You must be logged in to post your query.
Home › Forums › StockChart Support › Range Select Buttons not highlighted if rangeChanging option used
I have a function that fires every time the range of the chart is changed using the range buttons. If I use this function, the selected range button is not highlighted…
Sample code can be found in below fiddle: https://jsfiddle.net/k93y6v70/1/
@avb,
We are looking into your query and will get back to you at the earliest.
—- Manoj Mohan Team CanvasJS
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.
You must be logged in to reply to this topic. Login/Register