diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Treemap/Stories.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Treemap/Stories.tsx index 1e960215ea05..8d9a504d7214 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Treemap/Stories.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Treemap/Stories.tsx @@ -24,8 +24,8 @@ export const Treemap = ({ width, height }) => { queriesData={[{ data }]} formData={{ colorScheme: 'supersetColors', - groupby: ['gender', 'name'], - metrics: ['count', 'MIN(num_boys)'], + groupby: ['genre'], + metrics: ['count'], showLabels: boolean('Show labels', true), showUpperLabels: boolean('Show upperLabels', true), labelType: select('Treemap label type', ['key', 'value', 'key_value'], 'key_value'), diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts index 3cf274470892..a9f2b009f7d1 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/transformProps.ts @@ -97,8 +97,7 @@ export default function transformProps(chartProps: EchartsTreemapChartProps): Ec dateFormat, showLabels, showUpperLabels, - nodeClick, - roam, + dashboardId, }: EchartsTreemapFormData = { ...DEFAULT_TREEMAP_FORM_DATA, ...formData, @@ -204,8 +203,8 @@ export default function transformProps(chartProps: EchartsTreemapChartProps): Ec animation: false, width: '100%', height: '100%', - nodeClick, - roam, + nodeClick: dashboardId ? undefined : 'zoomToNode', + roam: !dashboardId, breadcrumb: { show: false, emptyItemWidth: 25, diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/types.ts b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/types.ts index 70548b5d2aeb..5c13722fac7e 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/types.ts +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-echarts/src/Treemap/types.ts @@ -35,8 +35,7 @@ export type EchartsTreemapFormData = QueryFormData & { showUpperLabels: boolean; numberFormat: string; dateFormat: string; - nodeClick: undefined | 'zoomToNode' | 'link'; - roam: boolean | 'scale' | 'move'; + dashboardId?: number; }; export enum EchartsTreemapLabelType { @@ -58,8 +57,6 @@ export const DEFAULT_FORM_DATA: Partial = { showLabels: true, showUpperLabels: true, dateFormat: 'smart_date', - nodeClick: 'zoomToNode', - roam: true, }; interface TreePathInfo {