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

SfChart PieSeries color

Thread ID:





148378 Oct 17,2019 08:01 AM UTC Oct 19,2019 05:17 AM UTC Xamarin.Forms 3
Tags: SfChart
Vito Feleppa
Asked On October 17, 2019 08:01 AM UTC


is possible to set the color of every item in a pie chart? If yes, how?


Hemalatha Marikumar [Syncfusion]
Replied On October 17, 2019 01:42 PM UTC

Hi Vito Feleppa,

Greetings from Syncfusion.

Yes, you can set color for every item in PieSeries. You can achieve this requirement by setting the CustomBrushes which is available in ChartSeries. Please refer below code snippet. 
Code Snippet[Xaml]: 
                <chart:ChartColorCollection x:Key="Colors"> 
                    <Color> Blue</Color> 
               <chart:PieSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"> 
                        <chart:ChartColorModel Palette="Custom" CustomBrushes="{StaticResource Colors}"/> 
Please refer below link to know more about the CustomBrushes. 
And we have prepared a sample based on your requirement and you can download the sample from the below link. 
Please let us know if need any further assistance. 
Hemalatha M.

Vito Feleppa
Replied On October 18, 2019 10:27 AM UTC


Ok thanks, I achieved the requirement.

Best regards,

Hemalatha Marikumar [Syncfusion]
Replied On October 19, 2019 05:17 AM UTC

Hi Vito Felepp, 
Thanks for your update. 
We glad to hear that given solution works. 
Please let us know if you have any other query. 
Hemalatha M. 


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon