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


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);

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 =(