@aura-react-comp/charts 0.3.1 → 0.4.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 (68) hide show
  1. package/esm/charts/area-chart/index.js +27 -23
  2. package/esm/charts/bar-chart/index.js +17 -21
  3. package/esm/charts/candlestick-chart/index.js +242 -180
  4. package/esm/charts/combo-chart/index.js +8 -20
  5. package/esm/charts/funnel-chart/index.js +133 -108
  6. package/esm/charts/gauge-chart/index.js +102 -105
  7. package/esm/charts/graph-chart/index.js +154 -114
  8. package/esm/charts/heatmap-chart/index.js +179 -135
  9. package/esm/charts/line-chart/index.js +28 -24
  10. package/esm/charts/pie-chart/index.d.ts.map +1 -1
  11. package/esm/charts/pie-chart/index.js +198 -139
  12. package/esm/charts/radar-chart/index.d.ts.map +1 -1
  13. package/esm/charts/radar-chart/index.js +154 -128
  14. package/esm/charts/ring-progress/index.js +81 -82
  15. package/esm/charts/sankey-chart/index.js +171 -141
  16. package/esm/charts/scatter-chart/index.d.ts.map +1 -1
  17. package/esm/charts/scatter-chart/index.js +225 -159
  18. package/esm/charts/sparkline/index.js +81 -66
  19. package/esm/charts/tree-chart/index.js +128 -102
  20. package/esm/charts/treemap-chart/index.js +162 -141
  21. package/esm/charts/waterfall-chart/index.js +165 -121
  22. package/esm/components/Legend.d.ts +3 -2
  23. package/esm/components/Legend.d.ts.map +1 -1
  24. package/esm/components/Legend.js +79 -48
  25. package/esm/components/Tooltip.js +62 -71
  26. package/esm/components/chart/index.d.ts +4 -1
  27. package/esm/components/chart/index.d.ts.map +1 -1
  28. package/esm/components/chart/index.js +80 -102
  29. package/esm/components/chart.less +13 -0
  30. package/esm/core/animation.js +31 -43
  31. package/esm/core/export.d.ts +34 -0
  32. package/esm/core/export.d.ts.map +1 -0
  33. package/esm/core/export.js +390 -0
  34. package/esm/core/force.js +22 -45
  35. package/esm/core/format.js +48 -52
  36. package/esm/core/hierarchy.js +60 -92
  37. package/esm/core/layout.js +32 -50
  38. package/esm/core/sampling.js +30 -53
  39. package/esm/core/sankey.js +35 -55
  40. package/esm/core/scale.js +72 -86
  41. package/esm/core/shape.js +101 -133
  42. package/esm/core/sync.d.ts +41 -0
  43. package/esm/core/sync.d.ts.map +1 -0
  44. package/esm/core/sync.js +120 -0
  45. package/esm/hooks/useChartExport.d.ts +19 -0
  46. package/esm/hooks/useChartExport.d.ts.map +1 -0
  47. package/esm/hooks/useChartExport.js +35 -0
  48. package/esm/hooks/useChartTheme.js +17 -19
  49. package/esm/hooks/useChartTransition.js +58 -73
  50. package/esm/hooks/useElementSize.js +19 -28
  51. package/esm/hooks/usePlotPointer.d.ts +23 -0
  52. package/esm/hooks/usePlotPointer.d.ts.map +1 -0
  53. package/esm/hooks/usePlotPointer.js +94 -0
  54. package/esm/index.d.ts +6 -0
  55. package/esm/index.d.ts.map +1 -1
  56. package/esm/index.js +136 -47
  57. package/esm/internal/CartesianChart.d.ts.map +1 -1
  58. package/esm/internal/CartesianChart.js +666 -485
  59. package/esm/internal/model.js +44 -60
  60. package/esm/scene/canvas.js +100 -107
  61. package/esm/scene/svg.js +106 -99
  62. package/esm/scene/types.js +8 -15
  63. package/esm/style.css +10 -0
  64. package/esm/theme/index.js +143 -171
  65. package/esm/types.d.ts +4 -0
  66. package/esm/types.d.ts.map +1 -1
  67. package/esm/types.js +0 -1
  68. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  'use client';
