SeriesKeyColorColorizer.Keys Property
In This Article
Returns the collection of keys that the colorizer uses to assign colors to series.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
NuGet Package: DevExpress.Charts
#Declaration
public KeyCollection Keys { get; }
#Property Value
Type | Description |
---|---|
Key |
The collection of key objects that the colorizer uses to assign colors to series. |
#Remarks
When the colorizer starts painting series and its Keys collection is empty, the colorizer fills this collection using the unique series data member values.
#Example
The following code demonstrates how to configure the colorizer and uses the properties below:
Property | Description |
---|---|
Series |
Gets or sets the name of the palette whose colors the colorizer assigns to series. |
Series |
Returns the collection of keys that the colorizer uses to assign colors to series. |
Series |
Gets or sets the object that converts series data member values into series color keys. |
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;
See Also