Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating unique DirectedForce controls #9359

Merged
merged 4 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,6 @@ Note the `y_axis_format` is defined under various section for some charts.
| `bar_stacked` | _N/A_ | |
| `cache_timeout` | _N/A_ | |
| `canvas_image_rendering` | _N/A_ | |
| `charge` | _N/A_ | |
| `clustering_radius` | _N/A_ | |
| `code` | _N/A_ | |
| `collapsed_fieldsets` | _N/A_ | |
Expand Down
30 changes: 29 additions & 1 deletion superset-frontend/src/explore/controlPanels/DirectedForce.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/
import { t } from '@superset-ui/translation';
import { formatSelectOptions } from '../../modules/utils';

export default {
controlPanelSections: [
Expand All @@ -32,7 +33,34 @@ export default {
},
{
label: t('Options'),
controlSetRows: [['link_length'], ['charge']],
controlSetRows: [
['link_length'],
[
{
name: 'charge',
config: {
type: 'SelectControl',
renderTrigger: true,
freeForm: true,
label: t('Charge'),
default: '-500',
choices: formatSelectOptions([
'-50',
'-75',
'-100',
'-150',
'-200',
'-250',
'-500',
'-1000',
'-2500',
'-5000',
]),
description: t('Charge in the force layout'),
},
},
],
],
},
],
controlOverrides: {
Expand Down
21 changes: 0 additions & 21 deletions superset-frontend/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -914,27 +914,6 @@ export const controls = {
description: t('Link length in the force layout'),
},

charge: {
type: 'SelectControl',
renderTrigger: true,
freeForm: true,
label: t('Charge'),
default: '-500',
choices: formatSelectOptions([
'-50',
'-75',
'-100',
'-150',
'-200',
'-250',
'-500',
'-1000',
'-2500',
'-5000',
]),
description: t('Charge in the force layout'),
},

granularity_sqla: {
type: 'SelectControl',
label: TIME_FILTER_LABELS.granularity_sqla,
Expand Down