This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 265a2fe  Migrating NVD3 Area's stacked_style config (#9454)
265a2fe is described below

commit 265a2feb297804f2a9a380d90bceb67bff828ad7
Author: Evan Rusackas <[email protected]>
AuthorDate: Fri Apr 3 12:50:28 2020 -0700

    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.
---
 CONTRIBUTING.md                                    |  1 -
 .../spec/javascripts/explore/controlUtils_spec.jsx | 26 ++++++++++++++++++++--
 .../src/explore/controlPanels/Area.js              | 19 +++++++++++++++-
 superset-frontend/src/explore/controls.jsx         | 13 -----------
 4 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index dfaf22c..5accddb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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_ |       |
diff --git a/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx 
b/superset-frontend/spec/javascripts/explore/controlUtils_spec.jsx
index 2725a9a..b2bb700 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 1c01fa4..2eda633 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 9e49713..b616264 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'),

Reply via email to