@neo4j-ndl/react-charts 2.1.21 → 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.
Files changed (209) hide show
  1. package/lib/LICENSES.txt +0 -295
  2. package/lib/NOTICE.txt +1383 -1392
  3. package/lib/{esm/charts/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.js} +13 -5
  4. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js +46 -0
  5. package/lib/{esm/charts/tests/ChartWrapperWithTooltipFormatter.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js} +12 -13
  6. package/lib/{esm/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js} +13 -2
  7. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.js +35 -0
  8. package/lib/{esm/charts/utils/chart-types.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.js} +10 -2
  9. package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.js +37 -0
  10. package/lib/cjs/_virtual/_rolldown/runtime.js +44 -0
  11. package/lib/cjs/charts/Chart.js +121 -111
  12. package/lib/cjs/charts/Chart.js.map +1 -1
  13. package/lib/cjs/charts/ChartContainer.js +67 -62
  14. package/lib/cjs/charts/ChartContainer.js.map +1 -1
  15. package/lib/cjs/charts/ChartEmpty.js +45 -30
  16. package/lib/cjs/charts/ChartEmpty.js.map +1 -1
  17. package/lib/cjs/charts/ChartRender.js +112 -87
  18. package/lib/cjs/charts/ChartRender.js.map +1 -1
  19. package/lib/cjs/charts/ChartTooltip.js +111 -65
  20. package/lib/cjs/charts/ChartTooltip.js.map +1 -1
  21. package/lib/cjs/charts/Legend.js +81 -69
  22. package/lib/cjs/charts/Legend.js.map +1 -1
  23. package/lib/cjs/charts/LegendItem.js +83 -62
  24. package/lib/cjs/charts/LegendItem.js.map +1 -1
  25. package/lib/cjs/charts/LegendLayout.js +330 -348
  26. package/lib/cjs/charts/LegendLayout.js.map +1 -1
  27. package/lib/cjs/charts/hooks/use-chart-instance.js +115 -122
  28. package/lib/cjs/charts/hooks/use-chart-instance.js.map +1 -1
  29. package/lib/cjs/charts/hooks/use-chart-option.js +79 -80
  30. package/lib/cjs/charts/hooks/use-chart-option.js.map +1 -1
  31. package/lib/cjs/charts/hooks/use-chart-refs.js +47 -44
  32. package/lib/cjs/charts/hooks/use-chart-refs.js.map +1 -1
  33. package/lib/cjs/charts/hooks/use-chart-zoom.js +102 -127
  34. package/lib/cjs/charts/hooks/use-chart-zoom.js.map +1 -1
  35. package/lib/cjs/charts/hooks/use-legend-interactions.js +127 -132
  36. package/lib/cjs/charts/hooks/use-legend-interactions.js.map +1 -1
  37. package/lib/cjs/charts/hooks/use-legend-series.js +143 -174
  38. package/lib/cjs/charts/hooks/use-legend-series.js.map +1 -1
  39. package/lib/cjs/charts/hooks/use-legend-visibility.js +66 -85
  40. package/lib/cjs/charts/hooks/use-legend-visibility.js.map +1 -1
  41. package/lib/cjs/charts/index.js +31 -40
  42. package/lib/cjs/charts/index.js.map +1 -1
  43. package/lib/cjs/charts/themes/ndl-echarts-theme.js +136 -168
  44. package/lib/cjs/charts/themes/ndl-echarts-theme.js.map +1 -1
  45. package/lib/cjs/charts/utils/aria-description.js +150 -214
  46. package/lib/cjs/charts/utils/aria-description.js.map +1 -1
  47. package/lib/cjs/charts/utils/build-chart-option.js +166 -174
  48. package/lib/cjs/charts/utils/build-chart-option.js.map +1 -1
  49. package/lib/cjs/charts/utils/chart-tooltip-formatter.js +156 -172
  50. package/lib/cjs/charts/utils/chart-tooltip-formatter.js.map +1 -1
  51. package/lib/cjs/charts/utils/chart-types.js +25 -20
  52. package/lib/cjs/charts/utils/chart-types.js.map +1 -1
  53. package/lib/cjs/charts/utils/defaults.js +69 -67
  54. package/lib/cjs/charts/utils/defaults.js.map +1 -1
  55. package/lib/cjs/charts/utils/format-utils.js +55 -66
  56. package/lib/cjs/charts/utils/format-utils.js.map +1 -1
  57. package/lib/cjs/charts/utils/legend-layout.js +54 -53
  58. package/lib/cjs/charts/utils/legend-layout.js.map +1 -1
  59. package/lib/cjs/charts/utils/legend-utils.js +82 -121
  60. package/lib/cjs/charts/utils/legend-utils.js.map +1 -1
  61. package/lib/cjs/charts/utils/scatter-tooltip-points.js +191 -266
  62. package/lib/cjs/charts/utils/scatter-tooltip-points.js.map +1 -1
  63. package/lib/cjs/charts/utils/threshold.js +89 -102
  64. package/lib/cjs/charts/utils/threshold.js.map +1 -1
  65. package/lib/cjs/charts/utils/user-option-utils.js +419 -347
  66. package/lib/cjs/charts/utils/user-option-utils.js.map +1 -1
  67. package/lib/cjs/index.js +31 -35
  68. package/lib/cjs/index.js.map +1 -1
  69. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.mjs +11 -0
  70. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs +24 -0
  71. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs +12 -0
  72. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.mjs +11 -0
  73. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.mjs +13 -0
  74. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.mjs +8 -0
  75. package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.mjs +10 -0
  76. package/lib/esm/charts/Chart.mjs +123 -0
  77. package/lib/esm/charts/Chart.mjs.map +1 -0
  78. package/lib/esm/charts/ChartContainer.mjs +71 -0
  79. package/lib/esm/charts/ChartContainer.mjs.map +1 -0
  80. package/lib/esm/charts/ChartEmpty.mjs +46 -0
  81. package/lib/esm/charts/ChartEmpty.mjs.map +1 -0
  82. package/lib/esm/charts/ChartRender.mjs +113 -0
  83. package/lib/esm/charts/ChartRender.mjs.map +1 -0
  84. package/lib/esm/charts/ChartTooltip.mjs +109 -0
  85. package/lib/esm/charts/ChartTooltip.mjs.map +1 -0
  86. package/lib/esm/charts/Legend.mjs +82 -0
  87. package/lib/esm/charts/Legend.mjs.map +1 -0
  88. package/lib/esm/charts/LegendItem.mjs +82 -0
  89. package/lib/esm/charts/LegendItem.mjs.map +1 -0
  90. package/lib/esm/charts/LegendLayout.mjs +337 -0
  91. package/lib/esm/charts/LegendLayout.mjs.map +1 -0
  92. package/lib/esm/charts/hooks/use-chart-instance.mjs +119 -0
  93. package/lib/esm/charts/hooks/use-chart-instance.mjs.map +1 -0
  94. package/lib/esm/charts/hooks/use-chart-option.mjs +79 -0
  95. package/lib/esm/charts/hooks/use-chart-option.mjs.map +1 -0
  96. package/lib/esm/charts/hooks/use-chart-refs.mjs +49 -0
  97. package/lib/esm/charts/hooks/use-chart-refs.mjs.map +1 -0
  98. package/lib/esm/charts/hooks/use-chart-zoom.mjs +102 -0
  99. package/lib/esm/charts/hooks/use-chart-zoom.mjs.map +1 -0
  100. package/lib/esm/charts/hooks/use-legend-interactions.mjs +138 -0
  101. package/lib/esm/charts/hooks/use-legend-interactions.mjs.map +1 -0
  102. package/lib/esm/charts/hooks/use-legend-series.mjs +151 -0
  103. package/lib/esm/charts/hooks/use-legend-series.mjs.map +1 -0
  104. package/lib/esm/charts/hooks/use-legend-visibility.mjs +67 -0
  105. package/lib/esm/charts/hooks/use-legend-visibility.mjs.map +1 -0
  106. package/lib/esm/charts/index.mjs +27 -0
  107. package/lib/esm/charts/index.mjs.map +1 -0
  108. package/lib/esm/charts/themes/ndl-echarts-theme.mjs +139 -0
  109. package/lib/esm/charts/themes/ndl-echarts-theme.mjs.map +1 -0
  110. package/lib/esm/charts/utils/aria-description.mjs +162 -0
  111. package/lib/esm/charts/utils/aria-description.mjs.map +1 -0
  112. package/lib/esm/charts/utils/build-chart-option.mjs +184 -0
  113. package/lib/esm/charts/utils/build-chart-option.mjs.map +1 -0
  114. package/lib/esm/charts/utils/chart-tooltip-formatter.mjs +159 -0
  115. package/lib/esm/charts/utils/chart-tooltip-formatter.mjs.map +1 -0
  116. package/lib/esm/charts/utils/chart-types.mjs +24 -0
  117. package/lib/esm/charts/utils/chart-types.mjs.map +1 -0
  118. package/lib/esm/charts/utils/defaults.mjs +73 -0
  119. package/lib/esm/charts/utils/defaults.mjs.map +1 -0
  120. package/lib/esm/charts/utils/format-utils.mjs +61 -0
  121. package/lib/esm/charts/utils/format-utils.mjs.map +1 -0
  122. package/lib/esm/charts/utils/legend-layout.mjs +57 -0
  123. package/lib/esm/charts/utils/legend-layout.mjs.map +1 -0
  124. package/lib/esm/charts/utils/legend-utils.mjs +90 -0
  125. package/lib/esm/charts/utils/legend-utils.mjs.map +1 -0
  126. package/lib/esm/charts/utils/scatter-tooltip-points.mjs +215 -0
  127. package/lib/esm/charts/utils/scatter-tooltip-points.mjs.map +1 -0
  128. package/lib/esm/charts/utils/threshold.mjs +92 -0
  129. package/lib/esm/charts/utils/threshold.mjs.map +1 -0
  130. package/lib/esm/charts/utils/user-option-utils.mjs +445 -0
  131. package/lib/esm/charts/utils/user-option-utils.mjs.map +1 -0
  132. package/lib/esm/index.mjs +27 -0
  133. package/lib/esm/index.mjs.map +1 -0
  134. package/package.json +12 -16
  135. package/skills/ndl-react-charts/SKILL.md +2 -2
  136. package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js +0 -38
  137. package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
  138. package/lib/cjs/charts/tests/ChartZoomHarness.js +0 -113
  139. package/lib/cjs/charts/tests/ChartZoomHarness.js.map +0 -1
  140. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js +0 -78
  141. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
  142. package/lib/cjs/charts/tests/PieChartWithRerender.js +0 -46
  143. package/lib/cjs/charts/tests/PieChartWithRerender.js.map +0 -1
  144. package/lib/cjs/charts/tests/chart-test-utils.js +0 -527
  145. package/lib/cjs/charts/tests/chart-test-utils.js.map +0 -1
  146. package/lib/esm/charts/Chart.js +0 -114
  147. package/lib/esm/charts/Chart.js.map +0 -1
  148. package/lib/esm/charts/ChartContainer.js +0 -67
  149. package/lib/esm/charts/ChartContainer.js.map +0 -1
  150. package/lib/esm/charts/ChartEmpty.js +0 -33
  151. package/lib/esm/charts/ChartEmpty.js.map +0 -1
  152. package/lib/esm/charts/ChartRender.js +0 -89
  153. package/lib/esm/charts/ChartRender.js.map +0 -1
  154. package/lib/esm/charts/ChartTooltip.js +0 -64
  155. package/lib/esm/charts/ChartTooltip.js.map +0 -1
  156. package/lib/esm/charts/Legend.js +0 -71
  157. package/lib/esm/charts/Legend.js.map +0 -1
  158. package/lib/esm/charts/LegendItem.js +0 -61
  159. package/lib/esm/charts/LegendItem.js.map +0 -1
  160. package/lib/esm/charts/LegendLayout.js +0 -323
  161. package/lib/esm/charts/LegendLayout.js.map +0 -1
  162. package/lib/esm/charts/hooks/use-chart-instance.js +0 -128
  163. package/lib/esm/charts/hooks/use-chart-instance.js.map +0 -1
  164. package/lib/esm/charts/hooks/use-chart-option.js +0 -82
  165. package/lib/esm/charts/hooks/use-chart-option.js.map +0 -1
  166. package/lib/esm/charts/hooks/use-chart-refs.js +0 -48
  167. package/lib/esm/charts/hooks/use-chart-refs.js.map +0 -1
  168. package/lib/esm/charts/hooks/use-chart-zoom.js +0 -129
  169. package/lib/esm/charts/hooks/use-chart-zoom.js.map +0 -1
  170. package/lib/esm/charts/hooks/use-legend-interactions.js +0 -145
  171. package/lib/esm/charts/hooks/use-legend-interactions.js.map +0 -1
  172. package/lib/esm/charts/hooks/use-legend-series.js +0 -184
  173. package/lib/esm/charts/hooks/use-legend-series.js.map +0 -1
  174. package/lib/esm/charts/hooks/use-legend-visibility.js +0 -87
  175. package/lib/esm/charts/hooks/use-legend-visibility.js.map +0 -1
  176. package/lib/esm/charts/index.js.map +0 -1
  177. package/lib/esm/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
  178. package/lib/esm/charts/tests/ChartZoomHarness.js +0 -109
  179. package/lib/esm/charts/tests/ChartZoomHarness.js.map +0 -1
  180. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js +0 -74
  181. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
  182. package/lib/esm/charts/tests/PieChartWithRerender.js +0 -43
  183. package/lib/esm/charts/tests/PieChartWithRerender.js.map +0 -1
  184. package/lib/esm/charts/tests/chart-test-utils.js +0 -500
  185. package/lib/esm/charts/tests/chart-test-utils.js.map +0 -1
  186. package/lib/esm/charts/themes/ndl-echarts-theme.js +0 -172
  187. package/lib/esm/charts/themes/ndl-echarts-theme.js.map +0 -1
  188. package/lib/esm/charts/utils/aria-description.js +0 -228
  189. package/lib/esm/charts/utils/aria-description.js.map +0 -1
  190. package/lib/esm/charts/utils/build-chart-option.js +0 -193
  191. package/lib/esm/charts/utils/build-chart-option.js.map +0 -1
  192. package/lib/esm/charts/utils/chart-tooltip-formatter.js +0 -177
  193. package/lib/esm/charts/utils/chart-tooltip-formatter.js.map +0 -1
  194. package/lib/esm/charts/utils/chart-types.js.map +0 -1
  195. package/lib/esm/charts/utils/defaults.js +0 -73
  196. package/lib/esm/charts/utils/defaults.js.map +0 -1
  197. package/lib/esm/charts/utils/format-utils.js +0 -74
  198. package/lib/esm/charts/utils/format-utils.js.map +0 -1
  199. package/lib/esm/charts/utils/legend-layout.js +0 -59
  200. package/lib/esm/charts/utils/legend-layout.js.map +0 -1
  201. package/lib/esm/charts/utils/legend-utils.js +0 -131
  202. package/lib/esm/charts/utils/legend-utils.js.map +0 -1
  203. package/lib/esm/charts/utils/scatter-tooltip-points.js +0 -291
  204. package/lib/esm/charts/utils/scatter-tooltip-points.js.map +0 -1
  205. package/lib/esm/charts/utils/threshold.js +0 -106
  206. package/lib/esm/charts/utils/threshold.js.map +0 -1
  207. package/lib/esm/charts/utils/user-option-utils.js +0 -374
  208. package/lib/esm/charts/utils/user-option-utils.js.map +0 -1
  209. package/lib/esm/index.js.map +0 -1
