mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00:00
fix(plugin-chart-echarts): disabling dragging treemap on the dashboard (#1109)
This commit is contained in:
committed by
Yongjie Zhao
parent
dab8a4be4b
commit
b6f2df9583
+2
-2
@@ -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'),
|
||||
|
||||
+3
-4
@@ -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,
|
||||
|
||||
+1
-4
@@ -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<EchartsTreemapFormData> = {
|
||||
showLabels: true,
|
||||
showUpperLabels: true,
|
||||
dateFormat: 'smart_date',
|
||||
nodeClick: 'zoomToNode',
|
||||
roam: true,
|
||||
};
|
||||
|
||||
interface TreePathInfo {
|
||||
|
||||
Reference in New Issue
Block a user