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

SfChart PieSeries color


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


3 Replies

HM Hemalatha Marikumar Syncfusion Team 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.

SS Seitron spa October 18, 2019 10:27 AM UTC


Ok thanks, I achieved the requirement.

Best regards,

HM Hemalatha Marikumar Syncfusion Team 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. 

Live Chat Icon For mobile
Up arrow icon