angular-highcharts icon indicating copy to clipboard operation
angular-highcharts copied to clipboard

disable navigator and rangeSelector from stock chart using ref

Open yash27 opened this issue 6 years ago • 1 comments

I have a stock chart in my application which I have to disable after button click event.

this is my stock chart options

this.stock = new StockChart(<any>{
      colors: Global.colors,
      title: {
        text: ''
      },
      xAxis: {
        crosshair: true
      },
      yAxis: [
        {
          opposite: true,
          labels: {
            align: 'left',
            x: 5
          },
          height: '60%',
          lineWidth: 2,
          resize: {
            enabled: true
          },
        }, {
          labels: {
            align: 'right',
            x: -3
          },
          top: '65%',
          height: '35%',
          offset: 0,
          lineWidth: 2
        }],
      tooltip: {
        split: true,
        distance: 50,
        padding: 2,
      },
      credits: {
        enabled: false
      },
      legend: {
        enabled: false
      },
      plotOptions: {
        series: {
          marker: {
            enabled: false
          }
        },
      }
    });

I tried this but its not working.

onDisableRangeSelector(){
   this.stock.ref.options.rangeSelector.enabled=false;
}

onDisableNavigator(){
   this.stock.ref.options.navigator.enabled=false;
}

Is there any way to disable both using ref.

yash27 avatar Aug 27 '18 11:08 yash27

@cebor any suggestions?

yash27 avatar Sep 12 '18 10:09 yash27