How to set the Color Palette for a Chart
4 Oct 2018 / 1 minute to read
ChartColorPalette.Color property can be used to specify the color palettes for the Chart.ColorPalette class. Apart from specifying predefined palettes, you can specify your own palette colors using the Custom style in the ChartColorPalette.
// Specify a custom color.
this.chartControl1.CustomPalette = new System.Drawing.Color[] {System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(203)))), ((int)(((byte)(216))))),System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(209)))), ((int)(((byte)(248))))),System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))))};
this.chartControl1.Palette = ChartColorPalette.Custom;
' Specify a custom color.
Me.chartControl1.CustomPalette = New System.Drawing.Color() {System.Drawing.Color.FromArgb((CInt(Fix((CByte(255))))), (CInt(Fix((CByte(203))))), (CInt(Fix((CByte(216)))))),System.Drawing.Color.FromArgb((CInt(Fix((CByte(222))))), (CInt(Fix((CByte(209))))), (CInt(Fix((CByte(248)))))), System.Drawing.Color.FromArgb((CInt(Fix((CByte(250))))), (CInt(Fix((CByte(155))))), (CInt(Fix((CByte(155))))))}
Me.chartControl1.Palette = ChartColorPalette.Custom
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page