chore: Rename Totals to Summary in table chart (#29360)
This commit is contained in:
parent
5ffa616d98
commit
213fd69b2b
|
|
@ -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.',
|
||||
|
|
|
|||
|
|
@ -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<D extends DataRecord = DataRecord>(
|
|||
/* 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<D extends DataRecord = DataRecord>(
|
|||
),
|
||||
Footer: totals ? (
|
||||
i === 0 ? (
|
||||
<th>{t('Totals')}</th>
|
||||
<th>
|
||||
<div
|
||||
css={css`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
& svg {
|
||||
margin-left: ${theme.gridUnit}px;
|
||||
color: ${theme.colors.grayscale.dark1} !important;
|
||||
}
|
||||
`}
|
||||
>
|
||||
{t('Summary')}
|
||||
<Tooltip
|
||||
overlay={t(
|
||||
'Show total aggregations of selected metrics. Note that row limit does not apply to the result.',
|
||||
)}
|
||||
>
|
||||
<InfoCircleOutlined />
|
||||
</Tooltip>
|
||||
</div>
|
||||
</th>
|
||||
) : (
|
||||
<td style={sharedStyle}>
|
||||
<strong>{formatColumnValue(column, totals[key])[1]}</strong>
|
||||
|
|
|
|||
|
|
@ -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.',
|
||||
|
|
|
|||
Loading…
Reference in New Issue