Get Series Color

5 posts, 0 answers
  1. John Morris
    John Morris avatar
    28 posts
    Member since:
    Aug 2009

    Posted 14 Jan 2010 Link to this post

    I have a Stacked Bar chart that, when clicked, will drill down to a doughnut chart.  The problem I'm having is getting the colors in the stacked bar over to the doughnut.  I can set the doughnut colors but cannot get the colors used in the original.  I'm using the default assigned colors for the Stacked Bar.

    Is there a property to determine the assigned colors in a Stacked Bar or do I need to set each explicitly?
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 19 Jan 2010 Link to this post

    Hello John,

    There is the following issue with Silverlight: having reference to a Style does not help obtaining the values for say Foreground or Fill, or any other property, since the Property objects (set to Setter.Property) are translated to native resources and there is no way of obtaining any useful information out of those.

    We are currently extending the styling mechanism of the RadChart to enable easy color customization, i.e. Styles will be built using data provided by the developer. That, however, will only allow you to provide custom colors, but not get them back since the fore-mentioned problem will still persist.

    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 25 Mar 2010 Link to this post

    Hi John,

    How whre you able to set the colours of your doughnut? Did you use a style for this ?
    I have a doughnut and when i click on a slice, my barchart draws some bars. I want my bars in the barchart to have the same colors as the slice of the doughnut i clicked on. So if you could tell me how you were able to set these colours, maybe I can use this to assign that colour to the bars...

    And if possible, can you add some code to explain?

    Kind regards,

    Gertjan
  4. John Morris
    John Morris avatar
    28 posts
    Member since:
    Aug 2009

    Posted 25 Mar 2010 Link to this post

    Hello Gertjan. I have not addressed this problem yet.  Since I cannot get colors from an existing chart, my plan is to have all possible series colors as as constants and assign each time.  I'm not looking forward to this but I don't see any other way.  
  5. Grtjn
    Grtjn avatar
    129 posts
    Member since:
    Feb 2010

    Posted 25 Mar 2010 Link to this post

    Ok,

    Thanks for your reply!

    Gertjan
Back to Top