Pie Chart to show Poll Results

Thread is closed for posting
2 posts, 0 answers
  1. David Hosey
    David Hosey avatar
    14 posts
    Member since:
    Jan 2008

    Posted 26 May 2009 Link to this post


    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%)

    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,

  2. Vladimir Milev
    Vladimir Milev avatar
    1061 posts

    Posted 28 May 2009 Link to this post

    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

    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.
Back to Top