@@ -0,0 +1,445 @@
1
+ import { ChartTooltip } from "../ChartTooltip.mjs";
2
+ import { getTooltipValueFormatter } from "./chart-tooltip-formatter.mjs";
3
+ import { defaultThresholdLineSeriesOption, tooltipExtraCssText } from "./defaults.mjs";
4
+ import { formatNumberEnUS, formatTimeAxisDate } from "./format-utils.mjs";
5
+ import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { tokens } from "@neo4j-ndl/base";
8
+ import { renderToString } from "react-dom/server";
9
+ // src/charts/utils/user-option-utils.tsx
10
+ /*!
11
+ *
12
+ * Copyright (c) "Neo4j"
13
+ * Neo4j Sweden AB [http://neo4j.com]
14
+ *
15
+ * This file is part of Neo4j.
16
+ *
17
+ * Neo4j is free software: you can redistribute it and/or modify
18
+ * it under the terms of the GNU General Public License as published by
19
+ * the Free Software Foundation, either version 3 of the License, or
20
+ * (at your option) any later version.
21
+ *
22
+ * This program is distributed in the hope that it will be useful,
23
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
+ * GNU General Public License for more details.
26
+ *
27
+ * You should have received a copy of the GNU General Public License
28
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
29
+ */
30
+ const defaultColors = Object.values(tokens.categorical);
31
+ const mergeAxisTooltip = (tooltip) => _objectSpread2({
32
+ formatter: (params) => {
33
+ var _params$isTruncated;
34
+ return ((_params$isTruncated = params.isTruncated) === null || _params$isTruncated === void 0 ? void 0 : _params$isTruncated.call(params)) === true ? renderToString(/* @__PURE__ */ jsx("span", {
35
+ className: "ndl-tooltip-content ndl-tooltip-content-simple",
36
+ children: params.name
37
+ })) : void 0;
38
+ },
39
+ show: true
40
+ }, tooltip);
41
+ const mergeSeries = (series, theme = "light", userOption, palette) => {
42
+ const colors = palette !== null && palette !== void 0 ? palette : defaultColors;
43
+ return series.map((option, index = 0) => {
44
+ var _option$color;
45
+ if (option === void 0) return {};
46
+ const color = Array.isArray(option.color) ? option.color[index] : (_option$color = option.color) !== null && _option$color !== void 0 ? _option$color : colors[index % colors.length];
47
+ if (option.type === "thresholdLine") {
48
+ const { notificationType } = option;
49
+ const thresholdLineName = `thresholdLine-${notificationType}`;
50
+ return _objectSpread2(_objectSpread2({
51
+ symbolSize: 9,
52
+ symbol: "none",
53
+ condition: defaultThresholdLineSeriesOption.condition
54
+ }, option), {}, {
55
+ lineStyle: _objectSpread2({
56
+ type: "dashed",
57
+ width: 2
58
+ }, option.lineStyle),
59
+ name: thresholdLineName,
60
+ type: "line",
61
+ data: [[option.xAxis[0], option.yAxis], [option.xAxis[1], option.yAxis]]
62
+ });
63
+ }
64
+ if (option.type === "line") {
65
+ var _option$emphasis;
66
+ const shadowParts = tokens.theme[theme].boxShadow.raised.split(/ (?=\d+px|rgba?\()/);
67
+ return _objectSpread2(_objectSpread2({
68
+ type: "line",
69
+ symbolSize: 9,
70
+ color,
71
+ symbol: "none"
72
+ }, option), {}, {
73
+ lineStyle: _objectSpread2({
74
+ type: "solid",
75
+ width: 2
76
+ }, option.lineStyle),
77
+ emphasis: _objectSpread2(_objectSpread2({
78
+ disabled: true,
79
+ focus: "series"
80
+ }, option.emphasis), {}, {
81
+ itemStyle: _objectSpread2({
82
+ borderColor: tokens.theme[theme].color.neutral.bg.weak,
83
+ shadowBlur: parseInt(shadowParts[2]),
84
+ shadowColor: shadowParts[4],
85
+ shadowOffsetX: parseInt(shadowParts[0]),
86
+ shadowOffsetY: parseInt(shadowParts[1])
87
+ }, (_option$emphasis = option.emphasis) === null || _option$emphasis === void 0 ? void 0 : _option$emphasis.itemStyle),
88
+ label: { show: false }
89
+ }, option.emphasis)
90
+ });
91
+ }
92
+ if (option.type === "pie") {
93
+ var _option$blur, _option$blur2;
94
+ const valueFormatter = getTooltipValueFormatter(userOption);
95
+ return _objectSpread2(_objectSpread2({
96
+ animationDuration: 600,
97
+ animationType: "scale",
98
+ selectedMode: "single"
99
+ }, option), {}, {
100
+ blur: _objectSpread2({
101
+ itemStyle: _objectSpread2({ opacity: 1 }, (_option$blur = option.blur) === null || _option$blur === void 0 ? void 0 : _option$blur.itemStyle),
102
+ label: _objectSpread2({ opacity: 1 }, (_option$blur2 = option.blur) === null || _option$blur2 === void 0 ? void 0 : _option$blur2.label)
103
+ }, option.blur),
104
+ emphasis: _objectSpread2({
105
+ disabled: false,
106
+ focus: "self",
107
+ scale: true,
108
+ scaleSize: 5
109
+ }, option.emphasis),
110
+ itemStyle: _objectSpread2({
111
+ borderColor: tokens.theme[theme].color.neutral.bg.weak,
112
+ borderWidth: 1
113
+ }, option.itemStyle),
114
+ label: _objectSpread2({
115
+ backgroundColor: "transparent",
116
+ color: tokens.theme[theme].color.neutral.text.weak,
117
+ formatter: "{d}%"
118
+ }, option.label),
119
+ labelLine: _objectSpread2({
120
+ length: 5,
121
+ show: true
122
+ }, option.labelLine),
123
+ tooltip: _objectSpread2({
124
+ trigger: "item",
125
+ confine: true,
126
+ padding: 0,
127
+ borderRadius: 0,
128
+ borderWidth: 0,
129
+ extraCssText: tooltipExtraCssText,
130
+ formatter: function(params) {
131
+ var _firstParam$value$;
132
+ const firstParam = (Array.isArray(params) ? params : [params])[0];
133
+ const sliceName = (_firstParam$value$ = firstParam === null || firstParam === void 0 ? void 0 : firstParam.value[0]) !== null && _firstParam$value$ !== void 0 ? _firstParam$value$ : firstParam.seriesName;
134
+ const sliceLabel = sliceName instanceof Date ? formatTimeAxisDate(sliceName) : sliceName;
135
+ return `${renderToString(/* @__PURE__ */ jsx("span", {
136
+ className: "ndl-charts-chart-tooltip",
137
+ children: /* @__PURE__ */ jsx(ChartTooltip.Content, {
138
+ leadingElement: sliceLabel,
139
+ trailingElement: valueFormatter(Array.isArray(firstParam.value) ? firstParam.value[1] : firstParam.value),
140
+ indentSquareColor: firstParam.color
141
+ }, sliceLabel)
142
+ }))}`;
143
+ }
144
+ }, option.tooltip)
145
+ });
146
+ }
147
+ if (option.type === "scatter") {
148
+ var _option$emphasis2;
149
+ const interiorColor = tokens.theme[theme].color.neutral.bg.weak;
150
+ return _objectSpread2(_objectSpread2({
151
+ color,
152
+ symbol: "circle",
153
+ symbolSize: 10
154
+ }, option), {}, {
155
+ itemStyle: _objectSpread2({
156
+ borderColor: color,
157
+ borderWidth: 2,
158
+ color: interiorColor
159
+ }, option.itemStyle),
160
+ emphasis: _objectSpread2(_objectSpread2({
161
+ disabled: false,
162
+ focus: "none"
163
+ }, option.emphasis), {}, { itemStyle: _objectSpread2({
164
+ borderColor: color,
165
+ color
166
+ }, (_option$emphasis2 = option.emphasis) === null || _option$emphasis2 === void 0 ? void 0 : _option$emphasis2.itemStyle) })
167
+ });
168
+ }
169
+ if (option.type === "bar") {
170
+ var _option$blur3, _option$markLine, _option$markLine2, _option$markLine3;
171
+ const valueFormatter = getTooltipValueFormatter(userOption);
172
+ return _objectSpread2(_objectSpread2({ barMaxWidth: 16 }, option), {}, {
173
+ blur: _objectSpread2({ itemStyle: _objectSpread2({ opacity: .3 }, (_option$blur3 = option.blur) === null || _option$blur3 === void 0 ? void 0 : _option$blur3.itemStyle) }, option.blur),
174
+ emphasis: _objectSpread2({
175
+ disabled: true,
176
+ focus: "series"
177
+ }, option.emphasis),
178
+ itemStyle: _objectSpread2({
179
+ borderWidth: 20,
180
+ color
181
+ }, option.itemStyle),
182
+ markLine: {
183
+ emphasis: _objectSpread2({
184
+ disabled: true,
185
+ lineStyle: _objectSpread2({ width: 20 }, (_option$markLine = option.markLine) === null || _option$markLine === void 0 || (_option$markLine = _option$markLine.emphasis) === null || _option$markLine === void 0 ? void 0 : _option$markLine.lineStyle)
186
+ }, (_option$markLine2 = option.markLine) === null || _option$markLine2 === void 0 ? void 0 : _option$markLine2.emphasis),
187
+ lineStyle: _objectSpread2({ width: 20 }, (_option$markLine3 = option.markLine) === null || _option$markLine3 === void 0 ? void 0 : _option$markLine3.lineStyle)
188
+ },
189
+ tooltip: _objectSpread2({
190
+ trigger: "axis",
191
+ confine: true,
192
+ padding: 0,
193
+ borderRadius: 0,
194
+ borderWidth: 0,
195
+ extraCssText: tooltipExtraCssText,
196
+ formatter: function(params) {
197
+ var _firstParam$value$2;
198
+ const firstParam = (Array.isArray(params) ? params : [params])[0];
199
+ return `${renderToString(/* @__PURE__ */ jsxs("span", {
200
+ className: "ndl-charts-chart-tooltip",
201
+ children: [/* @__PURE__ */ jsx(ChartTooltip.Title, { children: firstParam.name }), /* @__PURE__ */ jsx(ChartTooltip.Content, {
202
+ leadingElement: firstParam.seriesName,
203
+ trailingElement: valueFormatter(Array.isArray(firstParam.value) ? firstParam.value[1] : firstParam.value),
204
+ indentSquareColor: firstParam.color
205
+ }, (_firstParam$value$2 = firstParam === null || firstParam === void 0 ? void 0 : firstParam.value[0]) !== null && _firstParam$value$2 !== void 0 ? _firstParam$value$2 : firstParam.seriesName)]
206
+ }))}`;
207
+ }
208
+ }, option.tooltip)
209
+ });
210
+ }
211
+ return option;
212
+ });
213
+ };
214
+ const mergeXAxis = (xAxis, theme = "light") => {
215
+ var _xAxis$axisLine, _xAxis$axisTick;
216
+ if (xAxis === void 0) return [];
217
+ if (Array.isArray(xAxis)) return xAxis.map((axis) => mergeXAxis(axis, theme));
218
+ const baseXAxis = _objectSpread2(_objectSpread2({}, xAxis), {}, {
219
+ axisLabel: _objectSpread2({
220
+ formatter: {
221
+ day: "{dd} {MMM}",
222
+ hour: "{HH}:{mm}",
223
+ millisecond: "{hh}:{mm}:{ss} {SSS}",
224
+ minute: "{HH}:{mm}",
225
+ month: "{MMM}",
226
+ none: "{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}",
227
+ second: "{HH}:{mm}:{ss}",
228
+ year: "{yearStyle|{yyyy}}\n{monthStyle|{MMM}}"
229
+ },
230
+ margin: 16,
231
+ overflow: "truncate"
232
+ }, xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisLabel),
233
+ axisLine: _objectSpread2({ lineStyle: _objectSpread2({}, xAxis === null || xAxis === void 0 || (_xAxis$axisLine = xAxis.axisLine) === null || _xAxis$axisLine === void 0 ? void 0 : _xAxis$axisLine.lineStyle) }, xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisLine),
234
+ axisTick: _objectSpread2(_objectSpread2({}, xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisTick), {}, {
235
+ lineStyle: _objectSpread2({}, xAxis === null || xAxis === void 0 || (_xAxis$axisTick = xAxis.axisTick) === null || _xAxis$axisTick === void 0 ? void 0 : _xAxis$axisTick.lineStyle),
236
+ show: true
237
+ }, xAxis === null || xAxis === void 0 ? void 0 : xAxis.axisTick),
238
+ splitLine: _objectSpread2({ show: false }, xAxis === null || xAxis === void 0 ? void 0 : xAxis.splitLine),
239
+ tooltip: mergeAxisTooltip(xAxis.tooltip)
240
+ });
241
+ if (xAxis.type === "time") return _objectSpread2(_objectSpread2({}, baseXAxis), {}, { axisLabel: _objectSpread2({ hideOverlap: true }, baseXAxis.axisLabel) });
242
+ if (xAxis.type === "value" || xAxis.type === "log") {
243
+ const xAxisFormatter = xAxis.axisLabel && "formatter" in xAxis.axisLabel ? xAxis.axisLabel.formatter : void 0;
244
+ return _objectSpread2(_objectSpread2({}, baseXAxis), {}, { axisLabel: _objectSpread2(_objectSpread2({}, baseXAxis.axisLabel), {}, { formatter: xAxisFormatter !== null && xAxisFormatter !== void 0 ? xAxisFormatter : formatNumberEnUS }) });
245
+ }
246
+ if (xAxis.type === "category") return _objectSpread2(_objectSpread2({}, baseXAxis), {}, {
247
+ axisLabel: _objectSpread2({ width: 80 }, baseXAxis === null || baseXAxis === void 0 ? void 0 : baseXAxis.axisLabel),
248
+ axisTick: _objectSpread2({ alignWithLabel: true }, baseXAxis === null || baseXAxis === void 0 ? void 0 : baseXAxis.axisTick)
249
+ });
250
+ return baseXAxis;
251
+ };
252
+ const mergeYAxis = (yAxis, theme = "light") => {
253
+ var _yAxis$axisLine, _yAxis$axisTick;
254
+ if (yAxis === void 0) return [];
255
+ if (Array.isArray(yAxis)) return yAxis.map((axis) => mergeYAxis(axis, theme));
256
+ const baseYAxis = _objectSpread2(_objectSpread2({}, yAxis), {}, {
257
+ axisLabel: _objectSpread2({
258
+ margin: 8,
259
+ overflow: "truncate"
260
+ }, yAxis === null || yAxis === void 0 ? void 0 : yAxis.axisLabel),
261
+ axisLine: _objectSpread2(_objectSpread2({}, yAxis === null || yAxis === void 0 ? void 0 : yAxis.axisLine), {}, {
262
+ lineStyle: _objectSpread2({}, yAxis === null || yAxis === void 0 || (_yAxis$axisLine = yAxis.axisLine) === null || _yAxis$axisLine === void 0 ? void 0 : _yAxis$axisLine.lineStyle),
263
+ show: true
264
+ }),
265
+ axisTick: _objectSpread2(_objectSpread2({ show: false }, yAxis === null || yAxis === void 0 ? void 0 : yAxis.axisTick), {}, { lineStyle: _objectSpread2({ width: 1 }, yAxis === null || yAxis === void 0 || (_yAxis$axisTick = yAxis.axisTick) === null || _yAxis$axisTick === void 0 ? void 0 : _yAxis$axisTick.lineStyle) }),
266
+ splitLine: _objectSpread2({ show: true }, yAxis === null || yAxis === void 0 ? void 0 : yAxis.splitLine),
267
+ tooltip: mergeAxisTooltip(yAxis.tooltip)
268
+ });
269
+ if (yAxis.type === "time") return _objectSpread2(_objectSpread2({}, baseYAxis), {}, {
270
+ axisLabel: _objectSpread2({ hideOverlap: true }, baseYAxis.axisLabel),
271
+ splitLine: _objectSpread2({ show: false }, baseYAxis === null || baseYAxis === void 0 ? void 0 : baseYAxis.splitLine)
272
+ });
273
+ if (yAxis.type === "value" || yAxis.type === "log") {
274
+ const yAxisFormatter = yAxis.axisLabel && "formatter" in yAxis.axisLabel ? yAxis.axisLabel.formatter : void 0;
275
+ return _objectSpread2(_objectSpread2({}, baseYAxis), {}, {
276
+ axisLabel: _objectSpread2(_objectSpread2({ hideOverlap: true }, baseYAxis.axisLabel), {}, { formatter: yAxisFormatter !== null && yAxisFormatter !== void 0 ? yAxisFormatter : formatNumberEnUS }),
277
+ splitLine: _objectSpread2({ show: false }, baseYAxis === null || baseYAxis === void 0 ? void 0 : baseYAxis.splitLine)
278
+ });
279
+ }
280
+ if (yAxis.type === "category") return _objectSpread2(_objectSpread2({}, baseYAxis), {}, { axisLabel: _objectSpread2({ width: 100 }, baseYAxis === null || baseYAxis === void 0 ? void 0 : baseYAxis.axisLabel) });
281
+ return baseYAxis;
282
+ };
283
+ const normalizeAxisIndices = (axisIndex) => {
284
+ if (typeof axisIndex === "number") return [axisIndex];
285
+ if (Array.isArray(axisIndex)) return axisIndex.filter((index) => {
286
+ return typeof index === "number";
287
+ });
288
+ return [];
289
+ };
290
+ /**
291
+ * Resolves the axes a single dataZoom entry targets, mirroring ECharts' own
292
+ * resolution order: explicit `xAxisIndex`/`yAxisIndex` win (`false` meaning
293
+ * "not this axis"); when no index is given, `orient: 'vertical'` targets the
294
+ * first y-axis and horizontal/unset targets the first x-axis.
295
+ */
296
+ const getSingleDataZoomTargets = (dataZoom) => {
297
+ if ((dataZoom === null || dataZoom === void 0 ? void 0 : dataZoom.type) !== "slider" && (dataZoom === null || dataZoom === void 0 ? void 0 : dataZoom.type) !== "inside") return {
298
+ xAxisIndices: [],
299
+ yAxisIndices: []
300
+ };
301
+ if (dataZoom.xAxisIndex !== void 0 || dataZoom.yAxisIndex !== void 0) return {
302
+ xAxisIndices: normalizeAxisIndices(dataZoom.xAxisIndex),
303
+ yAxisIndices: normalizeAxisIndices(dataZoom.yAxisIndex)
304
+ };
305
+ return dataZoom.orient === "vertical" ? {
306
+ xAxisIndices: [],
307
+ yAxisIndices: [0]
308
+ } : {
309
+ xAxisIndices: [0],
310
+ yAxisIndices: []
311
+ };
312
+ };
313
+ /**
314
+ * Union of the axis indices targeted by all slider/inside entries in a
315
+ * dataZoom config, using the same per-entry resolution as ECharts (explicit
316
+ * axis indices first, then orientation).
317
+ */
318
+ const getDataZoomTargetAxes = (dataZoom) => {
319
+ const entries = Array.isArray(dataZoom) ? dataZoom : [dataZoom];
320
+ const targets = {
321
+ xAxisIndices: [],
322
+ yAxisIndices: []
323
+ };
324
+ for (const entry of entries) {
325
+ const entryTargets = getSingleDataZoomTargets(entry);
326
+ for (const index of entryTargets.xAxisIndices) if (!targets.xAxisIndices.includes(index)) targets.xAxisIndices.push(index);
327
+ for (const index of entryTargets.yAxisIndices) if (!targets.yAxisIndices.includes(index)) targets.yAxisIndices.push(index);
328
+ }
329
+ return targets;
330
+ };
331
+ /**
332
+ * A slider is vertical when the consumer sets `orient: 'vertical'`, or when it
333
+ * only targets a y-axis, which makes ECharts infer the vertical orientation.
334
+ */
335
+ const isVerticalSlider = (dataZoom) => {
336
+ if ((dataZoom === null || dataZoom === void 0 ? void 0 : dataZoom.type) !== "slider") return false;
337
+ if (dataZoom.orient !== void 0) return dataZoom.orient === "vertical";
338
+ const targets = getSingleDataZoomTargets(dataZoom);
339
+ return targets.yAxisIndices.length > 0 && targets.xAxisIndices.length === 0;
340
+ };
341
+ /**
342
+ * Axis types where windowing (`filterMode: 'none'`) beats ECharts' default
343
+ * data filtering. Filtering a continuous axis removes whole data items outside
344
+ * the window, which makes bars and points vanish instead of clipping them.
345
+ * Category axes keep the `'filter'` default so paging through categories still
346
+ * rescales the opposite value axis to the visible data.
347
+ */
348
+ const WINDOWED_FILTER_AXIS_TYPES = [
349
+ "log",
350
+ "time",
351
+ "value"
352
+ ];
353
+ const getSingleAxisOption = (axis, axisIndex) => {
354
+ if (!Array.isArray(axis)) return axis;
355
+ return axis[typeof axisIndex === "number" ? axisIndex : Array.isArray(axisIndex) && typeof axisIndex[0] === "number" ? axisIndex[0] : 0];
356
+ };
357
+ /**
358
+ * Resolves the slider's target axis the way ECharts does (explicit axis index
359
+ * first, then orientation) and returns `'none'` when that axis is continuous.
360
+ * Returns `undefined` (keep ECharts' `'filter'` default) for category axes and
361
+ * for sliders that target both axes at once.
362
+ */
363
+ const getSliderDefaultFilterMode = (dataZoom, axes) => {
364
+ const targets = getSingleDataZoomTargets(dataZoom);
365
+ const isXAxisTarget = targets.xAxisIndices.length > 0;
366
+ const isYAxisTarget = targets.yAxisIndices.length > 0;
367
+ if (isXAxisTarget === isYAxisTarget) return;
368
+ const targetAxis = isYAxisTarget ? getSingleAxisOption(axes === null || axes === void 0 ? void 0 : axes.yAxis, dataZoom.yAxisIndex) : getSingleAxisOption(axes === null || axes === void 0 ? void 0 : axes.xAxis, dataZoom.xAxisIndex);
369
+ return (targetAxis === null || targetAxis === void 0 ? void 0 : targetAxis.type) !== void 0 && WINDOWED_FILTER_AXIS_TYPES.includes(targetAxis.type) ? "none" : void 0;
370
+ };
371
+ const VERTICAL_SLIDER_RIGHT = 10;
372
+ const VERTICAL_SLIDER_WIDTH = 28;
373
+ const mergeDataZoom = (dataZoom, axes) => {
374
+ if (Array.isArray(dataZoom)) return dataZoom.map((option) => mergeDataZoom(option, axes));
375
+ const isSlider = (dataZoom === null || dataZoom === void 0 ? void 0 : dataZoom.type) === "slider";
376
+ const isInside = (dataZoom === null || dataZoom === void 0 ? void 0 : dataZoom.type) === "inside";
377
+ if (isSlider) {
378
+ const filterMode = getSliderDefaultFilterMode(dataZoom, axes);
379
+ const layoutDefaults = isVerticalSlider(dataZoom) ? {
380
+ right: VERTICAL_SLIDER_RIGHT,
381
+ textStyle: {
382
+ overflow: "truncate",
383
+ width: 48
384
+ },
385
+ width: VERTICAL_SLIDER_WIDTH
386
+ } : {
387
+ bottom: 10,
388
+ height: 28
389
+ };
390
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, filterMode !== void 0 && { filterMode }), layoutDefaults), {}, {
391
+ show: true,
392
+ type: "slider"
393
+ }, dataZoom);
394
+ } else if (isInside) {
395
+ const targets = getSingleDataZoomTargets(dataZoom);
396
+ const hasDefaultXAxisTarget = dataZoom.xAxisIndex === void 0 && targets.xAxisIndices.length > 0;
397
+ return _objectSpread2(_objectSpread2({ filterMode: "none" }, hasDefaultXAxisTarget && { xAxisIndex: [0] }), {}, { zoomOnMouseWheel: false }, dataZoom);
398
+ }
399
+ return dataZoom;
400
+ };
401
+ const isContinuousAxisOption = (axisOption) => {
402
+ return (axisOption === null || axisOption === void 0 ? void 0 : axisOption.type) !== void 0 && WINDOWED_FILTER_AXIS_TYPES.includes(axisOption.type);
403
+ };
404
+ const areTargetAxesContinuous = (axis, axisIndices) => {
405
+ if (axisIndices === "all") {
406
+ const axisOptions = Array.isArray(axis) ? axis : [axis];
407
+ return axisOptions.length > 0 && axisOptions.every((axisOption) => {
408
+ return isContinuousAxisOption(axisOption);
409
+ });
410
+ }
411
+ return axisIndices.every((axisIndex) => {
412
+ return isContinuousAxisOption(getSingleAxisOption(axis, axisIndex));
413
+ });
414
+ };
415
+ /**
416
+ * Returns `'none'` when every axis targeted by the drag-to-zoom brush is
417
+ * continuous (`value`/`time`/`log`), matching the slider rule: filtering a
418
+ * continuous axis removes whole data items outside the selection instead of
419
+ * clipping them. Category (or unknown) targets keep ECharts' `'filter'`
420
+ * default.
421
+ */
422
+ const getBrushDefaultFilterMode = (context, xAxisTargets, yAxisTargets) => {
423
+ const checks = [];
424
+ if (xAxisTargets !== false) checks.push(areTargetAxesContinuous(context === null || context === void 0 ? void 0 : context.xAxis, xAxisTargets));
425
+ if (yAxisTargets !== false) checks.push(areTargetAxesContinuous(context === null || context === void 0 ? void 0 : context.yAxis, yAxisTargets));
426
+ return checks.length > 0 && checks.every(Boolean) ? "none" : void 0;
427
+ };
428
+ const mergeToolbox = (toolbox, context) => {
429
+ var _toolbox$feature;
430
+ if (Array.isArray(toolbox)) return toolbox.map((option) => mergeToolbox(option, context));
431
+ const targets = getDataZoomTargetAxes(context === null || context === void 0 ? void 0 : context.dataZoom);
432
+ const xAxisTargets = targets.xAxisIndices.length > 0 || targets.yAxisIndices.length > 0 ? targets.xAxisIndices.length > 0 && targets.xAxisIndices : "all";
433
+ const yAxisTargets = targets.yAxisIndices.length > 0 && targets.yAxisIndices;
434
+ const filterMode = getBrushDefaultFilterMode(context, xAxisTargets, yAxisTargets);
435
+ return { feature: { dataZoom: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, filterMode !== void 0 && { filterMode }), xAxisTargets !== "all" && { xAxisIndex: xAxisTargets }), {}, { yAxisIndex: yAxisTargets }, toolbox === null || toolbox === void 0 || (_toolbox$feature = toolbox.feature) === null || _toolbox$feature === void 0 ? void 0 : _toolbox$feature.dataZoom), {}, {
436
+ icon: {
437
+ back: "-",
438
+ zoom: "-"
439
+ },
440
+ show: true
441
+ }) } };
442
+ };
443
+ export { getDataZoomTargetAxes, isVerticalSlider, mergeDataZoom, mergeSeries, mergeToolbox, mergeXAxis, mergeYAxis };
444
+
445
+ //# sourceMappingURL=user-option-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-option-utils.mjs","names":[],"sources":["../../../../src/charts/utils/user-option-utils.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 { tokens } from '@neo4j-ndl/base';\nimport { type EChartsOption, type SeriesOption } from 'echarts';\nimport { renderToString } from 'react-dom/server';\n\nimport { ChartTooltip } from '../ChartTooltip';\nimport { getTooltipValueFormatter } from './chart-tooltip-formatter';\nimport {\n type EchartsSeries,\n type HexColor,\n type NeedleSeries,\n type ThresholdLineSeriesOption,\n} from './chart-types';\nimport {\n defaultThresholdLineSeriesOption,\n tooltipExtraCssText,\n} from './defaults';\nimport { formatNumberEnUS, formatTimeAxisDate } from './format-utils';\n\nconst defaultColors = Object.values(tokens.categorical);\n\ntype SingleXAxisOption = Exclude<\n NonNullable<EChartsOption['xAxis']>,\n unknown[]\n>;\ntype SingleYAxisOption = Exclude<\n NonNullable<EChartsOption['yAxis']>,\n unknown[]\n>;\n\ntype AxisTooltipFormatterParams = {\n isTruncated?: () => boolean;\n name: string;\n};\n\ntype AxisTooltipOption = NonNullable<SingleXAxisOption['tooltip']> & {\n formatter?: (params: AxisTooltipFormatterParams) => string | undefined;\n};\n\nconst mergeAxisTooltip = (\n tooltip: SingleXAxisOption['tooltip'],\n): AxisTooltipOption => ({\n formatter: (params) =>\n params.isTruncated?.() === true\n ? renderToString(\n <span className=\"ndl-tooltip-content ndl-tooltip-content-simple\">\n {params.name}\n </span>,\n )\n : undefined,\n show: true,\n ...tooltip,\n});\n\nexport const mergeSeries = (\n series: NeedleSeries,\n theme: 'light' | 'dark' = 'light',\n userOption?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >,\n palette?: HexColor[],\n): EchartsSeries => {\n const colors = palette ?? defaultColors;\n\n return series.map(\n (\n option:\n | SeriesOption\n | ThresholdLineSeriesOption<'warning'>\n | ThresholdLineSeriesOption<'danger'>,\n index: number = 0,\n ): SeriesOption => {\n if (option === undefined) {\n return {};\n }\n\n const color = Array.isArray(option.color)\n ? option.color[index]\n : (option.color ?? colors[index % colors.length]);\n\n if (option.type === 'thresholdLine') {\n const { notificationType } = option;\n // Needed to differentiate between normal lines and threshold lines\n // as we are unable to inject custom properties into echarts series lines.\n const thresholdLineName = `thresholdLine-${notificationType}`;\n return {\n symbolSize: 9,\n symbol: 'none',\n condition: defaultThresholdLineSeriesOption.condition,\n ...option,\n lineStyle: {\n type: 'dashed',\n width: 2,\n ...option.lineStyle,\n },\n name: thresholdLineName,\n type: 'line',\n data: [\n [option.xAxis[0], option.yAxis],\n [option.xAxis[1], option.yAxis],\n ],\n };\n }\n\n if (option.type === 'line') {\n const shadow = tokens.theme[theme].boxShadow.raised;\n const shadowParts = shadow.split(/ (?=\\d+px|rgba?\\()/);\n\n return {\n type: 'line',\n symbolSize: 9,\n color,\n symbol: 'none',\n ...option,\n lineStyle: {\n type: 'solid' as const,\n width: 2,\n ...option.lineStyle,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n shadowBlur: parseInt(shadowParts[2]),\n shadowColor: shadowParts[4],\n shadowOffsetX: parseInt(shadowParts[0]),\n shadowOffsetY: parseInt(shadowParts[1]),\n ...option.emphasis?.itemStyle,\n },\n label: { show: false },\n ...option.emphasis,\n },\n };\n }\n\n if (option.type === 'pie') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n animationDuration: 600,\n animationType: 'scale',\n selectedMode: 'single',\n ...option,\n // Blur opacity is set to 1 to prevent other slices from\n // being opacitated when hovering a slice where the emphasis is enabled (used for scale effect)\n blur: {\n itemStyle: {\n opacity: 1,\n ...option.blur?.itemStyle,\n },\n label: {\n opacity: 1,\n ...option.blur?.label,\n },\n ...option.blur,\n },\n // Emphasis is enabled and used to apply the scale effect when hovering the pie chart slices.\n emphasis: {\n disabled: false,\n focus: 'self',\n scale: true,\n scaleSize: 5,\n ...option.emphasis,\n },\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n borderWidth: 1,\n ...option.itemStyle,\n },\n label: {\n backgroundColor: 'transparent',\n color: tokens.theme[theme].color.neutral.text.weak,\n formatter: '{d}%',\n ...option.label,\n },\n labelLine: {\n length: 5,\n show: true,\n ...option.labelLine,\n },\n tooltip: {\n trigger: 'item',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: tooltipExtraCssText,\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n const sliceName = firstParam?.value[0] ?? firstParam.seriesName;\n // Only dates are formatted, so a numeric name like a year keeps\n // its digits as they are.\n const sliceLabel =\n sliceName instanceof Date\n ? formatTimeAxisDate(sliceName)\n : sliceName;\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Content\n key={sliceLabel}\n leadingElement={sliceLabel}\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n if (option.type === 'scatter') {\n // `emptyCircle` always fills with white, so the interior is a real\n // circle painted with the theme's surface color. The ring is the border,\n // drawn on top of that fill. Hover replaces the interior with the\n // series color and leaves the ring in place. `focus` stays 'none':\n // any other value blurs the series, and blur wins over emphasis, so\n // the circle would never fill.\n const interiorColor = tokens.theme[theme].color.neutral.bg.weak;\n\n return {\n color,\n symbol: 'circle',\n symbolSize: 10,\n ...option,\n itemStyle: {\n borderColor: color,\n borderWidth: 2,\n color: interiorColor,\n ...option.itemStyle,\n },\n emphasis: {\n disabled: false,\n focus: 'none',\n ...option.emphasis,\n itemStyle: {\n borderColor: color,\n color,\n ...option.emphasis?.itemStyle,\n },\n },\n };\n }\n\n if (option.type === 'bar') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n barMaxWidth: 16,\n ...option,\n blur: {\n itemStyle: {\n opacity: 0.3,\n ...option.blur?.itemStyle,\n },\n ...option.blur,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n },\n itemStyle: {\n borderWidth: 20,\n color,\n ...option.itemStyle,\n },\n markLine: {\n emphasis: {\n disabled: true,\n lineStyle: {\n width: 20,\n ...option.markLine?.emphasis?.lineStyle,\n },\n ...option.markLine?.emphasis,\n },\n lineStyle: {\n width: 20,\n ...option.markLine?.lineStyle,\n },\n },\n tooltip: {\n trigger: 'axis',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: tooltipExtraCssText,\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Title>{firstParam.name}</ChartTooltip.Title>\n <ChartTooltip.Content\n key={firstParam?.value[0] ?? firstParam.seriesName}\n leadingElement={firstParam.seriesName}\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n return option;\n },\n );\n};\n\nexport const mergeXAxis = (\n xAxis: EChartsOption['xAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['xAxis'] => {\n if (xAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(xAxis)) {\n return xAxis.map((axis) =>\n mergeXAxis(axis, theme),\n ) as EChartsOption['xAxis'];\n }\n\n const baseXAxis = {\n ...xAxis,\n axisLabel: {\n formatter: {\n day: '{dd} {MMM}',\n hour: '{HH}:{mm}',\n millisecond: '{hh}:{mm}:{ss} {SSS}',\n minute: '{HH}:{mm}',\n month: '{MMM}',\n none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}',\n second: '{HH}:{mm}:{ss}',\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n },\n margin: 16,\n overflow: 'truncate',\n ...xAxis?.axisLabel,\n },\n axisLine: {\n lineStyle: {\n ...xAxis?.axisLine?.lineStyle,\n },\n ...xAxis?.axisLine,\n },\n axisTick: {\n ...xAxis?.axisTick,\n lineStyle: {\n ...xAxis?.axisTick?.lineStyle,\n },\n show: true,\n ...xAxis?.axisTick,\n },\n splitLine: { show: false, ...xAxis?.splitLine },\n tooltip: mergeAxisTooltip(xAxis.tooltip),\n } as SingleXAxisOption;\n\n if (xAxis.type === 'time') {\n const timeXAxis = {\n ...baseXAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseXAxis.axisLabel,\n },\n } as SingleXAxisOption;\n\n return timeXAxis;\n }\n\n if (xAxis.type === 'value' || xAxis.type === 'log') {\n const xAxisFormatter =\n xAxis.axisLabel && 'formatter' in xAxis.axisLabel\n ? xAxis.axisLabel.formatter\n : undefined;\n const valueXAxis = {\n ...baseXAxis,\n axisLabel: {\n ...baseXAxis.axisLabel,\n formatter: xAxisFormatter ?? formatNumberEnUS,\n },\n } as SingleXAxisOption;\n\n return valueXAxis;\n }\n\n if (xAxis.type === 'category') {\n const categoryXAxis = {\n ...baseXAxis,\n axisLabel: {\n width: 80,\n ...baseXAxis?.axisLabel,\n },\n axisTick: {\n alignWithLabel: true,\n ...baseXAxis?.axisTick,\n },\n } as SingleXAxisOption;\n return categoryXAxis;\n }\n\n return baseXAxis;\n};\n\nexport const mergeYAxis = (\n yAxis: EChartsOption['yAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['yAxis'] => {\n if (yAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(yAxis)) {\n return yAxis.map((axis) =>\n mergeYAxis(axis, theme),\n ) as EChartsOption['yAxis'];\n }\n\n const baseYAxis = {\n ...yAxis,\n axisLabel: {\n margin: 8,\n overflow: 'truncate',\n ...yAxis?.axisLabel,\n },\n axisLine: {\n ...yAxis?.axisLine,\n lineStyle: {\n ...yAxis?.axisLine?.lineStyle,\n },\n show: true,\n },\n axisTick: {\n show: false,\n ...yAxis?.axisTick,\n lineStyle: {\n width: 1,\n ...yAxis?.axisTick?.lineStyle,\n },\n },\n splitLine: { show: true, ...yAxis?.splitLine },\n tooltip: mergeAxisTooltip(yAxis.tooltip),\n } as SingleYAxisOption;\n\n if (yAxis.type === 'time') {\n const timeYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return timeYAxis;\n }\n\n if (yAxis.type === 'value' || yAxis.type === 'log') {\n const yAxisFormatter =\n yAxis.axisLabel && 'formatter' in yAxis.axisLabel\n ? yAxis.axisLabel.formatter\n : undefined;\n const valueYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n formatter: yAxisFormatter ?? formatNumberEnUS,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return valueYAxis;\n }\n\n if (yAxis.type === 'category') {\n const categoryYAxis = {\n ...baseYAxis,\n axisLabel: {\n width: 100,\n ...baseYAxis?.axisLabel,\n },\n } as SingleYAxisOption;\n\n return categoryYAxis;\n }\n\n return baseYAxis;\n};\n\ntype SingleDataZoomOption = Exclude<\n NonNullable<EChartsOption['dataZoom']>,\n unknown[]\n>;\n\ntype MergeDataZoomAxes = {\n xAxis?: EChartsOption['xAxis'];\n yAxis?: EChartsOption['yAxis'];\n};\n\nexport type DataZoomTargetAxes = {\n xAxisIndices: number[];\n yAxisIndices: number[];\n};\n\nconst normalizeAxisIndices = (axisIndex: unknown): number[] => {\n if (typeof axisIndex === 'number') {\n return [axisIndex];\n }\n\n if (Array.isArray(axisIndex)) {\n return axisIndex.filter((index): index is number => {\n return typeof index === 'number';\n });\n }\n\n return [];\n};\n\n/**\n * Resolves the axes a single dataZoom entry targets, mirroring ECharts' own\n * resolution order: explicit `xAxisIndex`/`yAxisIndex` win (`false` meaning\n * \"not this axis\"); when no index is given, `orient: 'vertical'` targets the\n * first y-axis and horizontal/unset targets the first x-axis.\n */\nconst getSingleDataZoomTargets = (\n dataZoom: SingleDataZoomOption | undefined,\n): DataZoomTargetAxes => {\n if (dataZoom?.type !== 'slider' && dataZoom?.type !== 'inside') {\n return { xAxisIndices: [], yAxisIndices: [] };\n }\n\n const hasAxisIndex =\n dataZoom.xAxisIndex !== undefined || dataZoom.yAxisIndex !== undefined;\n\n if (hasAxisIndex) {\n return {\n xAxisIndices: normalizeAxisIndices(dataZoom.xAxisIndex),\n yAxisIndices: normalizeAxisIndices(dataZoom.yAxisIndex),\n };\n }\n\n return dataZoom.orient === 'vertical'\n ? { xAxisIndices: [], yAxisIndices: [0] }\n : { xAxisIndices: [0], yAxisIndices: [] };\n};\n\n/**\n * Union of the axis indices targeted by all slider/inside entries in a\n * dataZoom config, using the same per-entry resolution as ECharts (explicit\n * axis indices first, then orientation).\n */\nexport const getDataZoomTargetAxes = (\n dataZoom: EChartsOption['dataZoom'],\n): DataZoomTargetAxes => {\n const entries = Array.isArray(dataZoom) ? dataZoom : [dataZoom];\n const targets: DataZoomTargetAxes = { xAxisIndices: [], yAxisIndices: [] };\n\n for (const entry of entries) {\n const entryTargets = getSingleDataZoomTargets(entry);\n\n for (const index of entryTargets.xAxisIndices) {\n if (!targets.xAxisIndices.includes(index)) {\n targets.xAxisIndices.push(index);\n }\n }\n\n for (const index of entryTargets.yAxisIndices) {\n if (!targets.yAxisIndices.includes(index)) {\n targets.yAxisIndices.push(index);\n }\n }\n }\n\n return targets;\n};\n\n/**\n * A slider is vertical when the consumer sets `orient: 'vertical'`, or when it\n * only targets a y-axis, which makes ECharts infer the vertical orientation.\n */\nexport const isVerticalSlider = (\n dataZoom: SingleDataZoomOption | undefined,\n): boolean => {\n if (dataZoom?.type !== 'slider') {\n return false;\n }\n\n if (dataZoom.orient !== undefined) {\n return dataZoom.orient === 'vertical';\n }\n\n const targets = getSingleDataZoomTargets(dataZoom);\n\n return targets.yAxisIndices.length > 0 && targets.xAxisIndices.length === 0;\n};\n\n/**\n * Axis types where windowing (`filterMode: 'none'`) beats ECharts' default\n * data filtering. Filtering a continuous axis removes whole data items outside\n * the window, which makes bars and points vanish instead of clipping them.\n * Category axes keep the `'filter'` default so paging through categories still\n * rescales the opposite value axis to the visible data.\n */\nconst WINDOWED_FILTER_AXIS_TYPES = ['log', 'time', 'value'];\n\nconst getSingleAxisOption = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndex: unknown,\n): { type?: string } | undefined => {\n if (!Array.isArray(axis)) {\n return axis as { type?: string } | undefined;\n }\n\n const index =\n typeof axisIndex === 'number'\n ? axisIndex\n : Array.isArray(axisIndex) && typeof axisIndex[0] === 'number'\n ? axisIndex[0]\n : 0;\n\n return axis[index] as { type?: string } | undefined;\n};\n\n/**\n * Resolves the slider's target axis the way ECharts does (explicit axis index\n * first, then orientation) and returns `'none'` when that axis is continuous.\n * Returns `undefined` (keep ECharts' `'filter'` default) for category axes and\n * for sliders that target both axes at once.\n */\nconst getSliderDefaultFilterMode = (\n dataZoom: SingleDataZoomOption,\n axes: MergeDataZoomAxes | undefined,\n): 'none' | undefined => {\n const targets = getSingleDataZoomTargets(dataZoom);\n const isXAxisTarget = targets.xAxisIndices.length > 0;\n const isYAxisTarget = targets.yAxisIndices.length > 0;\n\n if (isXAxisTarget === isYAxisTarget) {\n return undefined;\n }\n\n const targetAxis = isYAxisTarget\n ? getSingleAxisOption(axes?.yAxis, dataZoom.yAxisIndex)\n : getSingleAxisOption(axes?.xAxis, dataZoom.xAxisIndex);\n\n return targetAxis?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(targetAxis.type)\n ? 'none'\n : undefined;\n};\n\nconst VERTICAL_SLIDER_RIGHT = 10;\nconst VERTICAL_SLIDER_WIDTH = 28;\n\nexport const mergeDataZoom = (\n dataZoom: EChartsOption['dataZoom'],\n axes?: MergeDataZoomAxes,\n): EChartsOption['dataZoom'] => {\n if (Array.isArray(dataZoom)) {\n return dataZoom.map((option) =>\n mergeDataZoom(option, axes),\n ) as EChartsOption['dataZoom'];\n }\n\n const isSlider = dataZoom?.type === 'slider';\n const isInside = dataZoom?.type === 'inside';\n\n if (isSlider) {\n const filterMode = getSliderDefaultFilterMode(dataZoom, axes);\n const layoutDefaults = isVerticalSlider(dataZoom)\n ? {\n right: VERTICAL_SLIDER_RIGHT,\n textStyle: {\n overflow: 'truncate' as const,\n width: 2 * (VERTICAL_SLIDER_RIGHT + VERTICAL_SLIDER_WIDTH / 2),\n },\n width: VERTICAL_SLIDER_WIDTH,\n }\n : { bottom: 10, height: 28 };\n\n return {\n ...(filterMode !== undefined && { filterMode }),\n ...layoutDefaults,\n show: true,\n type: 'slider',\n ...dataZoom,\n };\n } else if (isInside) {\n // Only pin the default x-axis binding on entries that actually target the\n // x-axis; y-targeting entries (explicit `yAxisIndex` or\n // `orient: 'vertical'`) keep their own binding.\n const targets = getSingleDataZoomTargets(dataZoom);\n const hasDefaultXAxisTarget =\n dataZoom.xAxisIndex === undefined && targets.xAxisIndices.length > 0;\n\n return {\n filterMode: 'none',\n ...(hasDefaultXAxisTarget && { xAxisIndex: [0] }),\n zoomOnMouseWheel: false,\n ...dataZoom,\n };\n }\n\n return dataZoom;\n};\n\ntype MergeToolboxContext = MergeDataZoomAxes & {\n dataZoom?: EChartsOption['dataZoom'];\n};\n\nconst isContinuousAxisOption = (\n axisOption: { type?: string } | undefined,\n): boolean => {\n return (\n axisOption?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(axisOption.type)\n );\n};\n\nconst areTargetAxesContinuous = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndices: number[] | 'all',\n): boolean => {\n if (axisIndices === 'all') {\n const axisOptions = Array.isArray(axis) ? axis : [axis];\n\n return (\n axisOptions.length > 0 &&\n axisOptions.every((axisOption) => {\n return isContinuousAxisOption(axisOption as { type?: string });\n })\n );\n }\n\n return axisIndices.every((axisIndex) => {\n return isContinuousAxisOption(getSingleAxisOption(axis, axisIndex));\n });\n};\n\n/**\n * Returns `'none'` when every axis targeted by the drag-to-zoom brush is\n * continuous (`value`/`time`/`log`), matching the slider rule: filtering a\n * continuous axis removes whole data items outside the selection instead of\n * clipping them. Category (or unknown) targets keep ECharts' `'filter'`\n * default.\n */\nconst getBrushDefaultFilterMode = (\n context: MergeToolboxContext | undefined,\n xAxisTargets: number[] | 'all' | false,\n yAxisTargets: number[] | 'all' | false,\n): 'none' | undefined => {\n const checks: boolean[] = [];\n\n if (xAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.xAxis, xAxisTargets));\n }\n\n if (yAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.yAxis, yAxisTargets));\n }\n\n return checks.length > 0 && checks.every(Boolean) ? 'none' : undefined;\n};\n\nexport const mergeToolbox = (\n toolbox: EChartsOption['toolbox'],\n context?: MergeToolboxContext,\n): EChartsOption['toolbox'] => {\n if (Array.isArray(toolbox)) {\n return toolbox.map((option) =>\n mergeToolbox(option, context),\n ) as EChartsOption['toolbox'];\n }\n\n // The drag-to-zoom brush follows the axes the dataZoom config targets, so\n // zoom direction is configured in one place. Without any dataZoom config it\n // keeps the historical default: all x-axes on, y off.\n const targets = getDataZoomTargetAxes(context?.dataZoom);\n const hasTargets =\n targets.xAxisIndices.length > 0 || targets.yAxisIndices.length > 0;\n const xAxisTargets: number[] | 'all' | false = hasTargets\n ? targets.xAxisIndices.length > 0 && targets.xAxisIndices\n : 'all';\n const yAxisTargets: number[] | false =\n targets.yAxisIndices.length > 0 && targets.yAxisIndices;\n const filterMode = getBrushDefaultFilterMode(\n context,\n xAxisTargets,\n yAxisTargets,\n );\n\n return {\n feature: {\n dataZoom: {\n ...(filterMode !== undefined && { filterMode }),\n ...(xAxisTargets !== 'all' && { xAxisIndex: xAxisTargets }),\n yAxisIndex: yAxisTargets,\n ...toolbox?.feature?.dataZoom,\n icon: {\n // This hack removes the icons.\n // Due to: https://github.com/apache/echarts/issues/10274\n back: '-',\n zoom: '-',\n },\n show: true,\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,OAAO,OAAO,OAAO,WAAW;AAoBtD,MAAM,oBACJ,YAAA,eAAA;CAEA,YAAY,WACV;;EAAO,SAAA,sBAAA,OAAA,iBAAA,QAAA,wBAAA,KAAA,IAAA,KAAA,IAAA,oBAAA,KAA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AA,IAAwB,QAAS,OAAO,YAAY,CAAC;CAGnE,IAAI,iBAAiB,OACnB,OAAO,KAAK,wBAAA,YAAA,QAAA,YAAA,KAAA,IAAA,KAAA,IAAwB,QAAS,OAAO,YAAY,CAAC;CAGnE,OAAO,OAAO,SAAS,KAAK,OAAO,MAAM,OAAO,IAAI,SAAS,KAAA;AAC/D;AAEA,MAAa,gBACX,SACA,YAC6B;;CAC7B,IAAI,MAAM,QAAQ,OAAO,GACvB,OAAO,QAAQ,KAAK,WAClB,aAAa,QAAQ,OAAO,CAC9B;CAMF,MAAM,UAAU,sBAAA,YAAA,QAAA,YAAA,KAAA,IAAA,KAAA,IAAsB,QAAS,QAAQ;CAGvD,MAAM,eADJ,QAAQ,aAAa,SAAS,KAAK,QAAQ,aAAa,SAAS,IAE/D,QAAQ,aAAa,SAAS,KAAK,QAAQ,eAC3C;CACJ,MAAM,eACJ,QAAQ,aAAa,SAAS,KAAK,QAAQ;CAC7C,MAAM,aAAa,0BACjB,SACA,cACA,YACF;CAEA,OAAO,EACL,SAAS,EACP,UAAA,eAAA,eAAA,eAAA,eAAA,CAAA,GACM,eAAe,KAAA,KAAa,EAAE,WAAW,CAAA,GACzC,iBAAiB,SAAS,EAAE,YAAY,aAAa,CAAA,GAAA,CAAA,GAAA,EACzD,YAAY,aAAA,GAAA,YAAA,QAAA,YAAA,KAAA,MAAA,mBACT,QAAS,aAAA,QAAA,qBAAA,KAAA,IAAA,KAAA,IAAA,iBAAS,QAAA,GAAA,CAAA,GAAA;EACrB,MAAM;GAGJ,MAAM;GACN,MAAM;EACR;EACA,MAAM;CACR,CAAA,EACF,EACF;AACF"}
@@ -0,0 +1,27 @@
1
+ import { defaultThresholdLineSeriesOption } from "./charts/utils/defaults.mjs";
2
+ import { Chart } from "./charts/Chart.mjs";
3
+ import { ChartEmpty } from "./charts/ChartEmpty.mjs";
4
+ // src/index.ts
5
+ /*!
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ export { Chart, ChartEmpty, defaultThresholdLineSeriesOption };
26
+
27
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.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 */\nexport * from './charts';\n"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react-charts",
3
- "version": "2.1.21",
3
+ "version": "2.2.0",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of charts from Neo4j Design System",
6
6
  "keywords": [
@@ -16,18 +16,13 @@
16
16
  "homepage": "https://www.neo4j.design",
17
17
  "license": "GPL-3.0",
18
18
  "main": "./lib/cjs/index.js",
19
- "module": "./lib/esm/index.js",
19
+ "module": "./lib/esm/index.mjs",
20
20
  "types": "./lib/types/index.d.ts",
21
21
  "exports": {
22
- "./icons": {
23
- "import": "./lib/esm/icons/index.js",
24
- "require": "./lib/cjs/icons/index.js",
25
- "types": "./lib/types/icons/index.d.ts"
26
- },
27
22
  ".": {
28
- "import": "./lib/esm/index.js",
29
- "require": "./lib/cjs/index.js",
30
- "types": "./lib/types/index.d.ts"
23
+ "types": "./lib/types/index.d.ts",
24
+ "import": "./lib/esm/index.mjs",
25
+ "require": "./lib/cjs/index.js"
31
26
  }
32
27
  },
33
28
  "directories": {
@@ -50,14 +45,15 @@
50
45
  "@types/react-dom": "19.2.3",
51
46
  "react": "19.2.5",
52
47
  "react-dom": "19.2.5",
48
+ "tsdown": "0.23.0",
53
49
  "vitest": "4.1.10",
54
50
  "typescript": "5.9.3"
55
51
  },
56
52
  "peerDependencies": {
57
53
  "react": ">=19.0.0",
58
54
  "react-dom": ">=19.0.0",
59
- "@neo4j-ndl/base": "^5.2.0",
60
- "@neo4j-ndl/react": "^5.4.6"
55
+ "@neo4j-ndl/base": "^5.3.0",
56
+ "@neo4j-ndl/react": "^5.5.0"
61
57
  },
62
58
  "dependencies": {
63
59
  "classnames": "2.5.1",
@@ -69,10 +65,10 @@
69
65
  "typecheck": "pnpm exec tsc -p tsconfig.tests.json",
70
66
  "test:playwright": "pnpm exec playwright test --grep-invert '@happo|@visual-regression'",
71
67
  "build": "pnpm run build:esm && pnpm run build:cjs && pnpm run build:types",
72
- "build:esm": "pnpm exec tsc -p tsconfig.esm.json",
73
- "build:cjs": "pnpm exec tsc -p tsconfig.cjs.json",
74
- "watch:esm": "pnpm exec tsc -p tsconfig.esm.json --watch",
75
- "watch:cjs": "pnpm exec tsc -p tsconfig.cjs.json --watch",
68
+ "build:esm": "pnpm exec tsdown --format esm --out-dir lib/esm",
69
+ "build:cjs": "pnpm exec tsdown --format cjs --out-dir lib/cjs",
70
+ "watch:esm": "pnpm exec tsdown --format esm --out-dir lib/esm --watch",
71
+ "watch:cjs": "pnpm exec tsdown --format cjs --out-dir lib/cjs --watch",
76
72
  "build:types": "pnpm exec tsc -p tsconfig.types.json",
77
73
  "docs:generate": "pnpm --dir ../.. run docs:generate -- --package react-charts",
78
74
  "docs:generate-skills": "pnpm --dir ../.. run docs:generate-skills -- --package react-charts",
@@ -2,7 +2,7 @@
2
2
  name: ndl-react-charts
3
3
  metadata:
4
4
  package: '@neo4j-ndl/react-charts'
5
- version: '2.1.21'
5
+ version: '2.2.0'
6
6
  description: >-
7
7
  Build data visualizations with the Neo4j Needle React Charts library
8
8
  (@neo4j-ndl/react-charts), an Apache ECharts-based charting layer. Use when
@@ -15,7 +15,7 @@ description: >-
15
15
 
16
16
  # Neo4j Needle React Charts (@neo4j-ndl/react-charts)
17
17
 
18
- > 📌 Shipped with `@neo4j-ndl/react-charts` v2.1.21. Once installed into your repo (e.g. via
18
+ > 📌 Shipped with `@neo4j-ndl/react-charts` v2.2.0. Once installed into your repo (e.g. via
19
19
  > `npx skills add`) this folder is detached from the package — the installed
20
20
  > package (TypeScript types in `node_modules/@neo4j-ndl/react-charts`) is the source of
21
21
  > truth.