Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Add dataPointsVisible extension to eCharts (#81721)

Nick Fitzpatrick72ea70706483
diff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Custom_Y_Axis_Range_Off_Screen.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Custom_Y_Axis_Range_Off_Screen.png
new file mode 100644
index 00000000000..df3cb0d3e29
Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Custom_Y_Axis_Range_Off_Screen.png differ
diff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_ComboChart_Stacked_Normalized_Custom_Y_Axis_Range.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_ComboChart_Stacked_Normalized_Custom_Y_Axis_Range.png
new file mode 100644
index 00000000000..930fe44dadb
Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_ComboChart_Stacked_Normalized_Custom_Y_Axis_Range.png differ
diff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_ScatterPlot_Custom_Y_Axis_Range_Off_Screen.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_ScatterPlot_Custom_Y_Axis_Range_Off_Screen.png
new file mode 100644
index 00000000000..d038625ebff
Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_ScatterPlot_Custom_Y_Axis_Range_Off_Screen.png differ
diff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Custom_Y_Axis_Range_Off_Screen.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Custom_Y_Axis_Range_Off_Screen.png
new file mode 100644
index 00000000000..b9cf0b77499
Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Custom_Y_Axis_Range_Off_Screen.png differ
diff --git a/.loki/reference/chrome_laptop_viz_BarChart_Short_Bars_At_Baseline.png b/.loki/reference/chrome_laptop_viz_BarChart_Short_Bars_At_Baseline.png
new file mode 100644
index 00000000000..53afe877991
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_BarChart_Short_Bars_At_Baseline.png differ
diff --git a/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_All_Panels_Empty.png b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_All_Panels_Empty.png
new file mode 100644
index 00000000000..3e464542bb3
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_All_Panels_Empty.png differ
diff --git a/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_Combo_All_Panels_Empty.png b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_Combo_All_Panels_Empty.png
new file mode 100644
index 00000000000..6423eb36ece
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_Combo_All_Panels_Empty.png differ
diff --git a/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_First_Panel_Empty.png b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_First_Panel_Empty.png
new file mode 100644
index 00000000000..a6b934f1907
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_BarChart_Split_Panels_First_Panel_Empty.png differ
diff --git a/.loki/reference/chrome_laptop_viz_BoxPlot_All_Boxes_Off_Screen_With_Value_Labels.png b/.loki/reference/chrome_laptop_viz_BoxPlot_All_Boxes_Off_Screen_With_Value_Labels.png
new file mode 100644
index 00000000000..ec4c7210348
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_BoxPlot_All_Boxes_Off_Screen_With_Value_Labels.png differ
diff --git a/.loki/reference/chrome_laptop_viz_LineChart_Goal_Line_Inside_Range_With_Data_Off_Screen.png b/.loki/reference/chrome_laptop_viz_LineChart_Goal_Line_Inside_Range_With_Data_Off_Screen.png
new file mode 100644
index 00000000000..8f0d62c36d3
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_LineChart_Goal_Line_Inside_Range_With_Data_Off_Screen.png differ
diff --git a/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Above_Y_Axis_Max.png b/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Above_Y_Axis_Max.png
new file mode 100644
index 00000000000..6716becfcd0
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Above_Y_Axis_Max.png differ
diff --git a/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Below_Y_Axis_Max.png b/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Below_Y_Axis_Max.png
new file mode 100644
index 00000000000..4c4ad78ee5c
Binary files /dev/null and b/.loki/reference/chrome_laptop_viz_LineChart_Line_Just_Below_Y_Axis_Max.png differ
diff --git a/bun.lock b/bun.lock
index 0d1f72b6730..e0e56f6b2fc 100644
--- a/bun.lock
+++ b/bun.lock
@@ -364,7 +364,7 @@
"webpack-notifier": "1.15.0",
"webpack-stats-plugin": "^1.1.3",
"yaml-lint": "~1.6.0",
- "zrender": "^6.0.0",
+ "zrender": "6.1.0",
},
},
},
@@ -5353,7 +5353,7 @@
"zod-to-json-schema": ["[email protected]", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="],
- "zrender": ["[email protected]", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-41dFXEEXuJpNecuUQq6JlbybmnHaqqpGlbH1yxnA5V9MMP4SbohSVZsJIwz+zdjQXSSlR1Vc34EgH1zxyTDvhg=="],
+ "zrender": ["[email protected]", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ=="],
"zustand": ["[email protected]", "", { "dependencies": { "use-sync-external-store": "^1.2.2" } }, "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw=="],
@@ -5993,8 +5993,6 @@
"echarts/tslib": ["[email protected]", "", {}, "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="],
- "echarts/zrender": ["[email protected]", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ=="],
-
"elliptic/bn.js": ["[email protected]", "", {}, "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="],
"endent/dedent": ["[email protected]", "", {}, "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw="],
diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx
index 5a702813e18..9f00ca7f25d 100644
--- a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx
+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx
@@ -1,4 +1,5 @@
import type { StoryFn } from "@storybook/react";
+import { updateIn } from "icepick";
import {
measureTextHeight,
@@ -225,3 +226,21 @@ export const MultiSeriesTwoMetricsWithAxisSplitFormatting = {
renderingContext,
},
};
+
+export const CustomYAxisRangeOffScreen = {
+ render: Template,
+ args: {
+ // Unjustified type cast. FIXME
+ rawSeries: updateIn(
+ data.distributionShapes,
+ [0, "card", "visualization_settings"],
+ (val) => ({
+ ...val,
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 200,
+ "graph.y_axis.max": 300,
+ }),
+ ) as any,
+ renderingContext,
+ },
+};
diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx
index 16e1895640c..9db5bfd8072 100644
--- a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx
+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx
@@ -2,6 +2,7 @@ import { Group } from "@visx/group";
import { init } from "echarts/core";
import type { StaticChartProps } from "metabase/static-viz/components/StaticVisualization";
+import { readAllPointsOutOfRange } from "metabase/static-viz/lib/data-visibility";
import { sanitizeSvgForBatik } from "metabase/static-viz/lib/svg";
import {
getBoxPlotLayoutModel,
@@ -13,6 +14,7 @@ import {
} from "metabase/viz-core";
import Watermark from "../../watermark.svg?component";
+import { DataOutOfRangeOverlay } from "../DataOutOfRangeOverlay/DataOutOfRangeOverlay";
import { Legend } from "../Legend";
import { calculateLegendRows } from "../Legend/utils";
@@ -79,6 +81,7 @@ export function BoxPlotChart({
chart.setOption(option);
const chartSvg = sanitizeSvgForBatik(chart.renderToSVGString(), isStorybook);
+ const allPointsOutOfRange = readAllPointsOutOfRange(chart);
chart.dispose();
return (
@@ -98,6 +101,13 @@ export function BoxPlotChart({
opacity={0.2}
/>
)}
+ {allPointsOutOfRange && (
+ <DataOutOfRangeOverlay
+ width={width}
+ height={height}
+ renderingContext={renderingContext}
+ />
+ )}
</svg>
);
}
diff --git a/frontend/src/metabase/static-viz/components/ComboChart/ComboChart.tsx b/frontend/src/metabase/static-viz/components/ComboChart/ComboChart.tsx
index 0e1e383fdcb..fd45fd0b107 100644
--- a/frontend/src/metabase/static-viz/components/ComboChart/ComboChart.tsx
+++ b/frontend/src/metabase/static-viz/components/ComboChart/ComboChart.tsx
@@ -1,11 +1,10 @@
import { Group } from "@visx/group";
import { init } from "echarts/core";
-import { t } from "ttag";
import type { StaticChartProps } from "metabase/static-viz/components/StaticVisualization";
+import { readAllPointsOutOfRange } from "metabase/static-viz/lib/data-visibility";
import { sanitizeSvgForBatik } from "metabase/static-viz/lib/svg";
import { getChartHeight } from "metabase/static-viz/lib/utils";
-import { useAreAllDataPointsOutOfRange } from "metabase/visualizations/visualizations/CartesianChart/use-data-points-visible";
import {
getCartesianChartModel,
getCartesianChartOption,
@@ -15,6 +14,7 @@ import {
} from "metabase/viz-core";
import Watermark from "../../watermark.svg?component";
+import { DataOutOfRangeOverlay } from "../DataOutOfRangeOverlay/DataOutOfRangeOverlay";
import { Legend } from "../Legend";
import { calculateLegendRows } from "../Legend/utils";
@@ -22,11 +22,6 @@ const WIDTH = 540;
const HEIGHT = 360;
const LEGEND_PADDING = 8;
-const DATA_OUT_OF_RANGE_RECT = {
- height: 40,
- width: 210,
-};
-
registerEChartsModules();
export const ComboChart = ({
@@ -90,12 +85,11 @@ export const ComboChart = ({
chart.setOption(option);
const chartSvg = sanitizeSvgForBatik(chart.renderToSVGString(), isStorybook);
+
+ const allPointsOutOfRange = readAllPointsOutOfRange(chart);
+
chart.dispose();
- const allPointsOutOfRange = useAreAllDataPointsOutOfRange(
- chartModel,
- settings,
- );
const totalHeight = fitWithinBounds ? height : height + legendHeight;
return (
@@ -121,21 +115,11 @@ export const ComboChart = ({
/>
)}
{allPointsOutOfRange && (
- <g>
- <rect
- x={width / 2 - DATA_OUT_OF_RANGE_RECT.width / 2}
- y={totalHeight / 2 - DATA_OUT_OF_RANGE_RECT.height / 2}
- fill={renderingContext.getColor("background_page-primary")}
- stroke={renderingContext.getColor("border-neutral")}
- strokeWidth="1"
- width={DATA_OUT_OF_RANGE_RECT.width}
- height={DATA_OUT_OF_RANGE_RECT.height}
- rx="8"
- />
- <text x="50%" y={totalHeight / 2 + 4} textAnchor="middle">
- {t`Every data point is out of range`}
- </text>
- </g>
+ <DataOutOfRangeOverlay
+ width={width}
+ height={totalHeight}
+ renderingContext={renderingContext}
+ />
)}
</svg>
</>
diff --git a/frontend/src/metabase/static-viz/components/ComboChart/stories/ComboChart.stories.tsx b/frontend/src/metabase/static-viz/components/ComboChart/stories/ComboChart.stories.tsx
index 07f7ceb3c23..b81a8721af8 100644
--- a/frontend/src/metabase/static-viz/components/ComboChart/stories/ComboChart.stories.tsx
+++ b/frontend/src/metabase/static-viz/components/ComboChart/stories/ComboChart.stories.tsx
@@ -1081,6 +1081,24 @@ export const CombinedWithInvalidSettings = {
},
};
+export const StackedNormalizedCustomYAxisRange = {
+ render: Template,
+ args: {
+ // Unjustified type cast. FIXME
+ rawSeries: updateIn(
+ data.stackedChartCustomYAxisRange,
+ [0, "card", "visualization_settings"],
+ (val) => ({
+ ...val,
+ "stackable.stack_type": "normalized",
+ "graph.y_axis.min": 40,
+ "graph.y_axis.max": 60,
+ }),
+ ) as any,
+ renderingContext,
+ },
+};
+
export const StackedChartCustomYAxisRange = {
render: Template,
args: {
diff --git a/frontend/src/metabase/static-viz/components/DataOutOfRangeOverlay/DataOutOfRangeOverlay.tsx b/frontend/src/metabase/static-viz/components/DataOutOfRangeOverlay/DataOutOfRangeOverlay.tsx
new file mode 100644
index 00000000000..1b508b89148
--- /dev/null
+++ b/frontend/src/metabase/static-viz/components/DataOutOfRangeOverlay/DataOutOfRangeOverlay.tsx
@@ -0,0 +1,36 @@
+import { t } from "ttag";
+
+import type { RenderingContext } from "metabase/viz-core";
+
+const RECT = {
+ height: 40,
+ width: 210,
+};
+
+interface DataOutOfRangeOverlayProps {
+ width: number;
+ height: number;
+ renderingContext: RenderingContext;
+}
+
+export const DataOutOfRangeOverlay = ({
+ width,
+ height,
+ renderingContext,
+}: DataOutOfRangeOverlayProps) => (
+ <g>
+ <rect
+ x={width / 2 - RECT.width / 2}
+ y={height / 2 - RECT.height / 2}
+ fill={renderingContext.getColor("background_page-primary")}
+ stroke={renderingContext.getColor("border-neutral")}
+ strokeWidth="1"
+ width={RECT.width}
+ height={RECT.height}
+ rx="8"
+ />
+ <text x="50%" y={height / 2 + 4} textAnchor="middle">
+ {t`Every data point is out of range`}
+ </text>
+ </g>
+);
diff --git a/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.stories.tsx b/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.stories.tsx
index 6158bab09d0..698167ef5fc 100644
--- a/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.stories.tsx
+++ b/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.stories.tsx
@@ -1,4 +1,5 @@
import type { StoryFn } from "@storybook/react";
+import { updateIn } from "icepick";
import {
measureTextHeight,
@@ -219,3 +220,22 @@ export const Watermark = {
hasDevWatermark: true,
},
};
+
+export const CustomYAxisRangeOffScreen = {
+ render: Template,
+
+ args: {
+ // Unjustified type cast. FIXME
+ rawSeries: updateIn(
+ data.default,
+ [0, "card", "visualization_settings"],
+ (val) => ({
+ ...val,
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 100000,
+ "graph.y_axis.max": 200000,
+ }),
+ ) as any,
+ renderingContext,
+ },
+};
diff --git a/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.tsx b/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.tsx
index 2fe05eee633..00992f00c60 100644
--- a/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.tsx
+++ b/frontend/src/metabase/static-viz/components/ScatterPlot/ScatterPlot.tsx
@@ -2,6 +2,7 @@ import { Group } from "@visx/group";
import { init } from "echarts/core";
import type { StaticChartProps } from "metabase/static-viz/components/StaticVisualization";
+import { readAllPointsOutOfRange } from "metabase/static-viz/lib/data-visibility";
import { sanitizeSvgForBatik } from "metabase/static-viz/lib/svg";
import { getChartHeight } from "metabase/static-viz/lib/utils";
import {
@@ -13,6 +14,7 @@ import {
} from "metabase/viz-core";
import Watermark from "../../watermark.svg?component";
+import { DataOutOfRangeOverlay } from "../DataOutOfRangeOverlay/DataOutOfRangeOverlay";
import { Legend } from "../Legend";
import { calculateLegendRows } from "../Legend/utils";
@@ -80,14 +82,13 @@ export function ScatterPlot({
chart.setOption(option);
const chartSvg = sanitizeSvgForBatik(chart.renderToSVGString(), isStorybook);
+ const allPointsOutOfRange = readAllPointsOutOfRange(chart);
chart.dispose();
+ const totalHeight = fitWithinBounds ? height : height + legendHeight;
+
return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width={width}
- height={fitWithinBounds ? height : height + legendHeight}
- >
+ <svg xmlns="http://www.w3.org/2000/svg" width={width} height={totalHeight}>
<Legend items={legendLayoutItems} />
<Group top={legendHeight}>
<g dangerouslySetInnerHTML={{ __html: chartSvg }}></g>
@@ -103,6 +104,13 @@ export function ScatterPlot({
opacity={0.2}
/>
)}
+ {allPointsOutOfRange && (
+ <DataOutOfRangeOverlay
+ width={width}
+ height={totalHeight}
+ renderingContext={renderingContext}
+ />
+ )}
</svg>
);
}
diff --git a/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.stories.tsx b/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.stories.tsx
index 00db04e5274..fbe86d02806 100644
--- a/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.stories.tsx
+++ b/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.stories.tsx
@@ -468,3 +468,22 @@ export const WithGoalLine = {
renderingContext,
},
};
+
+export const CustomYAxisRangeOffScreen = {
+ render: Template,
+
+ args: {
+ // Unjustified type cast. FIXME
+ rawSeries: updateIn(
+ data.ordinalXScale,
+ [0, "card", "visualization_settings"],
+ (val) => ({
+ ...val,
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 30000,
+ "graph.y_axis.max": 40000,
+ }),
+ ) as any,
+ renderingContext,
+ },
+};
diff --git a/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.tsx b/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.tsx
index cd0ccdcfa45..fc7f5990b1a 100644
--- a/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.tsx
+++ b/frontend/src/metabase/static-viz/components/WaterfallChart/WaterfallChart.tsx
@@ -1,6 +1,7 @@
import { init } from "echarts/core";
import type { StaticChartProps } from "metabase/static-viz/components/StaticVisualization";
+import { readAllPointsOutOfRange } from "metabase/static-viz/lib/data-visibility";
import { sanitizeSvgForBatik } from "metabase/static-viz/lib/svg";
import {
getChartLayout,
@@ -10,6 +11,7 @@ import {
} from "metabase/viz-core";
import Watermark from "../../watermark.svg?component";
+import { DataOutOfRangeOverlay } from "../DataOutOfRangeOverlay/DataOutOfRangeOverlay";
registerEChartsModules();
@@ -54,6 +56,7 @@ export function WaterfallChart({
const chart = init(null, null, { renderer: "svg", ssr: true, width, height });
chart.setOption(option);
const chartSvg = sanitizeSvgForBatik(chart.renderToSVGString(), isStorybook);
+ const allPointsOutOfRange = readAllPointsOutOfRange(chart);
chart.dispose();
return (
@@ -70,6 +73,13 @@ export function WaterfallChart({
opacity={0.2}
/>
)}
+ {allPointsOutOfRange && (
+ <DataOutOfRangeOverlay
+ width={width}
+ height={height}
+ renderingContext={renderingContext}
+ />
+ )}
</svg>
);
}
diff --git a/frontend/src/metabase/static-viz/lib/data-visibility.ts b/frontend/src/metabase/static-viz/lib/data-visibility.ts
new file mode 100644
index 00000000000..d32b7423123
--- /dev/null
+++ b/frontend/src/metabase/static-viz/lib/data-visibility.ts
@@ -0,0 +1,23 @@
+import type { EChartsType } from "echarts/core";
+
+import {
+ DATA_VISIBILITY_ACTION,
+ DATA_VISIBILITY_EVENT,
+ isDataVisibilityResult,
+} from "metabase/viz-core";
+
+export const readAllPointsOutOfRange = (chart: EChartsType) => {
+ let allPointsOutOfRange = false;
+
+ const handleResult = (event: unknown) => {
+ if (isDataVisibilityResult(event)) {
+ allPointsOutOfRange = !event.anythingRendered;
+ }
+ };
+
+ chart.on(DATA_VISIBILITY_EVENT, handleResult);
+ chart.dispatchAction({ type: DATA_VISIBILITY_ACTION });
+ chart.off(DATA_VISIBILITY_EVENT, handleResult);
+
+ return allPointsOutOfRange;
+};
diff --git a/frontend/src/metabase/visualizations/components/DataPointsVisiblePopover/DataPointsVisiblePopover.tsx b/frontend/src/metabase/visualizations/components/DataPointsVisiblePopover/DataPointsVisiblePopover.tsx
index 288efb3fde7..f101a58ceaa 100644
--- a/frontend/src/metabase/visualizations/components/DataPointsVisiblePopover/DataPointsVisiblePopover.tsx
+++ b/frontend/src/metabase/visualizations/components/DataPointsVisiblePopover/DataPointsVisiblePopover.tsx
@@ -1,24 +1,63 @@
+import type { EChartsType } from "echarts/core";
+import { useEffect, useState } from "react";
import { t } from "ttag";
import { Card, Center, Text } from "metabase/ui";
-import { useAreAllDataPointsOutOfRange } from "metabase/visualizations/visualizations/CartesianChart/use-data-points-visible";
-import type { BaseCartesianChartModel } from "metabase/viz-core";
-import type { VisualizationSettings } from "metabase-types/api";
+import {
+ DATA_VISIBILITY_ACTION,
+ DATA_VISIBILITY_EVENT,
+ isDataVisibilityResult,
+} from "metabase/viz-core";
export interface DataPointsVisiblePopoverProps {
isDashboard: boolean;
isVisualizer: boolean;
- chartModel: BaseCartesianChartModel;
- settings: VisualizationSettings;
+ chartInstance: EChartsType | undefined;
}
+const useRenderedDataVisibility = (chartInstance: EChartsType | undefined) => {
+ const [anythingRendered, setAnythingRendered] = useState<boolean | null>(
+ null,
+ );
+
+ useEffect(() => {
+ if (!chartInstance) {
+ return;
+ }
+
+ const handleResult = (event: unknown) => {
+ if (isDataVisibilityResult(event)) {
+ setAnythingRendered(event.anythingRendered);
+ }
+ };
+
+ const requestResult = () => {
+ if (!chartInstance.isDisposed()) {
+ chartInstance.dispatchAction({ type: DATA_VISIBILITY_ACTION });
+ }
+ };
+
+ chartInstance.on(DATA_VISIBILITY_EVENT, handleResult);
+ chartInstance.on("rendered", requestResult);
+
+ requestResult();
+
+ return () => {
+ chartInstance.off(DATA_VISIBILITY_EVENT, handleResult);
+ chartInstance.off("rendered", requestResult);
+ };
+ }, [chartInstance]);
+
+ return anythingRendered;
+};
+
export const DataPointsVisiblePopover = ({
isDashboard,
isVisualizer,
- chartModel,
- settings,
+ chartInstance,
}: DataPointsVisiblePopoverProps) => {
- const allPointsHidden = useAreAllDataPointsOutOfRange(chartModel, settings);
+ const anythingRendered = useRenderedDataVisibility(chartInstance);
+ const allPointsHidden = anythingRendered === false;
if (!allPointsHidden || isVisualizer) {
return null;
diff --git a/frontend/src/metabase/visualizations/visualizations/BarChart/BarChart.stories.tsx b/frontend/src/metabase/visualizations/visualizations/BarChart/BarChart.stories.tsx
index a0b8c9c5a83..55f661d9914 100644
--- a/frontend/src/metabase/visualizations/visualizations/BarChart/BarChart.stories.tsx
+++ b/frontend/src/metabase/visualizations/visualizations/BarChart/BarChart.stories.tsx
@@ -1,14 +1,19 @@
import type { StoryFn } from "@storybook/react";
import { createMockSettingsState, createMockState } from "__support__/state";
-import { VisualizationWrapper } from "__support__/storybook";
+import {
+ IsomorphicVisualizationStory,
+ VisualizationWrapper,
+ createWaitForChartsDecorator,
+} from "__support__/storybook";
import { NumberColumn, StringColumn } from "__support__/visualizations";
import { Box } from "metabase/ui";
import Visualization from "metabase/visualizations/components/Visualization";
import { registerVisualization } from "metabase/viz-core";
-import type { Series } from "metabase-types/api";
+import type { RawSeries, Series } from "metabase-types/api";
import {
createMockCard,
+ createMockDatasetData,
createMockTokenFeatures,
} from "metabase-types/api/mocks";
@@ -75,3 +80,122 @@ export const Watermark = {
loki: { skip: true },
},
};
+
+const splitPanelsSeries = (min: number, max: number) =>
+ // Unjustified type cast. FIXME
+ [
+ {
+ card: createMockCard({
+ name: "Split panels",
+ display: "bar",
+ visualization_settings: {
+ "graph.dimensions": ["Month"],
+ "graph.metrics": ["Small", "Large"],
+ "graph.split_panels": true,
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": min,
+ "graph.y_axis.max": max,
+ },
+ }),
+ data: {
+ cols: [
+ StringColumn({ name: "Month" }),
+ NumberColumn({ name: "Small" }),
+ NumberColumn({ name: "Large" }),
+ ],
+ rows: [
+ ["Jan", 10, 100],
+ ["Feb", 12, 140],
+ ["Mar", 11, 180],
+ ],
+ },
+ },
+ ] as unknown as Series;
+
+const SplitPanelsTemplate: StoryFn<{ rawSeries: Series }> = (args) => (
+ <IsomorphicVisualizationStory {...args} />
+);
+
+export const SplitPanelsFirstPanelEmpty = {
+ render: SplitPanelsTemplate,
+ args: { rawSeries: splitPanelsSeries(120, 160) },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
+
+export const SplitPanelsAllPanelsEmpty = {
+ render: SplitPanelsTemplate,
+ args: { rawSeries: splitPanelsSeries(300, 400) },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
+
+const RawSeriesTemplate: StoryFn<{ rawSeries: RawSeries }> = (args) => (
+ <IsomorphicVisualizationStory {...args} />
+);
+
+const comboSplitPanelsSeries: RawSeries = [
+ {
+ card: createMockCard({
+ name: "Split panels combo",
+ display: "bar",
+ visualization_settings: {
+ "graph.dimensions": ["Month"],
+ "graph.metrics": ["Small", "Large"],
+ "graph.split_panels": true,
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 50,
+ "graph.y_axis.max": 60,
+ series_settings: { Large: { display: "line" } },
+ },
+ }),
+ data: createMockDatasetData({
+ cols: [
+ StringColumn({ name: "Month" }),
+ NumberColumn({ name: "Small" }),
+ NumberColumn({ name: "Large" }),
+ ],
+ rows: [
+ ["Jan", 1, 100],
+ ["Feb", 2, 140],
+ ["Mar", 1, 180],
+ ],
+ }),
+ },
+];
+
+// The line panel gets a transparent alignment bar that spans the panel.
+export const SplitPanelsComboAllPanelsEmpty = {
+ render: RawSeriesTemplate,
+ args: { rawSeries: comboSplitPanelsSeries },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
+
+const shortBarsSeries: RawSeries = [
+ {
+ card: createMockCard({
+ name: "Short bars",
+ display: "bar",
+ visualization_settings: {
+ "graph.dimensions": ["Month"],
+ "graph.metrics": ["Count"],
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 0,
+ "graph.y_axis.max": 1000,
+ },
+ }),
+ data: createMockDatasetData({
+ cols: [StringColumn({ name: "Month" }), NumberColumn({ name: "Count" })],
+ rows: [
+ ["Jan", 1],
+ ["Feb", 2],
+ ["Mar", 4],
+ ],
+ }),
+ },
+];
+
+// Bars under 2.5px tall are still painted, so no warning.
+export const ShortBarsAtBaseline = {
+ render: RawSeriesTemplate,
+ args: { rawSeries: shortBarsSeries },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.stories.tsx b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.stories.tsx
new file mode 100644
index 00000000000..6023563f2e8
--- /dev/null
+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.stories.tsx
@@ -0,0 +1,65 @@
+import type { StoryFn } from "@storybook/react";
+
+import {
+ IsomorphicVisualizationStory,
+ createWaitForChartsDecorator,
+} from "__support__/storybook";
+import { NumberColumn, StringColumn } from "__support__/visualizations";
+import { registerVisualization } from "metabase/viz-core";
+import type { RawSeries } from "metabase-types/api";
+import {
+ createMockCard,
+ createMockDatasetData,
+} from "metabase-types/api/mocks";
+
+import { BoxPlot } from "./BoxPlot";
+
+export default {
+ title: "viz/BoxPlot",
+ component: BoxPlot,
+};
+
+registerVisualization(BoxPlot);
+
+const Template: StoryFn<{ rawSeries: RawSeries }> = (args) => (
+ <IsomorphicVisualizationStory {...args} />
+);
+
+const boxesOffScreenSeries: RawSeries = [
+ {
+ card: createMockCard({
+ name: "Boxes off screen",
+ display: "boxplot",
+ visualization_settings: {
+ "graph.dimensions": ["Category"],
+ "graph.metrics": ["Value"],
+ "graph.show_values": true,
+ "boxplot.show_values_mode": "all",
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 40,
+ "graph.y_axis.max": 60,
+ },
+ }),
+ data: createMockDatasetData({
+ cols: [
+ StringColumn({ name: "Category" }),
+ NumberColumn({ name: "Value" }),
+ ],
+ rows: [
+ ["High", 100],
+ ["High", 105],
+ ["High", 110],
+ ["Low", 0],
+ ["Low", 5],
+ ["Low", 10],
+ ],
+ }),
+ },
+];
+
+// Value labels use transparent line series that cross the plot between boxes.
+export const AllBoxesOffScreenWithValueLabels = {
+ render: Template,
+ args: { rawSeries: boxesOffScreenSeries },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
index ac88bbbb681..7f2654a5381 100644
--- a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx
@@ -5,6 +5,7 @@ import { useSet } from "react-use";
import { isReducedMotionPreferred } from "metabase/utils/dom";
import { assignLazily } from "metabase/utils/merge-lazily";
import { ChartRenderingErrorBoundary } from "metabase/visualizations/components/ChartRenderingErrorBoundary";
+import { DataPointsVisiblePopover } from "metabase/visualizations/components/DataPointsVisiblePopover/DataPointsVisiblePopover";
import { ResponsiveEChartsRenderer } from "metabase/visualizations/components/EChartsRenderer";
import { LegendCaption } from "metabase/visualizations/components/legend/LegendCaption";
import { useBrowserRenderingContext } from "metabase/visualizations/hooks/use-browser-rendering-context";
@@ -39,6 +40,7 @@ function BoxPlotInner({
width,
height,
isDashboard,
+ isVisualizer,
isEditing,
isQueryBuilder,
isFullscreen,
@@ -58,6 +60,7 @@ function BoxPlotInner({
}: VisualizationProps) {
const containerRef = useRef<HTMLDivElement>(null);
const chartRef = useRef<EChartsType>();
+ const [chartInstance, setChartInstance] = useState<EChartsType>();
const [chartSize, setChartSize] = useState({ width: 0, height: 0 });
const [hiddenSeries, { toggle: toggleSeriesVisibility }] = useSet<string>();
@@ -175,8 +178,11 @@ function BoxPlotInner({
onChangeCardAndRun,
});
+ // The popover subscribes to the instance in an effect, and a ref mutation
+ // would not re-run it, so the instance is held in state as well.
const handleInit = useCallback((chart: EChartsType) => {
chartRef.current = chart;
+ setChartInstance(chart);
}, []);
const handleResize = useCallback((width: number, height: number) => {
@@ -228,7 +234,13 @@ function BoxPlotInner({
eventHandlers={hasValidOption ? eventHandlers : undefined}
onInit={handleInit}
onResize={handleResize}
- />
+ >
+ <DataPointsVisiblePopover
+ isDashboard={isDashboard}
+ isVisualizer={isVisualizer}
+ chartInstance={chartInstance}
+ />
+ </ResponsiveEChartsRenderer>
</CartesianChartLegendLayout>
</CartesianChartRoot>
);
diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx
index 3feadad441a..dfef608b149 100644
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx
+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx
@@ -256,8 +256,7 @@ function CartesianChartInner(props: VisualizationProps) {
<DataPointsVisiblePopover
isDashboard={isDashboard}
isVisualizer={isVisualizer}
- chartModel={chartModel}
- settings={settings}
+ chartInstance={chartInstance}
/>
<TimelineEventsBand
chartInstance={chartInstance}
diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-data-points-visible.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-data-points-visible.ts
deleted file mode 100644
index 6590cff7f18..00000000000
--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-data-points-visible.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import type {
- BaseCartesianChartModel,
- ComputedVisualizationSettings,
-} from "metabase/viz-core";
-
-export const useAreAllDataPointsOutOfRange = (
- chartModel: BaseCartesianChartModel,
- settings: ComputedVisualizationSettings,
-) => {
- if (settings["graph.y_axis.auto_range"]) {
- return false;
- }
-
- const { "graph.y_axis.min": yMin, "graph.y_axis.max": yMax } = settings;
-
- if (yMax === undefined || yMin === undefined) {
- return false;
- }
-
- const dataKeys = chartModel.seriesModels.map(
- (seriesModel) => seriesModel.dataKey,
- );
-
- return chartModel.dataset.every((data) =>
- dataKeys.every((key) => {
- // Unjustified type cast. FIXME
- const value = data[key] as number;
- return value === null || value < yMin || yMax < value;
- }),
- );
-};
diff --git a/frontend/src/metabase/visualizations/visualizations/LineChart/LineChart.stories.tsx b/frontend/src/metabase/visualizations/visualizations/LineChart/LineChart.stories.tsx
index 45e46f9eb2a..84429a7b330 100644
--- a/frontend/src/metabase/visualizations/visualizations/LineChart/LineChart.stories.tsx
+++ b/frontend/src/metabase/visualizations/visualizations/LineChart/LineChart.stories.tsx
@@ -1,17 +1,20 @@
-import type { StoryObj } from "@storybook/react";
+import type { StoryFn, StoryObj } from "@storybook/react";
import {
+ IsomorphicVisualizationStory,
SdkVisualizationWrapper,
VisualizationWrapper,
+ createWaitForChartsDecorator,
} from "__support__/storybook";
import { NumberColumn, StringColumn } from "__support__/visualizations";
import type { MetabaseTheme } from "metabase/embedding-sdk/theme";
import { Box } from "metabase/ui";
import Visualization from "metabase/visualizations/components/Visualization";
import { registerVisualization } from "metabase/viz-core";
-import type { Series } from "metabase-types/api";
+import type { RawSeries, Series } from "metabase-types/api";
import {
createMockCard,
+ createMockDatasetData,
createMockStructuredDatasetQuery,
} from "metabase-types/api/mocks";
@@ -82,3 +85,78 @@ export const EmbeddingHugeFont: StoryObj = {
loki: { skip: true },
},
};
+
+const yAxisMaxEdgeSeries = (lowestValue: number): RawSeries => [
+ {
+ card: createMockCard({
+ name: "Line near the y-axis max",
+ display: "line",
+ visualization_settings: {
+ "graph.dimensions": ["Month"],
+ "graph.metrics": ["Count"],
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 0,
+ "graph.y_axis.max": 100,
+ },
+ }),
+ data: createMockDatasetData({
+ cols: [StringColumn({ name: "Month" }), NumberColumn({ name: "Count" })],
+ rows: [
+ ["Jan", lowestValue],
+ ["Feb", 110],
+ ["Mar", 120],
+ ],
+ }),
+ },
+];
+
+const YAxisMaxEdgeTemplate: StoryFn<{ rawSeries: RawSeries }> = (args) => (
+ <IsomorphicVisualizationStory {...args} />
+);
+
+// About 1px above the max: within the line's 5px hit area, but under 0.5px of stroke reaches the plot.
+export const LineJustAboveYAxisMax = {
+ render: YAxisMaxEdgeTemplate,
+ args: { rawSeries: yAxisMaxEdgeSeries(100.28) },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
+
+export const LineJustBelowYAxisMax = {
+ render: YAxisMaxEdgeTemplate,
+ args: { rawSeries: yAxisMaxEdgeSeries(99.72) },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
+
+const goalLineDataOffScreenSeries: RawSeries = [
+ {
+ card: createMockCard({
+ name: "Goal line with data off screen",
+ display: "line",
+ visualization_settings: {
+ "graph.dimensions": ["Month"],
+ "graph.metrics": ["Count"],
+ "graph.y_axis.auto_range": false,
+ "graph.y_axis.min": 0,
+ "graph.y_axis.max": 100,
+ "graph.show_goal": true,
+ "graph.goal_value": 50,
+ "graph.goal_label": "Goal",
+ },
+ }),
+ data: createMockDatasetData({
+ cols: [StringColumn({ name: "Month" }), NumberColumn({ name: "Count" })],
+ rows: [
+ ["Jan", 110],
+ ["Feb", 120],
+ ["Mar", 130],
+ ],
+ }),
+ },
+];
+
+// The goal line is not data, so it must not hide the off-screen warning.
+export const GoalLineInsideRangeWithDataOffScreen = {
+ render: YAxisMaxEdgeTemplate,
+ args: { rawSeries: goalLineDataOffScreenSeries },
+ decorators: [createWaitForChartsDecorator({ count: 1 })],
+};
diff --git a/frontend/src/metabase/viz-core/echarts/data-visibility.ts b/frontend/src/metabase/viz-core/echarts/data-visibility.ts
new file mode 100644
index 00000000000..2ca253e5205
--- /dev/null
+++ b/frontend/src/metabase/viz-core/echarts/data-visibility.ts
@@ -0,0 +1,124 @@
+import { registerAction } from "echarts/core";
+// `instanceof` only matches ECharts' own zrender copy, so keep zrender pinned to ECharts' version.
+import Path from "zrender/lib/graphic/Path.js";
+
+import { GOAL_LINE_SERIES_ID } from "./cartesian/constants/dataset";
+
+export const DATA_VISIBILITY_ACTION = "metabaseCheckDataVisibility";
+export const DATA_VISIBILITY_EVENT = "metabaseDataVisibility";
+
+type DataVisibilityResult = {
+ anythingRendered: boolean;
+};
+
+// ECharts types event payloads as `unknown`, so listeners narrow with this.
+export const isDataVisibilityResult = (
+ value: unknown,
+): value is DataVisibilityResult =>
+ typeof value === "object" &&
+ value !== null &&
+ "anythingRendered" in value &&
+ typeof value.anythingRendered === "boolean";
+
+type ActionHandler = Parameters<typeof registerAction>[1];
+type ExtensionApi = Parameters<NonNullable<ActionHandler>>[2];
+type SeriesView = ReturnType<ExtensionApi["getViewOfSeriesModel"]>;
+
+type PlotArea = { x: number; y: number; width: number; height: number };
+
+// Area charts sill draw a line for a 0 value
+const EDGE_TOLERANCE = -0.5;
+
+// We want to ignore goal lines for this calculation
+const isGoalLineSeries = (seriesId: string) =>
+ seriesId === GOAL_LINE_SERIES_ID ||
+ seriesId.startsWith(`${GOAL_LINE_SERIES_ID}_`);
+
+const isTransparent = (path: Path) => path.style.opacity === 0;
+
+// zrender pads stroke-only paths out to a hit area that reaches well past the painted line.
+const getPaintedBounds = (path: Path) => {
+ const bounds = path.getBoundingRect().clone();
+
+ if (!path.hasStroke() || path.hasFill()) {
+ return bounds;
+ }
+
+ const lineWidth = path.style.lineWidth ?? 1;
+ const hitAreaInset =
+ (Math.max(lineWidth, path.strokeContainThreshold) - lineWidth) / 2;
+
+ bounds.x += hitAreaInset;
+ bounds.y += hitAreaInset;
+ bounds.width -= hitAreaInset * 2;
+ bounds.height -= hitAreaInset * 2;
+
+ return bounds;
+};
+
+const hasMarkInsidePlotArea = (view: SeriesView, plotArea: PlotArea) => {
+ let found = false;
+
+ view.group.traverse((element) => {
+ if (found) {
+ return true;
+ }
+
+ const path = element instanceof Path ? element : null;
+
+ // Groups aggregate their children's bounds, so we compare against children instead
+ if (element.isGroup || element.ignore || (path && isTransparent(path))) {
+ return;
+ }
+
+ const bounds = path
+ ? getPaintedBounds(path)
+ : element.getBoundingRect().clone();
+ if (element.transform) {
+ bounds.applyTransform(element.transform);
+ }
+
+ if (bounds.intersect(plotArea)) {
+ found = true;
+ }
+ });
+
+ return found;
+};
+
+export const DataVisibilityExtension = {
+ install: () => {
+ registerAction(
+ {
+ type: DATA_VISIBILITY_ACTION,
+ event: DATA_VISIBILITY_EVENT,
+ // Without this the dispatch would re-render, re-firing `rendered` and
+ // dispatching again forever.
+ update: "none",
+ },
+ (_payload, ecModel, api): DataVisibilityResult => {
+ let anythingRendered = false;
+
+ ecModel.eachSeries((seriesModel) => {
+ if (isGoalLineSeries(seriesModel.id)) {
+ return;
+ }
+
+ const plotArea =
+ seriesModel.coordinateSystem?.getArea?.(EDGE_TOLERANCE);
+
+ if (!plotArea) {
+ anythingRendered = true;
+ return;
+ }
+
+ const view = api.getViewOfSeriesModel(seriesModel);
+ anythingRendered =
+ anythingRendered || hasMarkInsidePlotArea(view, plotArea);
+ });
+
+ return { anythingRendered };
+ },
+ );
+ },
+};
diff --git a/frontend/src/metabase/viz-core/echarts/index.ts b/frontend/src/metabase/viz-core/echarts/index.ts
index 00bb494d446..e1e69a8c68d 100644
--- a/frontend/src/metabase/viz-core/echarts/index.ts
+++ b/frontend/src/metabase/viz-core/echarts/index.ts
@@ -22,6 +22,8 @@ import { use } from "echarts/core";
import { LabelLayout } from "echarts/features";
import { SVGRenderer } from "echarts/renderers";
+import { DataVisibilityExtension } from "./data-visibility";
+
export const registerEChartsModules = () => {
// eslint-disable-next-line react-hooks/rules-of-hooks
use([
@@ -44,5 +46,6 @@ export const registerEChartsModules = () => {
TreemapChart,
LabelLayout,
TooltipComponent,
+ DataVisibilityExtension,
]);
};
diff --git a/frontend/src/metabase/viz-core/index.ts b/frontend/src/metabase/viz-core/index.ts
index 54169219d72..cf6c6a8dd61 100644
--- a/frontend/src/metabase/viz-core/index.ts
+++ b/frontend/src/metabase/viz-core/index.ts
@@ -164,6 +164,11 @@ export {
TREEMAP_HOVER_OVERLAY_FILL,
} from "./echarts/graph/treemap/style";
export { registerEChartsModules } from "./echarts";
+export {
+ DATA_VISIBILITY_ACTION,
+ DATA_VISIBILITY_EVENT,
+ isDataVisibilityResult,
+} from "./echarts/data-visibility";
export { DIMENSIONS, OTHER_SLICE_KEY } from "./echarts/pie/constants";
export { getPieChartFormatters } from "./echarts/pie/format";
export type { PieChartFormatters } from "./echarts/pie/format";
diff --git a/package.json b/package.json
index c5fbcacbd58..815533abfa7 100644
--- a/package.json
+++ b/package.json
@@ -373,7 +373,7 @@
"webpack-notifier": "1.15.0",
"webpack-stats-plugin": "^1.1.3",
"yaml-lint": "~1.6.0",
- "zrender": "^6.0.0"
+ "zrender": "6.1.0"
},
"resolutions": {
"@codemirror/autocomplete": "^6.18.6",