Pie chart problem

Hello everyone,

I am new to the forum and I am learning coding for a while with the platform but thats not the issue. A friend of mine has a problem with developing a pie chart.
Thera are two problems she has:

  1. Pie chart numbers don’t add to 100, as It should (it is 99%). Client asked not to show decimals.
  2. 0% in the pie chart is not acceptable for the client, where there are actual data (in the example is 1 item)

Any proposals without showing decimals and cover the above requirements?

Thank you in advance! :blush:

try rounding up? 

if you round up the 0% it fixes both issues

This is a pretty terrible experience. Beign answered with a screenshot of someone else is a bit jarring. Maybe propose to your friend to ask themselves directly help?

Honestly, I don’t, it’s your friend code. Figure out what something like excel does, and replicate it :person_shrugging:

There probably is an algorithm used for this. It’s probably a lot of tweaking.
That will probabbly have to have 33%, 34%, 33%

I am sorry about this. I didn’t mean to insult anyone obviously. I just wanted to help and I thought that something has to do with the developing part. I am sorry again and thank you for your time.

maybe, but to help with developing you need to show your code, otherwise it’s just shooting in the dark

Yes, I understand. I will say to my friend to ask directly .

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.