style: Object

style object lets you customize the style of Inputfields in StockChart.


var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 rangeSelector: {
   inputFields: {
     style: {
       backgroundColor: "#d8d8d8"
     }
   }
 },
 .
 .
});
stockChart.render();


Simple Style Attributes

Applies To Attribute Type Default Options/Examples Remarks
style backgroundColor String “white” “blue”, “#a0beec”, …
style borderColor String “#2196f3” “blue”, “#d3d1dc”, …
style borderColorOnFocus String “#008eff” “black”, “#eaeaea”, …
style borderThickness Number 2 3, 4, …
style fontColor String “#000000” “black”, “#d3d1dc”, …
style fontSize Number 12 1, 2, …
style fontStyle String “normal” “normal”, “italic” , “oblique”
style fontFamily String “Trebuchet MS, Helvetica, sans-serif” “Arial, Trebuchet MS, Tahoma, sans-serif”, …
style fontWeight String “normal” “lighter”, “normal”, “bold” , “bolder”
style width Number Automatically Calculated Based on the Range Selector’s width 90, 100, …
style maxWidth Number Automatically Calculated Based on the Range Selector’s width 750, 960, …
style padding Number 2 6, 10, …
style cursor String “text” “pointer”, “crosshair”

Below example shows how to customize the style of inputFields.


Try it Yourself by Editing the Code below.


  Also See:    



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