Menu

Deselecting/Hiding Series with GWT-Highcharts 1.4.0 and GXT 3.0

8020Rule
2012-06-12
2012-06-13
  • 8020Rule

    8020Rule - 2012-06-12

    Hi,

    I have a line chart with three series. I want to be able to on load have only one selected/showing. I have tried select(false) and selectToggle() but neither effected the display of the two series' on load. I have also tried hide(). It also did not effect the display of the series' on load. So what am I doing wrong? Thanks.

     
  • Shawn Quinn

    Shawn Quinn - 2012-06-13

    The ".show()" and ".hide()" methods are only intended to be used to dynamically change the visibility state of the series after the chart has been rendered (this is a side effect of the way the internal Highcharts JS API is setup.) If you want to add a series to the chart that will initially be hidden, you need to set the "visible" option to false on the plot options. E.g.:

    final Series series = chart.createSeries()
        .setPlotOptions(new SeriesPlotOptions()
            .setVisible(false)
        )
        .setName(seriesName);
    
     

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.