@aura-react-comp/charts 0.2.0 → 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.
- package/esm/charts/area-chart/index.d.ts +2 -2
- package/esm/charts/area-chart/index.js +28 -23
- package/esm/charts/bar-chart/index.d.ts +1 -1
- package/esm/charts/bar-chart/index.js +18 -21
- package/esm/charts/candlestick-chart/index.d.ts +2 -2
- package/esm/charts/candlestick-chart/index.js +243 -180
- package/esm/charts/combo-chart/index.d.ts +1 -1
- package/esm/charts/combo-chart/index.js +9 -20
- package/esm/charts/funnel-chart/index.d.ts +2 -2
- package/esm/charts/funnel-chart/index.js +134 -108
- package/esm/charts/gauge-chart/index.d.ts +1 -1
- package/esm/charts/gauge-chart/index.js +103 -105
- package/esm/charts/graph-chart/index.d.ts +3 -3
- package/esm/charts/graph-chart/index.js +155 -114
- package/esm/charts/heatmap-chart/index.d.ts +2 -2
- package/esm/charts/heatmap-chart/index.js +180 -135
- package/esm/charts/line-chart/index.d.ts +2 -2
- package/esm/charts/line-chart/index.js +29 -24
- package/esm/charts/pie-chart/index.d.ts +2 -2
- package/esm/charts/pie-chart/index.d.ts.map +1 -1
- package/esm/charts/pie-chart/index.js +199 -139
- package/esm/charts/radar-chart/index.d.ts +2 -2
- package/esm/charts/radar-chart/index.d.ts.map +1 -1
- package/esm/charts/radar-chart/index.js +155 -128
- package/esm/charts/ring-progress/index.d.ts +1 -1
- package/esm/charts/ring-progress/index.js +82 -82
- package/esm/charts/sankey-chart/index.d.ts +3 -3
- package/esm/charts/sankey-chart/index.js +172 -141
- package/esm/charts/scatter-chart/index.d.ts +3 -3
- package/esm/charts/scatter-chart/index.d.ts.map +1 -1
- package/esm/charts/scatter-chart/index.js +226 -159
- package/esm/charts/sparkline/index.d.ts +1 -1
- package/esm/charts/sparkline/index.js +82 -66
- package/esm/charts/tree-chart/index.d.ts +3 -3
- package/esm/charts/tree-chart/index.js +129 -102
- package/esm/charts/treemap-chart/index.d.ts +3 -3
- package/esm/charts/treemap-chart/index.js +163 -141
- package/esm/charts/waterfall-chart/index.d.ts +2 -2
- package/esm/charts/waterfall-chart/index.js +166 -121
- package/esm/components/Legend.d.ts +5 -4
- package/esm/components/Legend.d.ts.map +1 -1
- package/esm/components/Legend.js +80 -48
- package/esm/components/Tooltip.d.ts +2 -2
- package/esm/components/Tooltip.js +63 -71
- package/esm/components/chart/index.d.ts +5 -2
- package/esm/components/chart/index.d.ts.map +1 -1
- package/esm/components/chart/index.js +81 -102
- package/esm/components/chart.less +13 -0
- package/esm/core/animation.js +32 -43
- package/esm/core/export.d.ts +34 -0
- package/esm/core/export.d.ts.map +1 -0
- package/esm/core/export.js +390 -0
- package/esm/core/force.js +23 -45
- package/esm/core/format.js +49 -52
- package/esm/core/hierarchy.d.ts +1 -1
- package/esm/core/hierarchy.js +61 -92
- package/esm/core/layout.d.ts +1 -1
- package/esm/core/layout.js +33 -50
- package/esm/core/sampling.js +31 -53
- package/esm/core/sankey.js +36 -55
- package/esm/core/scale.js +73 -86
- package/esm/core/shape.js +102 -133
- package/esm/core/sync.d.ts +41 -0
- package/esm/core/sync.d.ts.map +1 -0
- package/esm/core/sync.js +120 -0
- package/esm/hooks/useChartExport.d.ts +19 -0
- package/esm/hooks/useChartExport.d.ts.map +1 -0
- package/esm/hooks/useChartExport.js +35 -0
- package/esm/hooks/useChartTheme.d.ts +6 -5
- package/esm/hooks/useChartTheme.d.ts.map +1 -1
- package/esm/hooks/useChartTheme.js +18 -18
- package/esm/hooks/useChartTransition.d.ts +1 -1
- package/esm/hooks/useChartTransition.js +59 -73
- package/esm/hooks/useElementSize.js +20 -28
- package/esm/hooks/usePlotPointer.d.ts +23 -0
- package/esm/hooks/usePlotPointer.d.ts.map +1 -0
- package/esm/hooks/usePlotPointer.js +94 -0
- package/esm/index.d.ts +56 -50
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +137 -47
- package/esm/internal/CartesianChart.d.ts +1 -1
- package/esm/internal/CartesianChart.d.ts.map +1 -1
- package/esm/internal/CartesianChart.js +667 -485
- package/esm/internal/model.d.ts +2 -2
- package/esm/internal/model.js +45 -60
- package/esm/scene/canvas.d.ts +1 -1
- package/esm/scene/canvas.js +101 -107
- package/esm/scene/svg.d.ts +1 -1
- package/esm/scene/svg.js +107 -99
- package/esm/scene/types.js +9 -15
- package/esm/style.css +10 -0
- package/esm/theme/index.d.ts +2 -2
- package/esm/theme/index.d.ts.map +1 -1
- package/esm/theme/index.js +145 -170
- package/esm/types.d.ts +7 -3
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js +1 -1
- package/package.json +2 -2
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
// src/charts/treemap-chart/index.tsx
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
|
+
import { classNames, prefixCls } from "@aura-react-comp/shared";
|
|
3
5
|
import { SvgScene } from "../../scene/svg";
|
|
4
6
|
import { formatNumber, formatPercent } from "../../core/format";
|
|
5
7
|
import { roundedRectPath } from "../../core/shape";
|
|
6
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
buildTreemap,
|
|
10
|
+
countLeaves,
|
|
11
|
+
sumValues
|
|
12
|
+
} from "../../core/hierarchy";
|
|
7
13
|
import { mixColor, withAlpha } from "../../theme";
|
|
8
14
|
import { useChartTheme } from "../../hooks/useChartTheme";
|
|
9
15
|
import { useElementSize } from "../../hooks/useElementSize";
|
|
10
16
|
import { useChartTransition } from "../../hooks/useChartTransition";
|
|
11
17
|
import { resolveAnimation, staggerProgress } from "../../core/animation";
|
|
12
18
|
import { Tooltip } from "../../components/Tooltip";
|
|
13
|
-
import { jsx
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 矩形树图。
|
|
17
|
-
*
|
|
18
|
-
* 用面积编码数值,能在有限空间里同时表达「占比」与「层级」。
|
|
19
|
-
* 布局用 squarified 算法:让每块尽量接近正方形,
|
|
20
|
-
* 既放得下文字,也便于人眼比较面积。
|
|
21
|
-
*/
|
|
22
|
-
export function TreemapChart({
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
function TreemapChart({
|
|
23
21
|
data,
|
|
24
22
|
maxDepth = 1,
|
|
25
|
-
label =
|
|
23
|
+
label = "auto",
|
|
26
24
|
showValue = true,
|
|
27
25
|
gap = 2,
|
|
28
|
-
width =
|
|
26
|
+
width = "100%",
|
|
29
27
|
height = 320,
|
|
30
28
|
theme: themeInput,
|
|
31
29
|
palette,
|
|
@@ -34,141 +32,151 @@ export function TreemapChart({
|
|
|
34
32
|
className,
|
|
35
33
|
style,
|
|
36
34
|
ariaLabel,
|
|
37
|
-
emptyText =
|
|
35
|
+
emptyText = "暂无数据"
|
|
38
36
|
}) {
|
|
39
37
|
const theme = useChartTheme(themeInput, palette);
|
|
40
|
-
const {
|
|
41
|
-
ref,
|
|
42
|
-
size
|
|
43
|
-
} = useElementSize();
|
|
38
|
+
const { ref, size } = useElementSize();
|
|
44
39
|
const [activeKey, setActiveKey] = useState(null);
|
|
45
|
-
const animKey = typeof animation ===
|
|
46
|
-
const animConfig = useMemo(
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
const animKey = typeof animation === "object" ? JSON.stringify(animation) : String(animation);
|
|
41
|
+
const animConfig = useMemo(
|
|
42
|
+
() => resolveAnimation(animation),
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
[animKey]
|
|
45
|
+
);
|
|
49
46
|
const hierarchy = useMemo(() => {
|
|
50
|
-
if (!data)
|
|
51
|
-
cells: [],
|
|
52
|
-
total: 0,
|
|
53
|
-
leaves: 0
|
|
54
|
-
};
|
|
47
|
+
if (!data)
|
|
48
|
+
return { cells: [], total: 0, leaves: 0 };
|
|
55
49
|
const total = sumValues(data);
|
|
56
|
-
if (total <= 0)
|
|
57
|
-
cells: [],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
if (total <= 0)
|
|
51
|
+
return { cells: [], total: 0, leaves: countLeaves(data) };
|
|
52
|
+
const cells = buildTreemap(
|
|
53
|
+
data,
|
|
54
|
+
{
|
|
55
|
+
x: 0,
|
|
56
|
+
y: 0,
|
|
57
|
+
width: Math.max(0, size.width),
|
|
58
|
+
height: Math.max(0, size.height)
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
maxDepth,
|
|
62
|
+
headerHeight: 18,
|
|
63
|
+
theme,
|
|
64
|
+
colorOf: (depth, index, parentColor) => {
|
|
65
|
+
if (depth === 0)
|
|
66
|
+
return theme.palette[index % theme.palette.length];
|
|
67
|
+
return mixColor(parentColor ?? theme.palette[0], "#ffffff", 0.46);
|
|
68
|
+
}
|
|
74
69
|
}
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
cells,
|
|
78
|
-
total,
|
|
79
|
-
leaves: countLeaves(data)
|
|
80
|
-
};
|
|
70
|
+
);
|
|
71
|
+
return { cells, total, leaves: countLeaves(data) };
|
|
81
72
|
}, [data, maxDepth, size.width, size.height, theme]);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
const matrix = useMemo(
|
|
74
|
+
() => [hierarchy.cells.map((cell) => Math.round(cell.width * cell.height))],
|
|
75
|
+
[hierarchy.cells]
|
|
76
|
+
);
|
|
85
77
|
const transition = useChartTransition(matrix, animConfig);
|
|
86
78
|
const progress = transition.progress;
|
|
87
79
|
const scene = useMemo(() => {
|
|
88
|
-
if (!hierarchy.cells.length || size.width <= 0)
|
|
80
|
+
if (!hierarchy.cells.length || size.width <= 0)
|
|
81
|
+
return [];
|
|
89
82
|
const nodes = [];
|
|
90
83
|
hierarchy.cells.forEach((cell, index) => {
|
|
91
|
-
|
|
84
|
+
var _a;
|
|
85
|
+
const local = staggerProgress(
|
|
86
|
+
progress,
|
|
87
|
+
index,
|
|
88
|
+
hierarchy.cells.length,
|
|
89
|
+
animConfig.stagger
|
|
90
|
+
);
|
|
92
91
|
const key = `${cell.depth}-${cell.node.name}-${index}`;
|
|
93
92
|
const isActive = activeKey === key;
|
|
94
93
|
nodes.push({
|
|
95
|
-
kind:
|
|
94
|
+
kind: "path",
|
|
96
95
|
key,
|
|
97
|
-
d: roundedRectPath(
|
|
96
|
+
d: roundedRectPath(
|
|
97
|
+
cell.x + gap / 2,
|
|
98
|
+
cell.y + gap / 2,
|
|
99
|
+
Math.max(0, cell.width - gap),
|
|
100
|
+
Math.max(0, cell.height - gap),
|
|
101
|
+
3
|
|
102
|
+
),
|
|
98
103
|
fill: cell.color,
|
|
99
104
|
// 子层淡一些,形成「父块包着子块」的视觉层次
|
|
100
105
|
opacity: (cell.depth === 0 ? 1 : 0.92) * local,
|
|
101
|
-
stroke: isActive ? theme.text.primary :
|
|
106
|
+
stroke: isActive ? theme.text.primary : void 0,
|
|
102
107
|
strokeWidth: isActive ? 2 : 0,
|
|
103
|
-
pointerEvents:
|
|
108
|
+
pointerEvents: "none"
|
|
104
109
|
});
|
|
105
110
|
const boxWidth = cell.width - gap;
|
|
106
111
|
const boxHeight = cell.height - gap;
|
|
107
|
-
const showLabel = label ===
|
|
108
|
-
if (!showLabel || label === false)
|
|
109
|
-
|
|
112
|
+
const showLabel = label === "always" || label === "auto" && boxWidth >= 56 && boxHeight >= 22 || cell.depth === 0 && boxWidth >= 56 && boxHeight >= 22;
|
|
113
|
+
if (!showLabel || label === false)
|
|
114
|
+
return;
|
|
115
|
+
const hasChildren = Boolean((_a = cell.node.children) == null ? void 0 : _a.length);
|
|
110
116
|
const value = hasChildren ? sumValues(cell.node) : cell.node.value ?? 0;
|
|
111
117
|
const showNumber = showValue && boxHeight >= 40 && boxWidth >= 56;
|
|
112
|
-
// 有子块的格子把名称放在顶部标题条里;叶子居中
|
|
113
118
|
const labelY = hasChildren ? cell.y + 11 : cell.y + (showNumber ? 16 : boxHeight / 2 + gap);
|
|
114
119
|
nodes.push({
|
|
115
|
-
kind:
|
|
120
|
+
kind: "text",
|
|
116
121
|
key: `${key}-label`,
|
|
117
122
|
x: cell.x + 8,
|
|
118
123
|
y: labelY,
|
|
119
124
|
text: cell.node.name,
|
|
120
|
-
fill:
|
|
125
|
+
fill: "#fff",
|
|
121
126
|
fontSize: cell.depth === 0 ? theme.font.size : theme.font.sizeSmall,
|
|
122
|
-
fontWeight: cell.depth === 0 ? theme.font.weightMedium :
|
|
123
|
-
anchor:
|
|
124
|
-
baseline:
|
|
127
|
+
fontWeight: cell.depth === 0 ? theme.font.weightMedium : void 0,
|
|
128
|
+
anchor: "start",
|
|
129
|
+
baseline: "middle",
|
|
125
130
|
opacity: local,
|
|
126
131
|
fontFamily: theme.font.family
|
|
127
132
|
});
|
|
128
|
-
|
|
129
|
-
// 父块的汇总数值放到标题条右端,既不占额外高度又保留信息
|
|
130
133
|
if (hasChildren && showValue && boxWidth >= 130 && boxHeight >= 30) {
|
|
131
134
|
nodes.push({
|
|
132
|
-
kind:
|
|
135
|
+
kind: "text",
|
|
133
136
|
key: `${key}-total`,
|
|
134
137
|
x: cell.x + boxWidth - 8,
|
|
135
138
|
y: labelY,
|
|
136
|
-
text: `${formatNumber(value, {
|
|
137
|
-
|
|
138
|
-
})} · ${formatPercent(value, hierarchy.total, 1)}`,
|
|
139
|
-
fill: withAlpha('#ffffff', 0.85),
|
|
139
|
+
text: `${formatNumber(value, { compact: true })} · ${formatPercent(value, hierarchy.total, 1)}`,
|
|
140
|
+
fill: withAlpha("#ffffff", 0.85),
|
|
140
141
|
fontSize: theme.font.sizeSmall,
|
|
141
|
-
anchor:
|
|
142
|
-
baseline:
|
|
142
|
+
anchor: "end",
|
|
143
|
+
baseline: "middle",
|
|
143
144
|
opacity: local,
|
|
144
145
|
fontFamily: theme.font.family
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
if (showNumber && !hasChildren) {
|
|
148
149
|
nodes.push({
|
|
149
|
-
kind:
|
|
150
|
+
kind: "text",
|
|
150
151
|
key: `${key}-value`,
|
|
151
152
|
x: cell.x + 8,
|
|
152
153
|
y: cell.y + 32,
|
|
153
|
-
text: `${formatNumber(value, {
|
|
154
|
-
|
|
155
|
-
})} · ${formatPercent(value, hierarchy.total, 1)}`,
|
|
156
|
-
fill: withAlpha('#ffffff', 0.82),
|
|
154
|
+
text: `${formatNumber(value, { compact: true })} · ${formatPercent(value, hierarchy.total, 1)}`,
|
|
155
|
+
fill: withAlpha("#ffffff", 0.82),
|
|
157
156
|
fontSize: theme.font.sizeSmall,
|
|
158
|
-
anchor:
|
|
159
|
-
baseline:
|
|
157
|
+
anchor: "start",
|
|
158
|
+
baseline: "middle",
|
|
160
159
|
opacity: local,
|
|
161
160
|
fontFamily: theme.font.family
|
|
162
161
|
});
|
|
163
162
|
}
|
|
164
163
|
});
|
|
165
164
|
return nodes;
|
|
166
|
-
}, [
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
}, [
|
|
166
|
+
hierarchy,
|
|
167
|
+
size.width,
|
|
168
|
+
gap,
|
|
169
|
+
theme,
|
|
170
|
+
progress,
|
|
171
|
+
animConfig.stagger,
|
|
172
|
+
activeKey,
|
|
173
|
+
label,
|
|
174
|
+
showValue
|
|
175
|
+
]);
|
|
169
176
|
const cellFromPointer = (clientX, clientY) => {
|
|
170
177
|
const element = ref.current;
|
|
171
|
-
if (!element)
|
|
178
|
+
if (!element)
|
|
179
|
+
return null;
|
|
172
180
|
const rect = element.getBoundingClientRect();
|
|
173
181
|
const x = clientX - rect.left;
|
|
174
182
|
const y = clientY - rect.top;
|
|
@@ -181,58 +189,72 @@ export function TreemapChart({
|
|
|
181
189
|
return null;
|
|
182
190
|
};
|
|
183
191
|
const activeCell = useMemo(() => {
|
|
184
|
-
if (!activeKey)
|
|
185
|
-
|
|
192
|
+
if (!activeKey)
|
|
193
|
+
return null;
|
|
194
|
+
return hierarchy.cells.find(
|
|
195
|
+
(cell, index) => `${cell.depth}-${cell.node.name}-${index}` === activeKey
|
|
196
|
+
) ?? null;
|
|
186
197
|
}, [activeKey, hierarchy.cells]);
|
|
187
198
|
const tooltipPayload = activeCell ? {
|
|
188
199
|
label: activeCell.node.name,
|
|
189
200
|
row: null,
|
|
190
|
-
series: [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
compact: true
|
|
197
|
-
}
|
|
198
|
-
|
|
201
|
+
series: [
|
|
202
|
+
{
|
|
203
|
+
key: activeCell.node.name,
|
|
204
|
+
name: "数值",
|
|
205
|
+
color: activeCell.color,
|
|
206
|
+
value: activeCell.node.value ?? sumValues(activeCell.node),
|
|
207
|
+
formatted: `${formatNumber(activeCell.node.value ?? sumValues(activeCell.node), { compact: true })}(${formatPercent(activeCell.node.value ?? sumValues(activeCell.node), hierarchy.total, 1)})`
|
|
208
|
+
}
|
|
209
|
+
]
|
|
199
210
|
} : null;
|
|
200
|
-
const autoAriaLabel = ariaLabel ?? `矩形树图:共 ${hierarchy.leaves} 项,总计 ${formatNumber(hierarchy.total, {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
211
|
+
const autoAriaLabel = ariaLabel ?? `矩形树图:共 ${hierarchy.leaves} 项,总计 ${formatNumber(hierarchy.total, { compact: true })}`;
|
|
212
|
+
return /* @__PURE__ */ jsx(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
className: classNames(prefixCls("chart"), className),
|
|
216
|
+
style: { width, height, ...style },
|
|
217
|
+
"data-aura-chart": "treemap",
|
|
218
|
+
children: /* @__PURE__ */ jsxs(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
ref,
|
|
222
|
+
className: prefixCls("chart__plot"),
|
|
223
|
+
onPointerMove: (event) => {
|
|
224
|
+
const cell = cellFromPointer(event.clientX, event.clientY);
|
|
225
|
+
setActiveKey(
|
|
226
|
+
cell ? `${cell.depth}-${cell.node.name}-${hierarchy.cells.indexOf(cell)}` : null
|
|
227
|
+
);
|
|
228
|
+
},
|
|
229
|
+
onPointerLeave: () => setActiveKey(null),
|
|
230
|
+
children: [
|
|
231
|
+
!hierarchy.cells.length || size.width === 0 ? /* @__PURE__ */ jsx("div", { className: prefixCls("chart__empty"), children: emptyText }) : /* @__PURE__ */ jsx(
|
|
232
|
+
SvgScene,
|
|
233
|
+
{
|
|
234
|
+
nodes: scene,
|
|
235
|
+
width: size.width,
|
|
236
|
+
height: size.height,
|
|
237
|
+
ariaLabel: autoAriaLabel
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ jsx(
|
|
241
|
+
Tooltip,
|
|
242
|
+
{
|
|
243
|
+
payload: tooltipPayload,
|
|
244
|
+
x: activeCell ? activeCell.x + activeCell.width / 2 : 0,
|
|
245
|
+
y: activeCell ? activeCell.y + 8 : 0,
|
|
246
|
+
containerWidth: size.width,
|
|
247
|
+
containerHeight: size.height,
|
|
248
|
+
theme,
|
|
249
|
+
config: tooltip
|
|
250
|
+
}
|
|
251
|
+
)
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
export {
|
|
259
|
+
TreemapChart
|
|
260
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ChartThemeInput } from '../../theme';
|
|
3
|
-
import type { TooltipConfig } from '../../types';
|
|
2
|
+
import { type ChartThemeInput } from '../../theme/index.js';
|
|
3
|
+
import type { TooltipConfig } from '../../types.js';
|
|
4
4
|
export interface WaterfallItem {
|
|
5
5
|
name: string;
|
|
6
6
|
/** 增量值:正为增加,负为减少 */
|