Back to Devexpress

SeriesTemplate.SeriesColorizer Property

corelibraries-devexpress-dot-xtracharts-dot-seriestemplate-4400814e.md

latest3.5 KB
Original Source

SeriesTemplate.SeriesColorizer Property

Gets or sets the Series Colorizer that automatically paints series.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)]
public SeriesColorizerBase SeriesColorizer { get; set; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)>
Public Property SeriesColorizer As SeriesColorizerBase

Property Value

TypeDescription
SeriesColorizerBase

The Series Colorizer that automatically paints series.

|

Example

The following code demonstrates how to configure the colorizer and uses the properties below:

PropertyDescription
SeriesKeyColorColorizer.PaletteNameGets or sets the name of the palette whose colors the colorizer assigns to series.
SeriesKeyColorColorizer.KeysReturns the collection of keys that the colorizer uses to assign colors to series.
SeriesKeyColorColorizer.KeyProviderGets or sets the object that converts series data member values into series color keys.
csharp
SeriesKeyColorColorizer colorizer = new SeriesKeyColorColorizer() {
    // The colorizer uses the specified palette's colors.
    PaletteName = "Office2013",
    // The custom key provider that the colorizer uses 
    // to convert the series data member's value to another object.
    KeyProvider = new CustomKeyProvider()
};
// Keys that colorizer assigns to its palette's colors to create key-color pairs.
// The first key forms a pair with the first color, the second key with the second color, etc.
colorizer.Keys.AddRange(new object[]{"One", "Two", "Three"});
chartControl.SeriesTemplate.SeriesColorizer = colorizer;
vb
Dim colorizer As SeriesKeyColorColorizer = New SeriesKeyColorColorizer() With { _
    ' The colorizer uses the specified palette's colors.
    .PaletteName = "Office2013", _
    ' The custom key provider that the colorizer uses 
    ' to convert the series data member's value to another object.
    .KeyProvider = new CustomKeyProvider() _
}
' Keys that colorizer assigns to its palette's colors to create key-color pairs.
' The first key forms a pair with the first color, the second key with the second color, etc.
colorizer.Keys.AddRange(new object[]{"One", "Two", "Three"})
chartControl.SeriesTemplate.SeriesColorizer = colorizer

See Also

SeriesTemplate Class

SeriesTemplate Members

DevExpress.XtraCharts Namespace