Hello Adam,
This is currently a default behavior caused by rounding result value as we do not want to display percentage value with decimal places and here is the solution I've gone through with one of our customers in the past...
You can change this behavior in the following file:
~\CMSModules\Polls\Controls\PollView.ascx.cs.
As a result, numbers should be displayed with two decimal places (55.32%, 32.49% etc).
Please find the CreateGraph method and change the following code
ORIGINAL CODE:
else if (this.CountType == CountTypeEnum.Percentage)
{
// Percentage count
long percent = 0;
if (countSummary != 0)
{
percent = Math.BigMul(100, currentValue) / (long)countSummary;
}
pnlAnswer.Controls.Add(new LiteralControl(percent.ToString() + "%"));
}
NEW CODE:
else if (this.CountType == CountTypeEnum.Percentage)
{
// Percentage count
float percent = 0;
if (countSummary != 0)
{
percent = (float)Math.BigMul(100, currentValue) / (float)countSummary;
}
pnlAnswer.Controls.Add(new LiteralControl(percent.ToString("f2") + "%"));
}
Best Regards,
Martin Danko