theme: String

Sets the theme of the StockChart. Library comes with various predefined themes. You can easily switch between predefined themes by changing theme property.

Default: “light1”
Options: “light1”, “light2”, “dark1”, “dark2”
Note
  • Theme set in individual charts and navigator overrides the theme set in StockChart.
var stockChart = new CanvasJS.StockChart("container",
{
 .
 .
 theme: "dark1", // "light1", "light2", "dark2"
 .
 .
});
stockChart.render();

Try Editing The Code

  Also See:    


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