@actioneer/ads 1.0.9 → 1.0.10
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/DESIGN.md +98 -57
- package/README.md +19 -7
- package/components/answer.js +1 -1
- package/components/assistant-ui/composer-harness.js +13 -10
- package/components/body-page-header.d.ts +9 -4
- package/components/body-page-header.js +10 -10
- package/components/breadcrumbs.js +22 -22
- package/components/card.js +18 -18
- package/components/chart.d.ts +9 -0
- package/components/chart.js +738 -717
- package/components/chip.js +12 -12
- package/components/collection-header.js +4 -4
- package/components/connector-card.js +30 -30
- package/components/date-range-picker.js +1 -1
- package/components/detail-list.d.ts +28 -0
- package/components/detail-list.js +52 -0
- package/components/drawer.d.ts +38 -15
- package/components/drawer.js +150 -86
- package/components/empty-state.d.ts +3 -2
- package/components/empty-state.js +22 -22
- package/components/field.d.ts +16 -0
- package/components/field.js +63 -42
- package/components/file-dropzone.d.ts +15 -4
- package/components/file-dropzone.js +100 -64
- package/components/filter-bar.d.ts +44 -0
- package/components/filter-bar.js +89 -0
- package/components/index.d.ts +3 -0
- package/components/index.js +526 -513
- package/components/input-field.d.ts +1 -1
- package/components/input-field.js +24 -22
- package/components/modal.js +56 -53
- package/components/panel.js +26 -27
- package/components/sidebar.js +54 -54
- package/components/sparkline.d.ts +30 -0
- package/components/sparkline.js +69 -0
- package/demo/components/add-to-artifact.js +5 -2
- package/examples/README.md +4 -2
- package/examples/call-logs-screen.tsx +381 -0
- package/examples/campaign-analysis-screen.tsx +114 -72
- package/examples/campaigns-screen.tsx +218 -160
- package/examples/guardrails-settings-screen.tsx +123 -0
- package/fonts/geist-variable.woff2 +0 -0
- package/fonts.css +12 -17
- package/lib/icons.js +3 -3
- package/llms.txt +107 -39
- package/manifest.json +3100 -892
- package/package.json +1 -1
- package/styles.css +102 -59
- package/theme.css +81 -37
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
package/components/chart.js
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as A, jsx as e, Fragment as ce } from "react/jsx-runtime";
|
|
3
3
|
import * as C from "react";
|
|
4
|
-
import { ResponsiveContainer as
|
|
5
|
-
import { MotionConfig as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { floatVariants as
|
|
8
|
-
const
|
|
4
|
+
import { ResponsiveContainer as J, ComposedChart as pe, Tooltip as j, Area as Ne, Line as we, AreaChart as Be, CartesianGrid as ue, XAxis as me, YAxis as ne, BarChart as He, Bar as Ae, LabelList as he, Cell as re, ScatterChart as _e, Scatter as ze, PieChart as ke, Pie as je, RadarChart as Ge, PolarGrid as Pe, PolarAngleAxis as Ce, PolarRadiusAxis as We, Radar as Ue, RadialBarChart as Ve, RadialBar as Ye, Treemap as Xe, ReferenceArea as Ze, ReferenceLine as Qe, ReferenceDot as qe } from "recharts";
|
|
5
|
+
import { MotionConfig as Je, AnimatePresence as Ke, motion as et } from "motion/react";
|
|
6
|
+
import { cn as I } from "../lib/cn.js";
|
|
7
|
+
import { floatVariants as tt } from "../lib/motion.js";
|
|
8
|
+
const ae = (t) => `var(--color-chart-${t % 6 + 1})`, de = (t) => ae(t), ie = "var(--chart-context)", le = 2.5, nt = /* @__PURE__ */ new Set([
|
|
9
9
|
"var(--color-chart-2)",
|
|
10
10
|
"var(--color-chart-6)",
|
|
11
|
-
|
|
12
|
-
]),
|
|
13
|
-
function
|
|
11
|
+
ie
|
|
12
|
+
]), Me = (t) => nt.has(t), xe = 20, rt = 0.55, z = "transition-opacity duration-150 ease-out motion-reduce:transition-none", Y = (t, n, r = rt) => n == null || n === t ? 1 : r, Se = (t) => t != null && t.isTooltipActive && t.activeTooltipIndex != null ? t.activeTooltipIndex : null;
|
|
13
|
+
function Re() {
|
|
14
14
|
const [t, n] = C.useState(null), r = C.useMemo(
|
|
15
15
|
() => ({
|
|
16
|
-
onMouseMove: (i) => n(
|
|
16
|
+
onMouseMove: (i) => n(Se(i)),
|
|
17
17
|
onMouseLeave: () => n(null)
|
|
18
18
|
}),
|
|
19
19
|
[]
|
|
20
20
|
);
|
|
21
21
|
return { activeIndex: t, handlers: r };
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const r = C.useRef(null), [i,
|
|
25
|
-
return { frameRef: r, activeIndex: i, isDimmed: (
|
|
26
|
-
const b =
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
if (b == null || !n ||
|
|
30
|
-
|
|
23
|
+
function ye(t, n) {
|
|
24
|
+
const r = C.useRef(null), [i, l] = C.useState(null), [a, o] = C.useState(null);
|
|
25
|
+
return { frameRef: r, activeIndex: i, isDimmed: (c) => a != null && t(c) !== a, handlers: { onMouseMove: (c) => {
|
|
26
|
+
const b = Se(c);
|
|
27
|
+
l(b);
|
|
28
|
+
const g = c == null ? void 0 : c.chartY;
|
|
29
|
+
if (b == null || !n || g == null || !r.current) {
|
|
30
|
+
o(null);
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let h = null, N = 1 / 0;
|
|
34
34
|
r.current.querySelectorAll(`circle[data-chart-index="${b}"]`).forEach((M) => {
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}),
|
|
35
|
+
const R = M.dataset.chartSeries, p = Number(M.getAttribute("cy"));
|
|
36
|
+
if (R == null || Number.isNaN(p)) return;
|
|
37
|
+
const m = Math.abs(p - g);
|
|
38
|
+
m < N && (N = m, h = t(R));
|
|
39
|
+
}), o(h);
|
|
40
40
|
}, onMouseLeave: () => {
|
|
41
|
-
|
|
41
|
+
l(null), o(null);
|
|
42
42
|
} } };
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Le(t, n) {
|
|
45
45
|
return (r) => {
|
|
46
46
|
if (!(n != null && n.includes(r))) return r;
|
|
47
|
-
const i = t.filter((
|
|
47
|
+
const i = t.filter((l) => !n.includes(l));
|
|
48
48
|
return i[n.indexOf(r)] ?? i[0] ?? r;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const at = 2.5, V = {
|
|
52
52
|
primary: { ref: "var(--brand)", pill: "bg-action-primary-soft text-brand-text" },
|
|
53
53
|
success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
|
|
54
54
|
warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
|
|
55
55
|
danger: { ref: "var(--color-danger-500)", pill: "bg-danger-50 text-danger-700" },
|
|
56
56
|
info: { ref: "var(--color-info-500)", pill: "bg-info-50 text-info-700" }
|
|
57
|
-
},
|
|
57
|
+
}, k = (t) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(t), $e = (t, n) => {
|
|
58
58
|
const r = [];
|
|
59
59
|
for (const i of t)
|
|
60
|
-
for (const
|
|
61
|
-
|
|
60
|
+
for (const l of Object.keys(i))
|
|
61
|
+
l !== n && typeof i[l] == "number" && !r.includes(l) && r.push(l);
|
|
62
62
|
return r;
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return /* @__PURE__ */ e("text", { x: t, y: n, dy:
|
|
64
|
+
function W({ x: t, y: n, payload: r, anchor: i, dy: l, format: a }) {
|
|
65
|
+
const o = (r == null ? void 0 : r.value) ?? "", f = a ? a(o) : o;
|
|
66
|
+
return /* @__PURE__ */ e("text", { x: t, y: n, dy: l, textAnchor: i, className: "fill-tertiary text-xs tabular-nums", children: f });
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Oe({
|
|
69
69
|
x: t,
|
|
70
70
|
y: n,
|
|
71
71
|
value: r,
|
|
72
72
|
index: i,
|
|
73
|
-
hidden:
|
|
73
|
+
hidden: l,
|
|
74
74
|
skip: a,
|
|
75
|
-
below:
|
|
76
|
-
color:
|
|
77
|
-
format:
|
|
75
|
+
below: o,
|
|
76
|
+
color: f,
|
|
77
|
+
format: d
|
|
78
78
|
}) {
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
if (Number.isNaN(
|
|
82
|
-
const
|
|
79
|
+
if (l || i != null && (a != null && a(i)) || t == null || n == null || r == null || r === "") return null;
|
|
80
|
+
const u = Number(r);
|
|
81
|
+
if (Number.isNaN(u)) return null;
|
|
82
|
+
const c = i != null && (o == null ? void 0 : o(i));
|
|
83
83
|
return /* @__PURE__ */ e(
|
|
84
84
|
"text",
|
|
85
85
|
{
|
|
86
86
|
x: Number(t),
|
|
87
|
-
y:
|
|
87
|
+
y: c ? Number(n) + 20 : Number(n) - 10,
|
|
88
88
|
textAnchor: "middle",
|
|
89
|
-
fill:
|
|
90
|
-
className:
|
|
91
|
-
children:
|
|
89
|
+
fill: f,
|
|
90
|
+
className: I(!f && "fill-secondary", "text-xs tabular-nums"),
|
|
91
|
+
children: d(u)
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
}
|
|
@@ -97,208 +97,208 @@ function U({
|
|
|
97
97
|
cy: n,
|
|
98
98
|
color: r,
|
|
99
99
|
active: i = !1,
|
|
100
|
-
seriesKey:
|
|
100
|
+
seriesKey: l,
|
|
101
101
|
index: a
|
|
102
102
|
}) {
|
|
103
103
|
if (t == null || n == null) return null;
|
|
104
|
-
const
|
|
104
|
+
const o = l != null && !i;
|
|
105
105
|
return /* @__PURE__ */ e(
|
|
106
106
|
"circle",
|
|
107
107
|
{
|
|
108
108
|
"aria-hidden": !0,
|
|
109
|
-
"data-chart-series":
|
|
110
|
-
"data-chart-index":
|
|
109
|
+
"data-chart-series": o ? l : void 0,
|
|
110
|
+
"data-chart-index": o ? a : void 0,
|
|
111
111
|
cx: t,
|
|
112
112
|
cy: n,
|
|
113
113
|
r: i ? 5.5 : 4,
|
|
114
114
|
fill: "var(--background)",
|
|
115
115
|
stroke: r,
|
|
116
|
-
strokeWidth: i ? 3 :
|
|
116
|
+
strokeWidth: i ? 3 : at
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function it({
|
|
121
121
|
x: t,
|
|
122
122
|
y: n,
|
|
123
123
|
width: r,
|
|
124
124
|
height: i,
|
|
125
|
-
value:
|
|
125
|
+
value: l,
|
|
126
126
|
format: a,
|
|
127
|
-
horizontal:
|
|
127
|
+
horizontal: o
|
|
128
128
|
}) {
|
|
129
|
-
if (t == null || n == null ||
|
|
130
|
-
const
|
|
131
|
-
if (Number.isNaN(
|
|
132
|
-
const
|
|
133
|
-
return
|
|
129
|
+
if (t == null || n == null || l == null || l === "") return null;
|
|
130
|
+
const f = Number(l);
|
|
131
|
+
if (Number.isNaN(f)) return null;
|
|
132
|
+
const d = Number(t), u = Number(n), c = Number(r ?? 0), b = Number(i ?? 0);
|
|
133
|
+
return o ? /* @__PURE__ */ e(
|
|
134
134
|
"text",
|
|
135
135
|
{
|
|
136
|
-
x:
|
|
137
|
-
y:
|
|
136
|
+
x: d + c + 8,
|
|
137
|
+
y: u + b / 2,
|
|
138
138
|
dy: "0.32em",
|
|
139
139
|
textAnchor: "start",
|
|
140
140
|
className: "fill-secondary text-xs tabular-nums",
|
|
141
|
-
children: a(
|
|
141
|
+
children: a(f)
|
|
142
142
|
}
|
|
143
143
|
) : /* @__PURE__ */ e(
|
|
144
144
|
"text",
|
|
145
145
|
{
|
|
146
|
-
x:
|
|
147
|
-
y:
|
|
146
|
+
x: d + c / 2,
|
|
147
|
+
y: u - 8,
|
|
148
148
|
textAnchor: "middle",
|
|
149
149
|
className: "fill-secondary text-xs tabular-nums",
|
|
150
|
-
children: a(
|
|
150
|
+
children: a(f)
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function lt({
|
|
155
155
|
x: t,
|
|
156
156
|
y: n,
|
|
157
157
|
width: r,
|
|
158
158
|
height: i,
|
|
159
|
-
value:
|
|
159
|
+
value: l,
|
|
160
160
|
format: a,
|
|
161
|
-
horizontal:
|
|
162
|
-
light:
|
|
161
|
+
horizontal: o,
|
|
162
|
+
light: f
|
|
163
163
|
}) {
|
|
164
|
-
if (t == null || n == null ||
|
|
165
|
-
const
|
|
166
|
-
if (Number.isNaN(
|
|
167
|
-
const
|
|
168
|
-
return (
|
|
164
|
+
if (t == null || n == null || l == null || l === "") return null;
|
|
165
|
+
const d = Number(l);
|
|
166
|
+
if (Number.isNaN(d) || d === 0) return null;
|
|
167
|
+
const u = Number(t), c = Number(n), b = Math.abs(Number(r ?? 0)), g = Math.abs(Number(i ?? 0)), h = a(d), N = o ? Math.max(xe, h.length * 6 + 8) : xe;
|
|
168
|
+
return (o ? b : g) < N ? null : /* @__PURE__ */ e(
|
|
169
169
|
"text",
|
|
170
170
|
{
|
|
171
|
-
x:
|
|
172
|
-
y:
|
|
171
|
+
x: u + Number(r ?? 0) / 2,
|
|
172
|
+
y: c + Number(i ?? 0) / 2,
|
|
173
173
|
dy: "0.32em",
|
|
174
174
|
textAnchor: "middle",
|
|
175
175
|
pointerEvents: "none",
|
|
176
|
-
className:
|
|
177
|
-
children:
|
|
176
|
+
className: I("text-xs tabular-nums", f ? "fill-primary" : "fill-white"),
|
|
177
|
+
children: h
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ot({
|
|
182
182
|
x: t,
|
|
183
183
|
y: n,
|
|
184
184
|
width: r,
|
|
185
185
|
height: i,
|
|
186
|
-
index:
|
|
186
|
+
index: l,
|
|
187
187
|
totals: a,
|
|
188
|
-
format:
|
|
189
|
-
horizontal:
|
|
188
|
+
format: o,
|
|
189
|
+
horizontal: f
|
|
190
190
|
}) {
|
|
191
|
-
if (t == null || n == null ||
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
194
|
-
const
|
|
195
|
-
return
|
|
191
|
+
if (t == null || n == null || l == null) return null;
|
|
192
|
+
const d = a[l];
|
|
193
|
+
if (d == null) return null;
|
|
194
|
+
const u = Number(t), c = Number(n), b = Number(r ?? 0), g = Number(i ?? 0);
|
|
195
|
+
return f ? /* @__PURE__ */ e(
|
|
196
196
|
"text",
|
|
197
197
|
{
|
|
198
|
-
x:
|
|
199
|
-
y:
|
|
198
|
+
x: u + b + 8,
|
|
199
|
+
y: c + g / 2,
|
|
200
200
|
dy: "0.32em",
|
|
201
201
|
textAnchor: "start",
|
|
202
202
|
className: "fill-primary text-xs font-medium tabular-nums",
|
|
203
|
-
children:
|
|
203
|
+
children: o(d)
|
|
204
204
|
}
|
|
205
205
|
) : /* @__PURE__ */ e(
|
|
206
206
|
"text",
|
|
207
207
|
{
|
|
208
|
-
x:
|
|
209
|
-
y:
|
|
208
|
+
x: u + b / 2,
|
|
209
|
+
y: c - 8,
|
|
210
210
|
textAnchor: "middle",
|
|
211
211
|
className: "fill-primary text-xs font-medium tabular-nums",
|
|
212
|
-
children:
|
|
212
|
+
children: o(d)
|
|
213
213
|
}
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function G({
|
|
217
217
|
active: t,
|
|
218
218
|
payload: n,
|
|
219
219
|
label: r,
|
|
220
220
|
format: i,
|
|
221
|
-
labelKey:
|
|
221
|
+
labelKey: l,
|
|
222
222
|
renderer: a
|
|
223
223
|
}) {
|
|
224
|
-
var b,
|
|
225
|
-
const
|
|
226
|
-
const M =
|
|
224
|
+
var b, g;
|
|
225
|
+
const o = (n ?? []).map((h, N) => {
|
|
226
|
+
const M = h.payload && typeof h.payload == "object" ? h.payload : void 0;
|
|
227
227
|
return {
|
|
228
|
-
key:
|
|
229
|
-
name:
|
|
230
|
-
value:
|
|
231
|
-
color:
|
|
228
|
+
key: h.dataKey ?? N,
|
|
229
|
+
name: h.name ?? h.dataKey ?? N,
|
|
230
|
+
value: h.value,
|
|
231
|
+
color: h.color,
|
|
232
232
|
datum: M
|
|
233
233
|
};
|
|
234
|
-
}),
|
|
234
|
+
}), f = l ? (g = (b = o[0]) == null ? void 0 : b.datum) == null ? void 0 : g[l] : void 0, d = {
|
|
235
235
|
active: !!t,
|
|
236
|
-
label: typeof
|
|
237
|
-
items:
|
|
236
|
+
label: typeof f == "string" || typeof f == "number" ? f : r,
|
|
237
|
+
items: o,
|
|
238
238
|
formatValue: i
|
|
239
239
|
};
|
|
240
|
-
if (a) return /* @__PURE__ */ e(
|
|
241
|
-
if (!
|
|
242
|
-
const
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */ e("div", { className:
|
|
245
|
-
|
|
246
|
-
!
|
|
247
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background:
|
|
248
|
-
/* @__PURE__ */ e("span", { className: "text-background/70", children:
|
|
240
|
+
if (a) return /* @__PURE__ */ e(ce, { children: a(d) });
|
|
241
|
+
if (!d.active || !o.length) return null;
|
|
242
|
+
const u = o.length === 1, c = d.label ?? (u ? o[0].name : void 0);
|
|
243
|
+
return /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background", children: [
|
|
244
|
+
/* @__PURE__ */ e("div", { className: I("text-xs font-normal tracking-wide uppercase text-background/60", !u && "mb-1"), children: c }),
|
|
245
|
+
o.map((h) => /* @__PURE__ */ A("div", { className: "flex items-center gap-1.5", children: [
|
|
246
|
+
!u && /* @__PURE__ */ A(ce, { children: [
|
|
247
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background: h.color } }),
|
|
248
|
+
/* @__PURE__ */ e("span", { className: "text-background/70", children: h.name })
|
|
249
249
|
] }),
|
|
250
|
-
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-normal tabular-nums", children: typeof
|
|
251
|
-
] },
|
|
250
|
+
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-normal tabular-nums", children: typeof h.value == "number" ? i(h.value) : String(h.value ?? "") })
|
|
251
|
+
] }, h.key))
|
|
252
252
|
] });
|
|
253
253
|
}
|
|
254
|
-
const
|
|
255
|
-
function
|
|
254
|
+
const Te = "pointer-events-none inline-flex min-h-4 items-center rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap";
|
|
255
|
+
function st({
|
|
256
256
|
viewBox: t,
|
|
257
257
|
label: n,
|
|
258
258
|
value: r,
|
|
259
259
|
color: i,
|
|
260
|
-
axis:
|
|
260
|
+
axis: l
|
|
261
261
|
}) {
|
|
262
|
-
const a = t ?? {},
|
|
262
|
+
const a = t ?? {}, o = /* @__PURE__ */ A("span", { className: I(Te, V[i].pill), children: [
|
|
263
263
|
n,
|
|
264
264
|
r != null && /* @__PURE__ */ e("span", { className: "ml-1 tabular-nums", children: r })
|
|
265
265
|
] });
|
|
266
|
-
return
|
|
266
|
+
return l === "y" ? /* @__PURE__ */ e("foreignObject", { x: a.x ?? 0, y: (a.y ?? 0) - 12, width: a.width ?? 0, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-end pr-1", children: o }) }) : /* @__PURE__ */ e("foreignObject", { x: (a.x ?? 0) - 90, y: (a.y ?? 0) - 12, width: 180, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: o }) });
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function ct({ viewBox: t, label: n, color: r }) {
|
|
269
269
|
const i = t ?? {};
|
|
270
|
-
return /* @__PURE__ */ e("foreignObject", { x: i.x ?? 0, y: i.y ?? 0, width: i.width ?? 0, height: 28, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center pl-1.5", children: /* @__PURE__ */ e("span", { className:
|
|
270
|
+
return /* @__PURE__ */ e("foreignObject", { x: i.x ?? 0, y: i.y ?? 0, width: i.width ?? 0, height: 28, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center pl-1.5", children: /* @__PURE__ */ e("span", { className: I(Te, V[r].pill), children: n }) }) });
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function dt({
|
|
273
273
|
cx: t,
|
|
274
274
|
cy: n,
|
|
275
275
|
n: r,
|
|
276
276
|
ann: i,
|
|
277
|
-
onEnter:
|
|
277
|
+
onEnter: l,
|
|
278
278
|
onLeave: a
|
|
279
279
|
}) {
|
|
280
|
-
const [
|
|
280
|
+
const [o, f] = C.useState(!1);
|
|
281
281
|
if (t == null || n == null || !Number.isFinite(t) || !Number.isFinite(n)) return /* @__PURE__ */ e("g", {});
|
|
282
|
-
const
|
|
283
|
-
return /* @__PURE__ */
|
|
282
|
+
const d = () => l({ ann: i, n: r, cx: t, cy: n }), u = () => a();
|
|
283
|
+
return /* @__PURE__ */ A(
|
|
284
284
|
"g",
|
|
285
285
|
{
|
|
286
286
|
tabIndex: 0,
|
|
287
287
|
role: "img",
|
|
288
288
|
"aria-label": `Annotation ${r}: ${i.label}`,
|
|
289
289
|
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:150ms] hover:scale-110 focus-visible:scale-110 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100",
|
|
290
|
-
onMouseEnter:
|
|
291
|
-
onMouseLeave:
|
|
290
|
+
onMouseEnter: d,
|
|
291
|
+
onMouseLeave: u,
|
|
292
292
|
onFocus: () => {
|
|
293
|
-
|
|
293
|
+
f(!0), d();
|
|
294
294
|
},
|
|
295
295
|
onBlur: () => {
|
|
296
|
-
|
|
296
|
+
f(!1), u();
|
|
297
297
|
},
|
|
298
298
|
children: [
|
|
299
|
-
|
|
299
|
+
o && /* @__PURE__ */ e("circle", { cx: t, cy: n, r: 12, fill: "none", stroke: "var(--ring)", strokeWidth: 2 }),
|
|
300
300
|
/* @__PURE__ */ e("circle", { cx: t, cy: n, r: 10, fill: "var(--background)" }),
|
|
301
|
-
/* @__PURE__ */ e("circle", { cx: t, cy: n, r: 8, fill:
|
|
301
|
+
/* @__PURE__ */ e("circle", { cx: t, cy: n, r: 8, fill: V[i.color ?? "primary"].ref }),
|
|
302
302
|
/* @__PURE__ */ e(
|
|
303
303
|
"text",
|
|
304
304
|
{
|
|
@@ -314,8 +314,8 @@ function st({
|
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return /* @__PURE__ */ e(
|
|
317
|
+
function ut({ hovered: t, frameWidth: n, format: r }) {
|
|
318
|
+
return /* @__PURE__ */ e(Je, { reducedMotion: "user", children: /* @__PURE__ */ e(Ke, { children: t && /* @__PURE__ */ e(
|
|
319
319
|
"div",
|
|
320
320
|
{
|
|
321
321
|
className: "pointer-events-none absolute z-10",
|
|
@@ -323,29 +323,29 @@ function ct({ hovered: t, frameWidth: n, format: r }) {
|
|
|
323
323
|
left: Math.max(96, Math.min(t.cx, Math.max(n - 96, 96))),
|
|
324
324
|
top: t.cy - 16
|
|
325
325
|
},
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
|
|
326
|
+
children: /* @__PURE__ */ A(
|
|
327
|
+
et.div,
|
|
328
328
|
{
|
|
329
|
-
variants:
|
|
329
|
+
variants: tt,
|
|
330
330
|
initial: "hidden",
|
|
331
331
|
animate: "visible",
|
|
332
332
|
exit: "hidden",
|
|
333
333
|
className: "w-max max-w-60 -translate-x-1/2 -translate-y-full origin-bottom rounded-lg bg-elevated p-3",
|
|
334
334
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
|
|
336
336
|
/* @__PURE__ */ e(
|
|
337
337
|
"span",
|
|
338
338
|
{
|
|
339
339
|
"aria-hidden": !0,
|
|
340
340
|
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-s font-medium text-brand-foreground",
|
|
341
|
-
style: { background:
|
|
341
|
+
style: { background: V[t.ann.color ?? "primary"].ref },
|
|
342
342
|
children: t.n
|
|
343
343
|
}
|
|
344
344
|
),
|
|
345
345
|
/* @__PURE__ */ e("span", { className: "text-xs font-normal text-foreground", children: t.ann.label })
|
|
346
346
|
] }),
|
|
347
347
|
t.ann.description && /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs leading-relaxed text-secondary", children: t.ann.description }),
|
|
348
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ A("div", { className: "mt-1.5 text-xs font-normal tracking-wide uppercase text-tertiary tabular-nums", children: [
|
|
349
349
|
t.ann.x,
|
|
350
350
|
" · ",
|
|
351
351
|
r(t.ann.y)
|
|
@@ -356,46 +356,46 @@ function ct({ hovered: t, frameWidth: n, format: r }) {
|
|
|
356
356
|
}
|
|
357
357
|
) }) });
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
const [r, i] = C.useState(null),
|
|
361
|
-
const
|
|
362
|
-
let
|
|
363
|
-
return (t ?? []).forEach((
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
367
|
-
|
|
359
|
+
function Fe(t, n) {
|
|
360
|
+
const [r, i] = C.useState(null), l = C.useCallback(() => i(null), []), { back: a, front: o } = C.useMemo(() => {
|
|
361
|
+
const f = [], d = [];
|
|
362
|
+
let u = 0;
|
|
363
|
+
return (t ?? []).forEach((c, b) => {
|
|
364
|
+
const g = c.color ?? "primary";
|
|
365
|
+
if (c.kind === "band") {
|
|
366
|
+
const h = c.axis ?? "y";
|
|
367
|
+
f.push(
|
|
368
368
|
/* @__PURE__ */ e(
|
|
369
|
-
|
|
369
|
+
Ze,
|
|
370
370
|
{
|
|
371
|
-
...
|
|
372
|
-
fill:
|
|
371
|
+
...h === "y" ? { y1: c.from, y2: c.to } : { x1: c.from, x2: c.to },
|
|
372
|
+
fill: V[g].ref,
|
|
373
373
|
fillOpacity: 0.06,
|
|
374
374
|
stroke: "none",
|
|
375
|
-
ifOverflow:
|
|
376
|
-
label:
|
|
375
|
+
ifOverflow: h === "y" ? "extendDomain" : "visible",
|
|
376
|
+
label: c.label ? /* @__PURE__ */ e(ct, { label: c.label, color: g }) : void 0
|
|
377
377
|
},
|
|
378
378
|
`ann-${b}`
|
|
379
379
|
)
|
|
380
380
|
);
|
|
381
|
-
} else if (
|
|
382
|
-
const
|
|
383
|
-
|
|
381
|
+
} else if (c.kind === "line") {
|
|
382
|
+
const h = c.axis ?? "y";
|
|
383
|
+
d.push(
|
|
384
384
|
/* @__PURE__ */ e(
|
|
385
|
-
|
|
385
|
+
Qe,
|
|
386
386
|
{
|
|
387
|
-
...
|
|
388
|
-
stroke:
|
|
387
|
+
...h === "y" ? { y: c.value } : { x: c.value },
|
|
388
|
+
stroke: V[g].ref,
|
|
389
389
|
strokeWidth: 1,
|
|
390
390
|
strokeDasharray: "4 4",
|
|
391
|
-
ifOverflow:
|
|
392
|
-
label:
|
|
393
|
-
|
|
391
|
+
ifOverflow: h === "y" ? "extendDomain" : "visible",
|
|
392
|
+
label: c.label ? /* @__PURE__ */ e(
|
|
393
|
+
st,
|
|
394
394
|
{
|
|
395
|
-
label:
|
|
396
|
-
value: typeof
|
|
397
|
-
color:
|
|
398
|
-
axis:
|
|
395
|
+
label: c.label,
|
|
396
|
+
value: typeof c.value == "number" ? n(c.value) : String(c.value),
|
|
397
|
+
color: g,
|
|
398
|
+
axis: h
|
|
399
399
|
}
|
|
400
400
|
) : void 0
|
|
401
401
|
},
|
|
@@ -403,45 +403,45 @@ function Le(t, n) {
|
|
|
403
403
|
)
|
|
404
404
|
);
|
|
405
405
|
} else {
|
|
406
|
-
|
|
407
|
-
const
|
|
408
|
-
|
|
406
|
+
u += 1;
|
|
407
|
+
const h = u;
|
|
408
|
+
d.push(
|
|
409
409
|
/* @__PURE__ */ e(
|
|
410
|
-
|
|
410
|
+
qe,
|
|
411
411
|
{
|
|
412
|
-
x:
|
|
413
|
-
y:
|
|
412
|
+
x: c.x,
|
|
413
|
+
y: c.y,
|
|
414
414
|
ifOverflow: "visible",
|
|
415
|
-
shape: (
|
|
415
|
+
shape: (N) => /* @__PURE__ */ e(dt, { cx: N.cx, cy: N.cy, n: h, ann: c, onEnter: i, onLeave: l })
|
|
416
416
|
},
|
|
417
417
|
`ann-${b}`
|
|
418
418
|
)
|
|
419
419
|
);
|
|
420
420
|
}
|
|
421
|
-
}), { back:
|
|
422
|
-
}, [t, n,
|
|
423
|
-
return { back: a, front:
|
|
421
|
+
}), { back: f, front: d };
|
|
422
|
+
}, [t, n, l]);
|
|
423
|
+
return { back: a, front: o, hovered: r };
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function q({
|
|
426
426
|
items: t,
|
|
427
427
|
align: n = "end",
|
|
428
428
|
className: r,
|
|
429
429
|
onToggle: i
|
|
430
430
|
}) {
|
|
431
|
-
const
|
|
431
|
+
const l = {
|
|
432
432
|
start: "justify-start",
|
|
433
433
|
center: "justify-center",
|
|
434
434
|
end: "justify-end"
|
|
435
435
|
}[n];
|
|
436
|
-
return /* @__PURE__ */ e("div", { className:
|
|
437
|
-
(a) => i && a.key !== void 0 ? /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ e("div", { className: I("mb-3 flex flex-wrap items-center gap-x-4 gap-y-1", l, r), children: t.map(
|
|
437
|
+
(a) => i && a.key !== void 0 ? /* @__PURE__ */ A(
|
|
438
438
|
"button",
|
|
439
439
|
{
|
|
440
440
|
type: "button",
|
|
441
441
|
"aria-pressed": !a.hidden,
|
|
442
442
|
"aria-label": `Toggle ${a.label} series`,
|
|
443
443
|
onClick: () => i(a.key),
|
|
444
|
-
className:
|
|
444
|
+
className: I(
|
|
445
445
|
"inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-s outline-none",
|
|
446
446
|
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
447
447
|
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
@@ -452,7 +452,7 @@ function Q({
|
|
|
452
452
|
"span",
|
|
453
453
|
{
|
|
454
454
|
"aria-hidden": !0,
|
|
455
|
-
className:
|
|
455
|
+
className: I(
|
|
456
456
|
"size-2 rounded-dot transition-opacity duration-150 ease-out motion-reduce:transition-none",
|
|
457
457
|
a.hidden && "opacity-25"
|
|
458
458
|
),
|
|
@@ -463,313 +463,334 @@ function Q({
|
|
|
463
463
|
]
|
|
464
464
|
},
|
|
465
465
|
a.label
|
|
466
|
-
) : /* @__PURE__ */
|
|
466
|
+
) : /* @__PURE__ */ A("span", { className: "inline-flex items-center gap-1.5 text-s text-secondary", children: [
|
|
467
467
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background: a.color } }),
|
|
468
468
|
a.label
|
|
469
469
|
] }, a.label)
|
|
470
470
|
) });
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const X = C.forwardRef(
|
|
473
473
|
({
|
|
474
474
|
className: t,
|
|
475
475
|
height: n,
|
|
476
476
|
legendItems: r,
|
|
477
477
|
title: i,
|
|
478
|
-
subtitle:
|
|
478
|
+
subtitle: l,
|
|
479
479
|
legendPlacement: a,
|
|
480
|
-
hovered:
|
|
481
|
-
format:
|
|
482
|
-
onLegendToggle:
|
|
483
|
-
hoverRef:
|
|
484
|
-
children:
|
|
480
|
+
hovered: o,
|
|
481
|
+
format: f,
|
|
482
|
+
onLegendToggle: d,
|
|
483
|
+
hoverRef: u,
|
|
484
|
+
children: c,
|
|
485
485
|
...b
|
|
486
|
-
},
|
|
487
|
-
var
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
}, M = i != null ||
|
|
491
|
-
return /* @__PURE__ */
|
|
492
|
-
(M ||
|
|
486
|
+
}, g) => {
|
|
487
|
+
var m;
|
|
488
|
+
const h = C.useRef(null), N = (x) => {
|
|
489
|
+
h.current = x, u && (u.current = x), typeof g == "function" ? g(x) : g && (g.current = x);
|
|
490
|
+
}, M = i != null || l != null, p = (a ?? (M ? "header" : "top")) === "header" && r != null;
|
|
491
|
+
return /* @__PURE__ */ A("div", { ref: N, className: I("relative w-full font-sans", t), ...b, children: [
|
|
492
|
+
(M || p) && // The header row: title block leads, the legend trails on the same
|
|
493
493
|
// row. 36px separates the header block from the plot.
|
|
494
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ A(
|
|
495
495
|
"div",
|
|
496
496
|
{
|
|
497
497
|
"data-slot": "chart-header",
|
|
498
|
-
className:
|
|
498
|
+
className: I(
|
|
499
499
|
"flex flex-wrap items-start gap-x-6 gap-y-2",
|
|
500
500
|
M ? "justify-between" : "justify-end",
|
|
501
|
-
|
|
501
|
+
p ? "mb-9" : "mb-3"
|
|
502
502
|
),
|
|
503
503
|
children: [
|
|
504
|
-
M && /* @__PURE__ */
|
|
505
|
-
i != null && /* @__PURE__ */ e("div", { className: "text-l font-medium text-on-white-primary", children: i }),
|
|
506
|
-
|
|
504
|
+
M && /* @__PURE__ */ A("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
505
|
+
i != null && /* @__PURE__ */ e("div", { className: "font-heading text-l font-medium text-on-white-primary", children: i }),
|
|
506
|
+
l != null && /* @__PURE__ */ e("div", { className: "text-s text-on-white-secondary", children: l })
|
|
507
507
|
] }),
|
|
508
|
-
|
|
508
|
+
p && r && /* @__PURE__ */ e(q, { items: r, onToggle: d, className: "mb-0 pt-1" })
|
|
509
509
|
]
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
r && !
|
|
513
|
-
/* @__PURE__ */ e(
|
|
514
|
-
/* @__PURE__ */ e(
|
|
512
|
+
r && !p && /* @__PURE__ */ e(q, { items: r, onToggle: d }),
|
|
513
|
+
/* @__PURE__ */ e(J, { width: "100%", height: Math.max(n, P), children: c }),
|
|
514
|
+
/* @__PURE__ */ e(ut, { hovered: o, frameWidth: ((m = h.current) == null ? void 0 : m.clientWidth) ?? 0, format: f })
|
|
515
515
|
] });
|
|
516
516
|
}
|
|
517
517
|
);
|
|
518
|
-
|
|
519
|
-
function
|
|
518
|
+
X.displayName = "ChartFrame";
|
|
519
|
+
function oe(t) {
|
|
520
520
|
const {
|
|
521
521
|
data: n,
|
|
522
522
|
categoryKey: r,
|
|
523
523
|
series: i,
|
|
524
|
-
seriesLabels:
|
|
524
|
+
seriesLabels: l,
|
|
525
525
|
highlight: a,
|
|
526
|
-
annotations:
|
|
527
|
-
grid:
|
|
528
|
-
legend:
|
|
529
|
-
showYAxis:
|
|
530
|
-
formatValue:
|
|
526
|
+
annotations: o,
|
|
527
|
+
grid: f = !1,
|
|
528
|
+
legend: d,
|
|
529
|
+
showYAxis: u = !0,
|
|
530
|
+
formatValue: c,
|
|
531
531
|
xScale: b = "category",
|
|
532
|
-
xDomain:
|
|
533
|
-
yDomain:
|
|
534
|
-
xTickFormatter:
|
|
532
|
+
xDomain: g,
|
|
533
|
+
yDomain: h,
|
|
534
|
+
xTickFormatter: N,
|
|
535
535
|
yTickFormatter: M,
|
|
536
|
-
yAxisWidth:
|
|
537
|
-
title:
|
|
538
|
-
subtitle:
|
|
539
|
-
legendPlacement:
|
|
540
|
-
} = t,
|
|
536
|
+
yAxisWidth: R = 44,
|
|
537
|
+
title: p,
|
|
538
|
+
subtitle: m,
|
|
539
|
+
legendPlacement: x
|
|
540
|
+
} = t, y = { title: p, subtitle: m, legendPlacement: x }, L = C.useMemo(() => i ?? $e(n, r), [i, n, r]), $ = c ?? k, s = M ?? ((S) => typeof S == "number" ? $(S) : S), O = Fe(o, $), w = (S, H) => a && L.includes(a) ? S === a ? "var(--color-chart-1)" : ie : ae(H), F = (S) => (l == null ? void 0 : l[S]) ?? S, [T, D] = C.useState(
|
|
541
541
|
() => /* @__PURE__ */ new Set()
|
|
542
|
-
),
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
return
|
|
542
|
+
), _ = C.useCallback((S) => {
|
|
543
|
+
D((H) => {
|
|
544
|
+
const B = new Set(H);
|
|
545
|
+
return B.has(S) ? B.delete(S) : B.add(S), B;
|
|
546
546
|
});
|
|
547
|
-
}, []),
|
|
548
|
-
key:
|
|
549
|
-
label:
|
|
550
|
-
color:
|
|
551
|
-
hidden:
|
|
547
|
+
}, []), E = (S) => T.has(S), Z = d ?? L.length > 1 ? L.map((S, H) => ({
|
|
548
|
+
key: S,
|
|
549
|
+
label: F(S),
|
|
550
|
+
color: w(S, H),
|
|
551
|
+
hidden: T.has(S)
|
|
552
552
|
})) : null;
|
|
553
553
|
return {
|
|
554
|
-
names:
|
|
555
|
-
format:
|
|
554
|
+
names: L,
|
|
555
|
+
format: $,
|
|
556
556
|
layers: O,
|
|
557
|
-
legendItems:
|
|
558
|
-
header:
|
|
557
|
+
legendItems: Z,
|
|
558
|
+
header: y,
|
|
559
559
|
furniture: [
|
|
560
560
|
/* Gridlines one step below the border token — guides, not content. */
|
|
561
|
-
|
|
561
|
+
f ? /* @__PURE__ */ e(ue, { vertical: !1, stroke: "var(--chart-grid)" }, "grid") : null,
|
|
562
562
|
/* @__PURE__ */ e(
|
|
563
|
-
|
|
563
|
+
me,
|
|
564
564
|
{
|
|
565
565
|
dataKey: r,
|
|
566
566
|
type: b === "time" ? "number" : "category",
|
|
567
567
|
scale: b === "time" ? "time" : "auto",
|
|
568
|
-
domain: b === "time" ?
|
|
569
|
-
allowDataOverflow: !!
|
|
568
|
+
domain: b === "time" ? g ?? ["dataMin", "dataMax"] : g,
|
|
569
|
+
allowDataOverflow: !!g,
|
|
570
570
|
axisLine: { stroke: "var(--chart-axis)" },
|
|
571
571
|
tickLine: !1,
|
|
572
572
|
minTickGap: 28,
|
|
573
573
|
tickMargin: 24,
|
|
574
574
|
padding: { left: 16, right: 16 },
|
|
575
575
|
height: 40,
|
|
576
|
-
tick: /* @__PURE__ */ e(
|
|
576
|
+
tick: /* @__PURE__ */ e(W, { anchor: "middle", dy: 0, format: N })
|
|
577
577
|
},
|
|
578
578
|
"x"
|
|
579
579
|
),
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
u ? /* @__PURE__ */ e(
|
|
581
|
+
ne,
|
|
582
582
|
{
|
|
583
|
-
width:
|
|
584
|
-
domain:
|
|
585
|
-
allowDataOverflow: !!
|
|
583
|
+
width: R,
|
|
584
|
+
domain: h,
|
|
585
|
+
allowDataOverflow: !!h,
|
|
586
586
|
axisLine: { stroke: "var(--chart-axis)" },
|
|
587
587
|
tickLine: !1,
|
|
588
588
|
tickMargin: 12,
|
|
589
|
-
tick: /* @__PURE__ */ e(
|
|
589
|
+
tick: /* @__PURE__ */ e(W, { anchor: "end", dy: "0.32em", format: s })
|
|
590
590
|
},
|
|
591
591
|
"y"
|
|
592
592
|
) : null
|
|
593
593
|
],
|
|
594
|
-
colorFor:
|
|
595
|
-
labelFor:
|
|
596
|
-
toggleSeries:
|
|
597
|
-
isHidden:
|
|
594
|
+
colorFor: w,
|
|
595
|
+
labelFor: F,
|
|
596
|
+
toggleSeries: _,
|
|
597
|
+
isHidden: E
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
const P = 300,
|
|
601
|
-
function
|
|
600
|
+
const P = 300, K = { top: 24, right: 12, bottom: 8, left: 0 };
|
|
601
|
+
function fe(t, n, r, i) {
|
|
602
602
|
if (i === !0) return new Set(t);
|
|
603
603
|
if (i === !1) return /* @__PURE__ */ new Set();
|
|
604
604
|
if (r && t.includes(r)) {
|
|
605
|
-
const a = (n ?? []).filter((
|
|
605
|
+
const a = (n ?? []).filter((o) => o !== r);
|
|
606
606
|
return /* @__PURE__ */ new Set([r, ...a]);
|
|
607
607
|
}
|
|
608
608
|
return t.filter((a) => !(n != null && n.includes(a))).length === 1 ? new Set(t) : /* @__PURE__ */ new Set();
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Ie(t, n, r) {
|
|
611
611
|
return C.useCallback(
|
|
612
|
-
(i,
|
|
613
|
-
if (!(n != null && n.includes(i))) return r(i,
|
|
614
|
-
const a = t.filter((
|
|
615
|
-
return
|
|
612
|
+
(i, l) => {
|
|
613
|
+
if (!(n != null && n.includes(i))) return r(i, l);
|
|
614
|
+
const a = t.filter((f) => !n.includes(f)), o = a[n.indexOf(i)] ?? a[0];
|
|
615
|
+
return o ? r(o, t.indexOf(o)) : r(i, l);
|
|
616
616
|
},
|
|
617
617
|
[t, n, r]
|
|
618
618
|
);
|
|
619
619
|
}
|
|
620
|
-
const
|
|
620
|
+
const mt = C.forwardRef(
|
|
621
621
|
// Straight segments by default: the house line is a solid stroke with a DOT
|
|
622
622
|
// at every observation — the data points are visible, the path connects them
|
|
623
623
|
// without inventing values between them.
|
|
624
624
|
// A smooth curve invents values between observations; opt back in with
|
|
625
625
|
// `curve="natural"` when the interpolation is the point.
|
|
626
|
-
({ height: t = P, curve: n = "linear", forecastKeys: r, animatedSeriesKeys: i, showValues:
|
|
627
|
-
const { names:
|
|
628
|
-
if (!(r != null && r.includes(
|
|
629
|
-
const
|
|
630
|
-
if (
|
|
631
|
-
return (
|
|
632
|
-
var
|
|
633
|
-
const
|
|
634
|
-
return
|
|
626
|
+
({ height: t = P, curve: n = "linear", forecastKeys: r, animatedSeriesKeys: i, showValues: l = !0, gradientFill: a = !0, className: o, ...f }, d) => {
|
|
627
|
+
const { names: u, format: c, layers: b, legendItems: g, header: h, furniture: N, colorFor: M, labelFor: R, toggleSeries: p, isHidden: m } = oe(f), x = Ie(u, r, M), y = fe(u, r, f.highlight, l), L = C.useId().replace(/[^a-zA-Z0-9]/g, ""), $ = a ? u.filter((v) => !(r != null && r.includes(v))) : [], s = Le(u, r), O = new Set(u.filter((v) => !m(v)).map(s)), w = ye(s, O.size > 1), { activeIndex: F } = w, T = (v) => {
|
|
628
|
+
if (!(r != null && r.includes(v))) return;
|
|
629
|
+
const S = s(v);
|
|
630
|
+
if (S !== v)
|
|
631
|
+
return (H) => {
|
|
632
|
+
var Q;
|
|
633
|
+
const B = (Q = f.data[H]) == null ? void 0 : Q[S];
|
|
634
|
+
return B != null && B !== "" && !m(S);
|
|
635
635
|
};
|
|
636
|
-
},
|
|
637
|
-
var
|
|
638
|
-
const
|
|
639
|
-
return typeof
|
|
636
|
+
}, D = u.filter((v) => y.has(v) && !m(v)), _ = (v, S) => {
|
|
637
|
+
var B;
|
|
638
|
+
const H = (B = f.data[v]) == null ? void 0 : B[S];
|
|
639
|
+
return typeof H == "number" && !Number.isNaN(H) ? H : null;
|
|
640
640
|
};
|
|
641
|
-
let
|
|
642
|
-
for (let
|
|
643
|
-
for (const
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
646
|
-
const
|
|
647
|
-
return (
|
|
648
|
-
const
|
|
649
|
-
return
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
return
|
|
641
|
+
let E = 0;
|
|
642
|
+
for (let v = 0; v < f.data.length; v++)
|
|
643
|
+
for (const S of D) E = Math.max(E, Math.abs(_(v, S) ?? 0));
|
|
644
|
+
const Z = (v) => {
|
|
645
|
+
if (D.length < 2 || E === 0) return;
|
|
646
|
+
const S = D.indexOf(v);
|
|
647
|
+
return (H) => {
|
|
648
|
+
const B = _(H, v);
|
|
649
|
+
return B == null ? !1 : D.some((Q, Ee) => {
|
|
650
|
+
if (Q === v) return !1;
|
|
651
|
+
const ee = _(H, Q);
|
|
652
|
+
return ee == null ? !1 : (ee > B || ee === B && Ee < S) && (ee - B) / E < 0.1;
|
|
653
653
|
});
|
|
654
654
|
};
|
|
655
655
|
};
|
|
656
|
-
return /* @__PURE__ */ e(
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
656
|
+
return /* @__PURE__ */ e(X, { ref: d, className: o, height: t, legendItems: g, ...h, hovered: b.hovered, format: c, onLegendToggle: p, hoverRef: w.frameRef, children: /* @__PURE__ */ A(pe, { data: f.data, margin: K, ...w.handlers, children: [
|
|
657
|
+
$.length > 0 && /* @__PURE__ */ e("defs", { children: $.map((v) => /* @__PURE__ */ A("linearGradient", { id: `${L}-${u.indexOf(v)}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
658
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: x(v, u.indexOf(v)), stopOpacity: 0.2 }),
|
|
659
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: x(v, u.indexOf(v)), stopOpacity: 0 })
|
|
660
|
+
] }, v)) }),
|
|
661
|
+
N,
|
|
662
|
+
f.tooltip !== !1 && /* @__PURE__ */ e(
|
|
663
|
+
j,
|
|
660
664
|
{
|
|
661
665
|
content: /* @__PURE__ */ e(
|
|
662
|
-
|
|
666
|
+
G,
|
|
663
667
|
{
|
|
664
|
-
format:
|
|
665
|
-
renderer:
|
|
668
|
+
format: c,
|
|
669
|
+
renderer: f.tooltip
|
|
666
670
|
}
|
|
667
671
|
),
|
|
668
672
|
cursor: !1,
|
|
669
673
|
isAnimationActive: !1
|
|
670
674
|
}
|
|
671
675
|
),
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
676
|
+
b.back,
|
|
677
|
+
$.map((v) => /* @__PURE__ */ e(
|
|
678
|
+
Ne,
|
|
675
679
|
{
|
|
676
|
-
dataKey:
|
|
677
|
-
name: M(N),
|
|
680
|
+
dataKey: v,
|
|
678
681
|
type: n,
|
|
679
|
-
className:
|
|
680
|
-
stroke:
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
682
|
+
className: I(z, w.isDimmed(v) && "opacity-30"),
|
|
683
|
+
stroke: "none",
|
|
684
|
+
fill: `url(#${L}-${u.indexOf(v)})`,
|
|
685
|
+
dot: !1,
|
|
686
|
+
activeDot: !1,
|
|
687
|
+
legendType: "none",
|
|
688
|
+
tooltipType: "none",
|
|
689
|
+
hide: m(v),
|
|
690
|
+
isAnimationActive: !1
|
|
691
|
+
},
|
|
692
|
+
`${v}-fill`
|
|
693
|
+
)),
|
|
694
|
+
u.map((v, S) => /* @__PURE__ */ e(
|
|
695
|
+
we,
|
|
696
|
+
{
|
|
697
|
+
dataKey: v,
|
|
698
|
+
name: R(v),
|
|
699
|
+
type: n,
|
|
700
|
+
className: I(z, w.isDimmed(v) && "opacity-30"),
|
|
701
|
+
stroke: x(v, S),
|
|
702
|
+
strokeWidth: le,
|
|
703
|
+
strokeDasharray: r != null && r.includes(v) ? "6 4" : void 0,
|
|
704
|
+
dot: /* @__PURE__ */ e(U, { color: x(v, S), seriesKey: v }),
|
|
705
|
+
activeDot: w.isDimmed(v) ? !1 : /* @__PURE__ */ e(U, { color: x(v, S), active: !0 }),
|
|
706
|
+
label: y.has(v) ? /* @__PURE__ */ e(
|
|
707
|
+
Oe,
|
|
687
708
|
{
|
|
688
|
-
color:
|
|
689
|
-
format:
|
|
690
|
-
hidden:
|
|
691
|
-
skip:
|
|
692
|
-
below:
|
|
709
|
+
color: Me(x(v, S)) ? void 0 : x(v, S),
|
|
710
|
+
format: c,
|
|
711
|
+
hidden: F != null,
|
|
712
|
+
skip: T(v),
|
|
713
|
+
below: Z(v)
|
|
693
714
|
}
|
|
694
715
|
) : void 0,
|
|
695
|
-
hide:
|
|
696
|
-
isAnimationActive: (i == null ? void 0 : i.includes(
|
|
716
|
+
hide: m(v),
|
|
717
|
+
isAnimationActive: (i == null ? void 0 : i.includes(v)) ?? !1
|
|
697
718
|
},
|
|
698
|
-
|
|
719
|
+
v
|
|
699
720
|
)),
|
|
700
|
-
|
|
721
|
+
b.front
|
|
701
722
|
] }) });
|
|
702
723
|
}
|
|
703
724
|
);
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
({ height: t = P, curve: n = "linear", stacked: r = !1, forecastKeys: i, showValues:
|
|
707
|
-
const { names:
|
|
708
|
-
return /* @__PURE__ */ e(
|
|
709
|
-
/* @__PURE__ */ e("defs", { children:
|
|
710
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
711
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
712
|
-
] },
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
725
|
+
mt.displayName = "LineChart";
|
|
726
|
+
const ft = C.forwardRef(
|
|
727
|
+
({ height: t = P, curve: n = "linear", stacked: r = !1, forecastKeys: i, showValues: l, className: a, ...o }, f) => {
|
|
728
|
+
const { names: d, format: u, layers: c, legendItems: b, header: g, furniture: h, colorFor: N, labelFor: M, toggleSeries: R, isHidden: p } = oe(o), m = Ie(d, i, N), x = r ? /* @__PURE__ */ new Set() : fe(d, i, o.highlight, l), y = Le(d, i), L = new Set(d.filter((w) => !p(w)).map(y)), $ = ye(y, L.size > 1), { activeIndex: s } = $, O = C.useId().replace(/[^a-zA-Z0-9]/g, "");
|
|
729
|
+
return /* @__PURE__ */ e(X, { ref: f, className: a, height: t, legendItems: b, ...g, hovered: c.hovered, format: u, onLegendToggle: R, hoverRef: $.frameRef, children: /* @__PURE__ */ A(Be, { data: o.data, margin: K, ...$.handlers, children: [
|
|
730
|
+
/* @__PURE__ */ e("defs", { children: d.map((w, F) => /* @__PURE__ */ A("linearGradient", { id: `${O}-${F}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
731
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: N(w, F), stopOpacity: 0.18 }),
|
|
732
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: N(w, F), stopOpacity: 0.02 })
|
|
733
|
+
] }, w)) }),
|
|
734
|
+
h,
|
|
735
|
+
o.tooltip !== !1 && /* @__PURE__ */ e(
|
|
736
|
+
j,
|
|
716
737
|
{
|
|
717
738
|
content: /* @__PURE__ */ e(
|
|
718
|
-
|
|
739
|
+
G,
|
|
719
740
|
{
|
|
720
|
-
format:
|
|
721
|
-
renderer:
|
|
741
|
+
format: u,
|
|
742
|
+
renderer: o.tooltip
|
|
722
743
|
}
|
|
723
744
|
),
|
|
724
745
|
cursor: !1,
|
|
725
746
|
isAnimationActive: !1
|
|
726
747
|
}
|
|
727
748
|
),
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
749
|
+
c.back,
|
|
750
|
+
d.map((w, F) => /* @__PURE__ */ e(
|
|
751
|
+
Ne,
|
|
731
752
|
{
|
|
732
|
-
dataKey:
|
|
733
|
-
name: M(
|
|
753
|
+
dataKey: w,
|
|
754
|
+
name: M(w),
|
|
734
755
|
type: n,
|
|
735
|
-
className:
|
|
756
|
+
className: I(z, $.isDimmed(w) && "opacity-30"),
|
|
736
757
|
stackId: r ? "stack" : void 0,
|
|
737
|
-
stroke:
|
|
738
|
-
strokeWidth:
|
|
739
|
-
strokeDasharray: i != null && i.includes(
|
|
740
|
-
fill: `url(#${O}-${
|
|
741
|
-
dot: /* @__PURE__ */ e(U, { color:
|
|
742
|
-
activeDot:
|
|
743
|
-
label:
|
|
744
|
-
hide:
|
|
758
|
+
stroke: m(w, F),
|
|
759
|
+
strokeWidth: le,
|
|
760
|
+
strokeDasharray: i != null && i.includes(w) ? "6 4" : void 0,
|
|
761
|
+
fill: `url(#${O}-${F})`,
|
|
762
|
+
dot: /* @__PURE__ */ e(U, { color: m(w, F), seriesKey: w }),
|
|
763
|
+
activeDot: $.isDimmed(w) ? !1 : /* @__PURE__ */ e(U, { color: m(w, F), active: !0 }),
|
|
764
|
+
label: x.has(w) ? /* @__PURE__ */ e(Oe, { color: m(w, F), format: u, hidden: s != null }) : void 0,
|
|
765
|
+
hide: p(w),
|
|
745
766
|
isAnimationActive: !1
|
|
746
767
|
},
|
|
747
|
-
|
|
768
|
+
w
|
|
748
769
|
)),
|
|
749
|
-
|
|
770
|
+
c.front
|
|
750
771
|
] }) });
|
|
751
772
|
}
|
|
752
773
|
);
|
|
753
|
-
|
|
754
|
-
const
|
|
774
|
+
ft.displayName = "AreaChart";
|
|
775
|
+
const ht = C.forwardRef(
|
|
755
776
|
({
|
|
756
777
|
height: t = P,
|
|
757
778
|
stacked: n = !1,
|
|
758
779
|
layout: r = "vertical",
|
|
759
780
|
showValues: i = !0,
|
|
760
|
-
className:
|
|
781
|
+
className: l,
|
|
761
782
|
...a
|
|
762
|
-
},
|
|
763
|
-
const { names:
|
|
764
|
-
let
|
|
765
|
-
for (const
|
|
766
|
-
const
|
|
767
|
-
typeof
|
|
783
|
+
}, o) => {
|
|
784
|
+
const { names: f, format: d, layers: u, legendItems: c, header: b, furniture: g, colorFor: h, labelFor: N, toggleSeries: M, isHidden: R } = oe(a), p = r === "horizontal", m = n ? /* @__PURE__ */ new Set() : fe(f, void 0, a.highlight, i), x = f.filter((T) => !R(T)), y = n ? x[x.length - 1] : void 0, L = a.data.map((T) => {
|
|
785
|
+
let D = null;
|
|
786
|
+
for (const _ of x) {
|
|
787
|
+
const E = T[_];
|
|
788
|
+
typeof E == "number" && !Number.isNaN(E) && (D = (D ?? 0) + E);
|
|
768
789
|
}
|
|
769
|
-
return
|
|
770
|
-
}),
|
|
790
|
+
return D;
|
|
791
|
+
}), $ = a.xTickFormatter ?? ((T) => typeof T == "number" ? d(T) : T), s = [
|
|
771
792
|
a.grid !== !1 ? /* @__PURE__ */ e(
|
|
772
|
-
|
|
793
|
+
ue,
|
|
773
794
|
{
|
|
774
795
|
horizontal: !1,
|
|
775
796
|
vertical: !0,
|
|
@@ -778,7 +799,7 @@ const mt = C.forwardRef(
|
|
|
778
799
|
"grid"
|
|
779
800
|
) : null,
|
|
780
801
|
/* @__PURE__ */ e(
|
|
781
|
-
|
|
802
|
+
me,
|
|
782
803
|
{
|
|
783
804
|
type: "number",
|
|
784
805
|
domain: a.xDomain,
|
|
@@ -787,12 +808,12 @@ const mt = C.forwardRef(
|
|
|
787
808
|
tickLine: !1,
|
|
788
809
|
minTickGap: 28,
|
|
789
810
|
tickMargin: 10,
|
|
790
|
-
tick: /* @__PURE__ */ e(
|
|
811
|
+
tick: /* @__PURE__ */ e(W, { anchor: "middle", dy: 0, format: $ })
|
|
791
812
|
},
|
|
792
813
|
"x"
|
|
793
814
|
),
|
|
794
815
|
a.showYAxis !== !1 ? /* @__PURE__ */ e(
|
|
795
|
-
|
|
816
|
+
ne,
|
|
796
817
|
{
|
|
797
818
|
type: "category",
|
|
798
819
|
dataKey: a.categoryKey,
|
|
@@ -801,7 +822,7 @@ const mt = C.forwardRef(
|
|
|
801
822
|
tickLine: !1,
|
|
802
823
|
tickMargin: 6,
|
|
803
824
|
tick: /* @__PURE__ */ e(
|
|
804
|
-
|
|
825
|
+
W,
|
|
805
826
|
{
|
|
806
827
|
anchor: "end",
|
|
807
828
|
dy: "0.32em",
|
|
@@ -811,24 +832,24 @@ const mt = C.forwardRef(
|
|
|
811
832
|
},
|
|
812
833
|
"y"
|
|
813
834
|
) : null
|
|
814
|
-
], O = a.highlight &&
|
|
815
|
-
return /* @__PURE__ */ e(
|
|
816
|
-
|
|
835
|
+
], O = a.highlight && f.length === 1 && !f.includes(a.highlight) ? a.highlight : null, { activeIndex: w, handlers: F } = Re();
|
|
836
|
+
return /* @__PURE__ */ e(X, { ref: o, className: l, height: t, legendItems: c, ...b, hovered: u.hovered, format: d, onLegendToggle: M, children: /* @__PURE__ */ A(
|
|
837
|
+
He,
|
|
817
838
|
{
|
|
818
839
|
data: a.data,
|
|
819
|
-
layout:
|
|
820
|
-
margin:
|
|
840
|
+
layout: p ? "vertical" : "horizontal",
|
|
841
|
+
margin: K,
|
|
821
842
|
barCategoryGap: "24%",
|
|
822
|
-
...
|
|
843
|
+
...F,
|
|
823
844
|
children: [
|
|
824
|
-
|
|
845
|
+
p ? s : g,
|
|
825
846
|
a.tooltip !== !1 && /* @__PURE__ */ e(
|
|
826
|
-
|
|
847
|
+
j,
|
|
827
848
|
{
|
|
828
849
|
content: /* @__PURE__ */ e(
|
|
829
|
-
|
|
850
|
+
G,
|
|
830
851
|
{
|
|
831
|
-
format:
|
|
852
|
+
format: d,
|
|
832
853
|
renderer: a.tooltip
|
|
833
854
|
}
|
|
834
855
|
),
|
|
@@ -836,91 +857,91 @@ const mt = C.forwardRef(
|
|
|
836
857
|
isAnimationActive: !1
|
|
837
858
|
}
|
|
838
859
|
),
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
const
|
|
842
|
-
return /* @__PURE__ */
|
|
843
|
-
|
|
860
|
+
u.back,
|
|
861
|
+
f.map((T, D) => {
|
|
862
|
+
const _ = n ? T === y : !0, E = p ? [0, 4, 4, 0] : [4, 4, 0, 0];
|
|
863
|
+
return /* @__PURE__ */ A(
|
|
864
|
+
Ae,
|
|
844
865
|
{
|
|
845
|
-
dataKey:
|
|
846
|
-
name:
|
|
866
|
+
dataKey: T,
|
|
867
|
+
name: N(T),
|
|
847
868
|
stackId: n ? "stack" : void 0,
|
|
848
|
-
fill:
|
|
849
|
-
radius:
|
|
869
|
+
fill: h(T, D),
|
|
870
|
+
radius: _ ? E : 0,
|
|
850
871
|
maxBarSize: 48,
|
|
851
|
-
label:
|
|
852
|
-
hide:
|
|
872
|
+
label: m.has(T) ? /* @__PURE__ */ e(it, { format: d, horizontal: p }) : void 0,
|
|
873
|
+
hide: R(T),
|
|
853
874
|
isAnimationActive: !1,
|
|
854
875
|
children: [
|
|
855
876
|
n && i && /* @__PURE__ */ e(
|
|
856
|
-
|
|
877
|
+
he,
|
|
857
878
|
{
|
|
858
|
-
dataKey:
|
|
879
|
+
dataKey: T,
|
|
859
880
|
content: /* @__PURE__ */ e(
|
|
860
|
-
|
|
881
|
+
lt,
|
|
861
882
|
{
|
|
862
|
-
format:
|
|
863
|
-
horizontal:
|
|
864
|
-
light:
|
|
883
|
+
format: d,
|
|
884
|
+
horizontal: p,
|
|
885
|
+
light: Me(h(T, D))
|
|
865
886
|
}
|
|
866
887
|
)
|
|
867
888
|
}
|
|
868
889
|
),
|
|
869
|
-
n && i &&
|
|
870
|
-
|
|
890
|
+
n && i && T === y && /* @__PURE__ */ e(
|
|
891
|
+
he,
|
|
871
892
|
{
|
|
872
|
-
dataKey:
|
|
893
|
+
dataKey: T,
|
|
873
894
|
content: /* @__PURE__ */ e(
|
|
874
|
-
|
|
895
|
+
ot,
|
|
875
896
|
{
|
|
876
|
-
totals:
|
|
877
|
-
format:
|
|
878
|
-
horizontal:
|
|
897
|
+
totals: L,
|
|
898
|
+
format: d,
|
|
899
|
+
horizontal: p
|
|
879
900
|
}
|
|
880
901
|
)
|
|
881
902
|
}
|
|
882
903
|
),
|
|
883
|
-
a.data.map((
|
|
884
|
-
|
|
904
|
+
a.data.map((Z, v) => /* @__PURE__ */ e(
|
|
905
|
+
re,
|
|
885
906
|
{
|
|
886
|
-
fill: O ?
|
|
887
|
-
className:
|
|
888
|
-
opacity:
|
|
907
|
+
fill: O ? Z[a.categoryKey] === O ? "var(--color-chart-1)" : ie : h(T, D),
|
|
908
|
+
className: z,
|
|
909
|
+
opacity: Y(v, w)
|
|
889
910
|
},
|
|
890
|
-
|
|
911
|
+
v
|
|
891
912
|
))
|
|
892
913
|
]
|
|
893
914
|
},
|
|
894
|
-
|
|
915
|
+
T
|
|
895
916
|
);
|
|
896
917
|
}),
|
|
897
|
-
|
|
918
|
+
u.front
|
|
898
919
|
]
|
|
899
920
|
}
|
|
900
921
|
) });
|
|
901
922
|
}
|
|
902
923
|
);
|
|
903
|
-
|
|
904
|
-
const
|
|
905
|
-
({ height: t = P, lineKeys: n, dualAxis: r = !1, stacked: i = !1, forecastKeys:
|
|
906
|
-
const { names:
|
|
907
|
-
...
|
|
924
|
+
ht.displayName = "BarChart";
|
|
925
|
+
const De = C.forwardRef(
|
|
926
|
+
({ height: t = P, lineKeys: n, dualAxis: r = !1, stacked: i = !1, forecastKeys: l, className: a, ...o }, f) => {
|
|
927
|
+
const { names: d, format: u, layers: c, header: b, furniture: g, colorFor: h, labelFor: N, toggleSeries: M, isHidden: R } = oe(o), p = d.filter((s) => !n.includes(s)), m = (s, O) => n.length ? "var(--chart-axis)" : h(s, O), x = (s, O) => n.length ? "var(--color-chart-1)" : h(s, O), y = d.length > 1 ? [
|
|
928
|
+
...p.map((s) => ({
|
|
908
929
|
key: s,
|
|
909
|
-
label:
|
|
910
|
-
color:
|
|
911
|
-
hidden:
|
|
930
|
+
label: N(s),
|
|
931
|
+
color: m(s, d.indexOf(s)),
|
|
932
|
+
hidden: R(s)
|
|
912
933
|
})),
|
|
913
934
|
...n.map((s) => ({
|
|
914
935
|
key: s,
|
|
915
|
-
label:
|
|
916
|
-
color:
|
|
917
|
-
hidden:
|
|
936
|
+
label: N(s),
|
|
937
|
+
color: x(s, d.indexOf(s)),
|
|
938
|
+
hidden: R(s)
|
|
918
939
|
}))
|
|
919
|
-
] : null, { activeIndex:
|
|
920
|
-
return /* @__PURE__ */ e(
|
|
921
|
-
|
|
940
|
+
] : null, { activeIndex: L, handlers: $ } = Re();
|
|
941
|
+
return /* @__PURE__ */ e(X, { ref: f, className: a, height: t, legendItems: y, ...b, hovered: c.hovered, format: u, onLegendToggle: M, children: /* @__PURE__ */ A(pe, { data: o.data, margin: K, barCategoryGap: "24%", ...$, children: [
|
|
942
|
+
g,
|
|
922
943
|
r && /* @__PURE__ */ e(
|
|
923
|
-
|
|
944
|
+
ne,
|
|
924
945
|
{
|
|
925
946
|
yAxisId: "right",
|
|
926
947
|
orientation: "right",
|
|
@@ -929,144 +950,144 @@ const Oe = C.forwardRef(
|
|
|
929
950
|
tickLine: !1,
|
|
930
951
|
tickMargin: 6,
|
|
931
952
|
tick: /* @__PURE__ */ e(
|
|
932
|
-
|
|
953
|
+
W,
|
|
933
954
|
{
|
|
934
955
|
anchor: "start",
|
|
935
956
|
dy: "0.32em",
|
|
936
|
-
format: (s) => typeof s == "number" ?
|
|
957
|
+
format: (s) => typeof s == "number" ? u(s) : s
|
|
937
958
|
}
|
|
938
959
|
)
|
|
939
960
|
}
|
|
940
961
|
),
|
|
941
|
-
|
|
942
|
-
|
|
962
|
+
o.tooltip !== !1 && /* @__PURE__ */ e(
|
|
963
|
+
j,
|
|
943
964
|
{
|
|
944
965
|
content: /* @__PURE__ */ e(
|
|
945
|
-
|
|
966
|
+
G,
|
|
946
967
|
{
|
|
947
|
-
format:
|
|
948
|
-
renderer:
|
|
968
|
+
format: u,
|
|
969
|
+
renderer: o.tooltip
|
|
949
970
|
}
|
|
950
971
|
),
|
|
951
972
|
cursor: !1,
|
|
952
973
|
isAnimationActive: !1
|
|
953
974
|
}
|
|
954
975
|
),
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
const O =
|
|
976
|
+
c.back,
|
|
977
|
+
p.map((s) => {
|
|
978
|
+
const O = d.indexOf(s), w = i ? s === p[p.length - 1] : !0;
|
|
958
979
|
return /* @__PURE__ */ e(
|
|
959
|
-
|
|
980
|
+
Ae,
|
|
960
981
|
{
|
|
961
982
|
dataKey: s,
|
|
962
|
-
name:
|
|
983
|
+
name: N(s),
|
|
963
984
|
stackId: i ? "stack" : void 0,
|
|
964
|
-
fill:
|
|
965
|
-
radius:
|
|
985
|
+
fill: m(s, O),
|
|
986
|
+
radius: w ? [4, 4, 0, 0] : 0,
|
|
966
987
|
maxBarSize: 48,
|
|
967
|
-
hide:
|
|
988
|
+
hide: R(s),
|
|
968
989
|
isAnimationActive: !1,
|
|
969
|
-
children:
|
|
970
|
-
|
|
990
|
+
children: o.data.map((F, T) => /* @__PURE__ */ e(
|
|
991
|
+
re,
|
|
971
992
|
{
|
|
972
|
-
fill:
|
|
973
|
-
className:
|
|
974
|
-
opacity:
|
|
993
|
+
fill: m(s, O),
|
|
994
|
+
className: z,
|
|
995
|
+
opacity: Y(T, L)
|
|
975
996
|
},
|
|
976
|
-
|
|
997
|
+
T
|
|
977
998
|
))
|
|
978
999
|
},
|
|
979
1000
|
s
|
|
980
1001
|
);
|
|
981
1002
|
}),
|
|
982
1003
|
n.map((s) => {
|
|
983
|
-
const O =
|
|
1004
|
+
const O = d.indexOf(s);
|
|
984
1005
|
return /* @__PURE__ */ e(
|
|
985
|
-
|
|
1006
|
+
we,
|
|
986
1007
|
{
|
|
987
1008
|
dataKey: s,
|
|
988
|
-
name:
|
|
1009
|
+
name: N(s),
|
|
989
1010
|
yAxisId: r ? "right" : void 0,
|
|
990
1011
|
type: "linear",
|
|
991
|
-
stroke:
|
|
992
|
-
strokeWidth:
|
|
993
|
-
strokeDasharray:
|
|
994
|
-
dot: /* @__PURE__ */ e(U, { color:
|
|
995
|
-
activeDot: /* @__PURE__ */ e(U, { color:
|
|
996
|
-
hide:
|
|
1012
|
+
stroke: x(s, O),
|
|
1013
|
+
strokeWidth: le,
|
|
1014
|
+
strokeDasharray: l != null && l.includes(s) ? "6 4" : void 0,
|
|
1015
|
+
dot: /* @__PURE__ */ e(U, { color: x(s, O) }),
|
|
1016
|
+
activeDot: /* @__PURE__ */ e(U, { color: x(s, O), active: !0 }),
|
|
1017
|
+
hide: R(s),
|
|
997
1018
|
isAnimationActive: !1
|
|
998
1019
|
},
|
|
999
1020
|
s
|
|
1000
1021
|
);
|
|
1001
1022
|
}),
|
|
1002
|
-
|
|
1023
|
+
c.front
|
|
1003
1024
|
] }) });
|
|
1004
1025
|
}
|
|
1005
1026
|
);
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
(t, n) => /* @__PURE__ */ e(
|
|
1027
|
+
De.displayName = "ComboChart";
|
|
1028
|
+
const xt = C.forwardRef(
|
|
1029
|
+
(t, n) => /* @__PURE__ */ e(De, { ref: n, ...t })
|
|
1009
1030
|
);
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1031
|
+
xt.displayName = "ComposedChart";
|
|
1032
|
+
const vt = C.forwardRef(
|
|
1012
1033
|
({
|
|
1013
1034
|
data: t,
|
|
1014
1035
|
xKey: n,
|
|
1015
1036
|
yKey: r,
|
|
1016
1037
|
labelKey: i,
|
|
1017
|
-
annotations:
|
|
1038
|
+
annotations: l,
|
|
1018
1039
|
height: a = P,
|
|
1019
|
-
grid:
|
|
1020
|
-
showYAxis:
|
|
1021
|
-
formatValue:
|
|
1022
|
-
xScale:
|
|
1023
|
-
xDomain:
|
|
1040
|
+
grid: o = !1,
|
|
1041
|
+
showYAxis: f = !0,
|
|
1042
|
+
formatValue: d,
|
|
1043
|
+
xScale: u = "number",
|
|
1044
|
+
xDomain: c,
|
|
1024
1045
|
yDomain: b,
|
|
1025
|
-
xTickFormatter:
|
|
1026
|
-
yTickFormatter:
|
|
1027
|
-
yAxisWidth:
|
|
1046
|
+
xTickFormatter: g,
|
|
1047
|
+
yTickFormatter: h,
|
|
1048
|
+
yAxisWidth: N = 44,
|
|
1028
1049
|
tooltip: M,
|
|
1029
|
-
className:
|
|
1030
|
-
},
|
|
1031
|
-
const
|
|
1032
|
-
return /* @__PURE__ */ e(
|
|
1033
|
-
|
|
1050
|
+
className: R
|
|
1051
|
+
}, p) => {
|
|
1052
|
+
const m = d ?? k, x = g ?? (($) => typeof $ == "number" ? k($) : $), y = h ?? (($) => typeof $ == "number" ? m($) : $), L = Fe(l, m);
|
|
1053
|
+
return /* @__PURE__ */ e(X, { ref: p, className: R, height: a, legendItems: null, hovered: L.hovered, format: m, children: /* @__PURE__ */ A(_e, { margin: K, children: [
|
|
1054
|
+
o && /* @__PURE__ */ e(ue, { vertical: !1, stroke: "var(--chart-grid)" }),
|
|
1034
1055
|
/* @__PURE__ */ e(
|
|
1035
|
-
|
|
1056
|
+
me,
|
|
1036
1057
|
{
|
|
1037
1058
|
type: "number",
|
|
1038
1059
|
dataKey: n,
|
|
1039
|
-
scale:
|
|
1040
|
-
domain:
|
|
1041
|
-
allowDataOverflow: !!
|
|
1060
|
+
scale: u === "time" ? "time" : "auto",
|
|
1061
|
+
domain: c ?? (u === "time" ? ["dataMin", "dataMax"] : ["auto", "auto"]),
|
|
1062
|
+
allowDataOverflow: !!c,
|
|
1042
1063
|
axisLine: !1,
|
|
1043
1064
|
tickLine: !1,
|
|
1044
1065
|
minTickGap: 28,
|
|
1045
1066
|
tickMargin: 10,
|
|
1046
|
-
tick: /* @__PURE__ */ e(
|
|
1067
|
+
tick: /* @__PURE__ */ e(W, { anchor: "middle", dy: 0, format: x })
|
|
1047
1068
|
}
|
|
1048
1069
|
),
|
|
1049
|
-
|
|
1050
|
-
|
|
1070
|
+
f && /* @__PURE__ */ e(
|
|
1071
|
+
ne,
|
|
1051
1072
|
{
|
|
1052
1073
|
type: "number",
|
|
1053
1074
|
dataKey: r,
|
|
1054
|
-
width:
|
|
1075
|
+
width: N,
|
|
1055
1076
|
domain: b,
|
|
1056
1077
|
allowDataOverflow: !!b,
|
|
1057
1078
|
axisLine: !1,
|
|
1058
1079
|
tickLine: !1,
|
|
1059
1080
|
tickMargin: 6,
|
|
1060
|
-
tick: /* @__PURE__ */ e(
|
|
1081
|
+
tick: /* @__PURE__ */ e(W, { anchor: "end", dy: "0.32em", format: y })
|
|
1061
1082
|
}
|
|
1062
1083
|
),
|
|
1063
1084
|
M !== !1 && /* @__PURE__ */ e(
|
|
1064
|
-
|
|
1085
|
+
j,
|
|
1065
1086
|
{
|
|
1066
1087
|
content: /* @__PURE__ */ e(
|
|
1067
|
-
|
|
1088
|
+
G,
|
|
1068
1089
|
{
|
|
1069
|
-
format:
|
|
1090
|
+
format: m,
|
|
1070
1091
|
labelKey: i,
|
|
1071
1092
|
renderer: M
|
|
1072
1093
|
}
|
|
@@ -1075,58 +1096,58 @@ const ht = C.forwardRef(
|
|
|
1075
1096
|
isAnimationActive: !1
|
|
1076
1097
|
}
|
|
1077
1098
|
),
|
|
1078
|
-
|
|
1099
|
+
L.back,
|
|
1079
1100
|
/* @__PURE__ */ e(
|
|
1080
|
-
|
|
1101
|
+
ze,
|
|
1081
1102
|
{
|
|
1082
1103
|
data: t,
|
|
1083
1104
|
fill: "var(--color-chart-1)",
|
|
1084
|
-
shape: (
|
|
1105
|
+
shape: ($) => /* @__PURE__ */ e("circle", { cx: $.cx, cy: $.cy, r: 4.5, fill: "var(--color-chart-1)", fillOpacity: 0.75 }),
|
|
1085
1106
|
isAnimationActive: !1
|
|
1086
1107
|
}
|
|
1087
1108
|
),
|
|
1088
|
-
|
|
1109
|
+
L.front
|
|
1089
1110
|
] }) });
|
|
1090
1111
|
}
|
|
1091
1112
|
);
|
|
1092
|
-
|
|
1093
|
-
const
|
|
1113
|
+
vt.displayName = "ScatterChart";
|
|
1114
|
+
const bt = C.forwardRef(
|
|
1094
1115
|
({
|
|
1095
1116
|
data: t,
|
|
1096
1117
|
nameKey: n,
|
|
1097
1118
|
valueKey: r,
|
|
1098
1119
|
donut: i = !0,
|
|
1099
|
-
centerLabel:
|
|
1120
|
+
centerLabel: l,
|
|
1100
1121
|
highlight: a,
|
|
1101
|
-
height:
|
|
1102
|
-
legend:
|
|
1103
|
-
formatValue:
|
|
1104
|
-
tooltip:
|
|
1105
|
-
className:
|
|
1122
|
+
height: o = 260,
|
|
1123
|
+
legend: f = !0,
|
|
1124
|
+
formatValue: d,
|
|
1125
|
+
tooltip: u,
|
|
1126
|
+
className: c
|
|
1106
1127
|
}, b) => {
|
|
1107
|
-
const
|
|
1108
|
-
label: `${
|
|
1109
|
-
color:
|
|
1128
|
+
const g = d ?? k, h = t.reduce((x, y) => x + (typeof y[r] == "number" ? y[r] : 0), 0), N = (x, y) => ae(y), M = (x) => a && x !== a ? 0.3 : 1, [R, p] = C.useState(null), m = f ? t.map((x, y) => ({
|
|
1129
|
+
label: `${x[n]} · ${h ? Math.round(Number(x[r]) / h * 100) : 0}%`,
|
|
1130
|
+
color: N(String(x[n]), y)
|
|
1110
1131
|
})) : null;
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
/* @__PURE__ */ e(
|
|
1115
|
-
|
|
1116
|
-
|
|
1132
|
+
return /* @__PURE__ */ A("div", { ref: b, className: I("relative w-full font-sans", c), children: [
|
|
1133
|
+
m && /* @__PURE__ */ e(q, { items: m }),
|
|
1134
|
+
/* @__PURE__ */ A("div", { className: "relative", children: [
|
|
1135
|
+
/* @__PURE__ */ e(J, { width: "100%", height: o, children: /* @__PURE__ */ A(ke, { margin: { top: 8, right: 8, bottom: 8, left: 8 }, children: [
|
|
1136
|
+
u !== !1 && /* @__PURE__ */ e(
|
|
1137
|
+
j,
|
|
1117
1138
|
{
|
|
1118
1139
|
content: /* @__PURE__ */ e(
|
|
1119
|
-
|
|
1140
|
+
G,
|
|
1120
1141
|
{
|
|
1121
|
-
format:
|
|
1122
|
-
renderer:
|
|
1142
|
+
format: g,
|
|
1143
|
+
renderer: u
|
|
1123
1144
|
}
|
|
1124
1145
|
),
|
|
1125
1146
|
isAnimationActive: !1
|
|
1126
1147
|
}
|
|
1127
1148
|
),
|
|
1128
1149
|
/* @__PURE__ */ e(
|
|
1129
|
-
|
|
1150
|
+
je,
|
|
1130
1151
|
{
|
|
1131
1152
|
data: t,
|
|
1132
1153
|
dataKey: r,
|
|
@@ -1137,61 +1158,61 @@ const xt = C.forwardRef(
|
|
|
1137
1158
|
cornerRadius: i ? 4 : 2,
|
|
1138
1159
|
stroke: "none",
|
|
1139
1160
|
isAnimationActive: !1,
|
|
1140
|
-
onMouseEnter: (
|
|
1141
|
-
onMouseLeave: () =>
|
|
1142
|
-
children: t.map((
|
|
1143
|
-
|
|
1161
|
+
onMouseEnter: (x, y) => p(y),
|
|
1162
|
+
onMouseLeave: () => p(null),
|
|
1163
|
+
children: t.map((x, y) => /* @__PURE__ */ e(
|
|
1164
|
+
re,
|
|
1144
1165
|
{
|
|
1145
1166
|
role: "presentation",
|
|
1146
1167
|
"aria-hidden": "true",
|
|
1147
|
-
className:
|
|
1148
|
-
fill:
|
|
1149
|
-
fillOpacity: M(String(
|
|
1150
|
-
opacity:
|
|
1168
|
+
className: z,
|
|
1169
|
+
fill: N(String(x[n]), y),
|
|
1170
|
+
fillOpacity: M(String(x[n])),
|
|
1171
|
+
opacity: Y(y, R)
|
|
1151
1172
|
},
|
|
1152
|
-
String(
|
|
1173
|
+
String(x[n])
|
|
1153
1174
|
))
|
|
1154
1175
|
}
|
|
1155
1176
|
)
|
|
1156
1177
|
] }) }),
|
|
1157
|
-
i && /* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children:
|
|
1159
|
-
|
|
1178
|
+
i && /* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
1179
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: g(h) }),
|
|
1180
|
+
l && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: l })
|
|
1160
1181
|
] })
|
|
1161
1182
|
] })
|
|
1162
1183
|
] });
|
|
1163
1184
|
}
|
|
1164
1185
|
);
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1186
|
+
bt.displayName = "PieChart";
|
|
1187
|
+
const gt = C.forwardRef(
|
|
1167
1188
|
({
|
|
1168
1189
|
data: t,
|
|
1169
1190
|
categoryKey: n,
|
|
1170
1191
|
series: r,
|
|
1171
1192
|
seriesLabels: i,
|
|
1172
|
-
highlight:
|
|
1193
|
+
highlight: l,
|
|
1173
1194
|
maxValue: a,
|
|
1174
|
-
height:
|
|
1175
|
-
legend:
|
|
1176
|
-
formatValue:
|
|
1177
|
-
tooltip:
|
|
1178
|
-
className:
|
|
1195
|
+
height: o = 300,
|
|
1196
|
+
legend: f,
|
|
1197
|
+
formatValue: d,
|
|
1198
|
+
tooltip: u,
|
|
1199
|
+
className: c
|
|
1179
1200
|
}, b) => {
|
|
1180
|
-
const
|
|
1181
|
-
() => r ??
|
|
1201
|
+
const g = C.useMemo(
|
|
1202
|
+
() => r ?? $e(t, n),
|
|
1182
1203
|
[n, t, r]
|
|
1183
|
-
),
|
|
1204
|
+
), h = d ?? k, N = a ?? Math.max(
|
|
1184
1205
|
1,
|
|
1185
1206
|
...t.flatMap(
|
|
1186
|
-
(
|
|
1187
|
-
(
|
|
1207
|
+
(m) => g.map(
|
|
1208
|
+
(x) => typeof m[x] == "number" ? m[x] : 0
|
|
1188
1209
|
)
|
|
1189
1210
|
)
|
|
1190
|
-
), M = (
|
|
1191
|
-
return /* @__PURE__ */
|
|
1192
|
-
|
|
1193
|
-
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(
|
|
1194
|
-
|
|
1211
|
+
), M = (m) => (i == null ? void 0 : i[m]) ?? m, R = (m, x) => l && g.includes(l) ? m === l ? "var(--color-chart-1)" : ie : ae(x), p = f ?? g.length > 1 ? g.map((m, x) => ({ label: M(m), color: R(m, x) })) : null;
|
|
1212
|
+
return /* @__PURE__ */ A("div", { ref: b, className: I("relative w-full font-sans", c), children: [
|
|
1213
|
+
p && /* @__PURE__ */ e(q, { items: p, align: "center" }),
|
|
1214
|
+
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(J, { width: "100%", height: o, children: /* @__PURE__ */ A(
|
|
1215
|
+
Ge,
|
|
1195
1216
|
{
|
|
1196
1217
|
data: t,
|
|
1197
1218
|
cx: "50%",
|
|
@@ -1199,50 +1220,50 @@ const vt = C.forwardRef(
|
|
|
1199
1220
|
outerRadius: "68%",
|
|
1200
1221
|
margin: { top: 10, right: 56, bottom: 16, left: 56 },
|
|
1201
1222
|
children: [
|
|
1202
|
-
/* @__PURE__ */ e(
|
|
1223
|
+
/* @__PURE__ */ e(Pe, { stroke: "var(--border)", radialLines: !0 }),
|
|
1203
1224
|
/* @__PURE__ */ e(
|
|
1204
|
-
|
|
1225
|
+
Ce,
|
|
1205
1226
|
{
|
|
1206
1227
|
dataKey: n,
|
|
1207
1228
|
tick: { fill: "var(--text-secondary)", fontSize: "var(--text-s)", fontWeight: 500 }
|
|
1208
1229
|
}
|
|
1209
1230
|
),
|
|
1210
1231
|
/* @__PURE__ */ e(
|
|
1211
|
-
|
|
1232
|
+
We,
|
|
1212
1233
|
{
|
|
1213
1234
|
angle: 90,
|
|
1214
|
-
domain: [0,
|
|
1235
|
+
domain: [0, N],
|
|
1215
1236
|
tick: !1,
|
|
1216
1237
|
axisLine: !1,
|
|
1217
1238
|
tickLine: !1
|
|
1218
1239
|
}
|
|
1219
1240
|
),
|
|
1220
|
-
|
|
1221
|
-
|
|
1241
|
+
u !== !1 && /* @__PURE__ */ e(
|
|
1242
|
+
j,
|
|
1222
1243
|
{
|
|
1223
1244
|
content: /* @__PURE__ */ e(
|
|
1224
|
-
|
|
1245
|
+
G,
|
|
1225
1246
|
{
|
|
1226
|
-
format:
|
|
1227
|
-
renderer:
|
|
1247
|
+
format: h,
|
|
1248
|
+
renderer: u
|
|
1228
1249
|
}
|
|
1229
1250
|
),
|
|
1230
1251
|
isAnimationActive: !1
|
|
1231
1252
|
}
|
|
1232
1253
|
),
|
|
1233
|
-
|
|
1234
|
-
|
|
1254
|
+
g.map((m, x) => /* @__PURE__ */ e(
|
|
1255
|
+
Ue,
|
|
1235
1256
|
{
|
|
1236
|
-
dataKey:
|
|
1237
|
-
name: M(
|
|
1238
|
-
stroke:
|
|
1239
|
-
fill:
|
|
1240
|
-
fillOpacity:
|
|
1241
|
-
strokeWidth:
|
|
1242
|
-
dot: /* @__PURE__ */ e(U, { color:
|
|
1257
|
+
dataKey: m,
|
|
1258
|
+
name: M(m),
|
|
1259
|
+
stroke: R(m, x),
|
|
1260
|
+
fill: R(m, x),
|
|
1261
|
+
fillOpacity: l ? m === l ? 0.16 : 0.05 : 0.1,
|
|
1262
|
+
strokeWidth: le,
|
|
1263
|
+
dot: /* @__PURE__ */ e(U, { color: R(m, x) }),
|
|
1243
1264
|
isAnimationActive: !1
|
|
1244
1265
|
},
|
|
1245
|
-
|
|
1266
|
+
m
|
|
1246
1267
|
))
|
|
1247
1268
|
]
|
|
1248
1269
|
}
|
|
@@ -1250,106 +1271,106 @@ const vt = C.forwardRef(
|
|
|
1250
1271
|
] });
|
|
1251
1272
|
}
|
|
1252
1273
|
);
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1274
|
+
gt.displayName = "RadarChart";
|
|
1275
|
+
const pt = C.forwardRef(
|
|
1255
1276
|
({
|
|
1256
1277
|
data: t,
|
|
1257
1278
|
nameKey: n,
|
|
1258
1279
|
valueKey: r,
|
|
1259
1280
|
maxValue: i = 100,
|
|
1260
|
-
centerLabel:
|
|
1281
|
+
centerLabel: l,
|
|
1261
1282
|
height: a = P,
|
|
1262
|
-
legend:
|
|
1263
|
-
formatValue:
|
|
1264
|
-
tooltip:
|
|
1265
|
-
className:
|
|
1266
|
-
},
|
|
1267
|
-
const b =
|
|
1268
|
-
...
|
|
1269
|
-
name: String(
|
|
1270
|
-
fill:
|
|
1271
|
-
})), M =
|
|
1272
|
-
(
|
|
1283
|
+
legend: o = !0,
|
|
1284
|
+
formatValue: f,
|
|
1285
|
+
tooltip: d,
|
|
1286
|
+
className: u
|
|
1287
|
+
}, c) => {
|
|
1288
|
+
const b = f ?? k, [g, h] = C.useState(null), N = t.map((p, m) => ({
|
|
1289
|
+
...p,
|
|
1290
|
+
name: String(p[n]),
|
|
1291
|
+
fill: de(m)
|
|
1292
|
+
})), M = N.length ? N.reduce(
|
|
1293
|
+
(p, m) => p + (typeof m[r] == "number" ? m[r] : 0),
|
|
1273
1294
|
0
|
|
1274
|
-
) /
|
|
1275
|
-
label: String(
|
|
1276
|
-
color:
|
|
1295
|
+
) / N.length : 0, R = o ? N.map((p, m) => ({
|
|
1296
|
+
label: String(p[n]),
|
|
1297
|
+
color: de(m)
|
|
1277
1298
|
})) : null;
|
|
1278
|
-
return /* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */ e(
|
|
1281
|
-
|
|
1299
|
+
return /* @__PURE__ */ A("div", { ref: c, className: I("relative w-full font-sans", u), children: [
|
|
1300
|
+
/* @__PURE__ */ A("div", { className: "relative mx-auto w-full max-w-[420px]", children: [
|
|
1301
|
+
/* @__PURE__ */ e(J, { width: "100%", height: a, children: /* @__PURE__ */ A(
|
|
1302
|
+
Ve,
|
|
1282
1303
|
{
|
|
1283
|
-
data:
|
|
1304
|
+
data: N,
|
|
1284
1305
|
innerRadius: "48%",
|
|
1285
1306
|
outerRadius: "82%",
|
|
1286
1307
|
startAngle: 90,
|
|
1287
1308
|
endAngle: -270,
|
|
1288
1309
|
margin: { top: 6, right: 6, bottom: 6, left: 6 },
|
|
1289
1310
|
children: [
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1291
|
-
|
|
1292
|
-
|
|
1311
|
+
/* @__PURE__ */ e(Ce, { type: "number", domain: [0, i], tick: !1 }),
|
|
1312
|
+
d !== !1 && /* @__PURE__ */ e(
|
|
1313
|
+
j,
|
|
1293
1314
|
{
|
|
1294
1315
|
content: /* @__PURE__ */ e(
|
|
1295
|
-
|
|
1316
|
+
G,
|
|
1296
1317
|
{
|
|
1297
1318
|
format: b,
|
|
1298
|
-
renderer:
|
|
1319
|
+
renderer: d
|
|
1299
1320
|
}
|
|
1300
1321
|
),
|
|
1301
1322
|
isAnimationActive: !1
|
|
1302
1323
|
}
|
|
1303
1324
|
),
|
|
1304
1325
|
/* @__PURE__ */ e(
|
|
1305
|
-
|
|
1326
|
+
Ye,
|
|
1306
1327
|
{
|
|
1307
1328
|
dataKey: r,
|
|
1308
1329
|
background: { fill: "var(--muted)" },
|
|
1309
1330
|
cornerRadius: 999,
|
|
1310
1331
|
maxBarSize: 18,
|
|
1311
1332
|
isAnimationActive: !1,
|
|
1312
|
-
onMouseEnter: (
|
|
1313
|
-
onMouseLeave: () =>
|
|
1314
|
-
children:
|
|
1315
|
-
|
|
1333
|
+
onMouseEnter: (p, m) => h(m),
|
|
1334
|
+
onMouseLeave: () => h(null),
|
|
1335
|
+
children: N.map((p, m) => /* @__PURE__ */ e(
|
|
1336
|
+
re,
|
|
1316
1337
|
{
|
|
1317
|
-
fill:
|
|
1318
|
-
className:
|
|
1319
|
-
opacity:
|
|
1338
|
+
fill: p.fill,
|
|
1339
|
+
className: z,
|
|
1340
|
+
opacity: Y(m, g)
|
|
1320
1341
|
},
|
|
1321
|
-
`${
|
|
1342
|
+
`${p.name}-${m}`
|
|
1322
1343
|
))
|
|
1323
1344
|
}
|
|
1324
1345
|
)
|
|
1325
1346
|
]
|
|
1326
1347
|
}
|
|
1327
1348
|
) }),
|
|
1328
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
1329
1350
|
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: b(Math.round(M)) }),
|
|
1330
|
-
|
|
1351
|
+
l && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: l })
|
|
1331
1352
|
] })
|
|
1332
1353
|
] }),
|
|
1333
|
-
|
|
1354
|
+
R && /* @__PURE__ */ e(q, { items: R, align: "center", className: "mb-0 mt-3" })
|
|
1334
1355
|
] });
|
|
1335
1356
|
}
|
|
1336
1357
|
);
|
|
1337
|
-
|
|
1338
|
-
function
|
|
1358
|
+
pt.displayName = "RadialBarChart";
|
|
1359
|
+
function Nt({
|
|
1339
1360
|
x: t = 0,
|
|
1340
1361
|
y: n = 0,
|
|
1341
1362
|
width: r = 0,
|
|
1342
1363
|
height: i = 0,
|
|
1343
|
-
depth:
|
|
1364
|
+
depth: l = 0,
|
|
1344
1365
|
index: a = 0,
|
|
1345
|
-
name:
|
|
1346
|
-
value:
|
|
1347
|
-
format:
|
|
1348
|
-
activeIndex:
|
|
1366
|
+
name: o,
|
|
1367
|
+
value: f,
|
|
1368
|
+
format: d = k,
|
|
1369
|
+
activeIndex: u = null
|
|
1349
1370
|
}) {
|
|
1350
|
-
if (
|
|
1351
|
-
const
|
|
1352
|
-
return /* @__PURE__ */
|
|
1371
|
+
if (l === 0) return /* @__PURE__ */ e("g", {});
|
|
1372
|
+
const c = l === 0 ? "transparent" : de(a), b = l > 0 && a < 4, g = r > 72 && i > 38;
|
|
1373
|
+
return /* @__PURE__ */ A("g", { className: z, opacity: Y(a, u), children: [
|
|
1353
1374
|
/* @__PURE__ */ e(
|
|
1354
1375
|
"rect",
|
|
1355
1376
|
{
|
|
@@ -1359,12 +1380,12 @@ function gt({
|
|
|
1359
1380
|
height: i,
|
|
1360
1381
|
rx: 6,
|
|
1361
1382
|
ry: 6,
|
|
1362
|
-
fill:
|
|
1383
|
+
fill: c,
|
|
1363
1384
|
stroke: "var(--background)",
|
|
1364
1385
|
strokeWidth: 4
|
|
1365
1386
|
}
|
|
1366
1387
|
),
|
|
1367
|
-
|
|
1388
|
+
g && /* @__PURE__ */ e(
|
|
1368
1389
|
"foreignObject",
|
|
1369
1390
|
{
|
|
1370
1391
|
x: t + 8,
|
|
@@ -1372,25 +1393,25 @@ function gt({
|
|
|
1372
1393
|
width: Math.max(0, r - 16),
|
|
1373
1394
|
height: Math.max(0, i - 16),
|
|
1374
1395
|
className: "pointer-events-none overflow-hidden",
|
|
1375
|
-
children: /* @__PURE__ */
|
|
1396
|
+
children: /* @__PURE__ */ A("div", { className: "flex h-full flex-col justify-between", children: [
|
|
1376
1397
|
/* @__PURE__ */ e(
|
|
1377
1398
|
"p",
|
|
1378
1399
|
{
|
|
1379
|
-
className:
|
|
1400
|
+
className: I(
|
|
1380
1401
|
"truncate text-xs font-medium",
|
|
1381
1402
|
b ? "text-background" : "text-foreground"
|
|
1382
1403
|
),
|
|
1383
|
-
children:
|
|
1404
|
+
children: o
|
|
1384
1405
|
}
|
|
1385
1406
|
),
|
|
1386
|
-
typeof
|
|
1407
|
+
typeof f == "number" && i > 58 && /* @__PURE__ */ e(
|
|
1387
1408
|
"p",
|
|
1388
1409
|
{
|
|
1389
|
-
className:
|
|
1410
|
+
className: I(
|
|
1390
1411
|
"text-xs tabular-nums",
|
|
1391
1412
|
b ? "text-background/70" : "text-tertiary"
|
|
1392
1413
|
),
|
|
1393
|
-
children:
|
|
1414
|
+
children: d(f)
|
|
1394
1415
|
}
|
|
1395
1416
|
)
|
|
1396
1417
|
] })
|
|
@@ -1398,11 +1419,11 @@ function gt({
|
|
|
1398
1419
|
)
|
|
1399
1420
|
] });
|
|
1400
1421
|
}
|
|
1401
|
-
function
|
|
1402
|
-
const i = [],
|
|
1403
|
-
const
|
|
1404
|
-
if (
|
|
1405
|
-
|
|
1422
|
+
function wt(t, n, r) {
|
|
1423
|
+
const i = [], l = (a) => {
|
|
1424
|
+
const o = Array.isArray(a.children) ? a.children : void 0;
|
|
1425
|
+
if (o != null && o.length) {
|
|
1426
|
+
o.forEach(l);
|
|
1406
1427
|
return;
|
|
1407
1428
|
}
|
|
1408
1429
|
typeof a[r] == "number" && i.push({
|
|
@@ -1411,41 +1432,41 @@ function pt(t, n, r) {
|
|
|
1411
1432
|
value: a[r]
|
|
1412
1433
|
});
|
|
1413
1434
|
};
|
|
1414
|
-
return t.forEach(
|
|
1435
|
+
return t.forEach(l), i.length ? i : t;
|
|
1415
1436
|
}
|
|
1416
|
-
const
|
|
1437
|
+
const At = C.forwardRef(
|
|
1417
1438
|
({
|
|
1418
1439
|
data: t,
|
|
1419
1440
|
nameKey: n,
|
|
1420
1441
|
valueKey: r,
|
|
1421
1442
|
height: i = P,
|
|
1422
|
-
formatValue:
|
|
1443
|
+
formatValue: l,
|
|
1423
1444
|
tooltip: a,
|
|
1424
|
-
className:
|
|
1425
|
-
},
|
|
1426
|
-
const
|
|
1427
|
-
() =>
|
|
1445
|
+
className: o
|
|
1446
|
+
}, f) => {
|
|
1447
|
+
const d = l ?? k, u = C.useMemo(
|
|
1448
|
+
() => wt(t, n, r),
|
|
1428
1449
|
[t, n, r]
|
|
1429
|
-
), [
|
|
1430
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
1431
|
-
|
|
1450
|
+
), [c, b] = C.useState(null);
|
|
1451
|
+
return /* @__PURE__ */ e("div", { ref: f, className: I("relative w-full font-sans", o), children: /* @__PURE__ */ e(J, { width: "100%", height: i, children: /* @__PURE__ */ e(
|
|
1452
|
+
Xe,
|
|
1432
1453
|
{
|
|
1433
|
-
data:
|
|
1454
|
+
data: u,
|
|
1434
1455
|
nameKey: n,
|
|
1435
1456
|
dataKey: r,
|
|
1436
1457
|
type: "flat",
|
|
1437
1458
|
aspectRatio: 1.6,
|
|
1438
|
-
content: /* @__PURE__ */ e(
|
|
1459
|
+
content: /* @__PURE__ */ e(Nt, { format: d, activeIndex: c }),
|
|
1439
1460
|
isAnimationActive: !1,
|
|
1440
|
-
onMouseEnter: (
|
|
1461
|
+
onMouseEnter: (g) => b(g.depth ? g.index ?? null : null),
|
|
1441
1462
|
onMouseLeave: () => b(null),
|
|
1442
1463
|
children: a !== !1 && /* @__PURE__ */ e(
|
|
1443
|
-
|
|
1464
|
+
j,
|
|
1444
1465
|
{
|
|
1445
1466
|
content: /* @__PURE__ */ e(
|
|
1446
|
-
|
|
1467
|
+
G,
|
|
1447
1468
|
{
|
|
1448
|
-
format:
|
|
1469
|
+
format: d,
|
|
1449
1470
|
renderer: a
|
|
1450
1471
|
}
|
|
1451
1472
|
),
|
|
@@ -1456,92 +1477,92 @@ const Nt = C.forwardRef(
|
|
|
1456
1477
|
) }) });
|
|
1457
1478
|
}
|
|
1458
1479
|
);
|
|
1459
|
-
|
|
1460
|
-
const
|
|
1461
|
-
const a = Math.min(
|
|
1480
|
+
At.displayName = "TreemapChart";
|
|
1481
|
+
const se = "var(--color-chart-1)", Ct = "var(--chart-track)", te = 24, Mt = 44, ve = 0.55, be = 4, ge = (t, n, r, i, l) => {
|
|
1482
|
+
const a = Math.min(l, r / 2, i);
|
|
1462
1483
|
return `M ${t},${n + i} L ${t},${n + a} Q ${t},${n} ${t + a},${n} L ${t + r - a},${n} Q ${t + r},${n} ${t + r},${n + a} L ${t + r},${n + i} Z`;
|
|
1463
1484
|
};
|
|
1464
|
-
function
|
|
1485
|
+
function St() {
|
|
1465
1486
|
const t = C.useRef(null), [n, r] = C.useState(0);
|
|
1466
1487
|
return C.useLayoutEffect(() => {
|
|
1467
1488
|
const i = t.current;
|
|
1468
1489
|
if (!i) return;
|
|
1469
1490
|
r(i.getBoundingClientRect().width);
|
|
1470
|
-
const
|
|
1471
|
-
var
|
|
1472
|
-
const
|
|
1473
|
-
r((
|
|
1491
|
+
const l = new ResizeObserver((a) => {
|
|
1492
|
+
var f;
|
|
1493
|
+
const o = ((f = a[0]) == null ? void 0 : f.contentRect.width) ?? 0;
|
|
1494
|
+
r((d) => Math.abs(d - o) > 0.5 ? o : d);
|
|
1474
1495
|
});
|
|
1475
|
-
return
|
|
1496
|
+
return l.observe(i), () => l.disconnect();
|
|
1476
1497
|
}, []), { ref: t, width: n };
|
|
1477
1498
|
}
|
|
1478
|
-
const
|
|
1499
|
+
const Rt = C.forwardRef(
|
|
1479
1500
|
({
|
|
1480
1501
|
data: t,
|
|
1481
1502
|
nameKey: n,
|
|
1482
1503
|
valueKey: r,
|
|
1483
1504
|
height: i = P,
|
|
1484
|
-
formatValue:
|
|
1505
|
+
formatValue: l,
|
|
1485
1506
|
label: a,
|
|
1486
|
-
tooltip:
|
|
1487
|
-
className:
|
|
1488
|
-
},
|
|
1489
|
-
var
|
|
1490
|
-
const
|
|
1491
|
-
var
|
|
1492
|
-
const
|
|
1507
|
+
tooltip: o,
|
|
1508
|
+
className: f
|
|
1509
|
+
}, d) => {
|
|
1510
|
+
var $;
|
|
1511
|
+
const u = l ?? k, { ref: c, width: b } = St(), [g, h] = C.useState(null), N = Number((($ = t[0]) == null ? void 0 : $[r]) ?? 0), M = t.length, R = Math.max(0, i - te - Mt), p = te + R, m = M > 0 ? b / (M + (M - 1) * ve) : 0, x = m * ve, y = t.map((s, O) => {
|
|
1512
|
+
var E;
|
|
1513
|
+
const w = Number(s[r]), F = Number(((E = t[O - 1]) == null ? void 0 : E[r]) ?? w), T = N ? w / N * 100 : 0, D = F ? w / F * 100 : 0, _ = N && w > 0 ? Math.max(2, w / N * R) : 0;
|
|
1493
1514
|
return {
|
|
1494
1515
|
datum: s,
|
|
1495
1516
|
index: O,
|
|
1496
1517
|
name: String(s[n]),
|
|
1497
|
-
value:
|
|
1498
|
-
conversionFromFirst:
|
|
1499
|
-
conversionFromPrevious:
|
|
1500
|
-
dropOffFromPrevious: O === 0 ? 0 : 100 -
|
|
1501
|
-
x: O * (
|
|
1502
|
-
y:
|
|
1503
|
-
width:
|
|
1504
|
-
height:
|
|
1505
|
-
formatValue:
|
|
1518
|
+
value: w,
|
|
1519
|
+
conversionFromFirst: T,
|
|
1520
|
+
conversionFromPrevious: D,
|
|
1521
|
+
dropOffFromPrevious: O === 0 ? 0 : 100 - D,
|
|
1522
|
+
x: O * (m + x),
|
|
1523
|
+
y: p - _,
|
|
1524
|
+
width: m,
|
|
1525
|
+
height: _,
|
|
1526
|
+
formatValue: u
|
|
1506
1527
|
};
|
|
1507
|
-
}),
|
|
1508
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
1509
|
-
b > 0 && M > 0 && /* @__PURE__ */
|
|
1510
|
-
|
|
1511
|
-
const O =
|
|
1528
|
+
}), L = g != null ? y[g] : void 0;
|
|
1529
|
+
return /* @__PURE__ */ e("div", { ref: d, className: I("relative w-full font-sans", f), children: /* @__PURE__ */ A("div", { ref: c, className: "relative w-full", style: { height: i }, children: [
|
|
1530
|
+
b > 0 && M > 0 && /* @__PURE__ */ A("svg", { width: b, height: i, className: "block", children: [
|
|
1531
|
+
y.slice(1).map((s) => {
|
|
1532
|
+
const O = y[s.index - 1];
|
|
1512
1533
|
return /* @__PURE__ */ e(
|
|
1513
1534
|
"path",
|
|
1514
1535
|
{
|
|
1515
|
-
d: `M ${O.x + O.width},${O.y} L ${s.x},${s.y} L ${s.x},${
|
|
1516
|
-
fill:
|
|
1536
|
+
d: `M ${O.x + O.width},${O.y} L ${s.x},${s.y} L ${s.x},${p} L ${O.x + O.width},${p} Z`,
|
|
1537
|
+
fill: se,
|
|
1517
1538
|
opacity: 0.14
|
|
1518
1539
|
},
|
|
1519
1540
|
`connector-${s.index}`
|
|
1520
1541
|
);
|
|
1521
1542
|
}),
|
|
1522
|
-
|
|
1543
|
+
y.map((s) => /* @__PURE__ */ A(
|
|
1523
1544
|
"g",
|
|
1524
1545
|
{
|
|
1525
1546
|
role: "img",
|
|
1526
|
-
"aria-label": `${s.name}: ${
|
|
1547
|
+
"aria-label": `${s.name}: ${u(s.value)} (${Math.round(s.conversionFromFirst)}% of ${y[0].name})`,
|
|
1527
1548
|
children: [
|
|
1528
1549
|
/* @__PURE__ */ e(
|
|
1529
1550
|
"path",
|
|
1530
1551
|
{
|
|
1531
|
-
d:
|
|
1532
|
-
fill:
|
|
1552
|
+
d: ge(s.x, te, s.width, R, be),
|
|
1553
|
+
fill: Ct
|
|
1533
1554
|
}
|
|
1534
1555
|
),
|
|
1535
1556
|
s.height > 0 && /* @__PURE__ */ e(
|
|
1536
1557
|
"path",
|
|
1537
1558
|
{
|
|
1538
|
-
d:
|
|
1539
|
-
fill:
|
|
1540
|
-
className:
|
|
1541
|
-
opacity:
|
|
1559
|
+
d: ge(s.x, s.y, s.width, s.height, be),
|
|
1560
|
+
fill: se,
|
|
1561
|
+
className: z,
|
|
1562
|
+
opacity: Y(s.index, g)
|
|
1542
1563
|
}
|
|
1543
1564
|
),
|
|
1544
|
-
a !== !1 && (a ? a(s) : /* @__PURE__ */
|
|
1565
|
+
a !== !1 && (a ? a(s) : /* @__PURE__ */ A(
|
|
1545
1566
|
"text",
|
|
1546
1567
|
{
|
|
1547
1568
|
x: s.x,
|
|
@@ -1558,7 +1579,7 @@ const Mt = C.forwardRef(
|
|
|
1558
1579
|
"text",
|
|
1559
1580
|
{
|
|
1560
1581
|
x: s.x,
|
|
1561
|
-
y:
|
|
1582
|
+
y: p + 18,
|
|
1562
1583
|
textAnchor: "start",
|
|
1563
1584
|
className: "fill-primary text-xs font-normal",
|
|
1564
1585
|
children: s.name
|
|
@@ -1568,22 +1589,22 @@ const Mt = C.forwardRef(
|
|
|
1568
1589
|
"text",
|
|
1569
1590
|
{
|
|
1570
1591
|
x: s.x,
|
|
1571
|
-
y:
|
|
1592
|
+
y: p + 34,
|
|
1572
1593
|
textAnchor: "start",
|
|
1573
1594
|
className: "fill-tertiary text-xs tabular-nums",
|
|
1574
|
-
children:
|
|
1595
|
+
children: u(s.value)
|
|
1575
1596
|
}
|
|
1576
1597
|
),
|
|
1577
1598
|
/* @__PURE__ */ e(
|
|
1578
1599
|
"rect",
|
|
1579
1600
|
{
|
|
1580
1601
|
x: s.x,
|
|
1581
|
-
y:
|
|
1582
|
-
width: s.index === M - 1 ?
|
|
1583
|
-
height:
|
|
1602
|
+
y: te,
|
|
1603
|
+
width: s.index === M - 1 ? m : m + x,
|
|
1604
|
+
height: R,
|
|
1584
1605
|
fill: "transparent",
|
|
1585
|
-
onMouseEnter: () =>
|
|
1586
|
-
onMouseLeave: () =>
|
|
1606
|
+
onMouseEnter: () => h(s.index),
|
|
1607
|
+
onMouseLeave: () => h(null)
|
|
1587
1608
|
}
|
|
1588
1609
|
)
|
|
1589
1610
|
]
|
|
@@ -1591,34 +1612,34 @@ const Mt = C.forwardRef(
|
|
|
1591
1612
|
`${s.name}-${s.index}`
|
|
1592
1613
|
))
|
|
1593
1614
|
] }),
|
|
1594
|
-
|
|
1615
|
+
o !== !1 && L && /* @__PURE__ */ e(
|
|
1595
1616
|
"div",
|
|
1596
1617
|
{
|
|
1597
1618
|
className: "pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full",
|
|
1598
|
-
style: { left:
|
|
1599
|
-
children:
|
|
1619
|
+
style: { left: L.x + L.width / 2, top: L.y - 10 },
|
|
1620
|
+
children: o ? o({
|
|
1600
1621
|
active: !0,
|
|
1601
|
-
label:
|
|
1622
|
+
label: L.name,
|
|
1602
1623
|
items: [
|
|
1603
1624
|
{
|
|
1604
|
-
key:
|
|
1605
|
-
name:
|
|
1606
|
-
value:
|
|
1607
|
-
color:
|
|
1608
|
-
datum:
|
|
1625
|
+
key: L.name,
|
|
1626
|
+
name: L.name,
|
|
1627
|
+
value: L.value,
|
|
1628
|
+
color: se,
|
|
1629
|
+
datum: L.datum
|
|
1609
1630
|
}
|
|
1610
1631
|
],
|
|
1611
|
-
formatValue:
|
|
1612
|
-
}) : /* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children:
|
|
1614
|
-
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children:
|
|
1615
|
-
/* @__PURE__ */
|
|
1616
|
-
Math.round(
|
|
1632
|
+
formatValue: u
|
|
1633
|
+
}) : /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs whitespace-nowrap text-background", children: [
|
|
1634
|
+
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children: L.name }),
|
|
1635
|
+
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children: u(L.value) }),
|
|
1636
|
+
/* @__PURE__ */ A("div", { className: "text-background/70 tabular-nums", children: [
|
|
1637
|
+
Math.round(L.conversionFromFirst),
|
|
1617
1638
|
"% of ",
|
|
1618
|
-
|
|
1619
|
-
|
|
1639
|
+
y[0].name,
|
|
1640
|
+
L.index > 0 && /* @__PURE__ */ A(ce, { children: [
|
|
1620
1641
|
" · −",
|
|
1621
|
-
Math.round(
|
|
1642
|
+
Math.round(L.dropOffFromPrevious),
|
|
1622
1643
|
"% step"
|
|
1623
1644
|
] })
|
|
1624
1645
|
] })
|
|
@@ -1628,18 +1649,18 @@ const Mt = C.forwardRef(
|
|
|
1628
1649
|
] }) });
|
|
1629
1650
|
}
|
|
1630
1651
|
);
|
|
1631
|
-
|
|
1652
|
+
Rt.displayName = "FunnelChart";
|
|
1632
1653
|
export {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1654
|
+
ft as AreaChart,
|
|
1655
|
+
ht as BarChart,
|
|
1656
|
+
De as ComboChart,
|
|
1657
|
+
xt as ComposedChart,
|
|
1658
|
+
Rt as FunnelChart,
|
|
1659
|
+
mt as LineChart,
|
|
1639
1660
|
P as MIN_HEIGHT,
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1661
|
+
bt as PieChart,
|
|
1662
|
+
gt as RadarChart,
|
|
1663
|
+
pt as RadialBarChart,
|
|
1664
|
+
vt as ScatterChart,
|
|
1665
|
+
At as TreemapChart
|
|
1645
1666
|
};
|