diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 82c23fd591fdd..00a1a0e5d9b63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1188,7 +1188,6 @@ Note the `y_axis_format` is defined under various section for some charts. | `show_values` | _N/A_ | | | `slice_name` | _N/A_ | | | `spatial` | _N/A_ | | -| `stacked_style` | _N/A_ | | | `start_spatial` | _N/A_ | | | `stroke_color_picker` | _N/A_ | | | `stroke_width` | _N/A_ | | diff --git a/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx b/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx index 2725a9a975e00..b2bb700681bfc 100644 --- a/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx @@ -57,6 +57,23 @@ describe('controlUtils', () => { }, }, ], + [ + { + name: 'stacked_style', + config: { + type: 'SelectControl', + label: t('Stacked Style'), + renderTrigger: true, + choices: [ + ['stack', 'stack'], + ['stream', 'stream'], + ['expand', 'expand'], + ], + default: 'stack', + description: '', + }, + }, + ], ], }, ], @@ -148,10 +165,15 @@ describe('controlUtils', () => { }); it('removes missing/invalid choice', () => { - let control = getControlState('stacked_style', 'area', state, 'stack'); + let control = getControlState( + 'stacked_style', + 'test-chart', + state, + 'stack', + ); expect(control.value).toBe('stack'); - control = getControlState('stacked_style', 'area', state, 'FOO'); + control = getControlState('stacked_style', 'test-chart', state, 'FOO'); expect(control.value).toBe(null); }); diff --git a/superset-frontend/src/explore/controlPanels/Area.js b/superset-frontend/src/explore/controlPanels/Area.js index 1c01fa4825235..2eda633bfadf0 100644 --- a/superset-frontend/src/explore/controlPanels/Area.js +++ b/superset-frontend/src/explore/controlPanels/Area.js @@ -29,7 +29,24 @@ export default { expanded: true, controlSetRows: [ ['show_brush', 'show_legend'], - ['line_interpolation', 'stacked_style'], + [ + 'line_interpolation', + { + name: 'stacked_style', + config: { + type: 'SelectControl', + label: t('Stacked Style'), + renderTrigger: true, + choices: [ + ['stack', 'stack'], + ['stream', 'stream'], + ['expand', 'expand'], + ], + default: 'stack', + description: '', + }, + }, + ], ['color_scheme', 'label_colors'], ['rich_tooltip', 'show_controls'], ], diff --git a/superset-frontend/src/explore/controls.jsx b/superset-frontend/src/explore/controls.jsx index 3c2648247342c..b577716fe70cf 100644 --- a/superset-frontend/src/explore/controls.jsx +++ b/superset-frontend/src/explore/controls.jsx @@ -338,19 +338,6 @@ export const controls = { description: t('Choose a metric for right axis'), }, - stacked_style: { - type: 'SelectControl', - label: t('Stacked Style'), - renderTrigger: true, - choices: [ - ['stack', 'stack'], - ['stream', 'stream'], - ['expand', 'expand'], - ], - default: 'stack', - description: '', - }, - linear_color_scheme: { type: 'ColorSchemeControl', label: t('Linear Color Scheme'),