@acronis-platform/ui-react 5.4.1 → 5.4.2
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/dist/components/ui/area-chart/area-chart.js +107 -105
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +135 -132
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/chart/chart-format.js +36 -31
- package/dist/components/ui/chart/chart-format.js.map +1 -1
- package/dist/components/ui/chart/chart.js +9 -7
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/chart/use-x-axis-layout.js +71 -0
- package/dist/components/ui/chart/use-x-axis-layout.js.map +1 -0
- package/dist/components/ui/composed-chart/composed-chart.js +141 -139
- package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
- package/dist/components/ui/confidence-cone/confidence-cone.js +70 -67
- package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
- package/dist/components/ui/histogram/histogram.js +54 -51
- package/dist/components/ui/histogram/histogram.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +119 -117
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/scatter-chart/scatter-chart.js +53 -51
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/llms/area-chart.md +10 -1
- package/dist/llms/bar-chart.md +10 -1
- package/dist/llms/composed-chart.md +10 -1
- package/dist/llms/confidence-cone.md +10 -1
- package/dist/llms/histogram.md +10 -1
- package/dist/llms/line-chart.md +10 -1
- package/dist/llms/scatter-chart.md +10 -1
- package/dist/llms.txt +1 -1
- package/dist/src/components/ui/chart/chart-format.d.ts +10 -4
- package/dist/src/components/ui/chart/chart.d.ts +1 -1
- package/dist/src/components/ui/chart/use-x-axis-layout.d.ts +28 -0
- package/dist/ui-react.css +1 -1
- package/package.json +2 -2
|
@@ -3,13 +3,14 @@ import { cn as e } from "../../../lib/utils.js";
|
|
|
3
3
|
import { cva as t } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
4
4
|
import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../tooltip/tooltip.js";
|
|
5
5
|
import { ChartContainer as a, ChartLegend as o, ChartLegendContent as s, ChartTooltip as c, ChartTooltipContent as l, resolveChartColors as u, toCssKey as d } from "../chart/chart.js";
|
|
6
|
-
import { resolveAnimation as f, resolveAxisDomain as p, resolveBrushProps as m, resolveCartesianLabelPosition as h, resolveCategoryRange as g, resolveChartReferenceValue as _, resolveLabelFillClass as v, resolveReferenceLineProps as ee, resolveRotatedTickAnchor as te,
|
|
6
|
+
import { resolveAnimation as f, resolveAxisDomain as p, resolveBrushProps as m, resolveCartesianLabelPosition as h, resolveCategoryRange as g, resolveChartReferenceValue as _, resolveLabelFillClass as v, resolveReferenceLineProps as ee, resolveRotatedTickAnchor as te, resolveXAxisTickLabels as ne, resolveXAxisTitle as re, resolveYAxisTitle as ie, toLabelFormatter as ae, toReferenceLineList as oe } from "../chart/chart-format.js";
|
|
7
|
+
import { mergeXAxisLayoutMargin as se, useXAxisLayout as ce } from "../chart/use-x-axis-layout.js";
|
|
7
8
|
import * as y from "react";
|
|
8
9
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
9
|
-
import { Bar as C, BarChart as
|
|
10
|
+
import { Bar as C, BarChart as le, Brush as ue, CartesianGrid as de, Cell as w, LabelList as fe, Rectangle as T, ReferenceArea as pe, ReferenceLine as me, Text as he, XAxis as ge, YAxis as _e } from "recharts";
|
|
10
11
|
import { Meter as E } from "@base-ui/react/meter";
|
|
11
12
|
//#region src/components/ui/bar-chart/bar-chart.tsx
|
|
12
|
-
var
|
|
13
|
+
var D = t("", {
|
|
13
14
|
variants: {
|
|
14
15
|
orientation: {
|
|
15
16
|
vertical: "",
|
|
@@ -24,31 +25,31 @@ var ge = t("", {
|
|
|
24
25
|
orientation: "vertical",
|
|
25
26
|
layout: "grouped"
|
|
26
27
|
}
|
|
27
|
-
}),
|
|
28
|
-
function
|
|
29
|
-
let n = e?.filter((e) => !String(e.dataKey).startsWith(
|
|
28
|
+
}), O = "__headroom_";
|
|
29
|
+
function k(e, t) {
|
|
30
|
+
let n = e?.filter((e) => !String(e.dataKey).startsWith(O));
|
|
30
31
|
return t ? n?.slice().sort((e, n) => t.indexOf(String(e.dataKey)) - t.indexOf(String(n.dataKey))) : n;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function A(e) {
|
|
33
34
|
return e?.map((e) => e.color?.startsWith("url(") ? {
|
|
34
35
|
...e,
|
|
35
36
|
color: `var(--color-${d(String(e.dataKey))})`
|
|
36
37
|
} : e);
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function ve({ content: e, dataKeys: t, ...n }) {
|
|
39
40
|
let r = {
|
|
40
41
|
...n,
|
|
41
|
-
payload: k(
|
|
42
|
+
payload: A(k(n.payload, t))
|
|
42
43
|
};
|
|
43
44
|
return e ? typeof e == "function" ? y.createElement(e, r) : y.cloneElement(e, r) : /* @__PURE__ */ x(l, { ...r });
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function ye({ dataKeys: e, ...t }) {
|
|
46
47
|
return /* @__PURE__ */ x(s, {
|
|
47
48
|
verticalAlign: t.verticalAlign,
|
|
48
|
-
payload: k(
|
|
49
|
+
payload: A(k(t.payload, e))
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function j({ bar: e, track: t, trackFill: n, paint: r }) {
|
|
52
53
|
return /* @__PURE__ */ S(b, { children: [t && /* @__PURE__ */ x(T, {
|
|
53
54
|
className: "recharts-bar-background-rectangle",
|
|
54
55
|
x: t.x ?? void 0,
|
|
@@ -69,21 +70,21 @@ function M({ bar: e, track: t, trackFill: n, paint: r }) {
|
|
|
69
70
|
strokeDasharray: e.strokeDasharray
|
|
70
71
|
})] });
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
return ({ background: r, index: i, ...a }) =>
|
|
73
|
+
function M({ inRange: e, trackFill: t, paint: n }) {
|
|
74
|
+
return ({ background: r, index: i, ...a }) => j({
|
|
74
75
|
bar: a,
|
|
75
76
|
track: e(i) ? r : void 0,
|
|
76
77
|
trackFill: t,
|
|
77
78
|
paint: n
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function be({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }) {
|
|
81
82
|
return e ? {
|
|
82
|
-
shape:
|
|
83
|
+
shape: M({
|
|
83
84
|
inRange: t,
|
|
84
85
|
trackFill: n
|
|
85
86
|
}),
|
|
86
|
-
activeBar: r &&
|
|
87
|
+
activeBar: r && M({
|
|
87
88
|
inRange: t,
|
|
88
89
|
trackFill: n,
|
|
89
90
|
paint: r
|
|
@@ -93,7 +94,7 @@ function _e({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }
|
|
|
93
94
|
activeBar: r
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function xe(e) {
|
|
97
98
|
let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, fill: a, fillOpacity: o } = e;
|
|
98
99
|
return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(T, {
|
|
99
100
|
className: "recharts-reference-area-rect",
|
|
@@ -112,10 +113,10 @@ function P(e) {
|
|
|
112
113
|
strokeDasharray: "4 4"
|
|
113
114
|
})] });
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
-
if (e) return
|
|
116
|
+
function Se(e) {
|
|
117
|
+
if (e) return xe;
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
+
function Ce(e) {
|
|
119
120
|
return e ? {
|
|
120
121
|
value: e,
|
|
121
122
|
position: "insideTop",
|
|
@@ -123,7 +124,7 @@ function ye(e) {
|
|
|
123
124
|
fontSize: 12
|
|
124
125
|
} : void 0;
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function we({ id: e, dataKeys: t, shapes: n }) {
|
|
127
128
|
let r = n.has("gradient"), i = n.has("pattern");
|
|
128
129
|
return !r && !i ? null : /* @__PURE__ */ x("defs", { children: t.map((t) => /* @__PURE__ */ S(y.Fragment, { children: [r && /* @__PURE__ */ S("linearGradient", {
|
|
129
130
|
id: `${e}-gradient-${d(t)}`,
|
|
@@ -161,10 +162,10 @@ function be({ id: e, dataKeys: t, shapes: n }) {
|
|
|
161
162
|
})]
|
|
162
163
|
})] }, t)) });
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
+
function Te({ data: e, chartData: t, xKey: n, seriesKey: r, settings: i, range: a, headroomKey: o, barShape: s, rounded: c, fillOf: l, radiusFor: u }) {
|
|
165
166
|
let { fill: f, opacity: p, dashed: m } = i;
|
|
166
167
|
return e.map((e, h) => {
|
|
167
|
-
let g = h >= a[0] && h <= a[1], _ = g && i.shape || s, v = o !== void 0 && Number(t[h]?.[`${
|
|
168
|
+
let g = h >= a[0] && h <= a[1], _ = g && i.shape || s, v = o !== void 0 && Number(t[h]?.[`${O}${r}`]) > 0;
|
|
168
169
|
return /* @__PURE__ */ x(w, {
|
|
169
170
|
fill: g ? f ?? l(r, _) : l(r, s),
|
|
170
171
|
fillOpacity: g ? p : void 0,
|
|
@@ -175,8 +176,8 @@ function xe({ data: e, chartData: t, xKey: n, seriesKey: r, settings: i, range:
|
|
|
175
176
|
}, `${r}-${String(e[n])}-${h}`);
|
|
176
177
|
});
|
|
177
178
|
}
|
|
178
|
-
var
|
|
179
|
-
function
|
|
179
|
+
var N = (e) => e.toLocaleString();
|
|
180
|
+
function P({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip: c, tooltip: l }) {
|
|
180
181
|
let { label: u, value: d, forecast: f } = t, p = a, m = o > 0 ? Math.round(d / o * 100) : 0, h = f != null && f > d, g = /* @__PURE__ */ S(E.Root, {
|
|
181
182
|
value: d,
|
|
182
183
|
max: o,
|
|
@@ -244,7 +245,7 @@ function I({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip:
|
|
|
244
245
|
] })
|
|
245
246
|
})] }) : g;
|
|
246
247
|
}
|
|
247
|
-
var
|
|
248
|
+
var F = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = N, showTooltip: a = !0, tooltip: o, className: s, ...c }, l) => {
|
|
248
249
|
let d = n !== void 0 && n > 0 ? n : t.reduce((e, t) => e + t.value, 0) || 1, f = y.useMemo(() => {
|
|
249
250
|
if (!r) return null;
|
|
250
251
|
let e = Object.fromEntries(t.map((e, t) => [`item${t}`, {
|
|
@@ -258,7 +259,7 @@ var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, sho
|
|
|
258
259
|
"data-orientation": "horizontal",
|
|
259
260
|
className: e("flex flex-col gap-4", s),
|
|
260
261
|
...c,
|
|
261
|
-
children: t.map((e, t) => /* @__PURE__ */ x(
|
|
262
|
+
children: t.map((e, t) => /* @__PURE__ */ x(P, {
|
|
262
263
|
item: e,
|
|
263
264
|
resolvedColor: f ? f[t] ?? "" : e.color ?? "",
|
|
264
265
|
max: d,
|
|
@@ -268,135 +269,135 @@ var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, sho
|
|
|
268
269
|
}, `${t}-${e.label}`))
|
|
269
270
|
});
|
|
270
271
|
});
|
|
271
|
-
|
|
272
|
-
var
|
|
273
|
-
let r = y.useId().replace(/:/g, "");
|
|
272
|
+
F.displayName = "HorizontalBarLayout";
|
|
273
|
+
var I = y.forwardRef((t, n) => {
|
|
274
|
+
let r = y.useId().replace(/:/g, ""), i = y.useRef(null), s = t, l = s.xKey, u = ne(s.data && l ? s.data.map((e) => e[l]) : [], s.xTickFormatter), w = ce(i, s.xAxisAngle, s.xAxisLabel, u.join("\0"));
|
|
274
275
|
if (t.orientation === "horizontal") {
|
|
275
276
|
let { orientation: e, ...r } = t;
|
|
276
|
-
return /* @__PURE__ */ x(
|
|
277
|
+
return /* @__PURE__ */ x(F, {
|
|
277
278
|
...r,
|
|
278
279
|
ref: n
|
|
279
280
|
});
|
|
280
281
|
}
|
|
281
|
-
let { className:
|
|
282
|
-
animate:
|
|
283
|
-
animationDuration:
|
|
284
|
-
animationBegin:
|
|
285
|
-
animationEasing:
|
|
286
|
-
}), K =
|
|
287
|
-
labelPosition:
|
|
282
|
+
let { className: T, config: E, palette: k, data: A, dataKeys: j, xKey: M, referenceLine: xe, referenceArea: N, barSettings: P, xAxisLabel: I, yAxisLabel: Ee, yUnit: De, orientation: Oe = "vertical", layout: L = "grouped", barRadius: R = 8, barShape: z = "rounded", barSize: ke = 8, maxBarSize: Ae, barGap: je = 4, barCategoryGap: Me, minPointSize: B, showBackground: Ne = !1, backgroundFill: V = "var(--ui-background-surface-secondary)", showActiveBar: Pe = !1, activeBar: H, showGrid: Fe = !0, showTooltip: Ie = !0, showLegend: Le = !0, showXAxis: Re = !0, showYAxis: ze = !0, xTickFormatter: U, yTickFormatter: Be, xAxisAngle: W, xAxisInterval: Ve, yAxisTickCount: He, yAxisDomain: Ue, gridDashed: We = !0, gridHorizontal: Ge, gridVertical: Ke, tooltipContent: qe, animate: Je, animationDuration: Ye, animationBegin: Xe, animationEasing: Ze, showLabels: Qe = !1, labelPosition: $e, labelFormatter: et, showBrush: tt = !1, brushHeight: nt, brushAriaLabel: rt, ...it } = t, G = f({
|
|
283
|
+
animate: Je,
|
|
284
|
+
animationDuration: Ye,
|
|
285
|
+
animationBegin: Xe,
|
|
286
|
+
animationEasing: Ze
|
|
287
|
+
}), K = L === "stacked", q = h({
|
|
288
|
+
labelPosition: $e,
|
|
288
289
|
isStacked: K,
|
|
289
290
|
growingEnd: "top"
|
|
290
|
-
}),
|
|
291
|
+
}), at = oe(xe), J = (N ? Array.isArray(N) ? N : [N] : []).map((e) => ({
|
|
291
292
|
area: e,
|
|
292
|
-
range: g(e,
|
|
293
|
-
})).filter((e) => e.range !== void 0),
|
|
294
|
-
let t =
|
|
293
|
+
range: g(e, A, M)
|
|
294
|
+
})).filter((e) => e.range !== void 0), Y = new Map(j.flatMap((e) => {
|
|
295
|
+
let t = P?.[e], n = t ? g(t, A, M) : void 0;
|
|
295
296
|
return t && n ? [[e, {
|
|
296
297
|
settings: t,
|
|
297
298
|
range: n
|
|
298
299
|
}]] : [];
|
|
299
|
-
})),
|
|
300
|
+
})), X = new Map(K ? [] : Array.from(Y, ([e, t]) => typeof t.settings.background == "string" ? [e, t.settings.background] : void 0).filter((e) => e !== void 0)), Z = X.size ? A.map((e, t) => {
|
|
300
301
|
let n = {};
|
|
301
|
-
return
|
|
302
|
-
let a =
|
|
302
|
+
return X.forEach((r, i) => {
|
|
303
|
+
let a = Y.get(i);
|
|
303
304
|
if (!a) return;
|
|
304
305
|
let [o, s] = a.range;
|
|
305
306
|
if (t < o || t > s) return;
|
|
306
307
|
let c = e[i], l = e[r];
|
|
307
|
-
typeof c == "number" && typeof l == "number" && (n[`${
|
|
308
|
+
typeof c == "number" && typeof l == "number" && (n[`${O}${i}`] = Math.max(0, l - c));
|
|
308
309
|
}), {
|
|
309
310
|
...e,
|
|
310
311
|
...n
|
|
311
312
|
};
|
|
312
|
-
}) :
|
|
313
|
+
}) : A, ot = new Set(J.filter(({ area: e }) => e.highlightTicks !== !1).flatMap(({ range: e }) => A.slice(e[0], e[1] + 1).map((e) => e[M]))), st = ot.size ? ({ payload: t, index: n, ...r }) => {
|
|
313
314
|
let i = U ? U(t.value, n) : t.value;
|
|
314
|
-
return /* @__PURE__ */ x(
|
|
315
|
+
return /* @__PURE__ */ x(he, {
|
|
315
316
|
...r,
|
|
316
|
-
className: e("fill-muted-foreground",
|
|
317
|
+
className: e("fill-muted-foreground", ot.has(t.value) && "fill-primary italic"),
|
|
317
318
|
fontSize: 12,
|
|
318
319
|
children: i
|
|
319
320
|
});
|
|
320
|
-
} : void 0,
|
|
321
|
+
} : void 0, ct = Pe ? {
|
|
321
322
|
...H?.fill === void 0 ? {} : { fill: H.fill },
|
|
322
323
|
fillOpacity: H?.opacity ?? .85
|
|
323
|
-
} : !1, Q = `bar-${r}`,
|
|
324
|
-
|
|
325
|
-
e.shape &&
|
|
324
|
+
} : !1, Q = `bar-${r}`, lt = /* @__PURE__ */ new Set([z]);
|
|
325
|
+
Y.forEach(({ settings: e }) => {
|
|
326
|
+
e.shape && lt.add(e.shape);
|
|
326
327
|
});
|
|
327
|
-
let
|
|
328
|
-
let r = K ?
|
|
328
|
+
let ut = (e) => B === void 0 ? void 0 : (t, n) => {
|
|
329
|
+
let r = K ? Z[n]?.[e] : t;
|
|
329
330
|
return typeof r == "number" && r !== 0 ? B : 0;
|
|
330
|
-
},
|
|
331
|
+
}, dt = (e, t) => t === "gradient" ? `url(#${Q}-gradient-${d(e)})` : t === "pattern" ? `url(#${Q}-pattern-${d(e)})` : `var(--color-${d(e)})`, ft = re(I), pt = ie(Ee), mt = p(Ue), ht = [
|
|
331
332
|
R,
|
|
332
333
|
R,
|
|
333
334
|
0,
|
|
334
335
|
0
|
|
335
|
-
], $ = (e, t) => e === "pill" ? 9999 : R > 0 && t ?
|
|
336
|
-
content:
|
|
337
|
-
dataKeys:
|
|
338
|
-
}),
|
|
339
|
-
dataKey:
|
|
336
|
+
], $ = (e, t) => e === "pill" ? 9999 : R > 0 && t ? ht : void 0, gt = /* @__PURE__ */ x(ve, {
|
|
337
|
+
content: qe,
|
|
338
|
+
dataKeys: j
|
|
339
|
+
}), _t = /* @__PURE__ */ x(ye, { dataKeys: j }), vt = () => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ge, {
|
|
340
|
+
dataKey: M,
|
|
340
341
|
type: "category",
|
|
341
|
-
hide: !
|
|
342
|
+
hide: !Re,
|
|
342
343
|
tickLine: !1,
|
|
343
344
|
axisLine: !1,
|
|
344
|
-
tick:
|
|
345
|
+
tick: st,
|
|
345
346
|
tickFormatter: U,
|
|
346
347
|
angle: W,
|
|
347
|
-
interval:
|
|
348
|
+
interval: Ve,
|
|
348
349
|
textAnchor: te(W),
|
|
349
|
-
height:
|
|
350
|
-
label:
|
|
351
|
-
}), /* @__PURE__ */ x(
|
|
350
|
+
height: w.height,
|
|
351
|
+
label: ft
|
|
352
|
+
}), /* @__PURE__ */ x(_e, {
|
|
352
353
|
type: "number",
|
|
353
|
-
hide: !
|
|
354
|
+
hide: !ze,
|
|
354
355
|
tickLine: !1,
|
|
355
356
|
axisLine: !1,
|
|
356
|
-
unit:
|
|
357
|
-
tickFormatter:
|
|
358
|
-
tickCount:
|
|
359
|
-
domain:
|
|
360
|
-
width:
|
|
361
|
-
label:
|
|
362
|
-
})] }),
|
|
363
|
-
let n = !K || t ===
|
|
357
|
+
unit: De,
|
|
358
|
+
tickFormatter: Be,
|
|
359
|
+
tickCount: He,
|
|
360
|
+
domain: mt,
|
|
361
|
+
width: Ee ? 72 : void 0,
|
|
362
|
+
label: pt
|
|
363
|
+
})] }), yt = () => j.map((e, t) => {
|
|
364
|
+
let n = !K || t === j.length - 1, r = Y.get(e), i = (e) => r !== void 0 && e >= r.range[0] && e <= r.range[1], a = X.get(e), { shape: o, activeBar: s } = be({
|
|
364
365
|
rangeBackground: r?.settings.background === !0,
|
|
365
366
|
inRange: i,
|
|
366
367
|
trackFill: V,
|
|
367
|
-
activeBarOption:
|
|
368
|
-
}), c = r &&
|
|
369
|
-
data:
|
|
370
|
-
chartData:
|
|
371
|
-
xKey:
|
|
368
|
+
activeBarOption: ct
|
|
369
|
+
}), c = r && Te({
|
|
370
|
+
data: A,
|
|
371
|
+
chartData: Z,
|
|
372
|
+
xKey: M,
|
|
372
373
|
seriesKey: e,
|
|
373
374
|
settings: r.settings,
|
|
374
375
|
range: r.range,
|
|
375
376
|
headroomKey: a,
|
|
376
377
|
barShape: z,
|
|
377
378
|
rounded: n,
|
|
378
|
-
fillOf:
|
|
379
|
+
fillOf: dt,
|
|
379
380
|
radiusFor: $
|
|
380
|
-
}), l =
|
|
381
|
+
}), l = Qe && /* @__PURE__ */ x(fe, {
|
|
381
382
|
dataKey: e,
|
|
382
383
|
position: q,
|
|
383
|
-
formatter: ae(
|
|
384
|
+
formatter: ae(et),
|
|
384
385
|
className: v(q),
|
|
385
386
|
fontSize: 12
|
|
386
387
|
});
|
|
387
388
|
return /* @__PURE__ */ S(y.Fragment, { children: [/* @__PURE__ */ S(C, {
|
|
388
389
|
dataKey: e,
|
|
389
|
-
fill:
|
|
390
|
+
fill: dt(e, z),
|
|
390
391
|
stackId: K ? "a" : a ? e : void 0,
|
|
391
392
|
radius: $(z, n),
|
|
392
|
-
minPointSize:
|
|
393
|
-
background:
|
|
393
|
+
minPointSize: ut(e),
|
|
394
|
+
background: Ne ? { fill: V } : void 0,
|
|
394
395
|
shape: o,
|
|
395
396
|
activeBar: s,
|
|
396
397
|
...G,
|
|
397
398
|
children: [c, l]
|
|
398
399
|
}), a && /* @__PURE__ */ x(C, {
|
|
399
|
-
dataKey: `${
|
|
400
|
+
dataKey: `${O}${e}`,
|
|
400
401
|
stackId: e,
|
|
401
402
|
fill: `var(--color-${d(e)})`,
|
|
402
403
|
fillOpacity: .25,
|
|
@@ -405,67 +406,69 @@ var R = y.forwardRef((t, n) => {
|
|
|
405
406
|
tooltipType: "none",
|
|
406
407
|
...G
|
|
407
408
|
})] }, e);
|
|
408
|
-
}),
|
|
409
|
+
}), bt = () => J.map(({ area: e, range: t }, n) => {
|
|
409
410
|
let [r, i] = t;
|
|
410
|
-
return /* @__PURE__ */ x(
|
|
411
|
-
x1:
|
|
412
|
-
x2:
|
|
411
|
+
return /* @__PURE__ */ x(pe, {
|
|
412
|
+
x1: A[r]?.[M],
|
|
413
|
+
x2: A[i]?.[M],
|
|
413
414
|
fill: "var(--ui-background-surface-secondary)",
|
|
414
415
|
fillOpacity: .6,
|
|
415
416
|
ifOverflow: "extendDomain",
|
|
416
|
-
shape:
|
|
417
|
-
label:
|
|
417
|
+
shape: Se(e.divider),
|
|
418
|
+
label: Ce(e.label)
|
|
418
419
|
}, `${e.label ?? "area"}-${n}`);
|
|
419
|
-
}),
|
|
420
|
-
let n = _(e,
|
|
421
|
-
return n === void 0 ? null : /* @__PURE__ */ x(
|
|
420
|
+
}), xt = () => at.map((e, t) => {
|
|
421
|
+
let n = _(e, A, j);
|
|
422
|
+
return n === void 0 ? null : /* @__PURE__ */ x(me, {
|
|
422
423
|
y: n,
|
|
423
424
|
...ee(e.label, e.labelPosition ?? "insideTopRight")
|
|
424
425
|
}, `${e.label ?? "ref"}-${t}`);
|
|
425
426
|
});
|
|
426
427
|
return /* @__PURE__ */ x("div", {
|
|
427
428
|
ref: n,
|
|
428
|
-
"data-orientation":
|
|
429
|
-
"data-layout":
|
|
430
|
-
className: e(
|
|
431
|
-
orientation:
|
|
432
|
-
layout:
|
|
433
|
-
}),
|
|
434
|
-
...
|
|
429
|
+
"data-orientation": Oe,
|
|
430
|
+
"data-layout": L,
|
|
431
|
+
className: e(D({
|
|
432
|
+
orientation: Oe,
|
|
433
|
+
layout: L
|
|
434
|
+
}), T),
|
|
435
|
+
...it,
|
|
435
436
|
children: /* @__PURE__ */ x(a, {
|
|
436
|
-
|
|
437
|
-
|
|
437
|
+
ref: i,
|
|
438
|
+
config: E,
|
|
439
|
+
palette: k,
|
|
438
440
|
className: "size-full [&_.recharts-label]:fill-foreground",
|
|
439
|
-
children: /* @__PURE__ */ S(
|
|
440
|
-
data:
|
|
441
|
+
children: /* @__PURE__ */ S(le, {
|
|
442
|
+
data: Z,
|
|
441
443
|
layout: "horizontal",
|
|
442
|
-
barSize:
|
|
443
|
-
maxBarSize:
|
|
444
|
-
barGap:
|
|
445
|
-
barCategoryGap:
|
|
444
|
+
barSize: ke,
|
|
445
|
+
maxBarSize: Ae,
|
|
446
|
+
barGap: je,
|
|
447
|
+
barCategoryGap: Me,
|
|
448
|
+
margin: se(void 0, w.margin),
|
|
446
449
|
children: [
|
|
447
|
-
/* @__PURE__ */ x(
|
|
450
|
+
/* @__PURE__ */ x(we, {
|
|
448
451
|
id: Q,
|
|
449
|
-
dataKeys:
|
|
450
|
-
shapes:
|
|
452
|
+
dataKeys: j,
|
|
453
|
+
shapes: lt
|
|
451
454
|
}),
|
|
452
|
-
|
|
453
|
-
horizontal:
|
|
454
|
-
vertical:
|
|
455
|
-
strokeDasharray:
|
|
455
|
+
Fe && /* @__PURE__ */ x(de, {
|
|
456
|
+
horizontal: Ge ?? !0,
|
|
457
|
+
vertical: Ke ?? !1,
|
|
458
|
+
strokeDasharray: We ? "3 3" : void 0
|
|
456
459
|
}),
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
dataKey:
|
|
460
|
+
vt(),
|
|
461
|
+
Ie && /* @__PURE__ */ x(c, { content: gt }),
|
|
462
|
+
Le && /* @__PURE__ */ x(o, { content: _t }),
|
|
463
|
+
yt(),
|
|
464
|
+
bt(),
|
|
465
|
+
xt(),
|
|
466
|
+
tt && /* @__PURE__ */ x(ue, {
|
|
467
|
+
dataKey: M,
|
|
465
468
|
tickFormatter: U,
|
|
466
469
|
...m({
|
|
467
|
-
brushHeight:
|
|
468
|
-
brushAriaLabel:
|
|
470
|
+
brushHeight: nt,
|
|
471
|
+
brushAriaLabel: rt
|
|
469
472
|
})
|
|
470
473
|
})
|
|
471
474
|
]
|
|
@@ -473,8 +476,8 @@ var R = y.forwardRef((t, n) => {
|
|
|
473
476
|
})
|
|
474
477
|
});
|
|
475
478
|
});
|
|
476
|
-
|
|
479
|
+
I.displayName = "BarChart";
|
|
477
480
|
//#endregion
|
|
478
|
-
export {
|
|
481
|
+
export { I as BarChart, ye as NormalizedLegendContent, ve as NormalizedTooltipContent, D as barChartVariants, M as createTrackShape, k as dropHeadroomSeries, A as withSeriesColor };
|
|
479
482
|
|
|
480
483
|
//# sourceMappingURL=bar-chart.js.map
|