range: Number

Sets the range of a Button.

For example, if range is “1” and rangeType is “month”, then button range will be 1 month.


Default: Auto
Example: 1, 4, …

Note
  • This property is measured in the units specified by the rangeType property.

var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 rangeSelector: {
   .
   .
   buttons: [
     {
       .
       range: 1,
       .
     }
   ]
 },
 .
 . 
});
stockChart.render();
    



Try it Yourself by Editing the Code below.

  Also See:    



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