Don't show detailed doughnut tooltip if sum is > 99.9% #2398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR aim to accomplish?:
To decide whether some slice of the doughnut chart is hidden, we use
.chart._metasets[0].total
which outputs the percentage of "total shown percent". If it was>=100
we did not show the detailed doughnut tooltip.However, even if no slice is hidden
.chart._metasets[0].total
returns percentages between100.000000001
and99.9799999
, in the latter case the detailed tooltip is shown despite nothing is hidden.To compensate the rounding issue, this PR won't show the detailed tooltip if percentage is
> 99.9
.Before:
After:
By submitting this pull request, I confirm the following:
git rebase
)