ChartItem Background Color

6 posts, 1 answers
  1. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 30 Jun 2010 Link to this post

    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.
  2. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 02 Jul 2010 Link to this post

    Hi, I wrote this issue 2 days ago, I need a solution please to be able to continue my developmet.
    Best Regards.
  3. DevCraft banner
  4. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 02 Jul 2010 Link to this post

    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
  5. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 02 Jul 2010 Link to this post

    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.
  6. Answer
    Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 07 Jul 2010 Link to this post

    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
  7. Fábio Witt jagnow
    Fábio Witt jagnow avatar
    14 posts
    Member since:
    Mar 2010

    Posted 06 May 2011 Link to this post

    Great. Worked for me.
Back to Top
DevCraft banner