Skip to content

Commit

Permalink
migrating controls 🎛 (#9386)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusackas authored Mar 26, 2020
1 parent 19da904 commit bf0fa84
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 31 deletions.
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 @@ -1217,7 +1215,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

0 comments on commit bf0fa84

Please sign in to comment.