You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/11 06:10:20 UTC

[GitHub] [superset] villebro commented on a diff in pull request #19622: feat(plugin-chart-echarts): add aggregate total for the Pie/Donuct chart

villebro commented on code in PR #19622:
URL: https://github.com/apache/superset/pull/19622#discussion_r846974094


##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts:
##########
@@ -248,6 +311,18 @@ export default function transformProps(
       ...getLegendProps(legendType, legendOrientation, showLegend),
       data: keys,
     },
+    graphic: showTotal
+      ? {
+          type: 'text',
+          ...getTotalValuePadding({ chartPadding, donut, width, height }),
+          style: {
+            text: t(`Total: ${numberFormatter(totalValue)}`),

Review Comment:
   Late to the party, but translated strings need to be constant. This needs to be something like:
   ```js
   t('Total: %s', numberFormatter(totalValue))
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org