Using Chart Themes

Themes in the Manco.Chart for .NET are the real building blocks of the chart layout. Using themes you or your users can create desirable view of the chart during a few seconds. Theme is an XML file that contains ready to use part of the chart layout. The root element of this document could be one of the following: <Charts> or <ComponentLayout> . It could contain any or all parts of the chart layout (see content of the files are located in the subfolders of the Art\Themes folder for theme’s examples). There is one additional attribute that manages theme element loading. This is “Manco.Chart.LoadMode”. You can insert this attribute to any node of theme. It can have following values:

  1. Overload - attributes with same names obtain value from the theme's element (default value).
  2. Override - all attributes and child nodes of the layout element will be removed. Theme's attributes and child nodes are copied into the layout element.
  3. OverrideAttributes - all attributes of the layout element will be removed. Theme's attributes are copied into the layout element.
  4. Delete - remove corresponding node from the layout element.

To load theme you could use one of the overloaded “LoadTheme” method of the chart control. It’s possible to load number of themes sequentially. With this ability themes become real building blocks of the chart layout. You can provide your users with themes they will use to decorate charts.

You can use "ChartLayout" control to edit and save themes.