@neo4j-ndl/react-charts 2.1.22 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/LICENSES.txt +0 -295
- package/lib/NOTICE.txt +1383 -1392
- package/lib/{esm/charts/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.js} +13 -5
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js +46 -0
- package/lib/{esm/charts/tests/ChartWrapperWithTooltipFormatter.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js} +12 -13
- package/lib/{esm/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js} +13 -2
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.js +35 -0
- package/lib/{esm/charts/utils/chart-types.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.js} +10 -2
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.js +37 -0
- package/lib/cjs/_virtual/_rolldown/runtime.js +44 -0
- package/lib/cjs/charts/Chart.js +121 -111
- package/lib/cjs/charts/Chart.js.map +1 -1
- package/lib/cjs/charts/ChartContainer.js +67 -62
- package/lib/cjs/charts/ChartContainer.js.map +1 -1
- package/lib/cjs/charts/ChartEmpty.js +45 -30
- package/lib/cjs/charts/ChartEmpty.js.map +1 -1
- package/lib/cjs/charts/ChartRender.js +112 -87
- package/lib/cjs/charts/ChartRender.js.map +1 -1
- package/lib/cjs/charts/ChartTooltip.js +111 -65
- package/lib/cjs/charts/ChartTooltip.js.map +1 -1
- package/lib/cjs/charts/Legend.js +81 -69
- package/lib/cjs/charts/Legend.js.map +1 -1
- package/lib/cjs/charts/LegendItem.js +83 -62
- package/lib/cjs/charts/LegendItem.js.map +1 -1
- package/lib/cjs/charts/LegendLayout.js +330 -348
- package/lib/cjs/charts/LegendLayout.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-instance.js +115 -122
- package/lib/cjs/charts/hooks/use-chart-instance.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-option.js +79 -80
- package/lib/cjs/charts/hooks/use-chart-option.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-refs.js +47 -44
- package/lib/cjs/charts/hooks/use-chart-refs.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-zoom.js +102 -127
- package/lib/cjs/charts/hooks/use-chart-zoom.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-interactions.js +127 -132
- package/lib/cjs/charts/hooks/use-legend-interactions.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-series.js +143 -174
- package/lib/cjs/charts/hooks/use-legend-series.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-visibility.js +66 -85
- package/lib/cjs/charts/hooks/use-legend-visibility.js.map +1 -1
- package/lib/cjs/charts/index.js +31 -40
- package/lib/cjs/charts/index.js.map +1 -1
- package/lib/cjs/charts/themes/ndl-echarts-theme.js +136 -168
- package/lib/cjs/charts/themes/ndl-echarts-theme.js.map +1 -1
- package/lib/cjs/charts/utils/aria-description.js +150 -214
- package/lib/cjs/charts/utils/aria-description.js.map +1 -1
- package/lib/cjs/charts/utils/build-chart-option.js +166 -174
- package/lib/cjs/charts/utils/build-chart-option.js.map +1 -1
- package/lib/cjs/charts/utils/chart-tooltip-formatter.js +156 -172
- package/lib/cjs/charts/utils/chart-tooltip-formatter.js.map +1 -1
- package/lib/cjs/charts/utils/chart-types.js +25 -20
- package/lib/cjs/charts/utils/chart-types.js.map +1 -1
- package/lib/cjs/charts/utils/defaults.js +69 -67
- package/lib/cjs/charts/utils/defaults.js.map +1 -1
- package/lib/cjs/charts/utils/format-utils.js +55 -66
- package/lib/cjs/charts/utils/format-utils.js.map +1 -1
- package/lib/cjs/charts/utils/legend-layout.js +54 -53
- package/lib/cjs/charts/utils/legend-layout.js.map +1 -1
- package/lib/cjs/charts/utils/legend-utils.js +82 -121
- package/lib/cjs/charts/utils/legend-utils.js.map +1 -1
- package/lib/cjs/charts/utils/scatter-tooltip-points.js +191 -266
- package/lib/cjs/charts/utils/scatter-tooltip-points.js.map +1 -1
- package/lib/cjs/charts/utils/threshold.js +89 -102
- package/lib/cjs/charts/utils/threshold.js.map +1 -1
- package/lib/cjs/charts/utils/user-option-utils.js +419 -347
- package/lib/cjs/charts/utils/user-option-utils.js.map +1 -1
- package/lib/cjs/index.js +31 -35
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.mjs +11 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs +24 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs +12 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.mjs +11 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.mjs +13 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.mjs +8 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.mjs +10 -0
- package/lib/esm/charts/Chart.mjs +123 -0
- package/lib/esm/charts/Chart.mjs.map +1 -0
- package/lib/esm/charts/ChartContainer.mjs +71 -0
- package/lib/esm/charts/ChartContainer.mjs.map +1 -0
- package/lib/esm/charts/ChartEmpty.mjs +46 -0
- package/lib/esm/charts/ChartEmpty.mjs.map +1 -0
- package/lib/esm/charts/ChartRender.mjs +113 -0
- package/lib/esm/charts/ChartRender.mjs.map +1 -0
- package/lib/esm/charts/ChartTooltip.mjs +109 -0
- package/lib/esm/charts/ChartTooltip.mjs.map +1 -0
- package/lib/esm/charts/Legend.mjs +82 -0
- package/lib/esm/charts/Legend.mjs.map +1 -0
- package/lib/esm/charts/LegendItem.mjs +82 -0
- package/lib/esm/charts/LegendItem.mjs.map +1 -0
- package/lib/esm/charts/LegendLayout.mjs +337 -0
- package/lib/esm/charts/LegendLayout.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-instance.mjs +119 -0
- package/lib/esm/charts/hooks/use-chart-instance.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-option.mjs +79 -0
- package/lib/esm/charts/hooks/use-chart-option.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-refs.mjs +49 -0
- package/lib/esm/charts/hooks/use-chart-refs.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-zoom.mjs +102 -0
- package/lib/esm/charts/hooks/use-chart-zoom.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-interactions.mjs +138 -0
- package/lib/esm/charts/hooks/use-legend-interactions.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-series.mjs +151 -0
- package/lib/esm/charts/hooks/use-legend-series.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-visibility.mjs +67 -0
- package/lib/esm/charts/hooks/use-legend-visibility.mjs.map +1 -0
- package/lib/esm/charts/index.mjs +27 -0
- package/lib/esm/charts/index.mjs.map +1 -0
- package/lib/esm/charts/themes/ndl-echarts-theme.mjs +139 -0
- package/lib/esm/charts/themes/ndl-echarts-theme.mjs.map +1 -0
- package/lib/esm/charts/utils/aria-description.mjs +162 -0
- package/lib/esm/charts/utils/aria-description.mjs.map +1 -0
- package/lib/esm/charts/utils/build-chart-option.mjs +184 -0
- package/lib/esm/charts/utils/build-chart-option.mjs.map +1 -0
- package/lib/esm/charts/utils/chart-tooltip-formatter.mjs +159 -0
- package/lib/esm/charts/utils/chart-tooltip-formatter.mjs.map +1 -0
- package/lib/esm/charts/utils/chart-types.mjs +24 -0
- package/lib/esm/charts/utils/chart-types.mjs.map +1 -0
- package/lib/esm/charts/utils/defaults.mjs +73 -0
- package/lib/esm/charts/utils/defaults.mjs.map +1 -0
- package/lib/esm/charts/utils/format-utils.mjs +61 -0
- package/lib/esm/charts/utils/format-utils.mjs.map +1 -0
- package/lib/esm/charts/utils/legend-layout.mjs +57 -0
- package/lib/esm/charts/utils/legend-layout.mjs.map +1 -0
- package/lib/esm/charts/utils/legend-utils.mjs +90 -0
- package/lib/esm/charts/utils/legend-utils.mjs.map +1 -0
- package/lib/esm/charts/utils/scatter-tooltip-points.mjs +215 -0
- package/lib/esm/charts/utils/scatter-tooltip-points.mjs.map +1 -0
- package/lib/esm/charts/utils/threshold.mjs +92 -0
- package/lib/esm/charts/utils/threshold.mjs.map +1 -0
- package/lib/esm/charts/utils/user-option-utils.mjs +445 -0
- package/lib/esm/charts/utils/user-option-utils.mjs.map +1 -0
- package/lib/esm/index.mjs +27 -0
- package/lib/esm/index.mjs.map +1 -0
- package/package.json +12 -16
- package/skills/ndl-react-charts/SKILL.md +2 -2
- package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js +0 -38
- package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
- package/lib/cjs/charts/tests/ChartZoomHarness.js +0 -113
- package/lib/cjs/charts/tests/ChartZoomHarness.js.map +0 -1
- package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js +0 -78
- package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
- package/lib/cjs/charts/tests/PieChartWithRerender.js +0 -46
- package/lib/cjs/charts/tests/PieChartWithRerender.js.map +0 -1
- package/lib/cjs/charts/tests/chart-test-utils.js +0 -527
- package/lib/cjs/charts/tests/chart-test-utils.js.map +0 -1
- package/lib/esm/charts/Chart.js +0 -114
- package/lib/esm/charts/Chart.js.map +0 -1
- package/lib/esm/charts/ChartContainer.js +0 -67
- package/lib/esm/charts/ChartContainer.js.map +0 -1
- package/lib/esm/charts/ChartEmpty.js +0 -33
- package/lib/esm/charts/ChartEmpty.js.map +0 -1
- package/lib/esm/charts/ChartRender.js +0 -89
- package/lib/esm/charts/ChartRender.js.map +0 -1
- package/lib/esm/charts/ChartTooltip.js +0 -64
- package/lib/esm/charts/ChartTooltip.js.map +0 -1
- package/lib/esm/charts/Legend.js +0 -71
- package/lib/esm/charts/Legend.js.map +0 -1
- package/lib/esm/charts/LegendItem.js +0 -61
- package/lib/esm/charts/LegendItem.js.map +0 -1
- package/lib/esm/charts/LegendLayout.js +0 -323
- package/lib/esm/charts/LegendLayout.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-instance.js +0 -128
- package/lib/esm/charts/hooks/use-chart-instance.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-option.js +0 -82
- package/lib/esm/charts/hooks/use-chart-option.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-refs.js +0 -48
- package/lib/esm/charts/hooks/use-chart-refs.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-zoom.js +0 -129
- package/lib/esm/charts/hooks/use-chart-zoom.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-interactions.js +0 -145
- package/lib/esm/charts/hooks/use-legend-interactions.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-series.js +0 -184
- package/lib/esm/charts/hooks/use-legend-series.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-visibility.js +0 -87
- package/lib/esm/charts/hooks/use-legend-visibility.js.map +0 -1
- package/lib/esm/charts/index.js.map +0 -1
- package/lib/esm/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
- package/lib/esm/charts/tests/ChartZoomHarness.js +0 -109
- package/lib/esm/charts/tests/ChartZoomHarness.js.map +0 -1
- package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js +0 -74
- package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
- package/lib/esm/charts/tests/PieChartWithRerender.js +0 -43
- package/lib/esm/charts/tests/PieChartWithRerender.js.map +0 -1
- package/lib/esm/charts/tests/chart-test-utils.js +0 -500
- package/lib/esm/charts/tests/chart-test-utils.js.map +0 -1
- package/lib/esm/charts/themes/ndl-echarts-theme.js +0 -172
- package/lib/esm/charts/themes/ndl-echarts-theme.js.map +0 -1
- package/lib/esm/charts/utils/aria-description.js +0 -228
- package/lib/esm/charts/utils/aria-description.js.map +0 -1
- package/lib/esm/charts/utils/build-chart-option.js +0 -193
- package/lib/esm/charts/utils/build-chart-option.js.map +0 -1
- package/lib/esm/charts/utils/chart-tooltip-formatter.js +0 -177
- package/lib/esm/charts/utils/chart-tooltip-formatter.js.map +0 -1
- package/lib/esm/charts/utils/chart-types.js.map +0 -1
- package/lib/esm/charts/utils/defaults.js +0 -73
- package/lib/esm/charts/utils/defaults.js.map +0 -1
- package/lib/esm/charts/utils/format-utils.js +0 -74
- package/lib/esm/charts/utils/format-utils.js.map +0 -1
- package/lib/esm/charts/utils/legend-layout.js +0 -59
- package/lib/esm/charts/utils/legend-layout.js.map +0 -1
- package/lib/esm/charts/utils/legend-utils.js +0 -131
- package/lib/esm/charts/utils/legend-utils.js.map +0 -1
- package/lib/esm/charts/utils/scatter-tooltip-points.js +0 -291
- package/lib/esm/charts/utils/scatter-tooltip-points.js.map +0 -1
- package/lib/esm/charts/utils/threshold.js +0 -106
- package/lib/esm/charts/utils/threshold.js.map +0 -1
- package/lib/esm/charts/utils/user-option-utils.js +0 -374
- package/lib/esm/charts/utils/user-option-utils.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
|
@@ -1,203 +1,195 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
const require_charts_utils_aria_description = require("./aria-description.js");
|
|
7
|
+
const require_charts_utils_chart_tooltip_formatter = require("./chart-tooltip-formatter.js");
|
|
8
|
+
const require_charts_utils_defaults = require("./defaults.js");
|
|
9
|
+
const require_charts_utils_user_option_utils = require("./user-option-utils.js");
|
|
10
|
+
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js");
|
|
11
|
+
// src/charts/utils/build-chart-option.ts
|
|
2
12
|
/*!
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.hasMarkAreaInSeries = void 0;
|
|
24
|
-
exports.hasHorizontalSliderZoom = hasHorizontalSliderZoom;
|
|
25
|
-
exports.hasVerticalSliderZoom = hasVerticalSliderZoom;
|
|
26
|
-
exports.getSliderBottomOuterBound = getSliderBottomOuterBound;
|
|
27
|
-
exports.getSliderRightOuterBound = getSliderRightOuterBound;
|
|
28
|
-
exports.hasCategoryXAxis = hasCategoryXAxis;
|
|
29
|
-
exports.buildChartOption = buildChartOption;
|
|
30
|
-
const aria_description_1 = require("./aria-description");
|
|
31
|
-
const chart_tooltip_formatter_1 = require("./chart-tooltip-formatter");
|
|
32
|
-
const defaults_1 = require("./defaults");
|
|
33
|
-
const user_option_utils_1 = require("./user-option-utils");
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) "Neo4j"
|
|
15
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
16
|
+
*
|
|
17
|
+
* This file is part of Neo4j.
|
|
18
|
+
*
|
|
19
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
20
|
+
* it under the terms of the GNU General Public License as published by
|
|
21
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
22
|
+
* (at your option) any later version.
|
|
23
|
+
*
|
|
24
|
+
* This program is distributed in the hope that it will be useful,
|
|
25
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
27
|
+
* GNU General Public License for more details.
|
|
28
|
+
*
|
|
29
|
+
* You should have received a copy of the GNU General Public License
|
|
30
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
31
|
+
*/
|
|
34
32
|
const SLIDER_OUTER_BOUND_GAP = 8;
|
|
35
33
|
const SLIDER_OUTER_BOUND_FALLBACK = 60;
|
|
36
34
|
const toDataZoomArray = (dataZoom) => Array.isArray(dataZoom) ? dataZoom : [dataZoom];
|
|
37
35
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
* Horizontal slider zoom needs extra bottom grid space for ECharts' slider
|
|
37
|
+
* control.
|
|
38
|
+
*/
|
|
41
39
|
function hasHorizontalSliderZoom(dataZoom) {
|
|
42
|
-
|
|
40
|
+
return toDataZoomArray(dataZoom).some((dataZoomOption) => (dataZoomOption === null || dataZoomOption === void 0 ? void 0 : dataZoomOption.type) === "slider" && !require_charts_utils_user_option_utils.isVerticalSlider(dataZoomOption));
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
* Vertical slider zoom needs extra right grid space for ECharts' slider
|
|
44
|
+
* control.
|
|
45
|
+
*/
|
|
48
46
|
function hasVerticalSliderZoom(dataZoom) {
|
|
49
|
-
|
|
47
|
+
return toDataZoomArray(dataZoom).some((dataZoomOption) => require_charts_utils_user_option_utils.isVerticalSlider(dataZoomOption));
|
|
50
48
|
}
|
|
51
49
|
const getPixelValue = (value) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (typeof value !== 'string' || !/^-?\d+(?:\.\d+)?px$/.test(value)) {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
return Number.parseFloat(value);
|
|
50
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
51
|
+
if (typeof value !== "string" || !/^-?\d+(?:\.\d+)?px$/.test(value)) return;
|
|
52
|
+
return Number.parseFloat(value);
|
|
59
53
|
};
|
|
60
54
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
* Reserves the area occupied by bottom-positioned horizontal slider controls.
|
|
56
|
+
*
|
|
57
|
+
* ECharts lays data zoom controls outside the Cartesian grid, so its automatic
|
|
58
|
+
* axis outer bounds do not account for them. Normalized sliders use pixel
|
|
59
|
+
* values; custom percentage-based layouts fall back to the previous 60px
|
|
60
|
+
* reserve because they cannot be resolved without the rendered chart size.
|
|
61
|
+
*/
|
|
68
62
|
function getSliderBottomOuterBound(dataZoom) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
return [bottom + height + SLIDER_OUTER_BOUND_GAP];
|
|
80
|
-
});
|
|
81
|
-
return sliderOuterBounds.length > 0
|
|
82
|
-
? Math.max(...sliderOuterBounds)
|
|
83
|
-
: undefined;
|
|
63
|
+
const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {
|
|
64
|
+
const slider = option;
|
|
65
|
+
if ((slider === null || slider === void 0 ? void 0 : slider.type) !== "slider" || require_charts_utils_user_option_utils.isVerticalSlider(slider)) return [];
|
|
66
|
+
const bottom = getPixelValue(slider.bottom);
|
|
67
|
+
const height = getPixelValue(slider.height);
|
|
68
|
+
if (bottom === void 0 || height === void 0) return [SLIDER_OUTER_BOUND_FALLBACK];
|
|
69
|
+
return [bottom + height + SLIDER_OUTER_BOUND_GAP];
|
|
70
|
+
});
|
|
71
|
+
return sliderOuterBounds.length > 0 ? Math.max(...sliderOuterBounds) : void 0;
|
|
84
72
|
}
|
|
85
73
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
* Reserves the area occupied by right-positioned vertical slider controls,
|
|
75
|
+
* mirroring `getSliderBottomOuterBound` for horizontal ones. Normalized
|
|
76
|
+
* sliders use pixel values; custom percentage-based layouts fall back to the
|
|
77
|
+
* 60px reserve because they cannot be resolved without the rendered chart
|
|
78
|
+
* size.
|
|
79
|
+
*/
|
|
92
80
|
function getSliderRightOuterBound(dataZoom) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
return [right + width + SLIDER_OUTER_BOUND_GAP];
|
|
104
|
-
});
|
|
105
|
-
return sliderOuterBounds.length > 0
|
|
106
|
-
? Math.max(...sliderOuterBounds)
|
|
107
|
-
: undefined;
|
|
81
|
+
const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {
|
|
82
|
+
const slider = option;
|
|
83
|
+
if (!require_charts_utils_user_option_utils.isVerticalSlider(slider)) return [];
|
|
84
|
+
const right = getPixelValue(slider === null || slider === void 0 ? void 0 : slider.right);
|
|
85
|
+
const width = getPixelValue(slider === null || slider === void 0 ? void 0 : slider.width);
|
|
86
|
+
if (right === void 0 || width === void 0) return [SLIDER_OUTER_BOUND_FALLBACK];
|
|
87
|
+
return [right + width + SLIDER_OUTER_BOUND_GAP];
|
|
88
|
+
});
|
|
89
|
+
return sliderOuterBounds.length > 0 ? Math.max(...sliderOuterBounds) : void 0;
|
|
108
90
|
}
|
|
109
91
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const hasMarkAreaInSeries = (series) => Array.isArray(series)
|
|
113
|
-
? series.some((option) => !!option.markArea)
|
|
114
|
-
: !!series.markArea;
|
|
115
|
-
exports.hasMarkAreaInSeries = hasMarkAreaInSeries;
|
|
92
|
+
* Mark area needs extra top grid space to fit inside the chart.
|
|
93
|
+
*/
|
|
94
|
+
const hasMarkAreaInSeries = (series) => Array.isArray(series) ? series.some((option) => !!option.markArea) : !!series.markArea;
|
|
116
95
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
96
|
+
* Reads the `name` of the axis at `axisIndex`, which scatter tooltips use to
|
|
97
|
+
* label their x and y rows.
|
|
98
|
+
*/
|
|
120
99
|
function getAxisName(axis, axisIndex = 0) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
? axisOption.name
|
|
124
|
-
: undefined;
|
|
100
|
+
const axisOption = Array.isArray(axis) ? axis[axisIndex] : axisIndex === 0 ? axis : void 0;
|
|
101
|
+
return typeof (axisOption === null || axisOption === void 0 ? void 0 : axisOption.name) === "string" && axisOption.name.length > 0 ? axisOption.name : void 0;
|
|
125
102
|
}
|
|
126
103
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
104
|
+
* Category x-axes use slightly wider grid padding to avoid clipped labels.
|
|
105
|
+
*/
|
|
129
106
|
function hasCategoryXAxis(xAxis) {
|
|
130
|
-
|
|
131
|
-
? xAxis.some((axis) => axis.type === 'category')
|
|
132
|
-
: (xAxis === null || xAxis === void 0 ? void 0 : xAxis.type) === 'category';
|
|
107
|
+
return Array.isArray(xAxis) ? xAxis.some((axis) => axis.type === "category") : (xAxis === null || xAxis === void 0 ? void 0 : xAxis.type) === "category";
|
|
133
108
|
}
|
|
134
109
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
function buildChartOption({ dataZoom, dataset, getChartInstance, getLegendSelected, hasCategoryXAxis, legendSelected, propsSeries, series, thresholdLines, toolboxOptions, userOption, xAxis, yAxis, hasMarkArea
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
110
|
+
* Builds the ECharts option object from Needle chart props and derived values.
|
|
111
|
+
* Applying the option to an ECharts instance happens in `useChartOption`.
|
|
112
|
+
*/
|
|
113
|
+
function buildChartOption({ dataZoom, dataset, getChartInstance, getLegendSelected, hasCategoryXAxis, legendSelected, propsSeries, series, thresholdLines, toolboxOptions, userOption, xAxis, yAxis, hasMarkArea }) {
|
|
114
|
+
const customAriaDescription = require_charts_utils_aria_description.generateThresholdAriaDescription(propsSeries, dataset);
|
|
115
|
+
const sliderBottomOuterBound = getSliderBottomOuterBound(dataZoom);
|
|
116
|
+
const sliderRightOuterBound = getSliderRightOuterBound(dataZoom);
|
|
117
|
+
const hasVerticalSlider = hasVerticalSliderZoom(dataZoom);
|
|
118
|
+
const hasHorizontalSlider = hasHorizontalSliderZoom(dataZoom);
|
|
119
|
+
const gridBottom = hasHorizontalSlider ? 60 : hasVerticalSlider ? 25 : 10;
|
|
120
|
+
const gridHorizontalInset = hasCategoryXAxis ? 15 : 10;
|
|
121
|
+
const gridRight = hasVerticalSlider ? 60 : hasHorizontalSlider ? 45 : gridHorizontalInset;
|
|
122
|
+
const outerBoundsTop = hasMarkArea ? 20 : 10;
|
|
123
|
+
const gridTop = hasVerticalSlider ? 20 : outerBoundsTop;
|
|
124
|
+
const seriesList = Array.isArray(series) ? series : [series];
|
|
125
|
+
const isScatterChart = seriesList.length > 0 && seriesList.every((seriesOption) => seriesOption.type === "scatter");
|
|
126
|
+
const seriesAxisNames = seriesList.map((seriesOption) => {
|
|
127
|
+
const { xAxisIndex, yAxisIndex } = seriesOption;
|
|
128
|
+
return {
|
|
129
|
+
x: getAxisName(xAxis, xAxisIndex),
|
|
130
|
+
y: getAxisName(yAxis, yAxisIndex)
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
return require_objectSpread2.default(require_objectSpread2.default({}, userOption), {}, {
|
|
134
|
+
aria: require_objectSpread2.default(require_objectSpread2.default({
|
|
135
|
+
decal: { show: false },
|
|
136
|
+
enabled: true
|
|
137
|
+
}, customAriaDescription !== void 0 && { label: { description: customAriaDescription } }), userOption === null || userOption === void 0 ? void 0 : userOption.aria),
|
|
138
|
+
dataZoom,
|
|
139
|
+
dataset,
|
|
140
|
+
grid: require_objectSpread2.default({
|
|
141
|
+
bottom: `${gridBottom}px`,
|
|
142
|
+
left: `${gridHorizontalInset}px`,
|
|
143
|
+
outerBounds: {
|
|
144
|
+
bottom: sliderBottomOuterBound !== null && sliderBottomOuterBound !== void 0 ? sliderBottomOuterBound : gridBottom,
|
|
145
|
+
left: gridHorizontalInset,
|
|
146
|
+
right: sliderRightOuterBound !== null && sliderRightOuterBound !== void 0 ? sliderRightOuterBound : gridHorizontalInset,
|
|
147
|
+
top: outerBoundsTop
|
|
148
|
+
},
|
|
149
|
+
outerBoundsContain: "all",
|
|
150
|
+
right: `${gridRight}px`,
|
|
151
|
+
top: `${gridTop}px`,
|
|
152
|
+
type: "solid"
|
|
153
|
+
}, userOption === null || userOption === void 0 ? void 0 : userOption.grid),
|
|
154
|
+
legend: {
|
|
155
|
+
selected: require_objectSpread2.default({}, legendSelected),
|
|
156
|
+
show: false
|
|
157
|
+
},
|
|
158
|
+
series,
|
|
159
|
+
toolbox: require_charts_utils_user_option_utils.mergeToolbox(toolboxOptions, {
|
|
160
|
+
dataZoom,
|
|
161
|
+
xAxis,
|
|
162
|
+
yAxis
|
|
163
|
+
}),
|
|
164
|
+
tooltip: {
|
|
165
|
+
borderRadius: 0,
|
|
166
|
+
borderWidth: 0,
|
|
167
|
+
confine: true,
|
|
168
|
+
extraCssText: require_charts_utils_defaults.tooltipExtraCssText,
|
|
169
|
+
formatter: isScatterChart ? require_charts_utils_chart_tooltip_formatter.createScatterTooltipFormatter({
|
|
170
|
+
dataset,
|
|
171
|
+
getChartInstance,
|
|
172
|
+
getLegendSelected,
|
|
173
|
+
series,
|
|
174
|
+
seriesAxisNames,
|
|
175
|
+
userOption
|
|
176
|
+
}) : require_charts_utils_chart_tooltip_formatter.createAxisTooltipFormatter({
|
|
177
|
+
thresholdLines,
|
|
178
|
+
userOption
|
|
179
|
+
}),
|
|
180
|
+
padding: 0,
|
|
181
|
+
trigger: isScatterChart ? "item" : "axis"
|
|
182
|
+
},
|
|
183
|
+
xAxis,
|
|
184
|
+
yAxis
|
|
185
|
+
});
|
|
202
186
|
}
|
|
187
|
+
exports.buildChartOption = buildChartOption;
|
|
188
|
+
exports.getSliderBottomOuterBound = getSliderBottomOuterBound;
|
|
189
|
+
exports.getSliderRightOuterBound = getSliderRightOuterBound;
|
|
190
|
+
exports.hasCategoryXAxis = hasCategoryXAxis;
|
|
191
|
+
exports.hasHorizontalSliderZoom = hasHorizontalSliderZoom;
|
|
192
|
+
exports.hasMarkAreaInSeries = hasMarkAreaInSeries;
|
|
193
|
+
exports.hasVerticalSliderZoom = hasVerticalSliderZoom;
|
|
194
|
+
|
|
203
195
|
//# sourceMappingURL=build-chart-option.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-chart-option.js","sourceRoot":"","sources":["../../../../src/charts/utils/build-chart-option.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AA2CH,0DAOC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B,GAAI,mBAAmB;gBACnD,GAAG,EAAE,cAAc;aACpB,EACD,kBAAkB,EAAE,KAAK,EACzB,KAAK,EAAE,GAAG,SAAS,IAAI,EACvB,GAAG,EAAE,GAAG,OAAO,IAAI,EACnB,IAAI,EAAE,OAAO,IACT,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAA8B,GAEhD,MAAM,EAAE;YACN,oEAAoE;YACpE,8DAA8D;YAC9D,QAAQ,oBAAO,cAAc,CAAE;YAC/B,IAAI,EAAE,KAAK;SACZ,EACD,MAAM,EACN,OAAO,EAAE,IAAA,gCAAY,EAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EACjE,OAAO,EAAE;YACP,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,IAAI;YACb,YAAY,EAAE,8BAAmB;YACjC,SAAS,EAAE,cAAc;gBACvB,CAAC,CAAC,IAAA,uDAA6B,EAAC;oBAC5B,OAAO;oBACP,gBAAgB;oBAChB,iBAAiB;oBACjB,MAAM;oBACN,eAAe;oBACf,UAAU;iBACX,CAAC;gBACJ,CAAC,CAAC,IAAA,oDAA0B,EAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;YAC9D,OAAO,EAAE,CAAC;YACV,sEAAsE;YACtE,oEAAoE;YACpE,iCAAiC;YACjC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;SAC1C,EACD,KAAK;QACL,KAAK,IACL;AACJ,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { DataZoomComponentOption, EChartsOption } from 'echarts';\n\nimport { generateThresholdAriaDescription } from './aria-description';\nimport {\n createAxisTooltipFormatter,\n createScatterTooltipFormatter,\n type SeriesAxisNames,\n} from './chart-tooltip-formatter';\nimport type { ChartProps, EchartsSeries } from './chart-types';\nimport { tooltipExtraCssText } from './defaults';\nimport type { ScatterTooltipChart } from './scatter-tooltip-points';\nimport type { NormalizedThresholdLine } from './threshold';\nimport { isVerticalSlider, mergeToolbox } from './user-option-utils';\n\nconst SLIDER_OUTER_BOUND_GAP = 8;\nconst SLIDER_OUTER_BOUND_FALLBACK = 60;\n\ntype BuildChartOptionParams = {\n dataZoom: EChartsOption['dataZoom'];\n dataset: ChartProps['dataset'];\n getChartInstance?: () => ScatterTooltipChart | undefined;\n getLegendSelected?: () => Record<string, boolean> | undefined;\n hasCategoryXAxis: boolean;\n legendSelected: Record<string, boolean>;\n propsSeries: ChartProps['series'];\n series: EchartsSeries;\n thresholdLines: NormalizedThresholdLine[];\n toolboxOptions: EChartsOption['toolbox'];\n userOption: ChartProps['option'];\n xAxis: EChartsOption['xAxis'];\n yAxis: EChartsOption['yAxis'];\n hasMarkArea: boolean;\n};\n\nconst toDataZoomArray = (dataZoom: EChartsOption['dataZoom']) =>\n Array.isArray(dataZoom) ? dataZoom : [dataZoom];\n\n/**\n * Horizontal slider zoom needs extra bottom grid space for ECharts' slider\n * control.\n */\nexport function hasHorizontalSliderZoom(\n dataZoom: EChartsOption['dataZoom'],\n): boolean {\n return toDataZoomArray(dataZoom).some(\n (dataZoomOption: DataZoomComponentOption | undefined) =>\n dataZoomOption?.type === 'slider' && !isVerticalSlider(dataZoomOption),\n );\n}\n\n/**\n * Vertical slider zoom needs extra right grid space for ECharts' slider\n * control.\n */\nexport function hasVerticalSliderZoom(\n dataZoom: EChartsOption['dataZoom'],\n): boolean {\n return toDataZoomArray(dataZoom).some(\n (dataZoomOption: DataZoomComponentOption | undefined) =>\n isVerticalSlider(dataZoomOption),\n );\n}\n\ntype SliderDataZoomLayout = DataZoomComponentOption & {\n bottom?: number | string;\n height?: number | string;\n orient?: 'horizontal' | 'vertical';\n right?: number | string;\n width?: number | string;\n};\n\nconst getPixelValue = (value: number | string | undefined) => {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n\n if (typeof value !== 'string' || !/^-?\\d+(?:\\.\\d+)?px$/.test(value)) {\n return undefined;\n }\n\n return Number.parseFloat(value);\n};\n\n/**\n * Reserves the area occupied by bottom-positioned horizontal slider controls.\n *\n * ECharts lays data zoom controls outside the Cartesian grid, so its automatic\n * axis outer bounds do not account for them. Normalized sliders use pixel\n * values; custom percentage-based layouts fall back to the previous 60px\n * reserve because they cannot be resolved without the rendered chart size.\n */\nexport function getSliderBottomOuterBound(\n dataZoom: EChartsOption['dataZoom'],\n): number | undefined {\n const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {\n const slider = option as SliderDataZoomLayout | undefined;\n if (slider?.type !== 'slider' || isVerticalSlider(slider)) {\n return [];\n }\n\n const bottom = getPixelValue(slider.bottom);\n const height = getPixelValue(slider.height);\n if (bottom === undefined || height === undefined) {\n return [SLIDER_OUTER_BOUND_FALLBACK];\n }\n\n return [bottom + height + SLIDER_OUTER_BOUND_GAP];\n });\n\n return sliderOuterBounds.length > 0\n ? Math.max(...sliderOuterBounds)\n : undefined;\n}\n\n/**\n * Reserves the area occupied by right-positioned vertical slider controls,\n * mirroring `getSliderBottomOuterBound` for horizontal ones. Normalized\n * sliders use pixel values; custom percentage-based layouts fall back to the\n * 60px reserve because they cannot be resolved without the rendered chart\n * size.\n */\nexport function getSliderRightOuterBound(\n dataZoom: EChartsOption['dataZoom'],\n): number | undefined {\n const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {\n const slider = option as SliderDataZoomLayout | undefined;\n if (!isVerticalSlider(slider)) {\n return [];\n }\n\n const right = getPixelValue(slider?.right);\n const width = getPixelValue(slider?.width);\n if (right === undefined || width === undefined) {\n return [SLIDER_OUTER_BOUND_FALLBACK];\n }\n\n return [right + width + SLIDER_OUTER_BOUND_GAP];\n });\n\n return sliderOuterBounds.length > 0\n ? Math.max(...sliderOuterBounds)\n : undefined;\n}\n\n/**\n * Mark area needs extra top grid space to fit inside the chart.\n */\nexport const hasMarkAreaInSeries = (series: EchartsSeries) =>\n Array.isArray(series)\n ? series.some((option) => !!option.markArea)\n : !!series.markArea;\n\n/**\n * Reads the `name` of the axis at `axisIndex`, which scatter tooltips use to\n * label their x and y rows.\n */\nfunction getAxisName(\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndex = 0,\n): string | undefined {\n const axisOption = (\n Array.isArray(axis) ? axis[axisIndex] : axisIndex === 0 ? axis : undefined\n ) as { name?: unknown } | undefined;\n\n return typeof axisOption?.name === 'string' && axisOption.name.length > 0\n ? axisOption.name\n : undefined;\n}\n\n/**\n * Category x-axes use slightly wider grid padding to avoid clipped labels.\n */\nexport function hasCategoryXAxis(xAxis: EChartsOption['xAxis']): boolean {\n return Array.isArray(xAxis)\n ? xAxis.some((axis) => axis.type === 'category')\n : xAxis?.type === 'category';\n}\n\n/**\n * Builds the ECharts option object from Needle chart props and derived values.\n * Applying the option to an ECharts instance happens in `useChartOption`.\n */\nexport function buildChartOption({\n dataZoom,\n dataset,\n getChartInstance,\n getLegendSelected,\n hasCategoryXAxis,\n legendSelected,\n propsSeries,\n series,\n thresholdLines,\n toolboxOptions,\n userOption,\n xAxis,\n yAxis,\n hasMarkArea,\n}: BuildChartOptionParams): EChartsOption {\n const customAriaDescription = generateThresholdAriaDescription(\n propsSeries,\n dataset,\n );\n const sliderBottomOuterBound = getSliderBottomOuterBound(dataZoom);\n const sliderRightOuterBound = getSliderRightOuterBound(dataZoom);\n const hasVerticalSlider = hasVerticalSliderZoom(dataZoom);\n const hasHorizontalSlider = hasHorizontalSliderZoom(dataZoom);\n const gridBottom = hasHorizontalSlider ? 60 : hasVerticalSlider ? 25 : 10;\n const gridHorizontalInset = hasCategoryXAxis ? 15 : 10;\n const gridRight = hasVerticalSlider\n ? 60\n : hasHorizontalSlider\n ? 45\n : gridHorizontalInset;\n const outerBoundsTop = hasMarkArea ? 20 : 10;\n const gridTop = hasVerticalSlider ? 20 : outerBoundsTop;\n const seriesList = Array.isArray(series) ? series : [series];\n const isScatterChart =\n seriesList.length > 0 &&\n seriesList.every((seriesOption) => seriesOption.type === 'scatter');\n const seriesAxisNames: SeriesAxisNames[] = seriesList.map((seriesOption) => {\n const { xAxisIndex, yAxisIndex } = seriesOption as {\n xAxisIndex?: number;\n yAxisIndex?: number;\n };\n\n return {\n // oxlint-disable-next-line id-length\n x: getAxisName(xAxis, xAxisIndex),\n // oxlint-disable-next-line id-length\n y: getAxisName(yAxis, yAxisIndex),\n };\n });\n\n return {\n ...userOption,\n aria: {\n decal: {\n show: false,\n },\n enabled: true,\n ...(customAriaDescription !== undefined && {\n label: { description: customAriaDescription },\n }),\n ...(userOption?.aria as EChartsOption['aria']),\n },\n dataZoom,\n dataset,\n grid: {\n bottom: `${gridBottom}px`,\n left: `${gridHorizontalInset}px`,\n outerBounds: {\n bottom: sliderBottomOuterBound ?? gridBottom,\n left: gridHorizontalInset,\n right: sliderRightOuterBound ?? gridHorizontalInset,\n top: outerBoundsTop,\n },\n outerBoundsContain: 'all',\n right: `${gridRight}px`,\n top: `${gridTop}px`,\n type: 'solid',\n ...(userOption?.grid as EChartsOption['grid']),\n },\n legend: {\n // ECharts mutates option.legend.selected internally; callers pass a\n // copied object so the React ref remains the source of truth.\n selected: { ...legendSelected },\n show: false,\n },\n series,\n toolbox: mergeToolbox(toolboxOptions, { dataZoom, xAxis, yAxis }),\n tooltip: {\n borderRadius: 0,\n borderWidth: 0,\n confine: true,\n extraCssText: tooltipExtraCssText,\n formatter: isScatterChart\n ? createScatterTooltipFormatter({\n dataset,\n getChartInstance,\n getLegendSelected,\n series,\n seriesAxisNames,\n userOption,\n })\n : createAxisTooltipFormatter({ thresholdLines, userOption }),\n padding: 0,\n // Scatter needs item trigger so the unique per-point `encode.tooltip`\n // value can title the tooltip. Axis trigger would group every point\n // that shares an x (or y) value.\n trigger: isScatterChart ? 'item' : 'axis',\n },\n xAxis,\n yAxis,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"build-chart-option.js","names":["isVerticalSlider","generateThresholdAriaDescription","mergeToolbox","tooltipExtraCssText","createScatterTooltipFormatter","createAxisTooltipFormatter"],"sources":["../../../../src/charts/utils/build-chart-option.ts"],"sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { DataZoomComponentOption, EChartsOption } from 'echarts';\n\nimport { generateThresholdAriaDescription } from './aria-description';\nimport {\n createAxisTooltipFormatter,\n createScatterTooltipFormatter,\n type SeriesAxisNames,\n} from './chart-tooltip-formatter';\nimport type { ChartProps, EchartsSeries } from './chart-types';\nimport { tooltipExtraCssText } from './defaults';\nimport type { ScatterTooltipChart } from './scatter-tooltip-points';\nimport type { NormalizedThresholdLine } from './threshold';\nimport { isVerticalSlider, mergeToolbox } from './user-option-utils';\n\nconst SLIDER_OUTER_BOUND_GAP = 8;\nconst SLIDER_OUTER_BOUND_FALLBACK = 60;\n\ntype BuildChartOptionParams = {\n dataZoom: EChartsOption['dataZoom'];\n dataset: ChartProps['dataset'];\n getChartInstance?: () => ScatterTooltipChart | undefined;\n getLegendSelected?: () => Record<string, boolean> | undefined;\n hasCategoryXAxis: boolean;\n legendSelected: Record<string, boolean>;\n propsSeries: ChartProps['series'];\n series: EchartsSeries;\n thresholdLines: NormalizedThresholdLine[];\n toolboxOptions: EChartsOption['toolbox'];\n userOption: ChartProps['option'];\n xAxis: EChartsOption['xAxis'];\n yAxis: EChartsOption['yAxis'];\n hasMarkArea: boolean;\n};\n\nconst toDataZoomArray = (dataZoom: EChartsOption['dataZoom']) =>\n Array.isArray(dataZoom) ? dataZoom : [dataZoom];\n\n/**\n * Horizontal slider zoom needs extra bottom grid space for ECharts' slider\n * control.\n */\nexport function hasHorizontalSliderZoom(\n dataZoom: EChartsOption['dataZoom'],\n): boolean {\n return toDataZoomArray(dataZoom).some(\n (dataZoomOption: DataZoomComponentOption | undefined) =>\n dataZoomOption?.type === 'slider' && !isVerticalSlider(dataZoomOption),\n );\n}\n\n/**\n * Vertical slider zoom needs extra right grid space for ECharts' slider\n * control.\n */\nexport function hasVerticalSliderZoom(\n dataZoom: EChartsOption['dataZoom'],\n): boolean {\n return toDataZoomArray(dataZoom).some(\n (dataZoomOption: DataZoomComponentOption | undefined) =>\n isVerticalSlider(dataZoomOption),\n );\n}\n\ntype SliderDataZoomLayout = DataZoomComponentOption & {\n bottom?: number | string;\n height?: number | string;\n orient?: 'horizontal' | 'vertical';\n right?: number | string;\n width?: number | string;\n};\n\nconst getPixelValue = (value: number | string | undefined) => {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n\n if (typeof value !== 'string' || !/^-?\\d+(?:\\.\\d+)?px$/.test(value)) {\n return undefined;\n }\n\n return Number.parseFloat(value);\n};\n\n/**\n * Reserves the area occupied by bottom-positioned horizontal slider controls.\n *\n * ECharts lays data zoom controls outside the Cartesian grid, so its automatic\n * axis outer bounds do not account for them. Normalized sliders use pixel\n * values; custom percentage-based layouts fall back to the previous 60px\n * reserve because they cannot be resolved without the rendered chart size.\n */\nexport function getSliderBottomOuterBound(\n dataZoom: EChartsOption['dataZoom'],\n): number | undefined {\n const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {\n const slider = option as SliderDataZoomLayout | undefined;\n if (slider?.type !== 'slider' || isVerticalSlider(slider)) {\n return [];\n }\n\n const bottom = getPixelValue(slider.bottom);\n const height = getPixelValue(slider.height);\n if (bottom === undefined || height === undefined) {\n return [SLIDER_OUTER_BOUND_FALLBACK];\n }\n\n return [bottom + height + SLIDER_OUTER_BOUND_GAP];\n });\n\n return sliderOuterBounds.length > 0\n ? Math.max(...sliderOuterBounds)\n : undefined;\n}\n\n/**\n * Reserves the area occupied by right-positioned vertical slider controls,\n * mirroring `getSliderBottomOuterBound` for horizontal ones. Normalized\n * sliders use pixel values; custom percentage-based layouts fall back to the\n * 60px reserve because they cannot be resolved without the rendered chart\n * size.\n */\nexport function getSliderRightOuterBound(\n dataZoom: EChartsOption['dataZoom'],\n): number | undefined {\n const sliderOuterBounds = toDataZoomArray(dataZoom).flatMap((option) => {\n const slider = option as SliderDataZoomLayout | undefined;\n if (!isVerticalSlider(slider)) {\n return [];\n }\n\n const right = getPixelValue(slider?.right);\n const width = getPixelValue(slider?.width);\n if (right === undefined || width === undefined) {\n return [SLIDER_OUTER_BOUND_FALLBACK];\n }\n\n return [right + width + SLIDER_OUTER_BOUND_GAP];\n });\n\n return sliderOuterBounds.length > 0\n ? Math.max(...sliderOuterBounds)\n : undefined;\n}\n\n/**\n * Mark area needs extra top grid space to fit inside the chart.\n */\nexport const hasMarkAreaInSeries = (series: EchartsSeries) =>\n Array.isArray(series)\n ? series.some((option) => !!option.markArea)\n : !!series.markArea;\n\n/**\n * Reads the `name` of the axis at `axisIndex`, which scatter tooltips use to\n * label their x and y rows.\n */\nfunction getAxisName(\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndex = 0,\n): string | undefined {\n const axisOption = (\n Array.isArray(axis) ? axis[axisIndex] : axisIndex === 0 ? axis : undefined\n ) as { name?: unknown } | undefined;\n\n return typeof axisOption?.name === 'string' && axisOption.name.length > 0\n ? axisOption.name\n : undefined;\n}\n\n/**\n * Category x-axes use slightly wider grid padding to avoid clipped labels.\n */\nexport function hasCategoryXAxis(xAxis: EChartsOption['xAxis']): boolean {\n return Array.isArray(xAxis)\n ? xAxis.some((axis) => axis.type === 'category')\n : xAxis?.type === 'category';\n}\n\n/**\n * Builds the ECharts option object from Needle chart props and derived values.\n * Applying the option to an ECharts instance happens in `useChartOption`.\n */\nexport function buildChartOption({\n dataZoom,\n dataset,\n getChartInstance,\n getLegendSelected,\n hasCategoryXAxis,\n legendSelected,\n propsSeries,\n series,\n thresholdLines,\n toolboxOptions,\n userOption,\n xAxis,\n yAxis,\n hasMarkArea,\n}: BuildChartOptionParams): EChartsOption {\n const customAriaDescription = generateThresholdAriaDescription(\n propsSeries,\n dataset,\n );\n const sliderBottomOuterBound = getSliderBottomOuterBound(dataZoom);\n const sliderRightOuterBound = getSliderRightOuterBound(dataZoom);\n const hasVerticalSlider = hasVerticalSliderZoom(dataZoom);\n const hasHorizontalSlider = hasHorizontalSliderZoom(dataZoom);\n const gridBottom = hasHorizontalSlider ? 60 : hasVerticalSlider ? 25 : 10;\n const gridHorizontalInset = hasCategoryXAxis ? 15 : 10;\n const gridRight = hasVerticalSlider\n ? 60\n : hasHorizontalSlider\n ? 45\n : gridHorizontalInset;\n const outerBoundsTop = hasMarkArea ? 20 : 10;\n const gridTop = hasVerticalSlider ? 20 : outerBoundsTop;\n const seriesList = Array.isArray(series) ? series : [series];\n const isScatterChart =\n seriesList.length > 0 &&\n seriesList.every((seriesOption) => seriesOption.type === 'scatter');\n const seriesAxisNames: SeriesAxisNames[] = seriesList.map((seriesOption) => {\n const { xAxisIndex, yAxisIndex } = seriesOption as {\n xAxisIndex?: number;\n yAxisIndex?: number;\n };\n\n return {\n // oxlint-disable-next-line id-length\n x: getAxisName(xAxis, xAxisIndex),\n // oxlint-disable-next-line id-length\n y: getAxisName(yAxis, yAxisIndex),\n };\n });\n\n return {\n ...userOption,\n aria: {\n decal: {\n show: false,\n },\n enabled: true,\n ...(customAriaDescription !== undefined && {\n label: { description: customAriaDescription },\n }),\n ...(userOption?.aria as EChartsOption['aria']),\n },\n dataZoom,\n dataset,\n grid: {\n bottom: `${gridBottom}px`,\n left: `${gridHorizontalInset}px`,\n outerBounds: {\n bottom: sliderBottomOuterBound ?? gridBottom,\n left: gridHorizontalInset,\n right: sliderRightOuterBound ?? gridHorizontalInset,\n top: outerBoundsTop,\n },\n outerBoundsContain: 'all',\n right: `${gridRight}px`,\n top: `${gridTop}px`,\n type: 'solid',\n ...(userOption?.grid as EChartsOption['grid']),\n },\n legend: {\n // ECharts mutates option.legend.selected internally; callers pass a\n // copied object so the React ref remains the source of truth.\n selected: { ...legendSelected },\n show: false,\n },\n series,\n toolbox: mergeToolbox(toolboxOptions, { dataZoom, xAxis, yAxis }),\n tooltip: {\n borderRadius: 0,\n borderWidth: 0,\n confine: true,\n extraCssText: tooltipExtraCssText,\n formatter: isScatterChart\n ? createScatterTooltipFormatter({\n dataset,\n getChartInstance,\n getLegendSelected,\n series,\n seriesAxisNames,\n userOption,\n })\n : createAxisTooltipFormatter({ thresholdLines, userOption }),\n padding: 0,\n // Scatter needs item trigger so the unique per-point `encode.tooltip`\n // value can title the tooltip. Axis trigger would group every point\n // that shares an x (or y) value.\n trigger: isScatterChart ? 'item' : 'axis',\n },\n xAxis,\n yAxis,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AAmBpC,MAAM,mBAAmB,aACvB,MAAM,QAAQ,QAAQ,IAAI,WAAW,CAAC,QAAQ;;;;;AAMhD,SAAgB,wBACd,UACS;CACT,OAAO,gBAAgB,QAAQ,CAAC,CAAC,MAC9B,oBAAA,mBAAA,QAAA,mBAAA,KAAA,IAAA,KAAA,IACC,eAAgB,UAAS,YAAY,CAACA,uCAAAA,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