2
- import React, { useCallback, useMemo, useState } from 'react';
3
- import { classNames, prefixCls } from '@aura-react-comp/shared';
2
+ // src/charts/heatmap-chart/index.tsx
3
+ import { useCallback, useMemo, useState } from "react";
4
+ import { classNames, prefixCls } from "@aura-react-comp/shared";
4
5
  import { SvgScene } from "../../scene/svg";
5
6
  import { createBandScale } from "../../core/scale";
6
7
  import { formatNumber, estimateTextWidth } from "../../core/format";
@@ -11,32 +12,21 @@ import { useElementSize } from "../../hooks/useElementSize";
11
12
  import { useChartTransition } from "../../hooks/useChartTransition";
12
13
  import { resolveAnimation, staggerProgress } from "../../core/animation";
13
14
  import { Tooltip } from "../../components/Tooltip";
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- /** 把数值映射到 0~1 的位置;全等值时统一给 0.6,避免整片同色看不清边界 */
15
+ import { jsx, jsxs } from "react/jsx-runtime";
17
16
  function normalize(value, min, max) {
18
- if (max === min) return 0.6;
17
+ if (max === min)
18
+ return 0.6;
19
19
  return (value - min) / (max - min);
20
20
  }
21
-
22
- /**
23
- * 热力图。
24
- *
25
- * 用颜色深浅编码二维矩阵里的数值,密度远高于逐格标数字,
26
- * 适合「一眼看出哪块热」——访问时段分布、地域 × 品类销量、相关性矩阵。
27
- *
28
- * 注意:颜色编码的精度低于长度/位置(这是视觉感知的固有限制),
29
- * 需要读出准确数值时必须配合 tooltip 或数字。
30
- */
31
- export function HeatmapChart({
21
+ function HeatmapChart({
32
22
  data = [],
33
23
  xLabels: xLabelsProp,
34
24
  yLabels: yLabelsProp,
35
25
  colorRange,
36
- showValue = 'auto',
26
+ showValue = "auto",
37
27
  cellGap = 3,
38
28
  cellRadius = 3,
39
- width = '100%',
29
+ width = "100%",
40
30
  height = 320,
41
31
  theme: themeInput,
42
32
  palette,
@@ -45,33 +35,31 @@ export function HeatmapChart({
45
35
  className,
46
36
  style,
47
37
  ariaLabel,
48
- emptyText = '暂无数据'
38
+ emptyText = "暂无数据"
49
39
  }) {
50
40
  const theme = useChartTheme(themeInput, palette);
51
- const {
52
- ref,
53
- size
54
- } = useElementSize();
41
+ const { ref, size } = useElementSize();
55
42
  const [activeCell, setActiveCell] = useState(null);
56
- const animKey = typeof animation === 'object' ? JSON.stringify(animation) : String(animation);
57
- const animConfig = useMemo(() => resolveAnimation(animation),
58
- // eslint-disable-next-line react-hooks/exhaustive-deps
59
- [animKey]);
60
- const {
61
- xLabels,
62
- yLabels,
63
- lookup,
64
- range
65
- } = useMemo(() => {
66
- const xs = xLabelsProp?.length ? xLabelsProp : [];
67
- const ys = yLabelsProp?.length ? yLabelsProp : [];
43
+ const animKey = typeof animation === "object" ? JSON.stringify(animation) : String(animation);
44
+ const animConfig = useMemo(
45
+ () => resolveAnimation(animation),
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
+ [animKey]
48
+ );
49
+ const { xLabels, yLabels, lookup, range } = useMemo(() => {
50
+ const xs = (xLabelsProp == null ? void 0 : xLabelsProp.length) ? xLabelsProp : [];
51
+ const ys = (yLabelsProp == null ? void 0 : yLabelsProp.length) ? yLabelsProp : [];
68
52
  if (!xs.length) {
69
- for (const cell of data) if (!xs.includes(cell.x)) xs.push(cell.x);
53
+ for (const cell of data)
54
+ if (!xs.includes(cell.x))
55
+ xs.push(cell.x);
70
56
  }
71
57
  if (!ys.length) {
72
- for (const cell of data) if (!ys.includes(cell.y)) ys.push(cell.y);
58
+ for (const cell of data)
59
+ if (!ys.includes(cell.y))
60
+ ys.push(cell.y);
73
61
  }
74
- const map = new Map();
62
+ const map = /* @__PURE__ */ new Map();
75
63
  let min = Number.POSITIVE_INFINITY;
76
64
  let max = Number.NEGATIVE_INFINITY;
77
65
  for (const cell of data) {
@@ -85,19 +73,28 @@ export function HeatmapChart({
85
73
  xLabels: xs,
86
74
  yLabels: ys,
87
75
  lookup: map,
88
- range: [Number.isFinite(min) ? min : 0, Number.isFinite(max) ? max : 1]
76
+ range: [
77
+ Number.isFinite(min) ? min : 0,
78
+ Number.isFinite(max) ? max : 1
79
+ ]
89
80
  };
90
81
  }, [data, xLabelsProp, yLabelsProp]);
91
-
92
- // 用数值矩阵驱动动画:更新时颜色平滑过渡
93
- const matrix = useMemo(() => yLabels.map(y => xLabels.map(x => {
94
- const value = lookup.get(`${x}__${y}`);
95
- return value === undefined ? null : value;
96
- })), [xLabels, yLabels, lookup]);
82
+ const matrix = useMemo(
83
+ () => yLabels.map(
84
+ (y) => xLabels.map((x) => {
85
+ const value = lookup.get(`${x}__${y}`);
86
+ return value === void 0 ? null : value;
87
+ })
88
+ ),
89
+ [xLabels, yLabels, lookup]
90
+ );
97
91
  const transition = useChartTransition(matrix, animConfig);
98
92
  const progress = transition.progress;
99
93
  const geometry = useMemo(() => {
100
- const labelWidth = Math.max(0, ...yLabels.map(label => estimateTextWidth(label, theme.font.size)));
94
+ const labelWidth = Math.max(
95
+ 0,
96
+ ...yLabels.map((label) => estimateTextWidth(label, theme.font.size))
97
+ );
101
98
  const left = Math.ceil(labelWidth) + 8;
102
99
  const top = 8;
103
100
  const bottom = theme.font.size + 12;
@@ -111,48 +108,61 @@ export function HeatmapChart({
111
108
  plotHeight: Math.max(0, size.height - top - bottom)
112
109
  };
113
110
  }, [yLabels, size.width, size.height, theme.font.size]);
114
- const xScale = useMemo(() => createBandScale({
115
- domain: xLabels,
116
- range: [geometry.left, geometry.left + geometry.plotWidth],
117
- paddingInner: 0,
118
- paddingOuter: 0
119
- }), [xLabels, geometry.left, geometry.plotWidth]);
111
+ const xScale = useMemo(
112
+ () => createBandScale({
113
+ domain: xLabels,
114
+ range: [geometry.left, geometry.left + geometry.plotWidth],
115
+ paddingInner: 0,
116
+ paddingOuter: 0
117
+ }),
118
+ [xLabels, geometry.left, geometry.plotWidth]
119
+ );
120
120
  const rowHeight = yLabels.length > 0 ? geometry.plotHeight / yLabels.length : 0;
121
- const colorAt = useCallback(value => {
122
- const from = colorRange?.[0] ?? withAlpha(theme.emphasis, 0.08);
123
- const to = colorRange?.[1] ?? theme.emphasis;
124
- return mixColor(from, to, normalize(value, range[0], range[1]));
125
- }, [colorRange, theme.emphasis, range]);
121
+ const colorAt = useCallback(
122
+ (value) => {
123
+ const from = (colorRange == null ? void 0 : colorRange[0]) ?? withAlpha(theme.emphasis, 0.08);
124
+ const to = (colorRange == null ? void 0 : colorRange[1]) ?? theme.emphasis;
125
+ return mixColor(from, to, normalize(value, range[0], range[1]));
126
+ },
127
+ [colorRange, theme.emphasis, range]
128
+ );
126
129
  const cellSize = Math.max(0, xScale.step - cellGap);
127
- const showNumbers = showValue === true || showValue === 'auto' && cellSize >= 42 && rowHeight >= 24;
130
+ const showNumbers = showValue === true || showValue === "auto" && cellSize >= 42 && rowHeight >= 24;
128
131
  const scene = useMemo(() => {
129
- if (!xLabels.length || !yLabels.length || geometry.plotWidth <= 0) return [];
132
+ if (!xLabels.length || !yLabels.length || geometry.plotWidth <= 0)
133
+ return [];
130
134
  const nodes = [];
131
135
  const total = yLabels.length * xLabels.length;
132
136
  yLabels.forEach((yLabel, rowIndex) => {
133
137
  const y = geometry.top + rowIndex * rowHeight;
134
138
  nodes.push({
135
- kind: 'text',
139
+ kind: "text",
136
140
  key: `yl-${yLabel}`,
137
141
  x: geometry.left - 8,
138
142
  y: y + rowHeight / 2,
139
143
  text: yLabel,
140
144
  fill: theme.axis.label,
141
145
  fontSize: theme.font.size,
142
- anchor: 'end',
143
- baseline: 'middle',
146
+ anchor: "end",
147
+ baseline: "middle",
144
148
  fontFamily: theme.font.family
145
149
  });
146
150
  xLabels.forEach((xLabel, columnIndex) => {
151
+ var _a;
147
152
  const x = xScale.scale(xLabel);
148
- if (x === undefined) return;
149
- const raw = transition.values[rowIndex]?.[columnIndex] ?? null;
153
+ if (x === void 0)
154
+ return;
155
+ const raw = ((_a = transition.values[rowIndex]) == null ? void 0 : _a[columnIndex]) ?? null;
150
156
  const flatIndex = rowIndex * xLabels.length + columnIndex;
151
- const local = staggerProgress(progress, flatIndex, total, animConfig.stagger);
157
+ const local = staggerProgress(
158
+ progress,
159
+ flatIndex,
160
+ total,
161
+ animConfig.stagger
162
+ );
152
163
  if (raw === null) {
153
- // 缺失格:画一个极浅的底,让矩阵结构仍然完整
154
164
  nodes.push({
155
- kind: 'rect',
165
+ kind: "rect",
156
166
  key: `empty-${xLabel}-${yLabel}`,
157
167
  x: x + cellGap / 2,
158
168
  y: y + cellGap / 2,
@@ -161,121 +171,155 @@ export function HeatmapChart({
161
171
  radius: cellRadius,
162
172
  fill: withAlpha(theme.axis.line, 0.35),
163
173
  opacity: local,
164
- pointerEvents: 'none'
174
+ pointerEvents: "none"
165
175
  });
166
176
  return;
167
177
  }
168
- const isActive = activeCell?.x === xLabel && activeCell?.y === yLabel;
178
+ const isActive = (activeCell == null ? void 0 : activeCell.x) === xLabel && (activeCell == null ? void 0 : activeCell.y) === yLabel;
169
179
  nodes.push({
170
- kind: 'path',
180
+ kind: "path",
171
181
  key: `cell-${xLabel}-${yLabel}`,
172
- d: roundedRectPath(x + cellGap / 2, y + cellGap / 2, cellSize, Math.max(0, rowHeight - cellGap), cellRadius),
182
+ d: roundedRectPath(
183
+ x + cellGap / 2,
184
+ y + cellGap / 2,
185
+ cellSize,
186
+ Math.max(0, rowHeight - cellGap),
187
+ cellRadius
188
+ ),
173
189
  fill: colorAt(raw),
174
- stroke: isActive ? theme.text.primary : undefined,
190
+ stroke: isActive ? theme.text.primary : void 0,
175
191
  strokeWidth: isActive ? 1.5 : 0,
176
192
  opacity: local,
177
- pointerEvents: 'none'
193
+ pointerEvents: "none"
178
194
  });
179
195
  if (showNumbers) {
180
- // 深色格子用白字,浅色用深字,保证可读
181
196
  const ratio = normalize(raw, range[0], range[1]);
182
197
  nodes.push({
183
- kind: 'text',
198
+ kind: "text",
184
199
  key: `cell-value-${xLabel}-${yLabel}`,
185
200
  x: x + xScale.step / 2,
186
201
  y: y + rowHeight / 2,
187
202
  text: formatNumber(raw),
188
- fill: ratio > 0.55 ? '#fff' : theme.text.primary,
203
+ fill: ratio > 0.55 ? "#fff" : theme.text.primary,
189
204
  fontSize: theme.font.sizeSmall,
190
- anchor: 'middle',
191
- baseline: 'middle',
205
+ anchor: "middle",
206
+ baseline: "middle",
192
207
  opacity: local,
193
208
  fontFamily: theme.font.family
194
209
  });
195
210
  }
196
211
  });
197
212
  });
198
-
199
- // 横轴标签
200
- xLabels.forEach(xLabel => {
213
+ xLabels.forEach((xLabel) => {
201
214
  const x = xScale.scale(xLabel);
202
- if (x === undefined) return;
215
+ if (x === void 0)
216
+ return;
203
217
  nodes.push({
204
- kind: 'text',
218
+ kind: "text",
205
219
  key: `xl-${xLabel}`,
206
220
  x: x + xScale.step / 2,
207
221
  y: geometry.top + geometry.plotHeight + theme.font.size + 4,
208
222
  text: xLabel,
209
223
  fill: theme.axis.label,
210
224
  fontSize: theme.font.size,
211
- anchor: 'middle',
225
+ anchor: "middle",
212
226
  fontFamily: theme.font.family
213
227
  });
214
228
  });
215
229
  return nodes;
216
- }, [xLabels, yLabels, geometry, rowHeight, xScale, cellSize, cellGap, cellRadius, theme, transition.values, progress, animConfig.stagger, range, showNumbers, activeCell, colorAt]);
230
+ }, [
231
+ xLabels,
232
+ yLabels,
233
+ geometry,
234
+ rowHeight,
235
+ xScale,
236
+ cellSize,
237
+ cellGap,
238
+ cellRadius,
239
+ theme,
240
+ transition.values,
241
+ progress,
242
+ animConfig.stagger,
243
+ range,
244
+ showNumbers,
245
+ activeCell,
246
+ colorAt
247
+ ]);
217
248
  const cellFromPointer = (clientX, clientY) => {
218
249
  const element = ref.current;
219
- if (!element || xScale.step <= 0 || rowHeight <= 0) return null;
250
+ if (!element || xScale.step <= 0 || rowHeight <= 0)
251
+ return null;
220
252
  const rect = element.getBoundingClientRect();
221
253
  const localX = clientX - rect.left - geometry.left;
222
254
  const localY = clientY - rect.top - geometry.top;
223
- if (localX < 0 || localY < 0) return null;
255
+ if (localX < 0 || localY < 0)
256
+ return null;
224
257
  const column = Math.floor(localX / xScale.step);
225
258
  const row = Math.floor(localY / rowHeight);
226
259
  const x = xLabels[column];
227
260
  const y = yLabels[row];
228
- if (x === undefined || y === undefined) return null;
261
+ if (x === void 0 || y === void 0)
262
+ return null;
229
263
  const value = lookup.get(`${x}__${y}`);
230
- if (value === undefined) return null;
231
- return {
232
- x,
233
- y,
234
- value
235
- };
264
+ if (value === void 0)
265
+ return null;
266
+ return { x, y, value };
236
267
  };
237
268
  const tooltipPayload = activeCell ? {
238
269
  label: `${activeCell.y} · ${activeCell.x}`,
239
270
  row: null,
240
- series: [{
241
- key: activeCell.x,
242
- name: '数值',
243
- color: activeCell.value === null ? theme.text.secondary : colorAt(activeCell.value),
244
- value: activeCell.value,
245
- formatted: activeCell.value === null ? '无数据' : formatNumber(activeCell.value)
246
- }]
271
+ series: [
272
+ {
273
+ key: activeCell.x,
274
+ name: "数值",
275
+ color: activeCell.value === null ? theme.text.secondary : colorAt(activeCell.value),
276
+ value: activeCell.value,
277
+ formatted: activeCell.value === null ? "无数据" : formatNumber(activeCell.value)
278
+ }
279
+ ]
247
280
  } : null;
248
281
  const autoAriaLabel = ariaLabel ?? `热力图:${yLabels.length} 行 × ${xLabels.length} 列`;
249
- return /*#__PURE__*/_jsx("div", {
250
- className: classNames(prefixCls('chart'), className),
251
- style: {
252
- width,
253
- height,
254
- ...style
255
- },
256
- "data-aura-chart": "heatmap",
257
- children: /*#__PURE__*/_jsxs("div", {
258
- ref: ref,
259
- className: prefixCls('chart__plot'),
260
- onPointerMove: event => setActiveCell(cellFromPointer(event.clientX, event.clientY)),
261
- onPointerLeave: () => setActiveCell(null),
262
- children: [data.length === 0 || size.width === 0 ? /*#__PURE__*/_jsx("div", {
263
- className: prefixCls('chart__empty'),
264
- children: emptyText
265
- }) : /*#__PURE__*/_jsx(SvgScene, {
266
- nodes: scene,
267
- width: size.width,
268
- height: size.height,
269
- ariaLabel: autoAriaLabel
270
- }), /*#__PURE__*/_jsx(Tooltip, {
271
- payload: tooltipPayload,
272
- x: size.width / 2,
273
- y: 16,
274
- containerWidth: size.width,
275
- containerHeight: size.height,
276
- theme: theme,
277
- config: tooltip
278
- })]
279
- })
280
- });
281
- }
282
+ return /* @__PURE__ */ jsx(
283
+ "div",
284
+ {
285
+ className: classNames(prefixCls("chart"), className),
286
+ style: { width, height, ...style },
287
+ "data-aura-chart": "heatmap",
288
+ children: /* @__PURE__ */ jsxs(
289
+ "div",
290
+ {
291
+ ref,
292
+ className: prefixCls("chart__plot"),
293
+ onPointerMove: (event) => setActiveCell(cellFromPointer(event.clientX, event.clientY)),
294
+ onPointerLeave: () => setActiveCell(null),
295
+ children: [
296
+ data.length === 0 || size.width === 0 ? /* @__PURE__ */ jsx("div", { className: prefixCls("chart__empty"), children: emptyText }) : /* @__PURE__ */ jsx(
297
+ SvgScene,
298
+ {
299
+ nodes: scene,
300
+ width: size.width,
301
+ height: size.height,
302
+ ariaLabel: autoAriaLabel
303
+ }
304
+ ),
305
+ /* @__PURE__ */ jsx(
306
+ Tooltip,
307
+ {
308
+ payload: tooltipPayload,
309
+ x: size.width / 2,
310
+ y: 16,
311
+ containerWidth: size.width,
312
+ containerHeight: size.height,
313
+ theme,
314
+ config: tooltip
315
+ }
316
+ )
317
+ ]
318
+ }
319
+ )
320
+ }
321
+ );
322
+ }
323
+ export {
324
+ HeatmapChart
325
+ };
@@ -1,15 +1,10 @@
1
1
  'use client';
2
- import React, { useMemo } from 'react';
2
+ // src/charts/line-chart/index.tsx
3
+ import { useMemo } from "react";
3
4
  import { CartesianChart } from "../../internal/CartesianChart";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- /**
6
- * 折线图。
7
- *
8
- * 默认曲线为 monotone 而非普通样条:普通样条在极值处会「冲出」数据范围,
9
- * 折线图一旦画出超过真实最大值的高度,读者会基于错误信息做判断。
10
- */
11
- export function LineChart({
12
- curve = 'monotone',
5
+ import { jsx } from "react/jsx-runtime";
6
+ function LineChart({
7
+ curve = "monotone",
13
8
  smooth = false,
14
9
  area = false,
15
10
  showSymbol,
@@ -17,17 +12,26 @@ export function LineChart({
17
12
  series,
18
13
  ...rest
19
14
  }) {
20
- const merged = useMemo(() => (series ?? []).map(item => ({
21
- type: 'line',
22
- curve: smooth ? 'smooth' : curve,
23
- area,
24
- showSymbol,
25
- ...item
26
- })), [series, smooth, curve, area, showSymbol]);
27
- return /*#__PURE__*/_jsx(CartesianChart, {
28
- ...rest,
29
- series: merged,
30
- defaultType: "line",
31
- stack: stack
32
- });
33
- }
15
+ const merged = useMemo(
16
+ () => (series ?? []).map((item) => ({
17
+ type: "line",
18
+ curve: smooth ? "smooth" : curve,
19
+ area,
20
+ showSymbol,
21
+ ...item
22
+ })),
23
+ [series, smooth, curve, area, showSymbol]
24
+ );
25
+ return /* @__PURE__ */ jsx(
26
+ CartesianChart,
27
+ {
28
+ ...rest,
29
+ series: merged,
30
+ defaultType: "line",
31
+ stack
32
+ }
33
+ );
34
+ }
35
+ export {
36
+ LineChart
37
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAM9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAOnD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,6BAA6B,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IAClC,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC;IACrC,uBAAuB;IACvB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC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