Menu

Content in Navigator won't disappear even if the series has been removed from the Stock chart

Xi Guan
2012-09-17
2012-09-18
  • Xi  Guan

    Xi Guan - 2012-09-17

    Hi

    Based on my requirement, I need to remove the old series and add a new series in in the chart. Then I noticed the content inside navigator was the same one of the first series which had been removed.
    One example code could be like below.

    StockChart stockChart = new StockChart();
    stockChart.setType(Series.Type.SPLINE);
    stockChart.setMarginTop(70);
    stockChart.setChartTitleText("Test");
    final Series tickChartSeries = stockChart.createSeries()
                       .setName("Moles per Yard per Day")
                       .setPoints(new Number[][] {
                          {163, 45}, {203, 33}, {276, 50},                                                     {408, 13}, {547, 63}, {729, 48}
                       });
    
    Timer timer = new Timer() {
        public void run() {
            tickChartSeries.remove();
        }
    };
    timer.schedule(5000);
    


    Running this code, you will see the data in navigator is still there although the series has been removed.
    And I notice this problem happens when you disable one series by clicking button in legend also.

    Does anyone face this problem before? And do you have any idea how to fix it ?

    Thanks in advance and look forward to your reply

     

    Last edit: Xi Guan 2012-09-17
  • Jeff Myers

    Jeff Myers - 2012-09-18

    The series the navigator is associated with can be assigned using the navigator.baseSeries configuration option. If you want to directly manipulate the data used in the navigator, you can try changing the data in the navigator.series Neither of these options are directly exposed through the GWT Highcharts API right now, but I'm working on adding support for them.

    Hope this helps,
    - Jeff

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.