superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [incubator-superset] branch master updated: Tweaks to word cloud controls (#7212)
Date Mon, 08 Apr 2019 22:31:28 GMT
This is an automated email from the ASF dual-hosted git repository.

beto 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 442cfc6  Tweaks to word cloud controls (#7212)
442cfc6 is described below

commit 442cfc692af51d06e90cebe14672efc31ca31140
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Mon Apr 8 15:31:21 2019 -0700

    Tweaks to word cloud controls (#7212)
---
 superset/assets/src/explore/controlPanels/WordCloud.js | 17 +++++++++++++++++
 superset/assets/src/explore/controls.jsx               |  9 +++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/superset/assets/src/explore/controlPanels/WordCloud.js b/superset/assets/src/explore/controlPanels/WordCloud.js
index 7566a5a..35c396b 100644
--- a/superset/assets/src/explore/controlPanels/WordCloud.js
+++ b/superset/assets/src/explore/controlPanels/WordCloud.js
@@ -17,6 +17,7 @@
  * under the License.
  */
 import { t } from '@superset-ui/translation';
+import { nonEmpty } from '../validators';
 
 export default {
   controlPanelSections: [
@@ -32,6 +33,7 @@ export default {
     },
     {
       label: t('Options'),
+      expanded: true,
       controlSetRows: [
         ['size_from', 'size_to'],
         ['rotation'],
@@ -39,4 +41,19 @@ export default {
       ],
     },
   ],
+  controlOverrides: {
+    series: {
+      validators: [nonEmpty],
+      clearable: false,
+    },
+    row_limit: {
+      default: 100,
+    },
+    size_from: {
+      default: 10,
+    },
+    size_to: {
+      default: 70,
+    },
+  },
 };
diff --git a/superset/assets/src/explore/controls.jsx b/superset/assets/src/explore/controls.jsx
index 3314fd6..913d7fd 100644
--- a/superset/assets/src/explore/controls.jsx
+++ b/superset/assets/src/explore/controls.jsx
@@ -1300,10 +1300,11 @@ export const controls = {
 
   rotation: {
     type: 'SelectControl',
-    label: t('Rotation'),
+    label: t('Word Rotation'),
     choices: formatSelectOptions(['random', 'flat', 'square']),
     renderTrigger: true,
-    default: 'flat',
+    default: 'square',
+    clearable: false,
     description: t('Rotation to apply to words in the cloud'),
   },
 
@@ -1385,7 +1386,7 @@ export const controls = {
   size_from: {
     type: 'TextControl',
     isInt: true,
-    label: t('Font Size From'),
+    label: t('Minimum Font Size'),
     renderTrigger: true,
     default: '20',
     description: t('Font size for the smallest value in the list'),
@@ -1394,7 +1395,7 @@ export const controls = {
   size_to: {
     type: 'TextControl',
     isInt: true,
-    label: t('Font Size To'),
+    label: t('Maximum Font Size'),
     renderTrigger: true,
     default: '150',
     description: t('Font size for the biggest value in the list'),


Mime
View raw message