DoughnutSerie customization

3 posts, 0 answers
  1. Jean-Charles
    Jean-Charles avatar
    3 posts
    Member since:
    May 2014

    Posted 12 Mar 2015 Link to this post

    Hi,

    I have a DoughnutSerie inside a RadPieChart. I would like to bind the color of segments to some value in my model.
    I believe I shoud provide some style in DefaultSegmentStyle, but i cannot find what component to set (tried Path.Fill with no success).

    I cannot find any documentation (at least for Universal). Thanxs in advance for any help!
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    551 posts

    Posted 17 Mar 2015 Link to this post

    Hello Jean,

    Thank you for contacting us.

    You can not bind the color of the segments to a property of your model directly, but you can use the SegmentStyle or the SegmentStyleSelector properties of DoughnutSeries depending on whether you wish to apply a style on the whole series or on each data point (segment). The target type of the segment style is Path. I have attached a sample application that demonstrates how you can use the SegmentStyleSelector.

    Here is the documentation article for DoughnutSeries, and the style properties are inherited from its base class: PieSeries.

    I hope this helps.

    Regards,
    Rosy Topchiyska
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Jean-Charles
    Jean-Charles avatar
    3 posts
    Member since:
    May 2014

    Posted 17 Mar 2015 in reply to Rosy Topchiyska Link to this post

    Great!

    Your sample helped me a lot, everything is working perfectly now.

    Thanxs a lot
Back to Top