Skip to content
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

Migrating unique PivotTable controls #9386

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `collapsed_fieldsets` | _N/A_ | |
| `color_pn` | _N/A_ | |
| `column_collection` | _N/A_ | |
| `combine_metric` | _N/A_ | |
| `comparison type` | _N/A_ | |
| `contribution` | _N/A_ | |
| `country_fieldtype` | _N/A_ | |
Expand Down Expand Up @@ -1166,7 +1165,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `partition_threshold` | _N/A_ | |
| `period_ratio_type` | _N/A_ | |
| `perm` | _N/A_ | |
| `pivot_margins` | _N/A_ | |
| `point_radius` | _N/A_ | |
| `point_radius_fixed` | _N/A_ | |
| `point_radius_unit` | _N/A_ | |
Expand Down Expand Up @@ -1220,7 +1218,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `time_series_option` | _N/A_ | |
| `timed_refresh_immune_slices` | _N/A_ | |
| `toggle_polygons` | _N/A_ | |
| `transpose_pivot` | _N/A_ | |
| `url` | _N/A_ | |
| `userid` | _N/A_ | |
| `viewport` | _N/A_ | |
Expand Down
42 changes: 39 additions & 3 deletions superset-frontend/src/explore/controlPanels/PivotTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,45 @@ export default {
{
label: t('Pivot Options'),
controlSetRows: [
['pandas_aggfunc', 'pivot_margins'],
['number_format', 'combine_metric'],
['transpose_pivot'],
[
'pandas_aggfunc',
{
name: 'pivot_margins',
config: {
type: 'CheckboxControl',
label: t('Show totals'),
renderTrigger: false,
default: true,
description: t('Display total row/column'),
},
},
],
[
'number_format',
{
name: 'combine_metric',
config: {
type: 'CheckboxControl',
label: t('Combine Metrics'),
default: false,
description: t(
'Display metrics side by side within each column, as ' +
'opposed to each column being displayed side by side for each metric.',
),
},
},
],
[
{
name: 'transpose_pivot',
config: {
type: 'CheckboxControl',
label: t('Transpose Pivot'),
default: false,
description: t('Swap Groups and Columns'),
},
},
],
],
},
],
Expand Down
25 changes: 0 additions & 25 deletions superset-frontend/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,21 +442,6 @@ export const controls = {
description: null,
},

pivot_margins: {
type: 'CheckboxControl',
label: t('Show totals'),
renderTrigger: false,
default: true,
description: t('Display total row/column'),
},

transpose_pivot: {
type: 'CheckboxControl',
label: t('Transpose Pivot'),
default: false,
description: t('Swap Groups and Columns'),
},

show_markers: {
type: 'CheckboxControl',
label: t('Show Markers'),
Expand All @@ -481,16 +466,6 @@ export const controls = {
description: t('Sort bars by x labels.'),
},

combine_metric: {
type: 'CheckboxControl',
label: t('Combine Metrics'),
default: false,
description: t(
'Display metrics side by side within each column, as ' +
'opposed to each column being displayed side by side for each metric.',
),
},

show_controls: {
type: 'CheckboxControl',
label: t('Extra Controls'),
Expand Down