This is a migrated thread and some comments may be shown as answers.

Pie Chart Series Colours

1 Answer 149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
RAVINDRA
Top achievements
Rank 1
RAVINDRA asked on 06 Jul 2011, 08:26 AM
Hi

In my report i m displaying a Pie Chart. The colours for the Pie chart will also come for the data. Please let me know how do i set the colours of the pie chart in this case?

Example
i have a class with the following properties

StatusName (should be used as labels for legends)
Percentage(Value for pie chart)
Colour(colour for this statusname in the pie chart).


Please let me know whether the current system support this. Pls provide me a code example if possible.

Thanks
Ravindra

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 06 Jul 2011, 09:54 AM
Hello Ravindra,

You can accomplish this with the code available in How Do I Assign Individual Colors to Bars help article. If your chart is databound, you cannot control the series and items appearance i.e. they are auto generated. In such case you would have to manually create the series and items and assign colors during the creation process. Sample code is available in Data Binding Chart to a Generic List of Objects help article.

Kind regards,
Steve
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
RAVINDRA
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or