Formatting Charts

The previous section introduced the Theme that you can use to select the appearance of your charts quickly and easily. The Theme and Palette properties offer a long list of built-in options that were carefully developed to provide great results with little effort from developers.

In most applications, you will choose the combination of settings for the Theme and Palette properties that is closest to the feel you want for your application, then customize a few items if necessary. Items you may want to customize include:

1.   Axis titles: The axis titles are UIElement objects. You can customize them directly, and with complete flexibility. The chart samples used in the Simple Charts and Time-Series Chartstopics use the TextElement objects, but you could use many other elements, including panels such as Border and Grid objects. For more information on axis titles, see Axis Title.

2.   Axis: The chart samples used in the Simple Charts and Time-Series Chartstopics show how you can customize axis scale, annotation angle, and annotation format. All these are accessible through the Axis object exposed by the AxisX and AxisY properties. For more information on C1Chart’s axis, see Axes.

The C1Chart control has the usual Font properties that determine how annotations are displayed along both axes (FontFamily, FontSize, etc). If you need more control over the appearance of the annotations, the Axis object also exposes an AnnoTemplate property that can be used to customize annotations even further.

3.   Grid lines: Grid lines are controlled by the Axis properties. There are properties for the major and minor grid lines (MajorGridStrokeThickness, MajorGridStrokeThickness, MinorGridStrokeThickness, MinorGridStrokeThickness, and so on). For more information on grid lines, see Axis Grid Lines.

4.   Tick Marks: Tick marks are also controlled by the Axis properties. There are properties for the major and minor ticks (MajorTickStroke, MajorTickThickness, MinorTickStroke, MinorTickThickness, and so on). For more information on tick marks, see Axis Tick Marks.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.