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
close icon

Column chart with different colors

Hi

Is it possible to create a column chart where every column has its own color and each column is shown in the legend?

Regards Martin


3 Replies

SA Saravanan A Syncfusion Team May 10, 2011 11:42 AM UTC

Hi Martin,

Thanks for your interest in Syncfusion products.

In chart Silverlight we can change each segments color using the following code snippet.

Code Snippet: (c#)

Chart1.Areas[0].Series[0].Segments[0].Interior = new SolidColorBrush(Colors.Red);

But each segments of series cannot be shown in legend. Based on your requirement we have created simple sample and you can download the sample from below location.

Sample: http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Col_seg98756490.zip


Please let us know if you need any further clarifications.

Regards,
Saravanan




MV Martin Vogt May 10, 2011 03:36 PM UTC

Hi

Works. Thanks for your reply.

Would it also be possible through data binding?

E.g. I would add a property "Color" to the class "Sample":

public SolidColorBrush Color
{
get { return color; }
}



SS Sujitha S Syncfusion Team May 16, 2011 09:26 AM UTC

Hi Martin,

Thanks for your interest in Syncfusion products.

It is not possible to change the color of the segment using data binding.

Let me know, if you have any queries.

Regards,
Sujitha S



Loader.
Live Chat Icon For mobile
Up arrow icon