mirror of
https://github.com/apache/superset.git
synced 2026-05-12 11:25:56 +00:00
feat(dashboard): menu improvements, fallback support for Drill to Detail (#21351)
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { DataRecordValue, QueryObjectFilterClause } from '@superset-ui/core';
|
||||
import {
|
||||
DataRecordValue,
|
||||
BinaryQueryObjectFilterClause,
|
||||
} from '@superset-ui/core';
|
||||
import React, { useCallback } from 'react';
|
||||
import Echart from '../components/Echart';
|
||||
import { NULL_STRING } from '../constants';
|
||||
@@ -93,7 +96,7 @@ export default function EchartsTreemap({
|
||||
const { treePath } = extractTreePathInfo(eventParams.treePathInfo);
|
||||
if (treePath.length > 0) {
|
||||
const pointerEvent = eventParams.event.event;
|
||||
const filters: QueryObjectFilterClause[] = [];
|
||||
const filters: BinaryQueryObjectFilterClause[] = [];
|
||||
treePath.forEach((path, i) =>
|
||||
filters.push({
|
||||
col: groupby[i],
|
||||
@@ -102,7 +105,7 @@ export default function EchartsTreemap({
|
||||
formattedVal: path,
|
||||
}),
|
||||
);
|
||||
onContextMenu(filters, pointerEvent.clientX, pointerEvent.clientY);
|
||||
onContextMenu(pointerEvent.clientX, pointerEvent.clientY, filters);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -46,7 +46,7 @@ export default class EchartsTreemapChartPlugin extends ChartPlugin<
|
||||
controlPanel,
|
||||
loadChart: () => import('./EchartsTreemap'),
|
||||
metadata: new ChartMetadata({
|
||||
behaviors: [Behavior.INTERACTIVE_CHART],
|
||||
behaviors: [Behavior.INTERACTIVE_CHART, Behavior.DRILL_TO_DETAIL],
|
||||
category: t('Part of a Whole'),
|
||||
credits: ['https://echarts.apache.org'],
|
||||
description: t(
|
||||
|
||||
Reference in New Issue
Block a user