feat: Adds drill to detail context menu for ECharts visualizations (#20891)

* feat: Adds drill to detail context menu for ECharts visualizations

* Rebases and adds time grain

* Fixes selected gauge values

* Fixes Treemap edge click

* Adds right click to big number trendline

* Address some comments
This commit is contained in:
Michael S. Molina
2022-08-09 17:02:31 -03:00
committed by GitHub
parent 0042ade66f
commit 3df8335f87
38 changed files with 734 additions and 249 deletions

View File

@@ -62,8 +62,16 @@ const formatPercentChange = getNumberFormatter(
export default function transformProps(
chartProps: BigNumberWithTrendlineChartProps,
) {
const { width, height, queriesData, formData, rawFormData, theme } =
chartProps;
const {
width,
height,
queriesData,
formData,
rawFormData,
theme,
hooks,
inContextMenu,
} = chartProps;
const {
colorPicker,
compareLag: compareLag_,
@@ -221,7 +229,7 @@ export default function transformProps(
},
tooltip: {
appendToBody: true,
show: true,
show: !inContextMenu,
trigger: 'axis',
confine: true,
formatter: renderTooltipFactory(formatTime, headerFormatter),
@@ -234,6 +242,9 @@ export default function transformProps(
},
}
: {};
const { onContextMenu } = hooks;
return {
width,
height,
@@ -242,6 +253,7 @@ export default function transformProps(
className,
headerFormatter,
formatTime,
formData,
headerFontSize,
subheaderFontSize,
mainColor,
@@ -252,5 +264,7 @@ export default function transformProps(
timestamp,
trendLineData,
echartOptions,
onContextMenu,
xValueFormatter: formatTime,
};
}