Home forums StockChart Support Rate of Return and range change Reply To: Rate of Return and range change

#32741

Found a workaround to get this working

e.stockChart.options.rangeSelector.selectedRangeButtonIndex = e.index || 3
self.chart = new CanvasJS.StockChart(“graph-quotes”, e.stockChart.options);
self.chart.render();

After the JSFiddle was shown to work with 1y that gave me the idea that the range button isn’t being updated and stays stuck on 3m.. so i create a new chart, update the default button, then render… this seems to be working… but doesn’t answer why this wasn’t working before =(