Dear all,
I have a Pie chart which is shown as below :
When I add the percentage value of each section, it does not goes to 100 % but instead 98 ?
This occurs I guess du to some wrong rounding displayed by the chart.
Anyone manage to solve this ?
Thanks for your help
regards
This occurs I guess due to some wrong rounding displayed by the chart.
Yep, you guessed correctly. The percentage values are shown as integers, but are calculated using truncate, which means the sum of the percentage values almost never add up to 100%. IE. a value of "1.9xxxxxxx" is presented as 1% instead of 2% which would be a more correct value
Anyone manage to solve this ?
Nope. Google "jira pie chart percentage doesn't add up" to find the bug in JAC where the issue was first reported, decades ago.
That will lead you to the feature request to change that behaviour in the Charting module. The feature request is only 18 years old and still yet to be implemented, so there's hope yet ;)
Now, Google "Why don't pie chart percentages always add up to 100%?" to learn all about how not all numbers are equally divisible by other numbers, and the effect this has on displaying those resulting numbers as whole numbers, not very long decimals.
Hello @Sunny Ape
DO you know if a similar working gadget epress same data in % but which works ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You obviously didn't use Google and do the research I recommend, or you would have learned that what you are asking for is, in the purest sense, impossible! 100 cannot be divided by 14 to produce a non infinite number that can be re-multiplied by 14 to get back to 100.
The only possible way for any pie chart tool to achieve what you want, is to lie!! It has to use false numbers to "fill in the gap" somewhere or other.
Here is how it's done in products like Excel:
See, the percentage values for PASS and TODO (29%) are higher than for EXECUTING (28%), despite the fact that they are representing identical source values of 4. Also, the value of 29% is not exactly twice the value of 14% for EXECUTING, despite the fact that the value of 4 is exactly twice the value of 2.
Even if you increase the percentages to two decimal places, like this:
There's still a problem, since 14.29% is not exactly half of 28.57% and seven times 14.29% equals 100.03%; the chart is misrepresenting the true percentage for the EXECUTING value.
That's probably why Atlassian can't be bothered to 'fix' the problem.... as the solution always results in numerical data needing to be misrepresented using rounding or truncating, one way or the other.
This is basic mathematics @serge calderara .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @serge calderara,
Indeed, this looks like a defect in this Jira gadget. You could raise a ticket with Atlassian support for this.
There are better alternatives to this gadget as available apps (plugins) on Atlassian Marketplace.
If you want to try an app, our Great Gadgets app offers a Pivot Table & Pivot Chart gadget that lets you calculate and display percentages in various ways: as pivot table, heatmap table or charts of various types.
Danut.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Danut M _StonikByte_
Using the sample data provided by the OP's screen grab, can you please provide a screen grab of your product producing a four sector pie chart with percentages that sum up to exactly 100% and:
I look forward to seeing how your product solves the mathematical problem of equally dividing 100 by 14 to produce a number of only two decimal point significance that resolves the problem!
You could raise a ticket with Atlassian support for this
Don't bother. As I informed the OP, there is already bug reported and a corresponding request to change that behaviour was logged too... 18 years ago. The bug is JRASERVER-12497 and the change request is JCHART-160.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Sunny Ape ,
Just tested with the same values. This is what our gadget displays.
As you can see, the sum is 100%, but this is also because it rounds to 2 decimal places. Jira doesn't seem to use decimals... which causes big discrepancies.
I don't rule out the possibility of not having a 100% match in our gadget if we sum-up the values from the table manually, but in the worst case the total will be 99.99%, which is much better than Jira's 98%.
And our pivot pie chart is even more accurate because it uses 8 decimal places, so the error/deviation is 0.00000001%.
Danut
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. A very good insight into the degree of precision your app uses and the deviation that your app is willing to accept as being close enough to round up or down.
Using third party charts like yours are the only way to get a more acceptably accurate result. Let's be honest, Atlassian isn't really interested in fixing such tiny 'bugs' in the DC platform's charts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.