width: Number

Sets the width of each Range Button in pixels.


Default: Automatically calculated based on width of Range Selector.
Examples: 8, 10, 11 …

Note
  • We suggest not to set width/height property unless it is really required. When you don’t set width/height, CanvasJS automatically calculates the size of buttons. This helps you create responsive applications where the button size adapts to varying screen sizes.

var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 rangeSelector: {
   buttonStyle: {
     width: 10,
     .
     .
   }
 },
 .
 . 
});
stockChart.render();



Try it Yourself by Editing the Code below.




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