-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugin-chart-echarts): add aggregate total for the Pie/Donuct chart #19622
feat(plugin-chart-echarts): add aggregate total for the Pie/Donuct chart #19622
Conversation
@stephenLYZ There's a TS error that needs addressing, but otherwise this is looking great! |
Codecov Report
@@ Coverage Diff @@
## master #19622 +/- ##
==========================================
- Coverage 66.53% 66.48% -0.06%
==========================================
Files 1681 1681
Lines 64319 64389 +70
Branches 6564 6592 +28
==========================================
+ Hits 42793 42807 +14
- Misses 19853 19899 +46
- Partials 1673 1683 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There is an unrelated issue when I tested this. The colors of label disappeared when I applied negative metrics. @stephenLYZ |
type: 'text', | ||
...getTotalValuePadding({ chartPadding, donut, width, height }), | ||
style: { | ||
text: t(`Total: ${numberFormatter(totalValue)}`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late to the party, but translated strings need to be constant. This needs to be something like:
t('Total: %s', numberFormatter(totalValue))
SUMMARY
The data analyst would like to see the aggregate total to be displayed in a Pie/Donut chart. Similar to the Big Number chart. This will allow the viewer to see aggregate values as well as their breakdowns rather than having to calculate.
This PR adds:
show_total
control to decide whether to display the aggregate count.show_total
control checkedshow_total
control checkedBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
control panel
pie chart
donuct chart
with legend
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION