Home Forums StockChart Support Range Select Buttons not highlighted if rangeChanging option used Reply To: Range Select Buttons not highlighted if rangeChanging option used

#41682

[UPDATE]

We have just released StockChart v1.10.12 with this bug fix. Please refer to the release blog for more information. Do download the latest version from download page & let us know your feedback.


@avb
,

There seems to be an issue when navigator is disabled due to which selected range button is not highlighted after rendering the chart. You can workaround this issue by hiding the navigator using css and also setting selectedRangeButtonIndex in the rangeChanging event handler. Please take a look at this below code snippet.


<style>
#stockChartContainer .canvasjs-navigator-panel {
  display: none !important;
}
</style>

rangeChanged: function(e) {
.
.
if(e.source == "buttons") {
  stockChart.rangeSelector.set("selectedRangeButtonIndex", e.index, false);
}
.
.
}

Please take a look at this updated JSFiddle for complete working code.

—-
Manoj Mohan
Team CanvasJS