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.
Unfortunately, activation email could not send to your email. Please try again.

ChartColorPalette' Working

Thread ID:

Created:

Updated:

Platform:

Replies:

117567 Nov 10,2014 02:33 AM Nov 12,2014 04:06 AM Xamarin.Forms 3
loading
Tags: SfChart
Ankit
Asked On November 10, 2014 02:33 AM

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

Prabakaran R [Syncfusion]
Replied On November 10, 2014 07:12 AM

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

Ankit
Replied On November 11, 2014 05:16 AM

Thanks for the sample. It helped

Karthikeyan V [Syncfusion]
Replied On November 12, 2014 04:06 AM

Hi Ankit,


Thanks for the update.


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


Thanks,

Karthikeyan V


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;