Series.Palette Property

.NET Framework (current version)
 

Gets or sets the color palette of a Series object.

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

[BindableAttribute(true)]
public ChartColorPalette Palette { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.ChartColorPalette

An ChartColorPalette enumeration value that determines the palette for the data series.

A palette is used to automatically assign colors to data elements if the data points themselves do not have colors assigned to them and if the data Series object that the data points belong to also does not have an assigned color.

If no series or data point colors are explicitly specified, the colors used depend on the chart type and the Chart control palette or Series palette, if one is specified. See the table below for further details:

Chart Type

Series Palette Used?

Colors Displayed by Data Points

Any shape chart (for example, Pie and Doughnut charts)

No

First available colors used from Chart control palette. One color per data point.

All charts except shape charts

No

First available colors from Chart control palette. One color per data series.

Any shape chart (for example, Pie and Doughnut charts)

Yes

First available colors used from Series palette. One color per data point.

All charts except shape charts

Yes

First available colors used from Seriespalette. One color per data series.

This Palette property has precedence over the Palette property of the root Chart object, with respect to the display of data.

NOTE: If the Palette property for both the Chart and Series objects is set to None, and no color is assigned to the relevant data series/data points, the default palette "BrightPastel" or PaletteCustomColors is used.

.NET Framework
Available since 4.0
Return to top
Show: