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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.: