We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ChartColorPalette' Working

Hi,

Can you elaborate on the use of ChartColorPalette? I'm using the following code:

  chart.ColorModel.Palette = ChartColorPalette.Metro;

Changing the enum's value to Metro/None/Custom seems to have to effect on the Chart's rendering. How am I supposed to change the color of the series to colors of my choice? 

Any help is appreciated.
Thanks

3 Replies

PR Prabakaran R Syncfusion Team November 10, 2014 12:12 PM UTC

Hi Ankit,

 

Thank you for using Syncfusion products.

 

We would like to let you know that you can change the color of series by setting Palette property to Custom, also you have to give the list of colors to CustomBrushes property of ColorModel,

 

Code snippet [C#]

 

           //Set Palette as ChartColorPalette.Custom will apply colors for Series from CustomBrushes property
            series.ColorModel.Palette = ChartColorPalette.Custom;

            //Custom colors
            series.ColorModel.CustomBrushes = new List<Color> () {
                Color.Red,
                Color.Green,
                Color.Blue,
                Color.Pink,
                Color.Lime
            };

 

We have prepared the sample for your requirement, please find the sample in the following location.


Thanks,

Prabakaran

Attachment: ColorModelSample_b1e5404f.zip


AN Ankit November 11, 2014 10:16 AM UTC

Thanks for the sample. It helped


KV Karthikeyan V Syncfusion Team November 12, 2014 09:06 AM UTC

Hi Ankit,


Thanks for the update.


Please let us know if you require further assistance on this.


Thanks,

Karthikeyan V


Loader.
Live Chat Icon For mobile
Up arrow icon