How to template the DataPoint on the Pie chart

3 posts, 0 answers
  1. Vinod Sardar
    Vinod Sardar avatar
    33 posts
    Member since:
    Nov 2009

    Posted 27 Jan 2010 Link to this post

    Hi,

    My requirement is to draw  a pie chart.
    but i want to modify the way label's are shown on the pie chart.

    Please find attached screenshot for the same.
    i have following Data:
    Name | Value
    A|100
    B|120
    C|190
    D|..
    E|..
    I am binding "Value" property to YValue of the Pie chart.and "Name" property to Legend Label. But My requirement to hide the Legend Label that I did and to display the Item content for example:   "A 30%"  , "B 40%",........, "E x%" etc. That I need to understand.please let me know how to achieve this.

    Please let me know how to template or modify the value of the data point.

    I tried combining the values of the both (Name and Value) property to third property say DummyProp.. but Pie chart doesn't allow string value to be set to YValue....


    Please let me know how can we implement suggested requirement.

    Thanks in advanced.
    Vinod sardar.

  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 29 Jan 2010 Link to this post

    Hello Vinod Sardar,

    I believe this help article will explain very well how to achieve what you want.

    Best wishes,
    Vladimir Milev
    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. Vinod Sardar
    Vinod Sardar avatar
    33 posts
    Member since:
    Nov 2009

    Posted 29 Jan 2010 Link to this post

    Thanks for your reply.
    Already resolved by setting following thing:

    seriesMapping.SeriesDefinition.ItemLabelFormat =

    "#LEGENDLABEL #%{p0}";


     

Back to Top