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

4 posts, 0 answers
  1. Vipul
    Vipul avatar
    2 posts
    Member since:
    Jul 2015

    Posted 09 Jul 2015 Link to this post

    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

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 14 Jul 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vipul
    Vipul avatar
    2 posts
    Member since:
    Jul 2015

    Posted 14 Jul 2015 in reply to Danail Vasilev Link to this post

    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

  5. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1490 posts

    Posted 17 Jul 2015 Link to this post

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