@aura-react-comp/charts 0.0.0-stage → 0.3.1

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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -2
  3. package/esm/charts/area-chart/index.d.ts +19 -0
  4. package/esm/charts/area-chart/index.d.ts.map +1 -0
  5. package/esm/charts/area-chart/index.js +31 -0
  6. package/esm/charts/bar-chart/index.d.ts +16 -0
  7. package/esm/charts/bar-chart/index.d.ts.map +1 -0
  8. package/esm/charts/bar-chart/index.js +28 -0
  9. package/esm/charts/candlestick-chart/index.d.ts +47 -0
  10. package/esm/charts/candlestick-chart/index.d.ts.map +1 -0
  11. package/esm/charts/candlestick-chart/index.js +347 -0
  12. package/esm/charts/combo-chart/index.d.ts +17 -0
  13. package/esm/charts/combo-chart/index.d.ts.map +1 -0
  14. package/esm/charts/combo-chart/index.js +26 -0
  15. package/esm/charts/funnel-chart/index.d.ts +35 -0
  16. package/esm/charts/funnel-chart/index.d.ts.map +1 -0
  17. package/esm/charts/funnel-chart/index.js +200 -0
  18. package/esm/charts/gauge-chart/index.d.ts +41 -0
  19. package/esm/charts/gauge-chart/index.d.ts.map +1 -0
  20. package/esm/charts/gauge-chart/index.js +217 -0
  21. package/esm/charts/graph-chart/index.d.ts +35 -0
  22. package/esm/charts/graph-chart/index.d.ts.map +1 -0
  23. package/esm/charts/graph-chart/index.js +224 -0
  24. package/esm/charts/heatmap-chart/index.d.ts +47 -0
  25. package/esm/charts/heatmap-chart/index.d.ts.map +1 -0
  26. package/esm/charts/heatmap-chart/index.js +281 -0
  27. package/esm/charts/line-chart/index.d.ts +23 -0
  28. package/esm/charts/line-chart/index.d.ts.map +1 -0
  29. package/esm/charts/line-chart/index.js +33 -0
  30. package/esm/charts/pie-chart/index.d.ts +38 -0
  31. package/esm/charts/pie-chart/index.d.ts.map +1 -0
  32. package/esm/charts/pie-chart/index.js +272 -0
  33. package/esm/charts/radar-chart/index.d.ts +44 -0
  34. package/esm/charts/radar-chart/index.d.ts.map +1 -0
  35. package/esm/charts/radar-chart/index.js +263 -0
  36. package/esm/charts/ring-progress/index.d.ts +38 -0
  37. package/esm/charts/ring-progress/index.d.ts.map +1 -0
  38. package/esm/charts/ring-progress/index.js +137 -0
  39. package/esm/charts/sankey-chart/index.d.ts +34 -0
  40. package/esm/charts/sankey-chart/index.d.ts.map +1 -0
  41. package/esm/charts/sankey-chart/index.js +248 -0
  42. package/esm/charts/scatter-chart/index.d.ts +34 -0
  43. package/esm/charts/scatter-chart/index.d.ts.map +1 -0
  44. package/esm/charts/scatter-chart/index.js +305 -0
  45. package/esm/charts/sparkline/index.d.ts +31 -0
  46. package/esm/charts/sparkline/index.d.ts.map +1 -0
  47. package/esm/charts/sparkline/index.js +152 -0
  48. package/esm/charts/tree-chart/index.d.ts +34 -0
  49. package/esm/charts/tree-chart/index.d.ts.map +1 -0
  50. package/esm/charts/tree-chart/index.js +200 -0
  51. package/esm/charts/treemap-chart/index.d.ts +35 -0
  52. package/esm/charts/treemap-chart/index.d.ts.map +1 -0
  53. package/esm/charts/treemap-chart/index.js +239 -0
  54. package/esm/charts/waterfall-chart/index.d.ts +41 -0
  55. package/esm/charts/waterfall-chart/index.d.ts.map +1 -0
  56. package/esm/charts/waterfall-chart/index.js +281 -0
  57. package/esm/components/Legend.d.ts +24 -0
  58. package/esm/components/Legend.d.ts.map +1 -0
  59. package/esm/components/Legend.js +50 -0
  60. package/esm/components/Tooltip.d.ts +24 -0
  61. package/esm/components/Tooltip.d.ts.map +1 -0
  62. package/esm/components/Tooltip.js +85 -0
  63. package/esm/components/chart/index.d.ts +71 -0
  64. package/esm/components/chart/index.d.ts.map +1 -0
  65. package/esm/components/chart/index.js +142 -0
  66. package/esm/components/chart.less +223 -0
  67. package/esm/core/animation.d.ts +49 -0
  68. package/esm/core/animation.d.ts.map +1 -0
  69. package/esm/core/animation.js +93 -0
  70. package/esm/core/force.d.ts +43 -0
  71. package/esm/core/force.d.ts.map +1 -0
  72. package/esm/core/force.js +134 -0
  73. package/esm/core/format.d.ts +34 -0
  74. package/esm/core/format.d.ts.map +1 -0
  75. package/esm/core/format.js +81 -0
  76. package/esm/core/hierarchy.d.ts +77 -0
  77. package/esm/core/hierarchy.d.ts.map +1 -0
  78. package/esm/core/hierarchy.js +233 -0
  79. package/esm/core/layout.d.ts +67 -0
  80. package/esm/core/layout.d.ts.map +1 -0
  81. package/esm/core/layout.js +121 -0
  82. package/esm/core/sampling.d.ts +32 -0
  83. package/esm/core/sampling.d.ts.map +1 -0
  84. package/esm/core/sampling.js +124 -0
  85. package/esm/core/sankey.d.ts +67 -0
  86. package/esm/core/sankey.d.ts.map +1 -0
  87. package/esm/core/sankey.js +136 -0
  88. package/esm/core/scale.d.ts +98 -0
  89. package/esm/core/scale.d.ts.map +1 -0
  90. package/esm/core/scale.js +207 -0
  91. package/esm/core/shape.d.ts +60 -0
  92. package/esm/core/shape.d.ts.map +1 -0
  93. package/esm/core/shape.js +246 -0
  94. package/esm/global.d.ts +6 -0
  95. package/esm/hooks/useChartTheme.d.ts +11 -0
  96. package/esm/hooks/useChartTheme.d.ts.map +1 -0
  97. package/esm/hooks/useChartTheme.js +35 -0
  98. package/esm/hooks/useChartTransition.d.ts +20 -0
  99. package/esm/hooks/useChartTransition.d.ts.map +1 -0
  100. package/esm/hooks/useChartTransition.js +120 -0
  101. package/esm/hooks/useElementSize.d.ts +17 -0
  102. package/esm/hooks/useElementSize.d.ts.map +1 -0
  103. package/esm/hooks/useElementSize.js +47 -0
  104. package/esm/index.d.ts +62 -0
  105. package/esm/index.d.ts.map +1 -0
  106. package/esm/index.js +48 -0
  107. package/esm/internal/CartesianChart.d.ts +16 -0
  108. package/esm/internal/CartesianChart.d.ts.map +1 -0
  109. package/esm/internal/CartesianChart.js +811 -0
  110. package/esm/internal/model.d.ts +67 -0
  111. package/esm/internal/model.d.ts.map +1 -0
  112. package/esm/internal/model.js +146 -0
  113. package/esm/scene/canvas.d.ts +18 -0
  114. package/esm/scene/canvas.d.ts.map +1 -0
  115. package/esm/scene/canvas.js +138 -0
  116. package/esm/scene/svg.d.ts +12 -0
  117. package/esm/scene/svg.d.ts.map +1 -0
  118. package/esm/scene/svg.js +116 -0
  119. package/esm/scene/types.d.ts +89 -0
  120. package/esm/scene/types.d.ts.map +1 -0
  121. package/esm/scene/types.js +21 -0
  122. package/esm/style.css +196 -0
  123. package/esm/theme/index.d.ts +127 -0
  124. package/esm/theme/index.d.ts.map +1 -0
  125. package/esm/theme/index.js +300 -0
  126. package/esm/types.d.ts +168 -0
  127. package/esm/types.d.ts.map +1 -0
  128. package/esm/types.js +2 -0
  129. package/package.json +64 -3
