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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change color of PieChart in Xamarin.Android

Thread ID:





119801 Aug 3,2015 02:35 PM UTC Aug 12,2015 05:03 AM UTC Xamarin.Android 5
Tags: SfChart
Mislav Javor
Asked On August 3, 2015 02:35 PM UTC

I can't seem to find a way to change the color of my PieChart
This is what I have tried:

var colorsList = new List<Java.Lang.Integer>();
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#00B2B2")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#498FFF")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#61A037")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#B373B3")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#B373B3")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#D16A76")));
colorsList.Add(new Java.Lang.Integer(Color.ParseColor("#F5A523")));
_countriesChart.ColorModel.CustomColors = colorsList;

Yuvaraj Palanisamy [Syncfusion]
Replied On August 4, 2015 06:42 AM UTC

Hi Misla,

Thanks for using Syncfusion Products.

We can achieve your requirement by setting ColorPalette property of ColorModel as Custom as shown in the below code snippet.


_countriesChart.ColorModel.ColorPalette = ChartColorPalette.Custom;

Please let us know if you require further assistance on this, we will be happy to assist you.


Mislav Javor
Replied On August 9, 2015 07:16 PM UTC

I have tried that, but it doesn't help... 
I have tried putting it above the code, below the code... I copied and pasted it on dozen different locations.

Yuvaraj Palanisamy [Syncfusion]
Replied On August 10, 2015 04:54 AM UTC

Hi Mislav,

We have prepared a sample for your requirement to apply custom colors as you expected. Please refer the sample from the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/119801/ze/ChartSimpleSample-458809380

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


Mislav Javor
Replied On August 11, 2015 02:18 PM UTC

Hi, your example was helpful. 
I managed to fix everything. However it would be nice to have documentation for these sort of things...

Yuvaraj Palanisamy [Syncfusion]
Replied On August 12, 2015 05:03 AM UTC

Hi Mislav,

Thanks for the update.

We would like to let you know that, currently we are working on UG documentation and it will be published online as soon as possible.

Please let us know if you require further assistance on this we will be happy to assist you.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon