mirror of https://github.com/apache/superset.git
Migrating NVD3 Area's stacked_style config (#9454)
* Migrating NVD3 Area's stacked_style config * test mods * lint * nonsense change * undoing nonsense. Come on GitHub, WORK.
This commit is contained in:
parent
cd572334c9
commit
265a2feb29
|
@ -1174,7 +1174,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_ | |
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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'],
|
||||
],
|
||||
|
|
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue