diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ee77db23602e..8d43c7dca3d24 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1229,7 +1229,6 @@ Note the `y_axis_format` is defined under various section for some charts. | `timed_refresh_immune_slices` | _N/A_ | | | `toggle_polygons` | _N/A_ | | | `transpose_pivot` | _N/A_ | | -| `treemap_ratio` | _N/A_ | | | `url` | _N/A_ | | | `userid` | _N/A_ | | | `viewport` | _N/A_ | | diff --git a/superset-frontend/src/explore/controlPanels/Treemap.js b/superset-frontend/src/explore/controlPanels/Treemap.js index 8342ee55b5def..d4b0dcc9058ab 100644 --- a/superset-frontend/src/explore/controlPanels/Treemap.js +++ b/superset-frontend/src/explore/controlPanels/Treemap.js @@ -35,7 +35,19 @@ export default { expanded: true, controlSetRows: [ ['color_scheme', 'label_colors'], - ['treemap_ratio'], + [ + { + name: 'treemap_ratio', + config: { + type: 'TextControl', + label: t('Ratio'), + renderTrigger: true, + isFloat: true, + default: 0.5 * (1 + Math.sqrt(5)), // d3 default, golden ratio + description: t('Target aspect ratio for treemap tiles.'), + }, + }, + ], ['number_format'], ], }, diff --git a/superset-frontend/src/explore/controls.jsx b/superset-frontend/src/explore/controls.jsx index 6fcdbf9c74764..3a50fba1cd142 100644 --- a/superset-frontend/src/explore/controls.jsx +++ b/superset-frontend/src/explore/controls.jsx @@ -1046,15 +1046,6 @@ export const controls = { ]), }, - treemap_ratio: { - type: 'TextControl', - label: t('Ratio'), - renderTrigger: true, - isFloat: true, - default: 0.5 * (1 + Math.sqrt(5)), // d3 default, golden ratio - description: t('Target aspect ratio for treemap tiles.'), - }, - number_format: { type: 'SelectControl', freeForm: true,