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

How to template the DataPoint on the Pie chart

2 Answers 92 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Vinod Sardar
Top achievements
Rank 1
Vinod Sardar asked on 27 Jan 2010, 10:24 AM
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 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 29 Jan 2010, 12:24 PM
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.
0
Vinod Sardar
Top achievements
Rank 1
answered on 29 Jan 2010, 12:28 PM
Thanks for your reply.
Already resolved by setting following thing:

seriesMapping.SeriesDefinition.ItemLabelFormat =

"#LEGENDLABEL #%{p0}";


 

Tags
Chart
Asked by
Vinod Sardar
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Vinod Sardar
Top achievements
Rank 1
Share this question
or