0
votes

I'm using charts with Extjs 4.1, I have a chart in a panel, I want to hide the series of the chart on user click. But the problem is that the chart is never refreshed, this is how I do it :

chart.series.getAt(0).hideAll(); //Hiding
    chart.series.removeAt(0); // removing from legend
    chart.redraw();
    chart.refresh();
    var pan = Ext.getCmp('chartregion');
    pan.setVisible(true);

How can I do this please?

1

1 Answers

0
votes

Try to remove the chart series by item.

var chartSeries = chart.series;

chartSeries.remove(chartSeries.get(0));
chart.redraw();