rangeType: String

Sets the type of button’s range.

rangeType is the unit of range property. If required interval is 6 months, you need to set the range as 6 and rangeType as “month”.

Default: “month”
Options: “number”, “millisecond”, “second”, “minute”, “hour”, “day”, “week”, “month”, “year”, “ytd”, “all”
var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 rangeSelector: {
   .
   .
   buttons: [
     {
       .
       rangeType: "month",
       .
     }
   ]
 },
 .
 . 
});
stockChart.render();

Try Editing The Code

  Also See:    


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