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.

change a single bar''s color in one series

Thread ID:





128568 May 25,2008 11:05 PM Jan 30,2017 10:48 PM Xamarin.iOS 3
Tags: SfChart
Administrator [Syncfusion]
Asked On May 25, 2008 11:05 PM

How can I change the bar color in one series?

for an example, one series got 10 points, and have 10 bars in the chart with green color. I would like to change one bar color to red color.

Manohari [Syncfusion]
Replied On May 26, 2008 01:31 PM

Hi BS,

It is possible to set different colors to the Columns in a series by two ways:

1. Using the Series.Styles[index]:

For example, if a Series contains 3 Columns/Bar, each column/Bar can be set different colors using Styles property of the series as follows.

Series.Styles[0].Interior = new BrushInfo(Color.Blue);
Series.Styles[1].Interior = new BrushInfo(Color.Green);
Series.Styles[2].Interior = new BrushInfo(Color.Red);

Please refer to following sample that illustrates the same.

Sample 1

2. Using PrepareStyle event:

Please refer to the following link for more information on this event.


I have attached a sample illustrating the same in the below link.

Sample 2

Please let me know if you need any other informtaion.

Thanks for your interest in Syncfusion products.


Mohan Prasath
Replied On January 27, 2017 04:20 AM


May I know if this can also be achieved in Xamarin.iOS?



Lakshmi Radha Krishnan [Syncfusion]
Replied On January 30, 2017 10:48 PM

Hi Customer, 
Thanks for contacting syncfusion support.

We have achieved your requirement by using SelectedDataPointColor property. Please downloaded the sample from the following location.

Sample : http://www.syncfusion.com/downloads/support/forum/128568/ze/BarChart11976996601
Another way to set color for the segments by using ColorModel property and we can able to set different colour for each segments.Please download the sample from the following location.

Sample :  http://www.syncfusion.com/downloads/support/forum/128568/ze/BarChart1_2-423569874 
Lakshmi R. 


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.