use word cloud's built in control panel (#9770)
This commit is contained in:
parent
13c5b133a9
commit
8a49c69f38
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue