mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat(plugin-chart-pivot-table): support series limit (#17803)
* feat(plugin-chart-pivot-table): support series limit * Add a migration * Use non-legacy series limit controls * Add a todo comment * Bug fix
This commit is contained in:
committed by
GitHub
parent
19daf65b54
commit
2c3f39f3f2
@@ -30,7 +30,6 @@ import {
|
||||
sections,
|
||||
sharedControls,
|
||||
emitFilterControl,
|
||||
legacySortBy,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { MetricsLayoutEnum } from '../types';
|
||||
|
||||
@@ -90,15 +89,41 @@ const config: ControlPanelConfig = {
|
||||
],
|
||||
['adhoc_filters'],
|
||||
emitFilterControl,
|
||||
['series_limit'],
|
||||
[
|
||||
{
|
||||
name: 'row_limit',
|
||||
config: {
|
||||
...sharedControls.row_limit,
|
||||
label: t('Cell limit'),
|
||||
description: t('Limits the number of cells that get retrieved.'),
|
||||
},
|
||||
},
|
||||
],
|
||||
// TODO(kgabryje): add series_columns control after control panel is redesigned to avoid clutter
|
||||
[
|
||||
{
|
||||
name: 'series_limit_metric',
|
||||
config: {
|
||||
...sharedControls.series_limit_metric,
|
||||
description: t(
|
||||
'Metric used to define how the top series are sorted if a series or cell limit is present. ' +
|
||||
'If undefined reverts to the first metric (where appropriate).',
|
||||
),
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'order_desc',
|
||||
config: {
|
||||
type: 'CheckboxControl',
|
||||
label: t('Sort Descending'),
|
||||
default: true,
|
||||
description: t('Whether to sort descending or ascending'),
|
||||
},
|
||||
},
|
||||
],
|
||||
...legacySortBy,
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user