Export (0) Print
Expand All

LegendItem.Color Property

Gets or sets the color of a legend item.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public Color Color { get; set; }

Property Value

Type: System.Drawing.Color
A T[:System.Drawing.Color] value. The default color is Empty.

This Color property is one several related properties that get or set the color of many chart elements; it can be set to any ARGB (alpha, red, green, blue) value.

If this property is set for both a data point and its series, the data point color will have precedence. The series color will only be used for data points that do not define their own color.

If a custom legend item uses a marker, this property will determine the marker color. However, if the MarkerColor property is set, its value then has precedence.

This property will be ignored if the Image property specifies an image to be used for the legend item symbol.


This property is applicable only to LegendCell objects with a LegendCellType of either SeriesSymbol or Image.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

© 2015 Microsoft