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

Pie Chart to show Poll Results

1 Answer 77 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
David Hosey
Top achievements
Rank 1
David Hosey asked on 26 May 2009, 01:41 PM
Hello,

I am looking for a way to show Both X and Y label for a Pie chart to display a poll results.
For example: on each slice of chart I would have a label as follow:
Excellent (15%)
Good (55%)
Not Bad (20%)
Poor(10%)

My datasource provider has a sql select command like this:
Select Vote, Count(Vote) from VoteResults Group by Vote Where PollID = 1
At the moment I can either get X or Y label to show at a time: Either (Excellent,Good,Not Bad,Poor)  or (15%,55%,20%,10%)

So what is the best way to do this. I set the default format value to #% instead of #Y, but is there a way to say #X (#%) or something like that.

Thanks for any help or tips in advance,
Mehdi


1 Answer, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 28 May 2009, 01:40 PM
Hi David Hosey,

You will need to use the Item_DataBound event to customize the display of your chart items. Here is an example which demonstrates how to use this event to achieve something similar: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/chartandtooltip/defaultcs.aspx?product=chart

Greetings,
Vladimir Milev
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Tags
Chart (Obsolete)
Asked by
David Hosey
Top achievements
Rank 1
Answers by
Vladimir Milev
Telerik team
Share this question
or