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.

a color for each column

Thread ID:

Created:

Updated:

Platform:

Replies:

73804 May 20,2008 11:13 AM May 27,2008 01:34 PM ASP.NET Web Forms (Classic) 1
loading
Tags: Chart
Nizar Kriaa
Asked On May 20, 2008 11:13 AM

Hi,
Usng the webchartcontrol, i want to display each column with a different color but all columns belongs to to the same series.

Is this possible? If yes how to do this?

Cheers


Manohari [Syncfusion]
Replied On May 27, 2008 01:34 PM

Hi Nizar,

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.

Sample1.zip


2. Using PrepareStyle event:

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

http://websamples.syncfusion.com/docs/chart/ug/PrepareStyleEvent.html

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

Sample2.zip


Please let me know if you need any other information.

Thanks for your interest in Syncfusion products.

Regards,
Manohari.R


CONFIRMATION

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.

;