MindFusion.Wpf Pack Programmer's Guide
Customization

Customizing the Chart

All texts in the chart can be customized through the FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikeout, and TextBrush properties of the Chart class. Some texts can be individually customized using specialized settings. The chart title can be set through the Title property and customized through the TitleFontName, TitleFontSize, TitleFontBold, TitleFontItalicTitleFontUnderline, TitleFontStrikeout, and TitleTextBrush properties. The background color of the chart can be set through the Fill property. The LineBrush, LineSize and LineStyle properties can be used to customize the outline.

The fill and outline of the plot area can be customized through the PlotFill, PlotBorderBrush, PlotBorderSize, and PlotBorderStyle properties. The grid lines can be styled through the GridLineBrush and GridLineSize properties. Note, the grid lines are only visible when the ShowMajorGridLines property of the respective AxisSettings is set to true.

Customizing the Axes

This discussion is only relevant for charts that have at least one axis. The charts that do not have axes (such as the Pie and Donut charts) are not affected by the following settings.

The axes of the chart are customized through the settings exposed by the XAxisSettings and YAxisSettings properties of the chart. For charts with label and value axes, the XAxisSettings always affects the label axis and the YAxisSettings affects the value axis. For example, for Bar Charts the XAxisSettings actually affects the y-axis, which is the label axis.

The axis labels are affected by the FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrikeout, and TextBrush properties of the Chart class. The axis title can be set through the Title property of the respective AxisSettings object and is also affected by the font and color properties of the chart. However, the title can be individually customized through the TitleFontName, TitleFontSize, TitleFontBold, TitleFontItalicTitleFontUnderline, TitleFontStrikeout, and TitleTextBrush properties of the AxisSettings. When these properties are null (Nothing in Visual Basic) the title will use the corresponding properties of the chart.

The major and minor ticks of an axis can be displayed through the ShowMajorTicks and ShowMinorTicks properties respectively. The ShowMinorTicks property is only relevant for value axes. To display the major grid lines associated with the axis, use the ShowMajorGridLines property.

The scaling and labels of the value axes are automatically calculated according to the displayed data. They can also be specified manually through the Minimum, Maximum, MajorUnit, and MinorUnit properties.

Customizing the Series

The elements associated with a series are colored automatically using different shadings of the colors in the DefaultColors property of the chart. To individually customize a series, use the Fill, LineBrush, LineSize, and LineStyle properties of the Series class.