MindFusion.Charting Programmer's Guide

Chart.ChartBrushes Property

See Also
 





Specifies the brushes used to draw the charts.

Namespace: MindFusion.Charting
Assembly: MindFusion.Charting

 Syntax

C#  Copy Code

public BrushCollection ChartBrushes { get; set; }

Visual Basic  Copy Code

Public Property ChartBrushes As BrushCollection

 Property Value

A value of the .NET IList class filled with objects of type MindFusion.Drawing.BrushCollection class.

 Remarks

The property is used for drawing of any type of chart. If the MultiColored property is set to true, the brushes are taken from the ChartBrushes list one after the other till all graphics or chart parts are drawn. If the brushes needed are more than the brushes specified, the control cycles through them as many times as necessary. Thus, in a bar chart, which is multicoloured and has 9 bars, but only 5 brushes are specified, the bars from 1 to 5 are filled with the 5 brushes specified, the 6th bar - with the first brush and so on. When the chart is not multi-colored, just the first brush is used for filling of all chart graphics or chart parts.

The ChartBrushes property also sets the colors of the small squares that are drawn in legends before each legend text. If the ChartPens are specified and the ChartBrushes is an empty list, then the control fills the ChartBrushes with solid brushes, which are the same color and count as the ChartPens. If the ChartBrushes are specified and the ChartPens is an empty list, then the chart pens are filled with Pen-s which are equal in count and color to the ChartBrushes and have default width 1.

You can fill the ChartBrushes list with all sorts of brushes, which are derived from the MindFusion.Drawing.Brush class - HatchBrush, SolidBrush and so on.

Default value for the ChartBrushes property is an empty IList.

 See Also