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

RadHtmlChart pie chart's label appearance value not adding to 100%

3 Answers 201 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Vipul
Top achievements
Rank 1
Vipul asked on 09 Jul 2015, 08:12 AM

Hi Telerik Team,
I'm working with Radhtmlchart, and the label appearance's total addition of all data fields is not 100%, its always less than 100% like 99.6 or 99.7 or 99.99, but not 100%. Could you please help us in this regard. We have used the following code to add up the items and display the value in terms of percentage.

<LabelsAppearance>
<ClientTemplate>
        #=kendo.format(\'{0:P2}\', percentage)#
</ClientTemplate>
</LabelsAppearance>

I've attached the file for better understanding of our issue. Please take a look at the image I've attached.

Thank you,
Vipul

3 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 14 Jul 2015, 06:12 AM
Hello Vipul,

This looks like an issue with the rounding. You can try, for example, to increase the number of the decimal places - {0:P10} in order to decrease the deviation. On a side note - where and how do you sum up this total? You can also try to hard code the total value to 100.

Regards,
Danail Vasilev
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Vipul
Top achievements
Rank 1
answered on 14 Jul 2015, 10:06 AM

Hi Daniel,

The issue can't be with the rounding, since the amount that we represent in the pie chart as the percentage is already rounded-off and brought to the page. I also tried the {0:P10}, although this adds up the total percentage to 100%, it would not be a proper way of representation.Also, I wanna know whether the RadHtmlChart can total the percentage to exact 100% or does it keeps changing everytime based on the Amount data that we fetch from the Stored Procedure.

 

I've attached the image as well, do have a look.

 

Thanks,

Vipul

0
Danail Vasilev
Telerik team
answered on 17 Jul 2015, 05:50 AM
Hi Vipul,

Since increasing the number of the decimal places makes the total sum fit in, then this is an issue with the rounding. That being said this is expected behavior.  Can you also tell us where and how do you sum up these numbers?

Regards,
Danail Vasilev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Chart (HTML5)
Asked by
Vipul
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Vipul
Top achievements
Rank 1
Share this question
or