diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx index 67a55cff0..dd1516098 100644 --- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx +++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/metrics.tsx @@ -102,7 +102,7 @@ export const showTotalsControlSetItem: ControlSetItem = { name: 'show_totals', config: { type: 'CheckboxControl', - label: t('Show totals'), + label: t('Show summary'), default: false, description: t( 'Show total aggregations of selected metrics. Note that row limit does not apply to the result.', diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index e82d63d2f..37bdbed9d 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -52,16 +52,16 @@ import { tn, useTheme, } from '@superset-ui/core'; -import { Dropdown, Menu } from '@superset-ui/chart-controls'; +import { Dropdown, Menu, Tooltip } from '@superset-ui/chart-controls'; import { CheckOutlined, + InfoCircleOutlined, DownOutlined, MinusCircleOutlined, PlusCircleOutlined, TableOutlined, } from '@ant-design/icons'; - -import { isEmpty } from 'lodash'; +import { isEmpty, isNumber } from 'lodash'; import { ColorSchemeEnum, DataColumnMeta, @@ -891,7 +891,7 @@ export default function TableChart( /* The following classes are added to support custom CSS styling */ className={cx( 'cell-bar', - value && value < 0 ? 'negative' : 'positive', + isNumber(value) && value < 0 ? 'negative' : 'positive', )} css={cellBarStyles} role="presentation" @@ -965,7 +965,27 @@ export default function TableChart( ), Footer: totals ? ( i === 0 ? ( - {t('Totals')} + +
+ {t('Summary')} + + + +
+ ) : ( {formatColumnValue(column, totals[key])[1]} diff --git a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx index 1e541a443..91e2c5143 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx @@ -368,7 +368,7 @@ const config: ControlPanelConfig = { name: 'show_totals', config: { type: 'CheckboxControl', - label: t('Show totals'), + label: t('Show summary'), default: false, description: t( 'Show total aggregations of selected metrics. Note that row limit does not apply to the result.',