Class ChartColorModel
The ChartColorModel class serves as a repository for color information. Color information is used by the chart to render colored series. A group of colors is referred to as a palette of colors. You have the option of choosing from several predefined palettes or creating your own color palette. ChartColorPalette Palette CustomColors
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Chart
Assembly: Syncfusion.Chart.Base.dll
Syntax
public sealed class ChartColorModel
Fields
NumColorsInMetroPalette
Declaration
public const int NumColorsInMetroPalette = 10
Field Value
Type |
---|
System.Int32 |
NumColorsInPalette
The number of colors in the ChartColorModel's palette. If the number of series exceeds the number of colors in the palette (16 in the current version), colors will be repeated.
Declaration
public const int NumColorsInPalette = 17
Field Value
Type |
---|
System.Int32 |
Properties
AllowGradient
Gets or sets a value indicating whether [allow gradient].
Declaration
public bool AllowGradient { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
CustomColors
Gets or sets the table of custom colors to be used. Series will be colored with color data from this color table. Individual series color can still be overriden by specifying style attributes. Palette information is used only when no specific style information is available on the color to be used for the series. ChartColorModel Palette
Declaration
public Color[] CustomColors { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color[] | The custom colors. |
Palette
Gets or sets the color palette to be used. Series will be colored with color data from this palette (color table). Individual series color can still be overriden by specifying style attributes. Palette information is used only when no specific style information is available on the color to be used for the series. ChartColorModel CustomColors
Declaration
public ChartColorPalette Palette { get; set; }
Property Value
Type |
---|
ChartColorPalette |
Methods
CreatePaletteIcon(Size, ChartColorPalette, Int32)
Creates the palette icon.
Declaration
public Image CreatePaletteIcon(Size sz, ChartColorPalette palette, int colorCount)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Size | sz | The sz. |
ChartColorPalette | palette | The palette. |
System.Int32 | colorCount | The color count. |
Returns
Type |
---|
System.Drawing.Image |
Dispose()
Method to dispose Chart color model object
Declaration
public void Dispose()
GetColor(Int32)
Returns the color (from the palette) corresponding to the specified index value.
Declaration
public Color GetColor(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index value of the color to be returned. |
Returns
Type | Description |
---|---|
System.Drawing.Color | A System.Drawing.Color value that is used as the back color for the series. |
Events
Changed
An event that is triggered when palette is changed.
Declaration
public event EventHandler Changed
Event Type
Type |
---|
System.EventHandler |