@@ -0,0 +1,60 @@
1
+ /**
2
+ * 路径生成器。
3
+ *
4
+ * 所有图表最终都落到「一段 SVG path 字符串」这一层:
5
+ * · SVG 渲染器把它直接写进 `<path d>`;
6
+ * · Canvas 渲染器把它交给 `new Path2D(d)`。
7
+ * 两条渲染路径共用同一份几何计算,因此不存在「SVG 与 Canvas 画得不一样」的问题。
8
+ */
9
+ export interface Point {
10
+ x: number;
11
+ y: number;
12
+ }
13
+ export type CurveType = 'linear' | 'smooth' | 'monotone' | 'step';
14
+ /** 曲线上的点允许为 null,表示此处数据缺失、路径应断开 */
15
+ export type CurvePoint = Point | null;
16
+ /** 把点序列拆成若干连续段,段与段之间是 null 造成的断点 */
17
+ export declare function splitSegments(points: readonly CurvePoint[]): Point[][];
18
+ /** 折线路径(自动处理 null 断点) */
19
+ export declare function linePath(points: readonly CurvePoint[], curve?: CurveType): string;
20
+ /**
21
+ * 面积路径:上边界沿曲线走,再沿基线折回。
22
+ *
23
+ * @param points 上边界点集
24
+ * @param baseline 基线像素 y(通常是 0 值所在位置)
25
+ */
26
+ export declare function areaPath(points: readonly CurvePoint[], baseline: number, curve?: CurveType): string;
27
+ /**
28
+ * 扇形路径(饼图 / 环图 / 玫瑰图)。
29
+ *
30
+ * @param cx 圆心 x
31
+ * @param cy 圆心 y
32
+ * @param innerRadius 内半径,大于 0 即为环形
33
+ * @param outerRadius 外半径
34
+ * @param startAngle 起始角(弧度,0 指向 3 点钟方向,顺时针为正)
35
+ * @param endAngle 结束角
36
+ */
37
+ export declare function arcPath(cx: number, cy: number, innerRadius: number, outerRadius: number, startAngle: number, endAngle: number): string;
38
+ /**
39
+ * 圆角矩形路径。
40
+ *
41
+ * 柱状图的圆角通常只在上方两个角(负值柱则在下两个角),
42
+ * 因此用 corners 精确控制,而不是简单给 rect 加 rx(那会四角全圆)。
43
+ */
44
+ export declare function roundedRectPath(x: number, y: number, width: number, height: number, radius: number, corners?: {
45
+ tl?: boolean;
46
+ tr?: boolean;
47
+ br?: boolean;
48
+ bl?: boolean;
49
+ }): string;
50
+ /** 散点图形符号 */
51
+ export type SymbolType = 'circle' | 'square' | 'diamond' | 'triangle' | 'star' | 'cross';
52
+ export declare function symbolPath(type: SymbolType, cx: number, cy: number, size: number): string;
53
+ /**
54
+ * 圆弧中心线路径。
55
+ *
56
+ * 与 arcPath 的区别:arcPath 生成的是「环带 + 填充」的闭合区域,
57
+ * 而这里只生成一条中心线圆弧,供 stroke 使用(仪表盘、进度环都用它)。
58
+ */
59
+ export declare function arcLinePath(cx: number, cy: number, radius: number, startAngle: number, endAngle: number): string;
60
+ //# sourceMappingURL=shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["shape.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAElE,mCAAmC;AACnC,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;AAKtC,oCAAoC;AACpC,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG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AAM,CAmBR"}
@@ -0,0 +1,246 @@
1
+ 'use client';
2
+ /**
3
+ * 路径生成器。
4
+ *
5
+ * 所有图表最终都落到「一段 SVG path 字符串」这一层:
6
+ * · SVG 渲染器把它直接写进 `<path d>`;
7
+ * · Canvas 渲染器把它交给 `new Path2D(d)`。
8
+ * 两条渲染路径共用同一份几何计算,因此不存在「SVG 与 Canvas 画得不一样」的问题。
9
+ */
10
+
11
+ /** 曲线上的点允许为 null,表示此处数据缺失、路径应断开 */
12
+
13
+ const f = value => Number.isFinite(value) ? String(Math.round(value * 100) / 100) : '0';
14
+
15
+ /** 把点序列拆成若干连续段,段与段之间是 null 造成的断点 */
16
+ export function splitSegments(points) {
17
+ const segments = [];
18
+ let current = [];
19
+ for (const point of points) {
20
+ if (point) current.push(point);else if (current.length) {
21
+ segments.push(current);
22
+ current = [];
23
+ }
24
+ }
25
+ if (current.length) segments.push(current);
26
+ return segments;
27
+ }
28
+
29
+ /**
30
+ * Fritsch–Carlson 单调切线。
31
+ *
32
+ * 目的:让平滑折线在数据极值处不「鼓包」。
33
+ * 普通 Catmull-Rom 会让曲线冲出数据范围(视觉上像在说谎),
34
+ * 折线图必须避免这种失真,因此默认曲线类型用的是 monotone。
35
+ */
36
+ function monotoneTangents(xs, ys) {
37
+ const n = xs.length;
38
+ if (n < 2) return [0];
39
+ const dx = [];
40
+ const slopes = [];
41
+ for (let i = 0; i < n - 1; i += 1) {
42
+ const deltaX = xs[i + 1] - xs[i];
43
+ dx.push(deltaX);
44
+ slopes.push(deltaX === 0 ? 0 : (ys[i + 1] - ys[i]) / deltaX);
45
+ }
46
+ const m = new Array(n);
47
+ m[0] = slopes[0];
48
+ m[n - 1] = slopes[n - 2];
49
+ for (let i = 1; i < n - 1; i += 1) {
50
+ const s0 = slopes[i - 1];
51
+ const s1 = slopes[i];
52
+ if (s0 * s1 <= 0) {
53
+ m[i] = 0; // 极值点或平段:切线归零,曲线不会越界
54
+ } else {
55
+ const w1 = 2 * dx[i] + dx[i - 1];
56
+ const w2 = dx[i] + 2 * dx[i - 1];
57
+ m[i] = (w1 + w2) / (w1 / s0 + w2 / s1);
58
+ }
59
+ }
60
+ return m;
61
+ }
62
+
63
+ /** 单个点序列 → path 命令(不含 M 之外的前缀处理) */
64
+ function segmentToPath(points, curve) {
65
+ if (points.length === 1) {
66
+ // 单点也要能画出来(否则只剩一个孤立 symbol,连线消失)
67
+ const {
68
+ x,
69
+ y
70
+ } = points[0];
71
+ return `M${f(x)},${f(y)}L${f(x)},${f(y)}`;
72
+ }
73
+ if (curve === 'linear') {
74
+ return points.map((p, i) => `${i === 0 ? 'M' : 'L'}${f(p.x)},${f(p.y)}`).join('');
75
+ }
76
+ if (curve === 'step') {
77
+ let d = `M${f(points[0].x)},${f(points[0].y)}`;
78
+ for (let i = 1; i < points.length; i += 1) {
79
+ const prev = points[i - 1];
80
+ const curr = points[i];
81
+ const midX = (prev.x + curr.x) / 2;
82
+ d += `H${f(midX)}V${f(curr.y)}H${f(curr.x)}`;
83
+ }
84
+ return d;
85
+ }
86
+
87
+ // smooth / monotone 都走三次贝塞尔,区别在于切线算法
88
+ const xs = points.map(p => p.x);
89
+ const ys = points.map(p => p.y);
90
+ const tangents = monotoneTangents(xs, ys);
91
+ let d = `M${f(points[0].x)},${f(points[0].y)}`;
92
+ for (let i = 0; i < points.length - 1; i += 1) {
93
+ const p0 = points[i];
94
+ const p1 = points[i + 1];
95
+ const dx = (p1.x - p0.x) / 3;
96
+
97
+ // smooth 在单调切线基础上放大 20%,视觉更「圆润」但仍不越界
98
+ const grow = curve === 'smooth' ? 1.2 : 1;
99
+ const c1x = p0.x + dx;
100
+ const c1y = p0.y + tangents[i] * dx * grow;
101
+ const c2x = p1.x - dx;
102
+ const c2y = p1.y - tangents[i + 1] * dx * grow;
103
+ d += `C${f(c1x)},${f(c1y)} ${f(c2x)},${f(c2y)} ${f(p1.x)},${f(p1.y)}`;
104
+ }
105
+ return d;
106
+ }
107
+
108
+ /** 折线路径(自动处理 null 断点) */
109
+ export function linePath(points, curve = 'monotone') {
110
+ return splitSegments(points).map(segment => segmentToPath(segment, curve)).filter(Boolean).join('');
111
+ }
112
+
113
+ /**
114
+ * 面积路径:上边界沿曲线走,再沿基线折回。
115
+ *
116
+ * @param points 上边界点集
117
+ * @param baseline 基线像素 y(通常是 0 值所在位置)
118
+ */
119
+ export function areaPath(points, baseline, curve = 'monotone') {
120
+ return splitSegments(points).map(segment => {
121
+ if (segment.length === 0) return '';
122
+ const top = segmentToPath(segment, curve);
123
+ const last = segment[segment.length - 1];
124
+ const first = segment[0];
125
+ return `${top}L${f(last.x)},${f(baseline)}L${f(first.x)},${f(baseline)}Z`;
126
+ }).filter(Boolean).join('');
127
+ }
128
+
129
+ /**
130
+ * 扇形路径(饼图 / 环图 / 玫瑰图)。
131
+ *
132
+ * @param cx 圆心 x
133
+ * @param cy 圆心 y
134
+ * @param innerRadius 内半径,大于 0 即为环形
135
+ * @param outerRadius 外半径
136
+ * @param startAngle 起始角(弧度,0 指向 3 点钟方向,顺时针为正)
137
+ * @param endAngle 结束角
138
+ */
139
+ export function arcPath(cx, cy, innerRadius, outerRadius, startAngle, endAngle) {
140
+ const sweep = endAngle - startAngle;
141
+ // 整圆无法用单段 A 命令表达(起终点重合),拆成两个半圆
142
+ if (Math.abs(sweep) >= Math.PI * 2 - 1e-6) {
143
+ return [`M${f(cx - outerRadius)},${f(cy)}`, `A${f(outerRadius)},${f(outerRadius)} 0 1 1 ${f(cx + outerRadius)},${f(cy)}`, `A${f(outerRadius)},${f(outerRadius)} 0 1 1 ${f(cx - outerRadius)},${f(cy)}`, innerRadius > 0 ? `M${f(cx - innerRadius)},${f(cy)}A${f(innerRadius)},${f(innerRadius)} 0 1 0 ${f(cx + innerRadius)},${f(cy)}A${f(innerRadius)},${f(innerRadius)} 0 1 0 ${f(cx - innerRadius)},${f(cy)}` : '', 'Z'].join('');
144
+ }
145
+ const largeArc = Math.abs(sweep) > Math.PI ? 1 : 0;
146
+ const direction = sweep > 0 ? 1 : 0;
147
+ const x0 = cx + outerRadius * Math.cos(startAngle);
148
+ const y0 = cy + outerRadius * Math.sin(startAngle);
149
+ const x1 = cx + outerRadius * Math.cos(endAngle);
150
+ const y1 = cy + outerRadius * Math.sin(endAngle);
151
+ if (innerRadius <= 0) {
152
+ return `M${f(cx)},${f(cy)}L${f(x0)},${f(y0)}A${f(outerRadius)},${f(outerRadius)} 0 ${largeArc} ${direction} ${f(x1)},${f(y1)}Z`;
153
+ }
154
+ const ix1 = cx + innerRadius * Math.cos(endAngle);
155
+ const iy1 = cy + innerRadius * Math.sin(endAngle);
156
+ const ix0 = cx + innerRadius * Math.cos(startAngle);
157
+ const iy0 = cy + innerRadius * Math.sin(startAngle);
158
+ return [`M${f(x0)},${f(y0)}`, `A${f(outerRadius)},${f(outerRadius)} 0 ${largeArc} ${direction} ${f(x1)},${f(y1)}`, `L${f(ix1)},${f(iy1)}`, `A${f(innerRadius)},${f(innerRadius)} 0 ${largeArc} ${direction === 1 ? 0 : 1} ${f(ix0)},${f(iy0)}`, 'Z'].join('');
159
+ }
160
+
161
+ /**
162
+ * 圆角矩形路径。
163
+ *
164
+ * 柱状图的圆角通常只在上方两个角(负值柱则在下两个角),
165
+ * 因此用 corners 精确控制,而不是简单给 rect 加 rx(那会四角全圆)。
166
+ */
167
+ export function roundedRectPath(x, y, width, height, radius, corners = {
168
+ tl: true,
169
+ tr: true
170
+ }) {
171
+ const r = Math.max(0, Math.min(radius, Math.abs(width) / 2, Math.abs(height) / 2));
172
+ if (r === 0) return `M${f(x)},${f(y)}H${f(x + width)}V${f(y + height)}H${f(x)}Z`;
173
+ const {
174
+ tl = true,
175
+ tr = true,
176
+ br = false,
177
+ bl = false
178
+ } = corners;
179
+ const rtl = tl ? r : 0;
180
+ const rtr = tr ? r : 0;
181
+ const rbr = br ? r : 0;
182
+ const rbl = bl ? r : 0;
183
+ const x1 = x + width;
184
+ const y1 = y + height;
185
+ return [`M${f(x + rtl)},${f(y)}`, `H${f(x1 - rtr)}`, rtr ? `A${f(rtr)},${f(rtr)} 0 0 1 ${f(x1)},${f(y + rtr)}` : '', `V${f(y1 - rbr)}`, rbr ? `A${f(rbr)},${f(rbr)} 0 0 1 ${f(x1 - rbr)},${f(y1)}` : '', `H${f(x + rbl)}`, rbl ? `A${f(rbl)},${f(rbl)} 0 0 1 ${f(x)},${f(y1 - rbl)}` : '', `V${f(y + rtl)}`, rtl ? `A${f(rtl)},${f(rtl)} 0 0 1 ${f(x + rtl)},${f(y)}` : '', 'Z'].join('');
186
+ }
187
+
188
+ /** 散点图形符号 */
189
+
190
+ export function symbolPath(type, cx, cy, size) {
191
+ const s = size / 2;
192
+ switch (type) {
193
+ case 'square':
194
+ return `M${f(cx - s)},${f(cy - s)}H${f(cx + s)}V${f(cy + s)}H${f(cx - s)}Z`;
195
+ case 'diamond':
196
+ return `M${f(cx)},${f(cy - s)}L${f(cx + s)},${f(cy)}L${f(cx)},${f(cy + s)}L${f(cx - s)},${f(cy)}Z`;
197
+ case 'triangle':
198
+ return `M${f(cx)},${f(cy - s)}L${f(cx + s)},${f(cy + s)}L${f(cx - s)},${f(cy + s)}Z`;
199
+ case 'cross':
200
+ {
201
+ const t = s / 3;
202
+ return [`M${f(cx - s)},${f(cy - t)}H${f(cx - t)}V${f(cy - s)}H${f(cx + t)}V${f(cy - t)}`, `H${f(cx + s)}V${f(cy + t)}H${f(cx + t)}V${f(cy + s)}H${f(cx - t)}V${f(cy + t)}H${f(cx - s)}Z`].join('');
203
+ }
204
+ case 'star':
205
+ {
206
+ const points = [];
207
+ for (let i = 0; i < 10; i += 1) {
208
+ const radius = i % 2 === 0 ? s : s * 0.45;
209
+ const angle = Math.PI / 5 * i - Math.PI / 2;
210
+ points.push(`${f(cx + radius * Math.cos(angle))},${f(cy + radius * Math.sin(angle))}`);
211
+ }
212
+ return `M${points.join('L')}Z`;
213
+ }
214
+ case 'circle':
215
+ default:
216
+ {
217
+ // 用两段圆弧表达圆形,保证与 rect/path 渲染器行为一致
218
+ return `M${f(cx - s)},${f(cy)}A${f(s)},${f(s)} 0 1 0 ${f(cx + s)},${f(cy)}A${f(s)},${f(s)} 0 1 0 ${f(cx - s)},${f(cy)}Z`;
219
+ }
220
+ }
221
+ }
222
+
223
+ /**
224
+ * 圆弧中心线路径。
225
+ *
226
+ * 与 arcPath 的区别:arcPath 生成的是「环带 + 填充」的闭合区域,
227
+ * 而这里只生成一条中心线圆弧,供 stroke 使用(仪表盘、进度环都用它)。
228
+ */
229
+ export function arcLinePath(cx, cy, radius, startAngle, endAngle) {
230
+ const sweep = endAngle - startAngle;
231
+ if (Math.abs(sweep) < 1e-6 || radius <= 0) return '';
232
+
233
+ // 整圆无法用单段弧表达,拆成两段
234
+ if (Math.abs(sweep) >= Math.PI * 2 - 1e-6) {
235
+ const x = cx + radius * Math.cos(startAngle);
236
+ const y = cy + radius * Math.sin(startAngle);
237
+ return `M${f(x)},${f(y)}A${f(radius)},${f(radius)} 0 1 1 ${f(cx - (x - cx))},${f(cy - (y - cy))}A${f(radius)},${f(radius)} 0 1 1 ${f(x)},${f(y)}`;
238
+ }
239
+ const largeArc = Math.abs(sweep) > Math.PI ? 1 : 0;
240
+ const direction = sweep > 0 ? 1 : 0;
241
+ const x0 = cx + radius * Math.cos(startAngle);
242
+ const y0 = cy + radius * Math.sin(startAngle);
243
+ const x1 = cx + radius * Math.cos(endAngle);
244
+ const y1 = cy + radius * Math.sin(endAngle);
245
+ return `M${f(x0)},${f(y0)}A${f(radius)},${f(radius)} 0 ${largeArc} ${direction} ${f(x1)},${f(y1)}`;
246
+ }
@@ -0,0 +1,6 @@
1
+ declare module '*.less' {
2
+ const classes: Record<string, string>;
3
+ export default classes;
4
+ }
5
+
6
+ declare module '*.css';
@@ -0,0 +1,11 @@
1
+ import { type ChartTheme, type ChartThemeInput } from '../theme/index.js';
2
+ /**
3
+ * 解析图表主题,并在主题属性变化时重新读取。
4
+ *
5
+ * 为什么需要订阅:Aura 的主题是 `document.documentElement` 上的双轴属性
6
+ * (`data-mode`=明暗 × `data-palette`=色板,见 ui/theme/tokens.css)。
7
+ * 图表颜色若是挂载时读一次,用户点切换后图表会停在旧配色 ——
8
+ * 视觉上和整站脱节。旧的 `data-theme` 键继续监听以兼容历史用法。
9
+ */
10
+ export declare function useChartTheme(input?: ChartThemeInput, palette?: string[]): ChartTheme;
11
+ //# sourceMappingURL=useChartTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartTheme.d.ts","sourceRoot":"","sources":["useChartTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,KAAK,CAAC,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,UAAU,CAiCZ"}
@@ -0,0 +1,35 @@
1
+ 'use client';
2
+ import { useEffect, useState } from 'react';
3
+ import { resolveTheme } from "../theme";
4
+
5
+ /**
6
+ * 解析图表主题,并在主题属性变化时重新读取。
7
+ *
8
+ * 为什么需要订阅:Aura 的主题是 `document.documentElement` 上的双轴属性
9
+ * (`data-mode`=明暗 × `data-palette`=色板,见 ui/theme/tokens.css)。
10
+ * 图表颜色若是挂载时读一次,用户点切换后图表会停在旧配色 ——
11
+ * 视觉上和整站脱节。旧的 `data-theme` 键继续监听以兼容历史用法。
12
+ */
13
+ export function useChartTheme(input, palette) {
14
+ const [theme, setTheme] = useState(() => resolveTheme(input));
15
+ useEffect(() => {
16
+ const update = () => {
17
+ const next = resolveTheme(input);
18
+ setTheme(palette && palette.length ? {
19
+ ...next,
20
+ palette
21
+ } : next);
22
+ };
23
+ update();
24
+ if (typeof MutationObserver === 'undefined' || typeof document === 'undefined') {
25
+ return undefined;
26
+ }
27
+ const observer = new MutationObserver(update);
28
+ observer.observe(document.documentElement, {
29
+ attributes: true,
30
+ attributeFilter: ['data-mode', 'data-palette', 'data-theme', 'class', 'style']
31
+ });
32
+ return () => observer.disconnect();
33
+ }, [input, palette]);
34
+ return theme;
35
+ }
@@ -0,0 +1,20 @@
1
+ import { type ResolvedAnimation } from '../core/animation.js';
2
+ export interface ChartTransition {
3
+ /** 插值后的数值矩阵;入场阶段直接等于目标值(生长由 progress 表达) */
4
+ values: (number | null)[][];
5
+ /** 入场进度 0→1,入场结束后恒为 1 */
6
+ progress: number;
7
+ }
8
+ /**
9
+ * 图表动画状态机。
10
+ *
11
+ * 只做两件事,且两者互斥,避免叠加出双重缓动:
12
+ * · **首次挂载** → 推进 `progress`(0→1),数值保持目标值,
13
+ * 由各图表用 staggerProgress 把 progress 映射成逐图元的位置;
14
+ * · **数据更新** → `progress` 恒为 1,改为在「当前显示值 → 新值」之间插值。
15
+ *
16
+ * 之前每次数据变化都重播入场,是「生硬」观感的主要来源:
17
+ * 用户改一个数字,整张图却从头长一遍。
18
+ */
19
+ export declare function useChartTransition(matrix: (number | null)[][], animation: ResolvedAnimation): ChartTransition;
20
+ //# sourceMappingURL=useChartTransition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChartTransition.d.ts","sourceRoot":"","sources":["useChartTransition.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC5B,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,EAC3B,SAAS,EAAE,iBAAiB,GAC3B,eAAe,CAwIjB"}
@@ -0,0 +1,120 @@
1
+ 'use client';
2
+ import { useEffect, useReducer, useRef } from 'react';
3
+ import { hashMatrix } from "../core/animation";
4
+ function prefersReducedMotion() {
5
+ if (typeof window === 'undefined' || !window.matchMedia) return false;
6
+ return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
7
+ }
8
+
9
+ /**
10
+ * 图表动画状态机。
11
+ *
12
+ * 只做两件事,且两者互斥,避免叠加出双重缓动:
13
+ * · **首次挂载** → 推进 `progress`(0→1),数值保持目标值,
14
+ * 由各图表用 staggerProgress 把 progress 映射成逐图元的位置;
15
+ * · **数据更新** → `progress` 恒为 1,改为在「当前显示值 → 新值」之间插值。
16
+ *
17
+ * 之前每次数据变化都重播入场,是「生硬」观感的主要来源:
18
+ * 用户改一个数字,整张图却从头长一遍。
19
+ */
20
+ export function useChartTransition(matrix, animation) {
21
+ const hash = hashMatrix(matrix);
22
+ const displayRef = useRef(matrix);
23
+ const progressRef = useRef(0);
24
+ const mountedRef = useRef(false);
25
+ const [, forceRender] = useReducer(tick => tick + 1, 0);
26
+ useEffect(() => {
27
+ /** 直接落到终态:无动画、时长非法、命中「减少动态效果」偏好、环境无 rAF */
28
+ const settle = () => {
29
+ displayRef.current = matrix;
30
+ progressRef.current = 1;
31
+ mountedRef.current = true;
32
+ forceRender();
33
+ };
34
+
35
+ // 页面不可见时不做动画:后台标签页的 rAF 会被浏览器节流甚至暂停,
36
+ // 此时推进动画既无意义,还可能让图表停在起始帧
37
+ const hidden = typeof document !== 'undefined' && document.visibilityState === 'hidden';
38
+ if (!animation.enabled || animation.duration <= 0 || prefersReducedMotion() || hidden || typeof requestAnimationFrame === 'undefined') {
39
+ settle();
40
+ return undefined;
41
+ }
42
+ const entering = !mountedRef.current;
43
+ mountedRef.current = true;
44
+ const from = entering ? matrix : displayRef.current;
45
+ const to = matrix;
46
+
47
+ /**
48
+ * 形状变化(行数或列数不同)时不做插值。
49
+ * 典型场景是 dataZoom 切换窗口:点数量变了,新旧数据之间没有对应关系,
50
+ * 硬插值会让图「从 0 长出来」,比直接切换更难看。
51
+ */
52
+ const sameShape = from.length === to.length && to.every((row, index) => row.length === (from[index]?.length ?? -1));
53
+ if (entering) {
54
+ progressRef.current = 0;
55
+ } else if (!sameShape) {
56
+ displayRef.current = to;
57
+ progressRef.current = 1;
58
+ forceRender();
59
+ return undefined;
60
+ }
61
+ let frame = 0;
62
+ let cancelled = false;
63
+ /**
64
+ * 时间基准用 Date.now()(墙钟)。
65
+ *
66
+ * 试过 rAF 回调的时间戳与 performance.now():浏览器里两者同源,
67
+ * 但 jsdom 等测试环境的时钟是冻结的,每帧拿到同一个值,
68
+ * 进度会永远停在 0 —— 动画在测试里完全不推进,也就无法断言。
69
+ * 600ms 量级用 1ms 精度完全够。
70
+ */
71
+ const startAt = Date.now() + animation.delay;
72
+ const tick = () => {
73
+ if (cancelled) return;
74
+ const raw = Math.max(0, Math.min(1, (Date.now() - startAt) / animation.duration));
75
+ const eased = animation.ease(raw);
76
+ if (entering) {
77
+ // 入场:只推进进度,数值就是目标值
78
+ progressRef.current = eased;
79
+ displayRef.current = to;
80
+ } else {
81
+ // 更新:逐格插值。null 不参与插值(缺失就是缺失)
82
+ displayRef.current = to.map((row, rowIndex) => row.map((target, columnIndex) => {
83
+ const previous = from[rowIndex]?.[columnIndex] ?? target ?? 0;
84
+ if (target === null) return previous === null ? null : previous;
85
+ if (previous === null) return target;
86
+ return previous + (target - previous) * eased;
87
+ }));
88
+ progressRef.current = 1;
89
+ }
90
+ forceRender();
91
+ if (raw < 1) frame = requestAnimationFrame(tick);
92
+ };
93
+ frame = requestAnimationFrame(tick);
94
+
95
+ /**
96
+ * 兜底:rAF 在某些环境不保证持续触发(无头浏览器、后台标签页、
97
+ * 窗口最小化、某些低功耗模式)。只靠 rAF,图表会永远停在起始帧 ——
98
+ * 表现为「所有图元贴在基线上」,比没有动画严重得多。
99
+ * 因此设一个略长于时长的定时器强制落到终态。
100
+ */
101
+ const failsafe = setTimeout(() => {
102
+ if (cancelled) return;
103
+ cancelled = true;
104
+ progressRef.current = 1;
105
+ displayRef.current = to;
106
+ forceRender();
107
+ }, animation.delay + animation.duration + 100);
108
+ return () => {
109
+ cancelled = true;
110
+ cancelAnimationFrame(frame);
111
+ clearTimeout(failsafe);
112
+ };
113
+ // hash 变化 = 数据变了;其余依赖变化 = 动画参数变了
114
+ // eslint-disable-next-line react-hooks/exhaustive-deps
115
+ }, [hash, animation.enabled, animation.duration, animation.easing, animation.stagger, animation.delay]);
116
+ return {
117
+ values: displayRef.current,
118
+ progress: progressRef.current
119
+ };
120
+ }
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ export interface Size {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ /**
7
+ * 监听元素尺寸。
8
+ *
9
+ * 图表必须能跟随容器变化(响应式栅格里容器宽度是被父元素决定的),
10
+ * 因此不用 window.resize(弹窗/抽屉里不会触发),而用 ResizeObserver。
11
+ */
12
+ export declare function useElementSize<T extends HTMLElement>(): {
13
+ ref: import("react").MutableRefObject<T | null>;
14
+ size: Size;
15
+ measure: () => void;
16
+ };
17
+ //# sourceMappingURL=useElementSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementSize.d.ts","sourceRoot":"","sources":["useElementSize.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW;;;;EAoCnD"}
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useRef, useState } from 'react';
3
+ /**
4
+ * 监听元素尺寸。
5
+ *
6
+ * 图表必须能跟随容器变化(响应式栅格里容器宽度是被父元素决定的),
7
+ * 因此不用 window.resize(弹窗/抽屉里不会触发),而用 ResizeObserver。
8
+ */
9
+ export function useElementSize() {
10
+ const ref = useRef(null);
11
+ const [size, setSize] = useState({
12
+ width: 0,
13
+ height: 0
14
+ });
15
+ const measure = useCallback(() => {
16
+ const element = ref.current;
17
+ if (!element) return;
18
+ const rect = element.getBoundingClientRect();
19
+ setSize(prev => {
20
+ const next = {
21
+ width: Math.round(rect.width),
22
+ height: Math.round(rect.height)
23
+ };
24
+ // 尺寸未变时不触发渲染,避免 ResizeObserver 抖动导致的重绘风暴
25
+ return prev.width === next.width && prev.height === next.height ? prev : next;
26
+ });
27
+ }, []);
28
+ useEffect(() => {
29
+ measure();
30
+ if (typeof ResizeObserver === 'undefined') {
31
+ // jsdom 等环境没有 ResizeObserver,退化为一次性测量
32
+ if (typeof window !== 'undefined') {
33
+ window.addEventListener('resize', measure);
34
+ return () => window.removeEventListener('resize', measure);
35
+ }
36
+ return undefined;
37
+ }
38
+ const observer = new ResizeObserver(measure);
39
+ if (ref.current) observer.observe(ref.current);
40
+ return () => observer.disconnect();
41
+ }, [measure]);
42
+ return {
43
+ ref,
44
+ size,
45
+ measure
46
+ };
47
+ }
package/esm/index.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @aura-react-comp/charts
3
+ *
4
+ * 自研图表库:SVG / Canvas 双渲染内核 + 令牌驱动主题。
5
+ *
6
+ * 分层导出:
7
+ * · 图表组件(LineChart / BarChart / ...)—— 日常使用
8
+ * · 配置式 <Chart option> —— 迁移 ECharts 或让 AI 生成
9
+ * · 主题工具(createChartTheme / readAuraTheme)—— 深度定制
10
+ * · 内核(scale / shape)—— 自建图表时的乐高积木
11
+ */
12
+ export { LineChart } from './charts/line-chart/index.js';
13
+ export type { LineChartProps } from './charts/line-chart/index.js';
14
+ export { BarChart } from './charts/bar-chart/index.js';
15
+ export type { BarChartProps } from './charts/bar-chart/index.js';
16
+ export { AreaChart } from './charts/area-chart/index.js';
17
+ export type { AreaChartProps } from './charts/area-chart/index.js';
18
+ export { ComboChart } from './charts/combo-chart/index.js';
19
+ export type { ComboChartProps } from './charts/combo-chart/index.js';
20
+ export { ScatterChart } from './charts/scatter-chart/index.js';
21
+ export type { ScatterChartProps } from './charts/scatter-chart/index.js';
22
+ export { PieChart } from './charts/pie-chart/index.js';
23
+ export type { PieChartProps, PieDataItem } from './charts/pie-chart/index.js';
24
+ export { RadarChart } from './charts/radar-chart/index.js';
25
+ export type { RadarChartProps, RadarIndicator, RadarSeries, } from './charts/radar-chart/index.js';
26
+ export { GaugeChart } from './charts/gauge-chart/index.js';
27
+ export type { GaugeChartProps, GaugeRange } from './charts/gauge-chart/index.js';
28
+ export { FunnelChart } from './charts/funnel-chart/index.js';
29
+ export type { FunnelChartProps, FunnelDataItem } from './charts/funnel-chart/index.js';
30
+ export { RingProgress } from './charts/ring-progress/index.js';
31
+ export type { RingProgressProps } from './charts/ring-progress/index.js';
32
+ export { WaterfallChart } from './charts/waterfall-chart/index.js';
33
+ export type { WaterfallChartProps, WaterfallItem, } from './charts/waterfall-chart/index.js';
34
+ export { Sparkline } from './charts/sparkline/index.js';
35
+ export type { SparklineProps } from './charts/sparkline/index.js';
36
+ export { HeatmapChart } from './charts/heatmap-chart/index.js';
37
+ export type { HeatmapChartProps, HeatmapCell } from './charts/heatmap-chart/index.js';
38
+ export { CandlestickChart } from './charts/candlestick-chart/index.js';
39
+ export type { CandlestickChartProps, CandlestickItem, } from './charts/candlestick-chart/index.js';
40
+ export { TreemapChart } from './charts/treemap-chart/index.js';
41
+ export type { TreemapChartProps } from './charts/treemap-chart/index.js';
42
+ export { TreeChart } from './charts/tree-chart/index.js';
43
+ export type { TreeChartProps } from './charts/tree-chart/index.js';
44
+ export { SankeyChart } from './charts/sankey-chart/index.js';
45
+ export type { SankeyChartProps } from './charts/sankey-chart/index.js';
46
+ export { GraphChart } from './charts/graph-chart/index.js';
47
+ export type { GraphChartProps } from './charts/graph-chart/index.js';
48
+ export { Tooltip } from './components/Tooltip.js';
49
+ export { useElementSize } from './hooks/useElementSize.js';
50
+ export { Chart } from './components/chart/index.js';
51
+ export type { ChartProps, ChartOption, ChartOptionSeries, } from './components/chart/index.js';
52
+ export type { BaseChartProps, ChartDataRow, SeriesConfig, SeriesType, AxisConfig, LegendConfig, TooltipConfig, TooltipPayload, TooltipSeriesItem, ChartRenderer, ChartAnimationInput, } from './types.js';
53
+ export { createChartTheme, readAuraTheme, resolveTheme, detectDarkMode, colorAt, withAlpha, mixColor, parseColor, lightTheme, darkTheme, DEFAULT_PALETTE, } from './theme/index.js';
54
+ export type { ChartTheme, ChartThemeInput, ChartThemeOptions, DeepPartial, } from './theme/index.js';
55
+ export { createBandScale, createPointScale, createLinearScale, linearTicks, niceStep, niceExtent, extentOf, extentWithZero, } from './core/scale.js';
56
+ export type { BandScale, PointScale, LinearScale, Extent } from './core/scale.js';
57
+ export { linePath, areaPath, arcLinePath, arcPath, roundedRectPath, symbolPath, splitSegments, } from './core/shape.js';
58
+ export type { CurveType, CurvePoint, Point, SymbolType } from './core/shape.js';
59
+ export { formatNumber, formatCompact, formatPercent, estimateTextWidth, } from './core/format.js';
60
+ export { squarify, buildTreemap, layoutTree, sumValues, } from './core/hierarchy.js';
61
+ export type { HierarchyNode, TreemapCell, TreeLayoutNode, } from './core/hierarchy.js';
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,E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