diff --git a/superset/assets/src/explore/controlPanels/WordCloud.js b/superset/assets/src/explore/controlPanels/WordCloud.js index 7566a5a469b..35c396baae3 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 3314fd69c49..913d7fdc29a 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'),