You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2020/05/08 01:29:05 UTC

[incubator-superset] branch master updated: use word cloud's built in control panel (#9770)

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 8a49c69  use word cloud's built in control panel (#9770)
8a49c69 is described below

commit 8a49c69f38770dc41848bb368722841ee4c6fe66
Author: David Aaron Suddjian <18...@users.noreply.github.com>
AuthorDate: Thu May 7 18:28:48 2020 -0700

    use word cloud's built in control panel (#9770)
---
 superset-frontend/package-lock.json                |  6 +-
 superset-frontend/package.json                     |  2 +-
 .../src/explore/controlPanels/WordCloud.js         | 93 ----------------------
 superset-frontend/src/setup/setupPlugins.ts        |  2 -
 4 files changed, 4 insertions(+), 99 deletions(-)

diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index ee0b820..b7064fe 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -6975,9 +6975,9 @@
       }
     },
     "@superset-ui/plugin-chart-word-cloud": {
-      "version": "0.13.5",
-      "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.13.5.tgz",
-      "integrity": "sha512-wsGPUDh5ZIh9RppbhyqnAZ8vmCVg+5X1uU+QbyxD7CwFaf/F8/XD3K2DMTpMo9QKtumilVG+u1exsOG2Dv7+KQ==",
+      "version": "0.13.9",
+      "resolved": "https://registry.npmjs.org/@superset-ui/plugin-chart-word-cloud/-/plugin-chart-word-cloud-0.13.9.tgz",
+      "integrity": "sha512-2tUfQgXtzDETI7Gw4wSBDs+FnlrOkaKF4cpVqX2G/IuCc+h8UxuMbLKIp4NAMgeJ8mDbeEL+lKgnl+RDobks9w==",
       "requires": {
         "@types/d3-cloud": "^1.2.1",
         "@types/d3-scale": "^2.0.2",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 08b998f..a718ac0 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -89,7 +89,7 @@
     "@superset-ui/legacy-preset-chart-deckgl": "^0.2.3",
     "@superset-ui/legacy-preset-chart-nvd3": "^0.13.5",
     "@superset-ui/number-format": "^0.13.3",
-    "@superset-ui/plugin-chart-word-cloud": "0.13.5",
+    "@superset-ui/plugin-chart-word-cloud": "^0.13.9",
     "@superset-ui/preset-chart-xy": "^0.13.5",
     "@superset-ui/query": "^0.13.6",
     "@superset-ui/style": "^0.13.3",
diff --git a/superset-frontend/src/explore/controlPanels/WordCloud.js b/superset-frontend/src/explore/controlPanels/WordCloud.js
deleted file mode 100644
index 0851064..0000000
--- a/superset-frontend/src/explore/controlPanels/WordCloud.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import { t } from '@superset-ui/translation';
-import { validateNonEmpty } from '@superset-ui/validator';
-
-export default {
-  controlPanelSections: [
-    {
-      label: t('Query'),
-      expanded: true,
-      controlSetRows: [
-        ['series'],
-        ['metric'],
-        ['adhoc_filters'],
-        ['row_limit', null],
-      ],
-    },
-    {
-      label: t('Options'),
-      expanded: true,
-      controlSetRows: [
-        [
-          {
-            name: 'size_from',
-            config: {
-              type: 'TextControl',
-              isInt: true,
-              label: t('Minimum Font Size'),
-              renderTrigger: true,
-              default: 10,
-              description: t('Font size for the smallest value in the list'),
-            },
-          },
-          {
-            name: 'size_to',
-            config: {
-              type: 'TextControl',
-              isInt: true,
-              label: t('Maximum Font Size'),
-              renderTrigger: true,
-              default: 70,
-              description: t('Font size for the biggest value in the list'),
-            },
-          },
-        ],
-        [
-          {
-            name: 'rotation',
-            config: {
-              type: 'SelectControl',
-              label: t('Word Rotation'),
-              choices: [
-                ['random', 'random'],
-                ['flat', 'flat'],
-                ['square', 'square'],
-              ],
-              renderTrigger: true,
-              default: 'square',
-              clearable: false,
-              description: t('Rotation to apply to words in the cloud'),
-            },
-          },
-        ],
-        ['color_scheme', 'label_colors'],
-      ],
-    },
-  ],
-  controlOverrides: {
-    series: {
-      validators: [validateNonEmpty],
-      clearable: false,
-    },
-    row_limit: {
-      default: 100,
-    },
-  },
-};
diff --git a/superset-frontend/src/setup/setupPlugins.ts b/superset-frontend/src/setup/setupPlugins.ts
index 5080b9a..ec0d2ba 100644
--- a/superset-frontend/src/setup/setupPlugins.ts
+++ b/superset-frontend/src/setup/setupPlugins.ts
@@ -63,7 +63,6 @@ import Table from '../explore/controlPanels/Table';
 import TimePivot from '../explore/controlPanels/TimePivot';
 import TimeTable from '../explore/controlPanels/TimeTable';
 import Treemap from '../explore/controlPanels/Treemap';
-import WordCloud from '../explore/controlPanels/WordCloud';
 import WorldMap from '../explore/controlPanels/WorldMap';
 
 export default function setupPlugins() {
@@ -105,7 +104,6 @@ export default function setupPlugins() {
     .registerValue('time_pivot', TimePivot)
     .registerValue('time_table', TimeTable)
     .registerValue('treemap', Treemap)
-    .registerValue('word_cloud', WordCloud)
     .registerValue('world_map', WorldMap)
     .registerValue('deck_arc', DeckArc)
     .registerValue('deck_geojson', DeckGeojson)