mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Tweaks to word cloud controls (#7212)
This commit is contained in:
committed by
Beto Dealmeida
parent
5ef2712e16
commit
442cfc692a
@@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user