startValue: Number/Date/Timestamp

Sets the minimum / starting value of viewport of all the charts. startValue can be defined in numeric or dateTime values (in the form of Date object or timestamp).

Default: Auto Calculated based on data
Examples: new Date(2017, 06, 01), 20, 100, …

  • If startValue is not set, it’s automatically calculated based on data passed to the StockChart.
  • While setting startValue, it should be taken care that endValue should be greater than startValue.
  • startValue can be overridden by setting minimum property of Slider.

var stockChart = new CanvasJS.StockChart("container",
 rangeSelector: {
    inputFields: {
      startValue: new Date(2017, 06, 01),

Try it Yourself by Editing the Code below.

If you have any questions, please feel free to ask in our forums.Ask Question