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: “numeric”, “millisecond”, “second”, “minute”, “hour”, “day”, “week”, “month”, “year”, “ytd”, “all”

var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 rangeSelector: {
   .
   .
   buttons: [
     {
       .
       rangeType: "month",
       .
     }
   ]
 },
 .
 . 
});
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.