+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to show % of votes on a poll?

How to show % of votes on a poll?

4 posts, 1 answered
  1. Bruno Michels
    Bruno Michels avatar
    125 posts
    Registered:
    16 Apr 2010
    22 Sep 2010
    Link to this post
    I have a control that overrides the ResultsBox of the poll.

    I want to display the % of votes.

    How can I do that?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Sep 2010
    Link to this post
    Hi Bruno,

    By default ResultsBox has a property -PercentageFormat which is used for showing all results in percentage.
    The IAnswerItem object that represents the poll answer object and provides access to its members has a property Percentage that returns the vote percentage for the answer

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Bruno Michels
    Bruno Michels avatar
    125 posts
    Registered:
    16 Apr 2010
    22 Sep 2010
    Link to this post
    How can I write the percentage on the RadChart?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Sep 2010
    Link to this post
    Hi Bruno Michels,

    You have to use chart.Series[0].SetValues method. You can take a look Series Overview

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 1 answered