When I dynamically remove a data series from a stock chart, it breaks.
I can not reproduce the issue using pure JavaScript.
Below is a working example.
:::javapublicclassChartBugExampleimplementsIsWidget{privateStockChartstockChart=null;privatebooleanplotSeriesOne=true;publicChartBugExample(){stockChart=newStockChart();finalSeriesseriesOne=stockChart.createSeries();finalSeriesseriesTwo=stockChart.createSeries();stockChart.addSeries(seriesOne);stockChart.addSeries(seriesTwo);//Remove series one after 10 secondsnewTimer(){@Overridepublicvoidrun(){plotSeriesOne=false;stockChart.removeSeries(seriesOne);}}.schedule(10000);//Plot random values every secondnewTimer(){@Overridepublicvoidrun(){LongvalueXParam=Long.valueOf(newDate().getTime());DoublevalueYParam=Double.valueOf((Math.random()*100.0));if(plotSeriesOne){seriesOne.addPoint(valueXParam,valueYParam);}valueXParam=Long.valueOf(newDate().getTime());valueYParam=Double.valueOf((Math.random()*100.0));seriesTwo.addPoint(valueXParam,valueYParam);}}.scheduleRepeating(1000);}@OverridepublicWidgetasWidget(){returnstockChart;}}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very interesting. Thanks to your example code there I was able to duplicate the problem, and then traced the logic all the way down to native call to the HighStocks JS library. Everything on the GWT Highcharts side appears to be functioning correctly, so I'd suspect a Highstocks problem. But, you mentioned you weren't able to reproduce this issue in native JS code? If so, could you post a jsFiddle link (or just some sample code) that shows this working in pure Javascript? I can then try and better discern where the root issue might be.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
When I dynamically remove a data series from a stock chart, it breaks.
I can not reproduce the issue using pure JavaScript.
Below is a working example.
Very interesting. Thanks to your example code there I was able to duplicate the problem, and then traced the logic all the way down to native call to the HighStocks JS library. Everything on the GWT Highcharts side appears to be functioning correctly, so I'd suspect a Highstocks problem. But, you mentioned you weren't able to reproduce this issue in native JS code? If so, could you post a jsFiddle link (or just some sample code) that shows this working in pure Javascript? I can then try and better discern where the root issue might be.
Hey Shawn,
Here is a jsfiddle example http://jsfiddle.net/5RutC/112/
Thanks.