@yamada-ui/charts 1.5.4-dev-20241005224505 → 1.5.4-dev-20241006000212
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/area-chart-gradient.d.mts +1 -1
- package/dist/area-chart-gradient.d.ts +1 -1
- package/dist/area-chart-gradient.js +5 -5
- package/dist/area-chart-gradient.js.map +1 -1
- package/dist/area-chart-gradient.mjs +1 -1
- package/dist/area-chart-split.d.mts +1 -1
- package/dist/area-chart-split.d.ts +1 -1
- package/dist/area-chart-split.js +2 -2
- package/dist/area-chart-split.js.map +1 -1
- package/dist/area-chart-split.mjs +1 -1
- package/dist/area-chart.d.mts +8 -8
- package/dist/area-chart.d.ts +8 -8
- package/dist/area-chart.js +180 -175
- package/dist/area-chart.js.map +1 -1
- package/dist/area-chart.mjs +13 -13
- package/dist/bar-chart.d.mts +8 -8
- package/dist/bar-chart.d.ts +8 -8
- package/dist/bar-chart.js +137 -127
- package/dist/bar-chart.js.map +1 -1
- package/dist/bar-chart.mjs +11 -11
- package/dist/chart-legend.d.mts +1 -1
- package/dist/chart-legend.d.ts +1 -1
- package/dist/chart-legend.js +2 -2
- package/dist/chart-legend.js.map +1 -1
- package/dist/chart-legend.mjs +3 -3
- package/dist/chart-tooltip.d.mts +4 -4
- package/dist/chart-tooltip.d.ts +4 -4
- package/dist/chart-tooltip.js +7 -7
- package/dist/chart-tooltip.js.map +1 -1
- package/dist/chart-tooltip.mjs +3 -3
- package/dist/chart-utils.js.map +1 -1
- package/dist/chart-utils.mjs +1 -1
- package/dist/chart.types.d.mts +14 -14
- package/dist/chart.types.d.ts +14 -14
- package/dist/chart.types.js.map +1 -1
- package/dist/{chunk-YSPGYMRF.mjs → chunk-5VLSGWQD.mjs} +8 -8
- package/dist/{chunk-YSPGYMRF.mjs.map → chunk-5VLSGWQD.mjs.map} +1 -1
- package/dist/{chunk-XYUYAHJX.mjs → chunk-6JRMEI6J.mjs} +2 -2
- package/dist/chunk-6JRMEI6J.mjs.map +1 -0
- package/dist/{chunk-VKBRU4Z4.mjs → chunk-AYVTBRCS.mjs} +29 -28
- package/dist/chunk-AYVTBRCS.mjs.map +1 -0
- package/dist/{chunk-6O5G3WYP.mjs → chunk-EZG52466.mjs} +29 -21
- package/dist/chunk-EZG52466.mjs.map +1 -0
- package/dist/{chunk-VEFEKDMH.mjs → chunk-FDALM73K.mjs} +15 -14
- package/dist/chunk-FDALM73K.mjs.map +1 -0
- package/dist/{chunk-2GQHI23M.mjs → chunk-GU4SGNWX.mjs} +5 -5
- package/dist/chunk-GU4SGNWX.mjs.map +1 -0
- package/dist/{chunk-MVRWZTQ5.mjs → chunk-NLXYCM5J.mjs} +2 -2
- package/dist/chunk-NLXYCM5J.mjs.map +1 -0
- package/dist/{chunk-54WAXZP7.mjs → chunk-NMPNNSBN.mjs} +74 -74
- package/dist/chunk-NMPNNSBN.mjs.map +1 -0
- package/dist/{chunk-OEM3VCHN.mjs → chunk-NQPC5LPY.mjs} +82 -82
- package/dist/chunk-NQPC5LPY.mjs.map +1 -0
- package/dist/{chunk-AYVZF37W.mjs → chunk-OG5CVPPV.mjs} +3 -3
- package/dist/chunk-OG5CVPPV.mjs.map +1 -0
- package/dist/{chunk-X6CD7LHX.mjs → chunk-OUIKA4AX.mjs} +3 -3
- package/dist/{chunk-X6CD7LHX.mjs.map → chunk-OUIKA4AX.mjs.map} +1 -1
- package/dist/{chunk-3EHZJFIA.mjs → chunk-PKQB4BFG.mjs} +28 -28
- package/dist/chunk-PKQB4BFG.mjs.map +1 -0
- package/dist/{chunk-C3ZYUDXE.mjs → chunk-QPMW56KA.mjs} +52 -48
- package/dist/chunk-QPMW56KA.mjs.map +1 -0
- package/dist/{chunk-IJRYXT4V.mjs → chunk-R2LOTDR3.mjs} +2 -2
- package/dist/{chunk-IJRYXT4V.mjs.map → chunk-R2LOTDR3.mjs.map} +1 -1
- package/dist/{chunk-6OYWQ3NO.mjs → chunk-SCY5V45W.mjs} +56 -56
- package/dist/chunk-SCY5V45W.mjs.map +1 -0
- package/dist/{chunk-CQTRL3BW.mjs → chunk-SYBJTMPL.mjs} +90 -90
- package/dist/chunk-SYBJTMPL.mjs.map +1 -0
- package/dist/{chunk-XKVM7WUW.mjs → chunk-TA7YJAW4.mjs} +47 -47
- package/dist/{chunk-XKVM7WUW.mjs.map → chunk-TA7YJAW4.mjs.map} +1 -1
- package/dist/{chunk-O3LMKYXK.mjs → chunk-TU6MKMMV.mjs} +29 -28
- package/dist/chunk-TU6MKMMV.mjs.map +1 -0
- package/dist/{chunk-QL3DB7OJ.mjs → chunk-TXNC7GLT.mjs} +1 -1
- package/dist/{chunk-QL3DB7OJ.mjs.map → chunk-TXNC7GLT.mjs.map} +1 -1
- package/dist/{chunk-EE6KEX6V.mjs → chunk-U325CYNR.mjs} +6 -6
- package/dist/chunk-U325CYNR.mjs.map +1 -0
- package/dist/{chunk-OPPMMNGP.mjs → chunk-UER5GW4M.mjs} +33 -24
- package/dist/chunk-UER5GW4M.mjs.map +1 -0
- package/dist/{chunk-FYAC4RRZ.mjs → chunk-UTD4XZDM.mjs} +11 -10
- package/dist/chunk-UTD4XZDM.mjs.map +1 -0
- package/dist/{chunk-A3IWA366.mjs → chunk-VK65X6Q2.mjs} +4 -4
- package/dist/chunk-VK65X6Q2.mjs.map +1 -0
- package/dist/{chunk-OJ2MLZZ7.mjs → chunk-X6PIY2M3.mjs} +7 -7
- package/dist/chunk-X6PIY2M3.mjs.map +1 -0
- package/dist/{chunk-MSG3WFBO.mjs → chunk-YIAK5DIM.mjs} +7 -6
- package/dist/chunk-YIAK5DIM.mjs.map +1 -0
- package/dist/{chunk-NETTMC2D.mjs → chunk-YTUEG4IY.mjs} +45 -45
- package/dist/chunk-YTUEG4IY.mjs.map +1 -0
- package/dist/{chunk-VUTCH2CU.mjs → chunk-YX23LEQ7.mjs} +13 -13
- package/dist/chunk-YX23LEQ7.mjs.map +1 -0
- package/dist/{chunk-DZL5KQOJ.mjs → chunk-ZRV4LO67.mjs} +42 -42
- package/dist/chunk-ZRV4LO67.mjs.map +1 -0
- package/dist/donut-chart.js +91 -89
- package/dist/donut-chart.js.map +1 -1
- package/dist/donut-chart.mjs +10 -10
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.js +2069 -2043
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -28
- package/dist/index.mjs.map +1 -1
- package/dist/line-chart.d.mts +7 -7
- package/dist/line-chart.d.ts +7 -7
- package/dist/line-chart.js +140 -138
- package/dist/line-chart.js.map +1 -1
- package/dist/line-chart.mjs +11 -11
- package/dist/pie-chart-label.d.mts +9 -9
- package/dist/pie-chart-label.d.ts +9 -9
- package/dist/pie-chart-label.js +14 -13
- package/dist/pie-chart-label.js.map +1 -1
- package/dist/pie-chart-label.mjs +1 -1
- package/dist/pie-chart.d.mts +11 -11
- package/dist/pie-chart.d.ts +11 -11
- package/dist/pie-chart.js +89 -87
- package/dist/pie-chart.js.map +1 -1
- package/dist/pie-chart.mjs +9 -9
- package/dist/radar-chart.d.mts +11 -11
- package/dist/radar-chart.d.ts +11 -11
- package/dist/radar-chart.js +81 -73
- package/dist/radar-chart.js.map +1 -1
- package/dist/radar-chart.mjs +9 -9
- package/dist/radial-chart.d.mts +10 -10
- package/dist/radial-chart.d.ts +10 -10
- package/dist/radial-chart.js +63 -62
- package/dist/radial-chart.js.map +1 -1
- package/dist/radial-chart.mjs +10 -10
- package/dist/use-area-chart.d.mts +53 -53
- package/dist/use-area-chart.d.ts +53 -53
- package/dist/use-area-chart.js +50 -46
- package/dist/use-area-chart.js.map +1 -1
- package/dist/use-area-chart.mjs +2 -2
- package/dist/use-bar-chart.d.mts +32 -32
- package/dist/use-bar-chart.d.ts +32 -32
- package/dist/use-bar-chart.js +30 -21
- package/dist/use-bar-chart.js.map +1 -1
- package/dist/use-bar-chart.mjs +2 -2
- package/dist/use-chart-axis.d.mts +27 -27
- package/dist/use-chart-axis.d.ts +27 -27
- package/dist/use-chart-axis.js +26 -26
- package/dist/use-chart-axis.js.map +1 -1
- package/dist/use-chart-axis.mjs +2 -2
- package/dist/use-chart-grid.d.mts +8 -8
- package/dist/use-chart-grid.d.ts +8 -8
- package/dist/use-chart-grid.js +3 -3
- package/dist/use-chart-grid.js.map +1 -1
- package/dist/use-chart-grid.mjs +2 -2
- package/dist/use-chart-label-list.d.mts +4 -4
- package/dist/use-chart-label-list.d.ts +4 -4
- package/dist/use-chart-label-list.js +5 -4
- package/dist/use-chart-label-list.js.map +1 -1
- package/dist/use-chart-label-list.mjs +2 -2
- package/dist/use-chart-label.d.mts +1 -1
- package/dist/use-chart-label.d.ts +1 -1
- package/dist/use-chart-label.js.map +1 -1
- package/dist/use-chart-label.mjs +2 -2
- package/dist/use-chart-legend.d.mts +1 -1
- package/dist/use-chart-legend.d.ts +1 -1
- package/dist/use-chart-legend.js +1 -1
- package/dist/use-chart-legend.js.map +1 -1
- package/dist/use-chart-legend.mjs +1 -1
- package/dist/use-chart-reference-line.d.mts +4 -4
- package/dist/use-chart-reference-line.d.ts +4 -4
- package/dist/use-chart-reference-line.js +8 -7
- package/dist/use-chart-reference-line.js.map +1 -1
- package/dist/use-chart-reference-line.mjs +2 -2
- package/dist/use-chart-tooltip.d.mts +7 -7
- package/dist/use-chart-tooltip.d.ts +7 -7
- package/dist/use-chart-tooltip.js +4 -4
- package/dist/use-chart-tooltip.js.map +1 -1
- package/dist/use-chart-tooltip.mjs +2 -2
- package/dist/use-chart.d.mts +6 -10
- package/dist/use-chart.d.ts +6 -10
- package/dist/use-chart.js +2 -2
- package/dist/use-chart.js.map +1 -1
- package/dist/use-chart.mjs +2 -2
- package/dist/use-line-chart.d.mts +43 -43
- package/dist/use-line-chart.d.ts +43 -43
- package/dist/use-line-chart.js +26 -25
- package/dist/use-line-chart.js.map +1 -1
- package/dist/use-line-chart.mjs +2 -2
- package/dist/use-pie-chart.d.mts +47 -47
- package/dist/use-pie-chart.d.ts +47 -47
- package/dist/use-pie-chart.js +40 -38
- package/dist/use-pie-chart.js.map +1 -1
- package/dist/use-pie-chart.mjs +3 -3
- package/dist/use-polar-grid.d.mts +5 -5
- package/dist/use-polar-grid.d.ts +5 -5
- package/dist/use-polar-grid.js.map +1 -1
- package/dist/use-polar-grid.mjs +2 -2
- package/dist/use-radar-chart.d.mts +41 -41
- package/dist/use-radar-chart.d.ts +41 -41
- package/dist/use-radar-chart.js +27 -19
- package/dist/use-radar-chart.js.map +1 -1
- package/dist/use-radar-chart.mjs +2 -2
- package/dist/use-radial-chart.d.mts +17 -17
- package/dist/use-radial-chart.d.ts +17 -17
- package/dist/use-radial-chart.js +11 -11
- package/dist/use-radial-chart.js.map +1 -1
- package/dist/use-radial-chart.mjs +2 -2
- package/package.json +3 -3
- package/dist/chunk-2GQHI23M.mjs.map +0 -1
- package/dist/chunk-3EHZJFIA.mjs.map +0 -1
- package/dist/chunk-54WAXZP7.mjs.map +0 -1
- package/dist/chunk-6O5G3WYP.mjs.map +0 -1
- package/dist/chunk-6OYWQ3NO.mjs.map +0 -1
- package/dist/chunk-A3IWA366.mjs.map +0 -1
- package/dist/chunk-AYVZF37W.mjs.map +0 -1
- package/dist/chunk-C3ZYUDXE.mjs.map +0 -1
- package/dist/chunk-CQTRL3BW.mjs.map +0 -1
- package/dist/chunk-DZL5KQOJ.mjs.map +0 -1
- package/dist/chunk-EE6KEX6V.mjs.map +0 -1
- package/dist/chunk-FYAC4RRZ.mjs.map +0 -1
- package/dist/chunk-MSG3WFBO.mjs.map +0 -1
- package/dist/chunk-MVRWZTQ5.mjs.map +0 -1
- package/dist/chunk-NETTMC2D.mjs.map +0 -1
- package/dist/chunk-O3LMKYXK.mjs.map +0 -1
- package/dist/chunk-OEM3VCHN.mjs.map +0 -1
- package/dist/chunk-OJ2MLZZ7.mjs.map +0 -1
- package/dist/chunk-OPPMMNGP.mjs.map +0 -1
- package/dist/chunk-VEFEKDMH.mjs.map +0 -1
- package/dist/chunk-VKBRU4Z4.mjs.map +0 -1
- package/dist/chunk-VUTCH2CU.mjs.map +0 -1
- package/dist/chunk-XYUYAHJX.mjs.map +0 -1
@@ -6,31 +6,31 @@ import {
|
|
6
6
|
} from "./chunk-6YUJLLGN.mjs";
|
7
7
|
import {
|
8
8
|
getComponentProps
|
9
|
-
} from "./chunk-
|
9
|
+
} from "./chunk-TXNC7GLT.mjs";
|
10
10
|
|
11
11
|
// src/use-area-chart.ts
|
12
12
|
import { getVar, useTheme } from "@yamada-ui/core";
|
13
13
|
import { cx } from "@yamada-ui/utils";
|
14
14
|
import { useCallback, useId, useMemo, useState } from "react";
|
15
15
|
var useAreaChart = ({
|
16
|
-
data,
|
17
|
-
series,
|
18
16
|
type,
|
19
|
-
layoutType = "horizontal",
|
20
|
-
withGradient: withGradientProp,
|
21
|
-
withDots = true,
|
22
|
-
withActiveDots = true,
|
23
|
-
curveType = "monotone",
|
24
|
-
strokeWidth = 2,
|
25
17
|
connectNulls = true,
|
18
|
+
curveType = "monotone",
|
19
|
+
data,
|
26
20
|
fillOpacity = 0.4,
|
21
|
+
layoutType = "horizontal",
|
22
|
+
series,
|
27
23
|
splitColors = ["#ee6a5d", "#5fce7d"],
|
28
24
|
splitOffset,
|
29
|
-
|
25
|
+
strokeWidth = 2,
|
26
|
+
styles,
|
30
27
|
syncId,
|
28
|
+
withActiveDots = true,
|
29
|
+
withDots = true,
|
30
|
+
withGradient: withGradientProp,
|
31
31
|
xAxisLabel,
|
32
32
|
yAxisLabel,
|
33
|
-
|
33
|
+
referenceLineProps,
|
34
34
|
...rest
|
35
35
|
}) => {
|
36
36
|
var _a;
|
@@ -42,10 +42,10 @@ var useAreaChart = ({
|
|
42
42
|
const withGradient = typeof withGradientProp === "boolean" ? withGradientProp : type === "default";
|
43
43
|
const shouldHighlight = highlightedArea !== null;
|
44
44
|
const {
|
45
|
-
dot = {},
|
46
45
|
activeDot = {},
|
47
|
-
dimDot,
|
48
46
|
dimArea,
|
47
|
+
dimDot,
|
48
|
+
dot = {},
|
49
49
|
...computedAreaProps
|
50
50
|
} = (_a = rest.areaProps) != null ? _a : {};
|
51
51
|
const areaColors = useMemo(
|
@@ -60,7 +60,7 @@ var useAreaChart = ({
|
|
60
60
|
() => splitColors.map((color, index) => ({
|
61
61
|
name: `area-split-${index}`,
|
62
62
|
token: "colors",
|
63
|
-
value: color
|
63
|
+
value: color || "transparent"
|
64
64
|
})),
|
65
65
|
[splitColors]
|
66
66
|
);
|
@@ -133,24 +133,27 @@ var useAreaChart = ({
|
|
133
133
|
);
|
134
134
|
}, [dimDot, theme]);
|
135
135
|
const defaultSplitOffset = useMemo(() => {
|
136
|
+
var _a2;
|
136
137
|
if (series.length === 1) {
|
137
|
-
const dataKey = series[0].dataKey;
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
138
|
+
const dataKey = (_a2 = series[0]) == null ? void 0 : _a2.dataKey;
|
139
|
+
if (dataKey) {
|
140
|
+
const dataMax = Math.max(...data.map((item) => item[dataKey]));
|
141
|
+
const dataMin = Math.min(...data.map((item) => item[dataKey]));
|
142
|
+
if (dataMax <= 0) return 0;
|
143
|
+
if (dataMin >= 0) return 1;
|
144
|
+
return dataMax / (dataMax - dataMin);
|
145
|
+
}
|
143
146
|
}
|
144
147
|
return 0.5;
|
145
148
|
}, [data, series]);
|
146
149
|
const areaPropsList = useMemo(
|
147
150
|
() => series.map((props, index) => {
|
148
151
|
const {
|
149
|
-
dataKey,
|
150
|
-
dot: dot2 = {},
|
151
152
|
activeDot: activeDot2 = {},
|
152
|
-
|
153
|
+
dataKey,
|
153
154
|
dimArea: dimArea2 = {},
|
155
|
+
dimDot: dimDot2 = {},
|
156
|
+
dot: dot2 = {},
|
154
157
|
strokeDasharray,
|
155
158
|
...computedProps
|
156
159
|
} = props;
|
@@ -177,8 +180,8 @@ var useAreaChart = ({
|
|
177
180
|
)(theme);
|
178
181
|
resolvedActiveDot = {
|
179
182
|
className: cx("ui-area-chart__active-dot", className),
|
180
|
-
stroke: color,
|
181
183
|
r: 4,
|
184
|
+
stroke: color,
|
182
185
|
...rest3
|
183
186
|
};
|
184
187
|
} else {
|
@@ -209,11 +212,11 @@ var useAreaChart = ({
|
|
209
212
|
return {
|
210
213
|
...rest2,
|
211
214
|
id,
|
215
|
+
activeDot: resolvedActiveDot,
|
212
216
|
color,
|
213
|
-
strokeDasharray,
|
214
217
|
dataKey,
|
215
|
-
|
216
|
-
|
218
|
+
dot: resolvedDot,
|
219
|
+
strokeDasharray
|
217
220
|
};
|
218
221
|
}),
|
219
222
|
[
|
@@ -241,14 +244,14 @@ var useAreaChart = ({
|
|
241
244
|
ref,
|
242
245
|
className: cx(className, areaChartClassName),
|
243
246
|
data,
|
244
|
-
stackOffset: type === "percent" ? "expand" : void 0,
|
245
247
|
layout: layoutType,
|
246
|
-
syncId,
|
247
248
|
margin: {
|
248
249
|
bottom: xAxisLabel ? 30 : void 0,
|
249
250
|
left: yAxisLabel ? 10 : void 0,
|
250
251
|
right: yAxisLabel ? 5 : void 0
|
251
252
|
},
|
253
|
+
stackOffset: type === "percent" ? "expand" : void 0,
|
254
|
+
syncId,
|
252
255
|
...props,
|
253
256
|
...chartProps
|
254
257
|
}),
|
@@ -266,40 +269,41 @@ var useAreaChart = ({
|
|
266
269
|
const getAreaSplitProps = useCallback(
|
267
270
|
(props = {}) => ({
|
268
271
|
id: splitId,
|
269
|
-
offset: splitOffset != null ? splitOffset : defaultSplitOffset,
|
270
272
|
fillOpacity: fillOpacityVar,
|
273
|
+
offset: splitOffset != null ? splitOffset : defaultSplitOffset,
|
271
274
|
...props
|
272
275
|
}),
|
273
276
|
[defaultSplitOffset, splitId, splitOffset, fillOpacityVar]
|
274
277
|
);
|
275
278
|
const getAreaProps = useCallback(
|
276
|
-
({
|
279
|
+
({ className: classNameProp, index, ...props }, ref = null) => {
|
280
|
+
var _a2;
|
277
281
|
const {
|
278
282
|
id,
|
279
|
-
color,
|
280
283
|
className,
|
281
|
-
dataKey,
|
282
|
-
strokeDasharray,
|
283
284
|
activeDot: activeDot2,
|
285
|
+
color,
|
286
|
+
dataKey = "",
|
284
287
|
dot: dot2,
|
288
|
+
strokeDasharray,
|
285
289
|
...rest2
|
286
|
-
} = areaPropsList[index];
|
290
|
+
} = (_a2 = areaPropsList[index]) != null ? _a2 : {};
|
287
291
|
return {
|
292
|
+
id,
|
288
293
|
ref,
|
294
|
+
type: curveType,
|
295
|
+
name: dataKey,
|
289
296
|
className: cx(classNameProp, className),
|
290
|
-
id,
|
291
297
|
activeDot: activeDot2,
|
292
|
-
|
293
|
-
name: dataKey,
|
294
|
-
type: curveType,
|
298
|
+
connectNulls,
|
295
299
|
dataKey,
|
300
|
+
dot: dot2,
|
296
301
|
fill: type === "split" ? `url(#${splitId})` : `url(#${id})`,
|
297
|
-
strokeWidth,
|
298
|
-
stroke: color,
|
299
302
|
isAnimationActive: false,
|
300
|
-
connectNulls,
|
301
303
|
stackId: stacked ? "stack" : void 0,
|
304
|
+
stroke: color,
|
302
305
|
strokeDasharray,
|
306
|
+
strokeWidth,
|
303
307
|
...props,
|
304
308
|
...rest2
|
305
309
|
};
|
@@ -316,23 +320,23 @@ var useAreaChart = ({
|
|
316
320
|
);
|
317
321
|
const getAreaGradientProps = useCallback(
|
318
322
|
(props = {}) => ({
|
319
|
-
withGradient,
|
320
323
|
fillOpacity: fillOpacityVar,
|
324
|
+
withGradient,
|
321
325
|
...props
|
322
326
|
}),
|
323
327
|
[withGradient, fillOpacityVar]
|
324
328
|
);
|
325
329
|
return {
|
330
|
+
areaVars,
|
331
|
+
setHighlightedArea,
|
326
332
|
getAreaChartProps,
|
327
|
-
getAreaSplitProps,
|
328
|
-
getAreaProps,
|
329
333
|
getAreaGradientProps,
|
330
|
-
|
331
|
-
|
334
|
+
getAreaProps,
|
335
|
+
getAreaSplitProps
|
332
336
|
};
|
333
337
|
};
|
334
338
|
|
335
339
|
export {
|
336
340
|
useAreaChart
|
337
341
|
};
|
338
|
-
//# sourceMappingURL=chunk-
|
342
|
+
//# sourceMappingURL=chunk-QPMW56KA.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/use-area-chart.ts"],"sourcesContent":["import type {\n CSSUIObject,\n CSSUIProps,\n PropGetter,\n RequiredPropGetter,\n} from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport type { ComponentPropsWithoutRef } from \"react\"\nimport type * as Recharts from \"recharts\"\nimport type { AreaGradientProps } from \"./area-chart-gradient\"\nimport type { AreaSplitProps } from \"./area-chart-split\"\nimport type {\n AreaChartProps,\n AreaChartType,\n AreaProps,\n ChartCurveType,\n ChartLayoutType,\n ReferenceLineProps,\n} from \"./chart.types\"\nimport { getVar, useTheme } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useCallback, useId, useMemo, useState } from \"react\"\nimport { getComponentProps } from \"./chart-utils\"\nimport {\n areaChartProperties,\n areaProperties,\n dotProperties,\n} from \"./rechart-properties\"\n\nexport interface UseAreaChartOptions {\n /**\n * Chart data.\n */\n data: Dict[]\n /**\n * An array of objects with `dataKey` and `color` keys. Determines which data should be consumed from the `data` array.\n */\n series: AreaProps[]\n /**\n * Controls how chart areas are positioned relative to each other.\n *\n * @default `default`\n */\n type?: AreaChartType\n /**\n * Determines whether points with `null` values should be connected.\n *\n * @default true\n */\n connectNulls?: boolean\n /**\n * Type of the curve.\n *\n * @default `monotone`\n */\n curveType?: ChartCurveType\n /**\n * Controls fill opacity of all areas.\n *\n * @default 0.4\n */\n fillOpacity?: [number, number] | number\n /**\n * Chart orientation.\n *\n * @default 'horizontal'\n */\n layoutType?: ChartLayoutType\n /**\n * A tuple of colors used when `type=\"split\"` is set, ignored in all other cases.\n *\n * @default '[\"red.400\", \"green.400\"]'\n */\n splitColors?: [string, string]\n /**\n * Offset for the split gradient. By default, value is inferred from `data` and `series` if possible.\n * Must be generated from the data array with `getSplitOffset` function.\n */\n splitOffset?: number\n /**\n * Stroke width for the chart areas.\n *\n * @default 2\n */\n strokeWidth?: number\n /**\n * If any two categorical charts have the same syncId,\n * these two charts can sync the position tooltip, and the startIndex, endIndex of Brush.\n */\n syncId?: number | string\n /**\n * Determines whether activeDots should be displayed.\n *\n * @default true\n */\n withActiveDots?: boolean\n /**\n * Determines whether dots should be displayed.\n *\n * @default true\n */\n withDots?: boolean\n /**\n * Determines whether the chart area should be represented with a gradient instead of the solid color.\n */\n withGradient?: boolean\n /**\n * A label to display below the X axis.\n */\n xAxisLabel?: string\n /**\n * A label to display below the Y axis.\n */\n yAxisLabel?: string\n /**\n * Props for the areas.\n */\n areaProps?: Partial<AreaProps>\n /**\n * Props passed down to recharts `AreaChart` component.\n */\n chartProps?: AreaChartProps\n /**\n * Reference lines that should be displayed on the chart.\n */\n referenceLineProps?: ReferenceLineProps[]\n}\n\ninterface UseAreaChartProps extends UseAreaChartOptions {\n styles: Dict<CSSUIObject | undefined>\n}\n\nexport const useAreaChart = ({\n type,\n connectNulls = true,\n curveType = \"monotone\",\n data,\n fillOpacity = 0.4,\n layoutType = \"horizontal\",\n series,\n splitColors = [\"#ee6a5d\", \"#5fce7d\"],\n splitOffset,\n strokeWidth = 2,\n styles,\n syncId,\n withActiveDots = true,\n withDots = true,\n withGradient: withGradientProp,\n xAxisLabel,\n yAxisLabel,\n referenceLineProps,\n ...rest\n}: UseAreaChartProps) => {\n const uuid = useId()\n const { theme } = useTheme()\n const [highlightedArea, setHighlightedArea] = useState<null | string>(null)\n const splitId = `${uuid}-split`\n const stacked = type === \"stacked\" || type === \"percent\"\n const withGradient =\n typeof withGradientProp === \"boolean\"\n ? withGradientProp\n : type === \"default\"\n const shouldHighlight = highlightedArea !== null\n const {\n activeDot = {},\n dimArea,\n dimDot,\n dot = {},\n ...computedAreaProps\n } = rest.areaProps ?? {}\n\n const areaColors: CSSUIProps[\"vars\"] = useMemo(\n () =>\n series.map(({ color }, index) => ({\n name: `area-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n })),\n [series],\n )\n\n const areaSplitColors: CSSUIProps[\"vars\"] = useMemo(\n () =>\n splitColors.map((color, index) => ({\n name: `area-split-${index}`,\n token: \"colors\",\n value: color || \"transparent\",\n })),\n [splitColors],\n )\n\n const referenceLineColors: CSSUIProps[\"vars\"] = useMemo(\n () =>\n referenceLineProps\n ? referenceLineProps.map(({ color }, index) => ({\n name: `reference-line-${index}`,\n token: \"colors\",\n value: color ?? \"transparent\",\n }))\n : [],\n [referenceLineProps],\n )\n\n const areaVars: CSSUIProps[\"vars\"] = useMemo(() => {\n return [\n ...areaColors,\n ...areaSplitColors,\n ...referenceLineColors,\n { name: \"fill-opacity\", value: fillOpacity },\n ]\n }, [areaColors, areaSplitColors, referenceLineColors, fillOpacity])\n const fillOpacityVar = useMemo(() => getVar(\"fill-opacity\")(theme), [theme])\n\n const [chartProps, areaChartClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [rest.chartProps ?? {}, areaChartProperties],\n styles.chart,\n )(theme),\n [rest.chartProps, styles.chart, theme],\n )\n\n const [areaProps, areaClassName] = useMemo(() => {\n const resolvedAreaProps = {\n fillOpacity: 1,\n strokeOpacity: 1,\n ...computedAreaProps,\n }\n\n return getComponentProps<Dict, string>(\n [resolvedAreaProps, areaProperties],\n styles.area,\n )(theme)\n }, [computedAreaProps, styles.area, theme])\n\n const [dimAreaProps, dimAreaClassName] = useMemo(() => {\n const resolvedDimArea = {\n fillOpacity: 0,\n strokeOpacity: 0.3,\n ...dimArea,\n }\n\n return getComponentProps<Dict, string>([resolvedDimArea, areaProperties])(\n theme,\n )\n }, [dimArea, theme])\n\n const [dotProps, dotClassName] = useMemo(() => {\n const resolvedDot = { fillOpacity: 1, strokeWidth: 2, ...dot }\n\n return getComponentProps<Dict, string>(\n [resolvedDot, dotProperties],\n styles.dot,\n )(theme)\n }, [dot, styles.dot, theme])\n\n const [activeDotProps, activeDotClassName] = useMemo(\n () =>\n getComponentProps<Dict, string>(\n [activeDot, dotProperties],\n styles.activeDot,\n )(theme),\n [activeDot, styles.activeDot, theme],\n )\n\n const [dimDotProps, dimDotClassName] = useMemo(() => {\n const resolvedDimDot = { fillOpacity: 0, strokeOpacity: 0, ...dimDot }\n return getComponentProps<Dict, string>([resolvedDimDot, dotProperties])(\n theme,\n )\n }, [dimDot, theme])\n\n const defaultSplitOffset = useMemo(() => {\n if (series.length === 1) {\n const dataKey = series[0]?.dataKey as string\n\n if (dataKey) {\n const dataMax = Math.max(...data.map((item) => item[dataKey]))\n const dataMin = Math.min(...data.map((item) => item[dataKey]))\n\n if (dataMax <= 0) return 0\n if (dataMin >= 0) return 1\n\n return dataMax / (dataMax - dataMin)\n }\n }\n\n return 0.5\n }, [data, series])\n\n const areaPropsList = useMemo(\n () =>\n series.map((props, index) => {\n const {\n activeDot = {},\n dataKey,\n dimArea = {},\n dimDot = {},\n dot = {},\n strokeDasharray,\n ...computedProps\n } = props\n const id = `${uuid}-${dataKey}`\n const color = getVar(`area-${index}`)(theme)\n const dimmed = shouldHighlight && highlightedArea !== dataKey\n const computedDimArea = { ...dimAreaProps, ...dimArea }\n\n const resolvedProps = {\n ...areaProps,\n ...computedProps,\n ...(dimmed ? computedDimArea : {}),\n }\n const rest = getComponentProps<Dict, string>(\n [resolvedProps, areaProperties],\n areaClassName,\n dimmed ? dimAreaClassName : undefined,\n )(theme, true)\n\n let resolvedActiveDot: boolean | Recharts.DotProps\n\n if (withActiveDots) {\n const computedActiveDot = { ...activeDotProps, ...activeDot }\n\n const [rest, className] = getComponentProps(\n [computedActiveDot, dotProperties],\n activeDotClassName,\n )(theme)\n\n resolvedActiveDot = {\n className: cx(\"ui-area-chart__active-dot\", className),\n r: 4,\n stroke: color,\n ...rest,\n } as Recharts.DotProps\n } else {\n resolvedActiveDot = false\n }\n\n let resolvedDot: boolean | Recharts.DotProps\n\n if (withDots) {\n const computedDimDot = { ...dimDotProps, ...dimDot }\n const computedDot = {\n ...dotProps,\n ...dot,\n ...(dimmed ? computedDimDot : {}),\n }\n\n const [rest, className] = getComponentProps(\n [computedDot, dotProperties],\n dotClassName,\n dimmed ? dimDotClassName : undefined,\n )(theme)\n\n resolvedDot = {\n className: cx(\"ui-area-chart__dot\", className),\n fill: color,\n r: 4,\n ...rest,\n } as Recharts.DotProps\n } else {\n resolvedDot = false\n }\n\n return {\n ...rest,\n id,\n activeDot: resolvedActiveDot,\n color,\n dataKey,\n dot: resolvedDot,\n strokeDasharray,\n }\n }),\n [\n series,\n uuid,\n shouldHighlight,\n highlightedArea,\n dimAreaProps,\n dimDotProps,\n areaProps,\n areaClassName,\n dimAreaClassName,\n theme,\n withActiveDots,\n withDots,\n activeDotProps,\n activeDotClassName,\n dotProps,\n dotClassName,\n dimDotClassName,\n ],\n )\n\n const getAreaChartProps: RequiredPropGetter<\n ComponentPropsWithoutRef<typeof Recharts.AreaChart>,\n ComponentPropsWithoutRef<typeof Recharts.AreaChart>\n > = useCallback(\n ({ className, ...props } = {}, ref = null) => ({\n ref,\n className: cx(className, areaChartClassName),\n data,\n layout: layoutType,\n margin: {\n bottom: xAxisLabel ? 30 : undefined,\n left: yAxisLabel ? 10 : undefined,\n right: yAxisLabel ? 5 : undefined,\n },\n stackOffset: type === \"percent\" ? \"expand\" : undefined,\n syncId,\n ...props,\n ...chartProps,\n }),\n [\n areaChartClassName,\n data,\n type,\n layoutType,\n syncId,\n xAxisLabel,\n yAxisLabel,\n chartProps,\n ],\n )\n\n const getAreaSplitProps: PropGetter<\n Partial<AreaSplitProps>,\n AreaSplitProps\n > = useCallback(\n (props = {}) => ({\n id: splitId,\n fillOpacity: fillOpacityVar,\n offset: splitOffset ?? defaultSplitOffset,\n ...props,\n }),\n [defaultSplitOffset, splitId, splitOffset, fillOpacityVar],\n )\n\n const getAreaProps: RequiredPropGetter<\n { index: number } & Partial<Recharts.AreaProps>,\n Omit<Recharts.AreaProps, \"ref\">\n > = useCallback(\n ({ className: classNameProp, index, ...props }, ref = null) => {\n const {\n id,\n className,\n activeDot,\n color,\n dataKey = \"\",\n dot,\n strokeDasharray,\n ...rest\n } = areaPropsList[index] ?? {}\n\n return {\n id,\n ref,\n type: curveType,\n name: dataKey as string,\n className: cx(classNameProp, className),\n activeDot,\n connectNulls,\n dataKey,\n dot,\n fill: type === \"split\" ? `url(#${splitId})` : `url(#${id})`,\n isAnimationActive: false,\n stackId: stacked ? \"stack\" : undefined,\n stroke: color,\n strokeDasharray,\n strokeWidth,\n ...(props as Omit<Recharts.AreaProps, \"dataKey\">),\n ...rest,\n }\n },\n [\n areaPropsList,\n connectNulls,\n curveType,\n splitId,\n stacked,\n strokeWidth,\n type,\n ],\n )\n\n const getAreaGradientProps: PropGetter<\n Partial<AreaGradientProps>,\n AreaGradientProps\n > = useCallback(\n (props = {}) => ({\n fillOpacity: fillOpacityVar,\n withGradient,\n ...props,\n }),\n [withGradient, fillOpacityVar],\n )\n\n return {\n areaVars,\n setHighlightedArea,\n getAreaChartProps,\n getAreaGradientProps,\n getAreaProps,\n getAreaSplitProps,\n }\n}\n\nexport type UseAreaChartReturn = ReturnType<typeof useAreaChart>\n"],"mappings":";;;;;;;;;;;AAmBA,SAAS,QAAQ,gBAAgB;AACjC,SAAS,UAAU;AACnB,SAAS,aAAa,OAAO,SAAS,gBAAgB;AA+G/C,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,eAAe;AAAA,EACf,YAAY;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb;AAAA,EACA,cAAc,CAAC,WAAW,SAAS;AAAA,EACnC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyB;AAxJzB;AAyJE,QAAM,OAAO,MAAM;AACnB,QAAM,EAAE,MAAM,IAAI,SAAS;AAC3B,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAwB,IAAI;AAC1E,QAAM,UAAU,GAAG,IAAI;AACvB,QAAM,UAAU,SAAS,aAAa,SAAS;AAC/C,QAAM,eACJ,OAAO,qBAAqB,YACxB,mBACA,SAAS;AACf,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,QACR;AAAA,QACA;AAAA,QACA,GAAI;AAAA,QACJ,GAAGC;AAAA,MACL;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,uBAGF;AAAA,IACF,CAAC,QAAQ,CAAC,OAAO;AAAA,MACf,aAAa;AAAA,MACb;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IACA,CAAC,cAAc,cAAc;AAAA,EAC/B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["_a","activeDot","dimArea","dimDot","dot","rest"]}
|
@@ -24,10 +24,10 @@ var useChartLegend = ({
|
|
24
24
|
},
|
25
25
|
[rest]
|
26
26
|
);
|
27
|
-
return {
|
27
|
+
return { getLegendProps, legendProps };
|
28
28
|
};
|
29
29
|
|
30
30
|
export {
|
31
31
|
useChartLegend
|
32
32
|
};
|
33
|
-
//# sourceMappingURL=chunk-
|
33
|
+
//# sourceMappingURL=chunk-R2LOTDR3.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/use-chart-legend.ts"],"sourcesContent":["import type { PropGetter } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport
|
1
|
+
{"version":3,"sources":["../src/use-chart-legend.ts"],"sourcesContent":["import type { PropGetter } from \"@yamada-ui/core\"\nimport type { Dict } from \"@yamada-ui/utils\"\nimport type * as Recharts from \"recharts\"\nimport type { LegendProps } from \"./chart.types\"\nimport { splitObject } from \"@yamada-ui/utils\"\nimport { useCallback } from \"react\"\nimport { legendProperties } from \"./rechart-properties\"\n\nexport interface UseChartLegendProps {\n /**\n * Props passed down to recharts 'Legend' component.\n */\n legendProps?: LegendProps\n}\n\nexport const useChartLegend = ({\n legendProps: _legendProps = {},\n}: UseChartLegendProps) => {\n const [rest, legendProps] = splitObject<Dict, string>(\n _legendProps,\n legendProperties,\n )\n\n const getLegendProps: PropGetter<\n Partial<Recharts.LegendProps>,\n Omit<Recharts.LegendProps, \"ref\">\n > = useCallback(\n (props, ref = null) => {\n return {\n ref,\n verticalAlign: \"top\",\n ...props,\n ...rest,\n }\n },\n [rest],\n )\n\n return { getLegendProps, legendProps }\n}\n"],"mappings":";;;;;;AAIA,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAUrB,IAAM,iBAAiB,CAAC;AAAA,EAC7B,aAAa,eAAe,CAAC;AAC/B,MAA2B;AACzB,QAAM,CAAC,MAAM,WAAW,IAAI;AAAA,IAC1B;AAAA,IACA;AAAA,EACF;AAEA,QAAM,iBAGF;AAAA,IACF,CAAC,OAAO,MAAM,SAAS;AACrB,aAAO;AAAA,QACL;AAAA,QACA,eAAe;AAAA,QACf,GAAG;AAAA,QACH,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AAEA,SAAO,EAAE,gBAAgB,YAAY;AACvC;","names":[]}
|
@@ -1,45 +1,45 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useRadarChart
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-EZG52466.mjs";
|
5
5
|
import {
|
6
6
|
usePolarGrid
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-6JRMEI6J.mjs";
|
8
8
|
import {
|
9
9
|
useChartTooltip
|
10
|
-
} from "./chunk-
|
10
|
+
} from "./chunk-X6PIY2M3.mjs";
|
11
11
|
import {
|
12
12
|
useChartLegend
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-R2LOTDR3.mjs";
|
14
14
|
import {
|
15
15
|
ChartLegend
|
16
|
-
} from "./chunk-
|
16
|
+
} from "./chunk-OUIKA4AX.mjs";
|
17
17
|
import {
|
18
18
|
ChartTooltip
|
19
|
-
} from "./chunk-
|
19
|
+
} from "./chunk-5VLSGWQD.mjs";
|
20
20
|
import {
|
21
21
|
ChartProvider,
|
22
22
|
useChart
|
23
|
-
} from "./chunk-
|
23
|
+
} from "./chunk-VK65X6Q2.mjs";
|
24
24
|
|
25
25
|
// src/radar-chart.tsx
|
26
26
|
import {
|
27
|
-
ui,
|
28
27
|
forwardRef,
|
29
|
-
|
30
|
-
|
28
|
+
omitThemeProps,
|
29
|
+
ui,
|
30
|
+
useComponentMultiStyle
|
31
31
|
} from "@yamada-ui/core";
|
32
32
|
import { cx } from "@yamada-ui/utils";
|
33
33
|
import { useMemo } from "react";
|
34
34
|
import {
|
35
|
-
|
36
|
-
RadarChart as ReChartsRadarChart,
|
37
|
-
PolarGrid,
|
35
|
+
Legend,
|
38
36
|
PolarAngleAxis,
|
37
|
+
PolarGrid,
|
39
38
|
PolarRadiusAxis,
|
40
39
|
Radar,
|
41
|
-
|
42
|
-
|
40
|
+
RadarChart as ReChartsRadarChart,
|
41
|
+
ResponsiveContainer,
|
42
|
+
Tooltip
|
43
43
|
} from "recharts";
|
44
44
|
import { jsx, jsxs } from "react/jsx-runtime";
|
45
45
|
var RadarChart = forwardRef((props, ref) => {
|
@@ -47,79 +47,79 @@ var RadarChart = forwardRef((props, ref) => {
|
|
47
47
|
const {
|
48
48
|
className,
|
49
49
|
data,
|
50
|
-
series,
|
51
50
|
dataKey,
|
52
|
-
|
53
|
-
chartProps,
|
54
|
-
polarGridProps,
|
55
|
-
polarAngleAxisProps,
|
56
|
-
polarAngleAxisTickProps,
|
57
|
-
polarRadiusAxisProps,
|
58
|
-
polarRadiusAxisTickProps,
|
59
|
-
containerProps,
|
60
|
-
tooltipProps,
|
61
|
-
legendProps,
|
62
|
-
tooltipAnimationDuration,
|
63
|
-
unit,
|
64
|
-
valueFormatter,
|
51
|
+
fillOpacity,
|
65
52
|
polarAngleAxisTickFormatter,
|
66
53
|
polarRadiusAxisTickFormatter,
|
54
|
+
series,
|
67
55
|
strokeDasharray,
|
68
|
-
withDots,
|
69
|
-
withActiveDots,
|
70
56
|
strokeWidth,
|
71
|
-
|
72
|
-
|
57
|
+
tooltipAnimationDuration,
|
58
|
+
unit,
|
59
|
+
valueFormatter,
|
60
|
+
withActiveDots,
|
61
|
+
withDots,
|
73
62
|
withLegend = false,
|
74
|
-
withPolarGrid = true,
|
75
63
|
withPolarAngleAxis = true,
|
64
|
+
withPolarGrid = true,
|
76
65
|
withPolarRadiusAxis = false,
|
66
|
+
withTooltip = true,
|
67
|
+
chartProps,
|
68
|
+
containerProps,
|
69
|
+
legendProps,
|
70
|
+
polarAngleAxisProps,
|
71
|
+
polarAngleAxisTickProps,
|
72
|
+
polarGridProps,
|
73
|
+
polarRadiusAxisProps,
|
74
|
+
polarRadiusAxisTickProps,
|
75
|
+
radarProps,
|
76
|
+
tooltipProps,
|
77
77
|
...rest
|
78
78
|
} = omitThemeProps(mergedProps);
|
79
79
|
const {
|
80
|
-
|
81
|
-
|
80
|
+
radarVars,
|
81
|
+
setHighlightedArea,
|
82
82
|
getPolarAngleAxisProps,
|
83
83
|
getPolarRadiusAxisProps,
|
84
|
-
|
85
|
-
|
84
|
+
getRadarChartProps,
|
85
|
+
getRadarProps
|
86
86
|
} = useRadarChart({
|
87
87
|
data,
|
88
|
-
series,
|
89
88
|
dataKey,
|
90
|
-
|
89
|
+
fillOpacity,
|
90
|
+
polarAngleAxisTickFormatter,
|
91
|
+
polarRadiusAxisTickFormatter,
|
92
|
+
series,
|
93
|
+
strokeWidth,
|
94
|
+
styles,
|
95
|
+
withActiveDots,
|
96
|
+
withDots,
|
91
97
|
chartProps,
|
92
98
|
polarAngleAxisProps,
|
93
99
|
polarAngleAxisTickProps,
|
94
100
|
polarRadiusAxisProps,
|
95
101
|
polarRadiusAxisTickProps,
|
96
|
-
|
97
|
-
withActiveDots,
|
98
|
-
strokeWidth,
|
99
|
-
fillOpacity,
|
100
|
-
polarAngleAxisTickFormatter,
|
101
|
-
polarRadiusAxisTickFormatter,
|
102
|
-
styles
|
102
|
+
radarProps
|
103
103
|
});
|
104
104
|
const { getContainerProps } = useChart({ containerProps });
|
105
|
-
const { tooltipProps: computedTooltipProps
|
106
|
-
|
105
|
+
const { getTooltipProps, tooltipProps: computedTooltipProps } = useChartTooltip({
|
106
|
+
styles,
|
107
107
|
tooltipAnimationDuration,
|
108
|
-
|
108
|
+
tooltipProps
|
109
109
|
});
|
110
|
-
const { legendProps: computedLegendProps
|
110
|
+
const { getLegendProps, legendProps: computedLegendProps } = useChartLegend({
|
111
111
|
legendProps
|
112
112
|
});
|
113
113
|
const { getPolarGridProps } = usePolarGrid({
|
114
|
-
polarGridProps,
|
115
114
|
strokeDasharray,
|
116
|
-
styles
|
115
|
+
styles,
|
116
|
+
polarGridProps
|
117
117
|
});
|
118
118
|
const radars = useMemo(
|
119
119
|
() => series.map(({ dataKey: dataKey2 }, index) => /* @__PURE__ */ jsx(
|
120
120
|
Radar,
|
121
121
|
{
|
122
|
-
...getRadarProps({
|
122
|
+
...getRadarProps({ className: "ui-radar-chart__radar", index })
|
123
123
|
},
|
124
124
|
`radar-${dataKey2}`
|
125
125
|
)),
|
@@ -189,8 +189,8 @@ var RadarChart = forwardRef((props, ref) => {
|
|
189
189
|
className: "ui-line-chart__tooltip",
|
190
190
|
label,
|
191
191
|
payload,
|
192
|
-
valueFormatter,
|
193
192
|
unit,
|
193
|
+
valueFormatter,
|
194
194
|
...computedTooltipProps
|
195
195
|
}
|
196
196
|
),
|
@@ -212,4 +212,4 @@ RadarChart.__ui__ = "RadarChart";
|
|
212
212
|
export {
|
213
213
|
RadarChart
|
214
214
|
};
|
215
|
-
//# sourceMappingURL=chunk-
|
215
|
+
//# sourceMappingURL=chunk-SCY5V45W.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/radar-chart.tsx"],"sourcesContent":["import type { HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport type { UseChartProps } from \"./use-chart\"\nimport type { UseChartLegendProps } from \"./use-chart-legend\"\nimport type { UseChartTooltipOptions } from \"./use-chart-tooltip\"\nimport type { UsePolarGridOptions } from \"./use-polar-grid\"\nimport type { UseRadarChartOptions } from \"./use-radar-chart\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentMultiStyle,\n} from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useMemo } from \"react\"\nimport {\n Legend,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart as ReChartsRadarChart,\n ResponsiveContainer,\n Tooltip,\n} from \"recharts\"\nimport { ChartLegend } from \"./chart-legend\"\nimport { ChartTooltip } from \"./chart-tooltip\"\nimport { ChartProvider, useChart } from \"./use-chart\"\nimport { useChartLegend } from \"./use-chart-legend\"\nimport { useChartTooltip } from \"./use-chart-tooltip\"\nimport { usePolarGrid } from \"./use-polar-grid\"\nimport { useRadarChart } from \"./use-radar-chart\"\n\ninterface RadarChartOptions {\n /**\n * Unit displayed next to each tick in y-axis.\n */\n unit?: string\n /**\n * If `true`, legend is visible.\n *\n * @default false\n */\n withLegend?: boolean\n /**\n * Determines whether polarAngleAxis should be displayed.\n *\n * @default true\n */\n withPolarAngleAxis?: boolean\n /**\n * Determines whether polarGrid should be displayed.\n *\n * @default true\n */\n withPolarGrid?: boolean\n /**\n * Determines whether polarRadiusAxis should be displayed.\n *\n * @default false\n */\n withPolarRadiusAxis?: boolean\n /**\n * If `true`, tooltip is visible.\n *\n * @default true\n */\n withTooltip?: boolean\n}\n\nexport interface RadarChartProps\n extends Omit<HTMLUIProps, \"fillOpacity\" | \"strokeDasharray\" | \"strokeWidth\">,\n ThemeProps<\"RadarChart\">,\n RadarChartOptions,\n UseChartProps,\n Omit<UseChartTooltipOptions, \"labelFormatter\">,\n UseChartLegendProps,\n UsePolarGridOptions,\n UseRadarChartOptions {}\n\n/**\n * `RadarChart` is a component for drawing radar charts to compare multiple sets of data.\n *\n * @see Docs https://yamada-ui.com/components/data-display/radar-chart\n */\nexport const RadarChart = forwardRef<RadarChartProps, \"div\">((props, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"RadarChart\", props)\n const {\n className,\n data,\n dataKey,\n fillOpacity,\n polarAngleAxisTickFormatter,\n polarRadiusAxisTickFormatter,\n series,\n strokeDasharray,\n strokeWidth,\n tooltipAnimationDuration,\n unit,\n valueFormatter,\n withActiveDots,\n withDots,\n withLegend = false,\n withPolarAngleAxis = true,\n withPolarGrid = true,\n withPolarRadiusAxis = false,\n withTooltip = true,\n chartProps,\n containerProps,\n legendProps,\n polarAngleAxisProps,\n polarAngleAxisTickProps,\n polarGridProps,\n polarRadiusAxisProps,\n polarRadiusAxisTickProps,\n radarProps,\n tooltipProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const {\n radarVars,\n setHighlightedArea,\n getPolarAngleAxisProps,\n getPolarRadiusAxisProps,\n getRadarChartProps,\n getRadarProps,\n } = useRadarChart({\n data,\n dataKey,\n fillOpacity,\n polarAngleAxisTickFormatter,\n polarRadiusAxisTickFormatter,\n series,\n strokeWidth,\n styles,\n withActiveDots,\n withDots,\n chartProps,\n polarAngleAxisProps,\n polarAngleAxisTickProps,\n polarRadiusAxisProps,\n polarRadiusAxisTickProps,\n radarProps,\n })\n const { getContainerProps } = useChart({ containerProps })\n const { getTooltipProps, tooltipProps: computedTooltipProps } =\n useChartTooltip({\n styles,\n tooltipAnimationDuration,\n tooltipProps,\n })\n const { getLegendProps, legendProps: computedLegendProps } = useChartLegend({\n legendProps,\n })\n const { getPolarGridProps } = usePolarGrid({\n strokeDasharray,\n styles,\n polarGridProps,\n })\n\n const radars = useMemo(\n () =>\n series.map(({ dataKey }, index) => (\n <Radar\n key={`radar-${dataKey}`}\n {...getRadarProps({ className: \"ui-radar-chart__radar\", index })}\n />\n )),\n [getRadarProps, series],\n )\n\n return (\n <ChartProvider value={{ styles }}>\n <ui.div\n ref={ref}\n className={cx(\"ui-radar-chart\", className)}\n __css={{ maxW: \"full\", vars: radarVars, ...styles.container }}\n {...rest}\n >\n <ResponsiveContainer\n {...getContainerProps({ className: \"ui-radar-chart__container\" })}\n >\n <ReChartsRadarChart\n {...getRadarChartProps({ className: \"ui-radar-chart__chart\" })}\n >\n {withPolarGrid ? (\n <PolarGrid\n {...getPolarGridProps({\n className: \"ui-radar-chart__polar-grid\",\n })}\n />\n ) : null}\n {withPolarAngleAxis ? (\n <PolarAngleAxis\n {...getPolarAngleAxisProps({\n className: \"ui-radar-chart__polar-angle-axis\",\n })}\n />\n ) : null}\n {withPolarRadiusAxis ? (\n <PolarRadiusAxis\n {...getPolarRadiusAxisProps({\n className: \"ui-radar-chart__polar-radius-axis\",\n })}\n />\n ) : null}\n\n {withLegend ? (\n <Legend\n content={({ payload }) => (\n <ChartLegend\n className=\"ui-area-chart__legend\"\n payload={payload}\n onHighlight={setHighlightedArea}\n {...computedLegendProps}\n />\n )}\n {...getLegendProps()}\n />\n ) : null}\n\n {withTooltip ? (\n <Tooltip\n content={({ label, payload }) => (\n <ChartTooltip\n className=\"ui-line-chart__tooltip\"\n label={label}\n payload={payload}\n unit={unit}\n valueFormatter={valueFormatter}\n {...computedTooltipProps}\n />\n )}\n {...getTooltipProps()}\n />\n ) : null}\n\n {radars}\n </ReChartsRadarChart>\n </ResponsiveContainer>\n </ui.div>\n </ChartProvider>\n )\n})\n\nRadarChart.displayName = \"RadarChart\"\nRadarChart.__ui__ = \"RadarChart\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,OACK;AA4IC,cAmBE,YAnBF;AA/ED,IAAM,aAAa,WAAmC,CAAC,OAAO,QAAQ;AAC3E,QAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,cAAc,KAAK;AACxE,QAAM;AAAA,IACJ;AAAA,IAC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