Home Forums Chart Support Keep range when hide data. Reply To: Keep range when hide data.

#19405

@intijk,

1. the re-render logic does not keep the range of the chart, it changes every time, which looks bad when toggle series on/off

This is an intended behavior, the axes range depends on the x and y-values of dataSeries shown. When a dataSeries is hidden, the range of the axes changes based on the x and y-values of the dataSeries visible.

2. When all data series removed, re-render will even refuse to render the coordinate system.

As there are no dataSeries to be shown the axes won’t be associated with any dataSeries hence there won’t be any range.

Still, setting the minimum and maximum for the axes will work fine in your case. Please take a look at this jsfiddle.

___________
Indranil Deo,
Team CanvasJS