2 of 3
Solved, the initial value has to be in range of the length of the data.; deleted 408 characters in body; edited title
sckull
  • 33
  • 1
  • 5

How to change the initial value Chart.js-RangeSlider? [Solved]

The Chart.js-RangeSlider doesnt starts at the initial value given (1901, 1910) and shows the chart:

What i'm searching is changin the initial value, and get the image below:


[..snip..]

rsLluviaHistorica = new RangeSliderChart({
  chartData: iniDataLluviaHistorica,
  chartOpts: optionsLluviaHistorica,
  chartType: 'line',
  chartCTX: iniLluviaHistorica,
  //class: 'my-chart-ranger',
  initial: [1901, 1910]        
})

//this doesnt work
rsLluviaHistorica.options.initial = [1901, 1910]

The code: https://jsfiddle.net/sckull/hy0p75cq/14/

sckull
  • 33
  • 1
  • 5