theme: String

Sets the theme of the Chart. Various predefined themes are bundled along with the library. User can easily switch these themes by changing theme property to the below mentioned options.


Default: “theme1”
Options: “theme1″,”theme2”, “theme3”

Notes
  • Properties set anywhere in chart options will override the values set by theme.
  • Currently there are three themes bundled with the library. There will be more themes coming up in future versions.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 theme: "theme2", //"theme1"
 .
 . 
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 9

  1. Love your lib, you guys did a great job. But please add this 3 lines of code and let us add our own themes. The best chart lib is kind of useless if it’s not visual adaptable to the rest of the website.

    • Hello,

      Thanks for your suggestion. We are implementing custom themes in our next version which you can expect within a week. For now you can consider using custom colorSet.

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.