How to access y - data in stack column after one of the legend is pressed/removed?

StackOverflow https://stackoverflow.com/questions/22086167

  •  18-10-2022
  •  | 
  •  

Pergunta

I just want to know how I can access the y data in highcharts stackedColumn? In the chart structure, it is chart->yAxis-> series->processedYData;

I tried to access it by this.chart.yAxis.series[0].processedYData but it returns an error. The reason is that, I compute the total per stack separately. That's why when it is removed, I need to access the new y values.

Also, I do this because the stacklabel total cannot be positioned just below the x-axis gridline, But if there's a way to make the stack total appear not inside the chart but outside of it, then that will be better.

Foi útil?

Solução

You need to set ignoreHiddenSeries: false to prevent that behavior, see: http://jsfiddle.net/JT3Zw/

Anyway, you are getting series, because you didn't set yAxis index here:

this.chart.yAxis[0].series[0].processedYData; // yAxis -> yAxis[0]
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top