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

ChartItem Background Color

5 Answers 69 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Chris Thierry
Top achievements
Rank 1
Chris Thierry asked on 30 Jun 2010, 04:26 PM
Hi, I have a Pie chart, when I click in one item, I need to get the background color for this item and fill another Bar Chart using this color as background. Could you please tell me how to get this color?

I'm trying to use DataSeries.Definition.Appearance.Fill the get the background color, but the value is always null, by the way, I'm using the colors that Telerik shows by defaut.

Thank you.

5 Answers, 1 is accepted

Sort by
0
Chris Thierry
Top achievements
Rank 1
answered on 02 Jul 2010, 04:37 PM
Hi, I wrote this issue 2 days ago, I need a solution please to be able to continue my developmet.
Best Regards.
0
Dwight
Telerik team
answered on 02 Jul 2010, 04:49 PM
Hi Chris,

Currently, there is no way to retrieve the color of the chart items through code since the chart actually builds the style per each series item, sometimes using more than one color.

What I can suggest is extract the colors from the XAML of the RadChart and use them directly. To determine which color to use, just find the index of the DataPoint associated with the clicked chart item (modulo the number of colors).

If you have further questions, please, open a support ticket since their response time is 24 hours, while the forums are answered in 72-hours.

Greetings,
Joshua
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris Thierry
Top achievements
Rank 1
answered on 02 Jul 2010, 04:57 PM
Thank you for answer, do you have an example of how to do it?, I'm not coding into the xaml file, I'm just using the default palette of the chart.

I saw for AJAX Controls that is possible to separate of the graph the selected clicked item, can I do that with RadControls for Silverlight, in that case, I donĀ“t need to change the backgroup color of the selected item.

Thank you.
0
Accepted
Giuseppe
Telerik team
answered on 07 Jul 2010, 01:10 PM
Hi Chris,

We have attached a sample application to get you started.

As for your second question -- exploding functionality for Pie / Doughnut chart will be added for the Q2 2010 release that is scheduled around mid-July.

Hope this helps.


Sincerely yours,
Freddie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Fábio Witt jagnow
Top achievements
Rank 2
answered on 06 May 2011, 08:14 PM
Great. Worked for me.
Tags
Chart
Asked by
Chris Thierry
Top achievements
Rank 1
Answers by
Chris Thierry
Top achievements
Rank 1
Dwight
Telerik team
Giuseppe
Telerik team
Fábio Witt jagnow
Top achievements
Rank 2
Share this question
or