@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
|
@@ -18,8 +18,16 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
const require_toPropertyKey = require("./toPropertyKey.js");
|
|
24
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
25
|
+
function _defineProperty(e, r, t) {
|
|
26
|
+
return (r = require_toPropertyKey.default(r)) in e ? Object.defineProperty(e, r, {
|
|
27
|
+
value: t,
|
|
28
|
+
enumerable: !0,
|
|
29
|
+
configurable: !0,
|
|
30
|
+
writable: !0
|
|
31
|
+
}) : e[r] = t, e;
|
|
32
|
+
}
|
|
33
|
+
exports.default = _defineProperty;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
const require_defineProperty = require("./defineProperty.js");
|
|
24
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectSpread2.js
|
|
25
|
+
function ownKeys(e, r) {
|
|
26
|
+
var t = Object.keys(e);
|
|
27
|
+
if (Object.getOwnPropertySymbols) {
|
|
28
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
29
|
+
r && (o = o.filter(function(r) {
|
|
30
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
31
|
+
})), t.push.apply(t, o);
|
|
32
|
+
}
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
function _objectSpread2(e) {
|
|
36
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
37
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
38
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
39
|
+
require_defineProperty.default(e, r, t[r]);
|
|
40
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
41
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
exports.default = _objectSpread2;
|
|
@@ -19,17 +19,16 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} })));
|
|
22
|
+
"use strict";
|
|
23
|
+
const require_objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose.js");
|
|
24
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutProperties.js
|
|
25
|
+
function _objectWithoutProperties(e, t) {
|
|
26
|
+
if (null == e) return {};
|
|
27
|
+
var o, r, i = require_objectWithoutPropertiesLoose.default(e, t);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
30
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
31
|
+
}
|
|
32
|
+
return i;
|
|
34
33
|
}
|
|
35
|
-
|
|
34
|
+
exports.default = _objectWithoutProperties;
|
|
@@ -18,5 +18,16 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js
|
|
24
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
25
|
+
if (null == r) return {};
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
28
|
+
if (e.includes(n)) continue;
|
|
29
|
+
t[n] = r[n];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
}
|
|
33
|
+
exports.default = _objectWithoutPropertiesLoose;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
const require_typeof = require("./typeof.js");
|
|
24
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
25
|
+
function toPrimitive(t, r) {
|
|
26
|
+
if ("object" != require_typeof.default(t) || !t) return t;
|
|
27
|
+
var e = t[Symbol.toPrimitive];
|
|
28
|
+
if (void 0 !== e) {
|
|
29
|
+
var i = e.call(t, r || "default");
|
|
30
|
+
if ("object" != require_typeof.default(i)) return i;
|
|
31
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
32
|
+
}
|
|
33
|
+
return ("string" === r ? String : Number)(t);
|
|
34
|
+
}
|
|
35
|
+
exports.default = toPrimitive;
|
|
@@ -18,5 +18,13 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
const require_typeof = require("./typeof.js");
|
|
24
|
+
const require_toPrimitive = require("./toPrimitive.js");
|
|
25
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
26
|
+
function toPropertyKey(t) {
|
|
27
|
+
var i = require_toPrimitive.default(t, "string");
|
|
28
|
+
return "symbol" == require_typeof.default(i) ? i : i + "";
|
|
29
|
+
}
|
|
30
|
+
exports.default = toPropertyKey;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
24
|
+
function _typeof(o) {
|
|
25
|
+
"@babel/helpers - typeof";
|
|
26
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
27
|
+
return typeof o;
|
|
28
|
+
} : function(o) {
|
|
29
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
30
|
+
}, _typeof(o);
|
|
31
|
+
}
|
|
32
|
+
Object.defineProperty(exports, "default", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return _typeof;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
// \0rolldown/runtime.js
|
|
24
|
+
var __create = Object.create;
|
|
25
|
+
var __defProp = Object.defineProperty;
|
|
26
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
27
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
28
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
29
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
30
|
+
var __copyProps = (to, from, except, desc) => {
|
|
31
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
32
|
+
key = keys[i];
|
|
33
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
34
|
+
get: ((k) => from[k]).bind(null, key),
|
|
35
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return to;
|
|
39
|
+
};
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
41
|
+
value: mod,
|
|
42
|
+
enumerable: true
|
|
43
|
+
}) : target, mod));
|
|
44
|
+
exports.__toESM = __toESM;
|
package/lib/cjs/charts/Chart.js
CHANGED
|
@@ -1,118 +1,128 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
*
|
|
3
|
-
* Copyright (c) "Neo4j"
|
|
4
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
-
*
|
|
6
|
-
* This file is part of Neo4j.
|
|
7
|
-
*
|
|
8
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU General Public License as published by
|
|
10
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
-
* (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
1
|
"use strict";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
const require_charts_ChartContainer = require("./ChartContainer.js");
|
|
7
|
+
const require_charts_ChartRender = require("./ChartRender.js");
|
|
8
|
+
const require_charts_hooks_use_chart_refs = require("./hooks/use-chart-refs.js");
|
|
9
|
+
const require_charts_hooks_use_legend_series = require("./hooks/use-legend-series.js");
|
|
10
|
+
const require_charts_Legend = require("./Legend.js");
|
|
11
|
+
const require_objectWithoutProperties = require("../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js");
|
|
12
|
+
const require_objectSpread2 = require("../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js");
|
|
13
|
+
let react = require("react");
|
|
14
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
|
+
// src/charts/Chart.tsx
|
|
16
|
+
const _excluded = ["style", "legend"];
|
|
17
|
+
/*!
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) "Neo4j"
|
|
20
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
21
|
+
*
|
|
22
|
+
* This file is part of Neo4j.
|
|
23
|
+
*
|
|
24
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
25
|
+
* it under the terms of the GNU General Public License as published by
|
|
26
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
27
|
+
* (at your option) any later version.
|
|
28
|
+
*
|
|
29
|
+
* This program is distributed in the hope that it will be useful,
|
|
30
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
31
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
32
|
+
* GNU General Public License for more details.
|
|
33
|
+
*
|
|
34
|
+
* You should have received a copy of the GNU General Public License
|
|
35
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
36
|
+
*/
|
|
43
37
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const ChartLegend = ({ chartOption, isLayoutReady, isWaitingForFirstResize, onLayoutReady
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
* Bridges the rendered ECharts option into the React legend.
|
|
39
|
+
*
|
|
40
|
+
* `useLegendSeries` reads the current chart option and ECharts color state to
|
|
41
|
+
* derive the legend rows. Rendering is deferred until the chart has completed
|
|
42
|
+
* its first resize so the legend does not measure against an uninitialized
|
|
43
|
+
* chart instance.
|
|
44
|
+
*/
|
|
45
|
+
const ChartLegend = ({ chartOption, isLayoutReady, isWaitingForFirstResize, onLayoutReady }) => {
|
|
46
|
+
const legendSeries = require_charts_hooks_use_legend_series.useLegendSeries({
|
|
47
|
+
chartOption,
|
|
48
|
+
isWaitingForFirstResize
|
|
49
|
+
});
|
|
50
|
+
if (isWaitingForFirstResize) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
className: "ndl-chart-legend-container ndl-chart-legend-container-placeholder"
|
|
53
|
+
});
|
|
54
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_charts_Legend.Legend, {
|
|
55
|
+
series: legendSeries !== null && legendSeries !== void 0 ? legendSeries : [],
|
|
56
|
+
onLayoutReady,
|
|
57
|
+
isLayoutReady
|
|
58
|
+
});
|
|
60
59
|
};
|
|
61
60
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const Chart = (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
61
|
+
* A chart component powered by Apache ECharts with Needle's customization and theming.
|
|
62
|
+
*
|
|
63
|
+
* The `Chart` component fills 100% of its parent's width and height. Because it
|
|
64
|
+
* relies on the container's `clientHeight` to size the canvas, **the parent element
|
|
65
|
+
* must have an explicit height** (e.g. a fixed px/rem value or a viewport unit).
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <div style={{ height: '350px' }}>
|
|
70
|
+
* <Chart dataset={dataset} series={series} xAxis={xAxis} yAxis={yAxis} />
|
|
71
|
+
* </div>
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* **Data zoom sliders.** A `dataZoom` slider passed through `option` targets
|
|
76
|
+
* the x-axis unless it is bound to an axis explicitly, so on a horizontal bar
|
|
77
|
+
* chart it zooms the value axis rather than the categories. Bind the slider to
|
|
78
|
+
* the category axis with `yAxisIndex: [0]` (or set `orient: 'vertical'`) to
|
|
79
|
+
* page through the bars instead; Needle then lays the slider out vertically on
|
|
80
|
+
* the right of the chart and reserves grid space for it. Sliders that target a
|
|
81
|
+
* continuous (`value`, `time`, or `log`) axis default to `filterMode: 'none'`
|
|
82
|
+
* so out-of-window data is clipped rather than removed, while category-axis
|
|
83
|
+
* sliders keep ECharts' `'filter'` default so the opposite value axis rescales
|
|
84
|
+
* to the visible data.
|
|
85
|
+
*
|
|
86
|
+
* **Drag-to-zoom.** Dragging in the plot area zooms the axes your `dataZoom`
|
|
87
|
+
* config targets: entries bound to a y-axis (`yAxisIndex` or
|
|
88
|
+
* `orient: 'vertical'`) make the drag select a y band, entries on both axes
|
|
89
|
+
* make it select a rectangle, and without any `dataZoom` config the drag zooms
|
|
90
|
+
* the x-axis. Set `toolbox.feature.dataZoom` through `option` to override the
|
|
91
|
+
* derived axes explicitly. When every drag-targeted axis is continuous the
|
|
92
|
+
* drag defaults to `filterMode: 'none'`, matching the slider rule above.
|
|
93
|
+
*
|
|
94
|
+
* **Axis-label tooltips.** Hovering a truncated axis label shows its full text
|
|
95
|
+
* in a tooltip. Set `xAxis.tooltip.show` or `yAxis.tooltip.show` to `false` to
|
|
96
|
+
* disable this behavior for an axis.
|
|
97
|
+
*/
|
|
98
|
+
const Chart = (_ref) => {
|
|
99
|
+
let { style, legend } = _ref, chartProps = require_objectWithoutProperties.default(_ref, _excluded);
|
|
100
|
+
const [isWaitingForFirstResize, setIsWaitingForFirstResize] = (0, react.useState)(true);
|
|
101
|
+
const [chartOption, setChartOption] = (0, react.useState)();
|
|
102
|
+
const [isLegendLayoutReady, setIsLegendLayoutReady] = (0, react.useState)(!(legend === null || legend === void 0 ? void 0 : legend.isVisible));
|
|
103
|
+
const handleLegendLayoutReady = (0, react.useCallback)(() => {
|
|
104
|
+
setIsLegendLayoutReady(true);
|
|
105
|
+
}, []);
|
|
106
|
+
(0, react.useEffect)(() => {
|
|
107
|
+
if (!(legend === null || legend === void 0 ? void 0 : legend.isVisible)) setIsLegendLayoutReady(true);
|
|
108
|
+
}, [legend === null || legend === void 0 ? void 0 : legend.isVisible]);
|
|
109
|
+
const chartLayoutClassName = (legend === null || legend === void 0 ? void 0 : legend.isVisible) && !isLegendLayoutReady ? "ndl-chart-layout ndl-chart-layout-hidden" : "ndl-chart-layout";
|
|
110
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_charts_hooks_use_chart_refs.ChartRefsProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_charts_ChartContainer.ChartContainer, {
|
|
111
|
+
style,
|
|
112
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
113
|
+
className: chartLayoutClassName,
|
|
114
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_charts_ChartRender.ChartRender, require_objectSpread2.default(require_objectSpread2.default({}, chartProps), {}, {
|
|
115
|
+
onChartOptionChange: setChartOption,
|
|
116
|
+
onFirstResizeChange: setIsWaitingForFirstResize
|
|
117
|
+
}))
|
|
118
|
+
}), (legend === null || legend === void 0 ? void 0 : legend.isVisible) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChartLegend, {
|
|
119
|
+
chartOption,
|
|
120
|
+
isLayoutReady: isLegendLayoutReady,
|
|
121
|
+
isWaitingForFirstResize,
|
|
122
|
+
onLayoutReady: handleLegendLayoutReady
|
|
123
|
+
})]
|
|
124
|
+
}) });
|
|
116
125
|
};
|
|
117
126
|
exports.Chart = Chart;
|
|
127
|
+
|
|
118
128
|
//# sourceMappingURL=Chart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","
|
|
1
|
+
{"version":3,"file":"Chart.js","names":["useLegendSeries","Legend","useState","useCallback","ChartRefsProvider","ChartContainer","ChartRender"],"sources":["../../../src/charts/Chart.tsx"],"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 { EChartsOption } from 'echarts';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { ChartContainer } from './ChartContainer';\nimport { ChartRender } from './ChartRender';\nimport { ChartRefsProvider } from './hooks/use-chart-refs';\nimport { useLegendSeries } from './hooks/use-legend-series';\nimport { Legend } from './Legend';\nimport { type ChartProps } from './utils/chart-types';\n\ntype ChartLegendProps = {\n chartOption: EChartsOption | undefined;\n isLayoutReady: boolean;\n isWaitingForFirstResize: boolean;\n onLayoutReady?: () => void;\n};\n\n/**\n * Bridges the rendered ECharts option into the React legend.\n *\n * `useLegendSeries` reads the current chart option and ECharts color state to\n * derive the legend rows. Rendering is deferred until the chart has completed\n * its first resize so the legend does not measure against an uninitialized\n * chart instance.\n */\nconst ChartLegend = ({\n chartOption,\n isLayoutReady,\n isWaitingForFirstResize,\n onLayoutReady,\n}: ChartLegendProps) => {\n const legendSeries = useLegendSeries({\n chartOption,\n isWaitingForFirstResize,\n });\n\n if (isWaitingForFirstResize) {\n return (\n <div\n aria-hidden=\"true\"\n className=\"ndl-chart-legend-container ndl-chart-legend-container-placeholder\"\n />\n );\n }\n\n return (\n <Legend\n series={legendSeries ?? []}\n onLayoutReady={onLayoutReady}\n isLayoutReady={isLayoutReady}\n />\n );\n};\n\n/**\n * A chart component powered by Apache ECharts with Needle's customization and theming.\n *\n * The `Chart` component fills 100% of its parent's width and height. Because it\n * relies on the container's `clientHeight` to size the canvas, **the parent element\n * must have an explicit height** (e.g. a fixed px/rem value or a viewport unit).\n *\n * @example\n * ```tsx\n * <div style={{ height: '350px' }}>\n * <Chart dataset={dataset} series={series} xAxis={xAxis} yAxis={yAxis} />\n * </div>\n * ```\n *\n * @remarks\n * **Data zoom sliders.** A `dataZoom` slider passed through `option` targets\n * the x-axis unless it is bound to an axis explicitly, so on a horizontal bar\n * chart it zooms the value axis rather than the categories. Bind the slider to\n * the category axis with `yAxisIndex: [0]` (or set `orient: 'vertical'`) to\n * page through the bars instead; Needle then lays the slider out vertically on\n * the right of the chart and reserves grid space for it. Sliders that target a\n * continuous (`value`, `time`, or `log`) axis default to `filterMode: 'none'`\n * so out-of-window data is clipped rather than removed, while category-axis\n * sliders keep ECharts' `'filter'` default so the opposite value axis rescales\n * to the visible data.\n *\n * **Drag-to-zoom.** Dragging in the plot area zooms the axes your `dataZoom`\n * config targets: entries bound to a y-axis (`yAxisIndex` or\n * `orient: 'vertical'`) make the drag select a y band, entries on both axes\n * make it select a rectangle, and without any `dataZoom` config the drag zooms\n * the x-axis. Set `toolbox.feature.dataZoom` through `option` to override the\n * derived axes explicitly. When every drag-targeted axis is continuous the\n * drag defaults to `filterMode: 'none'`, matching the slider rule above.\n *\n * **Axis-label tooltips.** Hovering a truncated axis label shows its full text\n * in a tooltip. Set `xAxis.tooltip.show` or `yAxis.tooltip.show` to `false` to\n * disable this behavior for an axis.\n */\nexport const Chart = ({ style, legend, ...chartProps }: ChartProps) => {\n const [isWaitingForFirstResize, setIsWaitingForFirstResize] = useState(true);\n const [chartOption, setChartOption] = useState<EChartsOption>();\n const [isLegendLayoutReady, setIsLegendLayoutReady] = useState(\n !legend?.isVisible,\n );\n\n const handleLegendLayoutReady = useCallback(() => {\n setIsLegendLayoutReady(true);\n }, []);\n\n useEffect(() => {\n if (!legend?.isVisible) {\n setIsLegendLayoutReady(true);\n }\n }, [legend?.isVisible]);\n\n const chartLayoutClassName =\n legend?.isVisible && !isLegendLayoutReady\n ? 'ndl-chart-layout ndl-chart-layout-hidden'\n : 'ndl-chart-layout';\n\n return (\n <ChartRefsProvider>\n <ChartContainer style={style}>\n <div className={chartLayoutClassName}>\n <ChartRender\n {...chartProps}\n onChartOptionChange={setChartOption}\n onFirstResizeChange={setIsWaitingForFirstResize}\n />\n </div>\n {legend?.isVisible && (\n <ChartLegend\n chartOption={chartOption}\n isLayoutReady={isLegendLayoutReady}\n isWaitingForFirstResize={isWaitingForFirstResize}\n onLayoutReady={handleLegendLayoutReady}\n />\n )}\n </ChartContainer>\n </ChartRefsProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAiHwB,MAAA,YAAA,CAAA,SAAO,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnE/B,MAAM,eAAe,EACnB,aACA,eACA,yBACA,oBACsB;CACtB,MAAM,eAAeA,uCAAAA,gBAAgB;EACnC;EACA;CACF,CAAC;CAED,IAAI,yBACF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,eAAY;EACZ,WAAU;CACX,CAAA;CAIL,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,QAAD;EACE,QAAQ,iBAAA,QAAA,iBAAA,KAAA,IAAA,eAAgB,CAAC;EACV;EACA;CAChB,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,SAAS,SAAiD;CAAjD,IAAA,EAAE,OAAO,WAAA,MAAW,aAAA,gCAAA,QAAA,MAAA,SAAA;CACxC,MAAM,CAAC,yBAAyB,+BAAA,GAA8BC,MAAAA,SAAAA,CAAS,IAAI;CAC3E,MAAM,CAAC,aAAa,mBAAA,GAAkBA,MAAAA,SAAAA,CAAwB;CAC9D,MAAM,CAAC,qBAAqB,2BAAA,GAA0BA,MAAAA,SAAAA,CACpD,EAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,UACX;CAEA,MAAM,2BAAA,GAA0BC,MAAAA,YAAAA,OAAkB;EAChD,uBAAuB,IAAI;CAC7B,GAAG,CAAC,CAAC;CAEL,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,EAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,YACX,uBAAuB,IAAI;CAE/B,GAAG,CAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,SAAS,CAAC;CAEtB,MAAM,wBAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IACJ,OAAQ,cAAa,CAAC,sBAClB,6CACA;CAEN,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,oCAAAA,mBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,8BAAAA,gBAAD;EAAuB;EAAvB,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAW;GACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,2BAAAA,aAAAA,sBAAAA,QAAAA,sBAAAA,QAAAA,CAAAA,GACK,UAAA,GAAA,CAAA,GAAA;IACJ,qBAAqB;IACrB,qBAAqB;GACtB,CAAA,CAAA;EACE,CAAA,IAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IACJ,OAAQ,cACP,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD;GACe;GACb,eAAe;GACU;GACzB,eAAe;EAChB,CAAA,CAEW;CACC,CAAA,EAAA,CAAA;AAEvB"}
|