vue-data-ui 3.0.0-next.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -30
- package/dist/{Arrow-BRtNjitS.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CO9ok1PR.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-BuOIF6t5.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-FH6oc0mS.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable-D36ZRtpU.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-DInM-hku.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B60MxEaz.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-CGQlqnmq.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-B5slIHlh.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-BGr3dQKt.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-BWA23VgJ.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-BSlAPr_H.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-lPcsweXz.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Dn5TCQxg.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Br-eVhJZ.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-CgMUOQnb.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-Cfm5-hMQ.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-BMVHBLq5.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-B1Hgs47c.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-CD674-M3.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-CEDGlyKI.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-CosgP-Fl.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-BG1ItsAb.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-6uKesZW9.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-CkVnNEGn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-D07ivGS7.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-Doidl3Lz.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-CWvzqAAa.js → vue-ui-donut-BtnIwS_E.js} +433 -424
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-D1pFzjJa.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DTeZbrJk.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-itpDcfZU.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-0milmSNS.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-C3QUdrMw.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-P-1SRvsT.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-Cd1bhDuU.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-B1tjuVi0.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap-BI8eIQG7.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CqBD7xhZ.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-sgO_Z6ja.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BPay31_q.js → vue-ui-vertical-bar-C-i2dRnU.js} +107 -105
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-DWskeHfE.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-Dkmsguo1.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-O07lQwRC.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-Hh7nGEjp.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-DWtJoryQ.js +0 -1227
- package/dist/vue-ui-age-pyramid-DbrA1G0r.js +0 -746
- package/dist/vue-ui-bullet-9IB3mGon.js +0 -513
- package/dist/vue-ui-candlestick-CWqPF_zW.js +0 -873
- package/dist/vue-ui-chord-Crd3l1b6.js +0 -949
- package/dist/vue-ui-circle-pack-CAm2gxBi.js +0 -673
- package/dist/vue-ui-donut-evolution-Djp_eBqw.js +0 -903
- package/dist/vue-ui-dumbbell-B7GySnYf.js +0 -753
- package/dist/vue-ui-flow-XDpZAYWI.js +0 -765
- package/dist/vue-ui-galaxy-DBQy21se.js +0 -617
- package/dist/vue-ui-gauge-FBZaUrBD.js +0 -738
- package/dist/vue-ui-gizmo-CDbPxUzE.js +0 -192
- package/dist/vue-ui-heatmap-DsDWxYOS.js +0 -877
- package/dist/vue-ui-history-plot-CzO1Z1FH.js +0 -924
- package/dist/vue-ui-molecule-Ddd3FgID.js +0 -597
- package/dist/vue-ui-mood-radar-24XAq8mg.js +0 -670
- package/dist/vue-ui-nested-donuts-DjWASp62.js +0 -1212
- package/dist/vue-ui-onion-B9thdF_c.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-DT-GhOaA.js +0 -807
- package/dist/vue-ui-quick-chart-D0DukVN6.js +0 -1612
- package/dist/vue-ui-radar-DY8y6oRc.js +0 -741
- package/dist/vue-ui-relation-circle-8Gd7_fxt.js +0 -542
- package/dist/vue-ui-ridgeline-iPtG1McW.js +0 -969
- package/dist/vue-ui-rings-BXPo4MMo.js +0 -685
- package/dist/vue-ui-scatter-26d0eebx.js +0 -1045
- package/dist/vue-ui-spark-trend-Dt3ctzpl.js +0 -291
- package/dist/vue-ui-sparkbar-RrxErqrU.js +0 -301
- package/dist/vue-ui-sparkgauge-CyNi1b0O.js +0 -201
- package/dist/vue-ui-sparkhistogram-DPpZCPuE.js +0 -313
- package/dist/vue-ui-sparkline-BMjQ_uYx.js +0 -459
- package/dist/vue-ui-sparkstackbar-CjO8pfE-.js +0 -381
- package/dist/vue-ui-stackbar-wgyvMlE6.js +0 -1207
- package/dist/vue-ui-strip-plot-BF1o8lvY.js +0 -761
- package/dist/vue-ui-thermometer-CtuxuYVt.js +0 -495
- package/dist/vue-ui-tiremarks-DOwj4ZE-.js +0 -358
- package/dist/vue-ui-treemap-C4LtyFug.js +0 -965
- package/dist/vue-ui-waffle-D8mzGTeo.js +0 -863
- package/dist/vue-ui-wheel-C6uAotal.js +0 -352
- package/dist/vue-ui-word-cloud-Bge2211V.js +0 -659
- package/dist/vue-ui-xy-UzQacbnA.js +0 -2982
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { defineAsyncComponent as X, useSlots as be, onMounted as J, ref as v, toRefs as ke, watch as K, computed as $, createElementBlock as r, openBlock as s, normalizeStyle as p, createCommentVNode as h, createVNode as Q, createBlock as _e, createElementVNode as d, toDisplayString as A, unref as c, Fragment as k, renderList as F, normalizeClass as N, withCtx as Z, renderSlot as R, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
|
+
import { u as xe, c as le, t as we, a as Ce, p as i, b as $e, e as D, d as Se, o as Ae, f as oe, g as Fe, i as U, X as De, s as ae, x as se, k as re, y as Ie } from "./index-BtNwOUja.js";
|
|
3
|
+
import { u as ne } from "./useNestedProp-f2H3m6Yj.js";
|
|
4
|
+
import { u as Pe } from "./useChartAccessibility-9icAAmYg.js";
|
|
5
|
+
import { u as ze, B as Be } from "./useLoading-D7YHNtLX.js";
|
|
6
|
+
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const Ne = ["xmlns", "viewBox"], Te = ["id"], Ee = ["stop-color"], Me = ["stop-color"], Oe = ["stop-color"], Ve = {
|
|
8
|
+
id: "stackPill",
|
|
9
|
+
clipPathUnits: "objectBoundingBox"
|
|
10
|
+
}, Re = ["fill"], Ue = {
|
|
11
|
+
key: 0,
|
|
12
|
+
"clip-path": "url(#stackPill)"
|
|
13
|
+
}, je = ["x", "width", "height", "fill"], Ge = ["x", "width", "height", "fill", "stroke"], We = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], Ye = ["width", "height", "rx"], qe = ["onClick"], He = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, Xe = ["height", "width"], Je = ["id"], Ke = ["stop-color"], Qe = ["stop-color"], Ze = ["fill"], et = {
|
|
14
|
+
key: 2,
|
|
15
|
+
ref: "source",
|
|
16
|
+
dir: "auto"
|
|
17
|
+
}, tt = {
|
|
18
|
+
__name: "vue-ui-sparkstackbar",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["selectDatapoint"],
|
|
34
|
+
setup(ue, { emit: ie }) {
|
|
35
|
+
const ce = X(() => import("./PackageVersion-CJ6Vd7V5.js")), de = X(() => import("./Tooltip-Bh2zYSoM.js")), { vue_ui_sparkstackbar: ve } = xe(), _ = ue, pe = be();
|
|
36
|
+
J(() => {
|
|
37
|
+
pe["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
|
|
38
|
+
});
|
|
39
|
+
const j = v(null), I = v(le()), T = v(!1), E = v(""), e = v(M()), { loading: x, FINAL_DATASET: m } = ze({
|
|
40
|
+
...ke(_),
|
|
41
|
+
FINAL_CONFIG: e,
|
|
42
|
+
prepareConfig: M,
|
|
43
|
+
skeletonDataset: [
|
|
44
|
+
{ name: "_", value: 8, color: "#808080" },
|
|
45
|
+
{ name: "_", value: 5, color: "#ADADAD" },
|
|
46
|
+
{ name: "_", value: 3, color: "#DBDBDB" }
|
|
47
|
+
],
|
|
48
|
+
skeletonConfig: we({
|
|
49
|
+
defaultConfig: e.value,
|
|
50
|
+
userConfig: {
|
|
51
|
+
style: {
|
|
52
|
+
backgroundColor: "#99999930",
|
|
53
|
+
animation: { show: !1 },
|
|
54
|
+
bar: { gradient: { inderlayerColor: "#6A6A6A" } },
|
|
55
|
+
title: {
|
|
56
|
+
backgroundColor: "transparent"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
}), { svgRef: ge } = Pe({ config: e.value.style.title });
|
|
62
|
+
function M() {
|
|
63
|
+
const t = ne({
|
|
64
|
+
userConfig: _.config,
|
|
65
|
+
defaultConfig: ve
|
|
66
|
+
});
|
|
67
|
+
return t.theme ? {
|
|
68
|
+
...ne({
|
|
69
|
+
userConfig: $e.vue_ui_sparkstackbar[t.theme] || _.config,
|
|
70
|
+
defaultConfig: t
|
|
71
|
+
}),
|
|
72
|
+
customPalette: Ce[t.theme] || i
|
|
73
|
+
} : t;
|
|
74
|
+
}
|
|
75
|
+
K(() => _.config, (t) => {
|
|
76
|
+
e.value = M(), Y();
|
|
77
|
+
}, { deep: !0 }), K(() => m.value, (t) => {
|
|
78
|
+
b.value = m.value.map((a, l) => ({
|
|
79
|
+
...a,
|
|
80
|
+
color: a.color ? D(a.color) : S.value[l] || i[l] || i[l % i.length]
|
|
81
|
+
})), G();
|
|
82
|
+
}, { deep: !0 });
|
|
83
|
+
const S = $(() => Se(e.value.customPalette)), b = v(m.value.map((t, a) => ({
|
|
84
|
+
...t,
|
|
85
|
+
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
86
|
+
color: t.color ? D(t.color) : S.value[a] || i[a] || i[a % i.length]
|
|
87
|
+
}))), w = v(!0);
|
|
88
|
+
function G() {
|
|
89
|
+
if (!e.value.style.animation.show) return;
|
|
90
|
+
const t = e.value.style.animation.animationFrames, a = m.value.map((n) => n.value || 0), l = a.map((n) => n / t), o = a.reduce((n, u) => n + u, 0);
|
|
91
|
+
let y = 0;
|
|
92
|
+
w.value = !0, b.value = m.value.map((n, u) => ({
|
|
93
|
+
...n,
|
|
94
|
+
value: 0,
|
|
95
|
+
color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length]
|
|
96
|
+
}));
|
|
97
|
+
function L() {
|
|
98
|
+
y += o / t, y < o ? (b.value = b.value.map((n, u) => ({
|
|
99
|
+
...n,
|
|
100
|
+
value: Math.min(n.value + l[u], a[u]),
|
|
101
|
+
color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length]
|
|
102
|
+
})), requestAnimationFrame(L)) : (w.value = !1, b.value = m.value.map((n, u) => ({
|
|
103
|
+
...n,
|
|
104
|
+
value: a[u],
|
|
105
|
+
color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length],
|
|
106
|
+
id: le()
|
|
107
|
+
})));
|
|
108
|
+
}
|
|
109
|
+
L();
|
|
110
|
+
}
|
|
111
|
+
J(() => {
|
|
112
|
+
Y();
|
|
113
|
+
});
|
|
114
|
+
const W = $(() => e.value.debug);
|
|
115
|
+
function Y() {
|
|
116
|
+
Ae(_.dataset) ? oe({
|
|
117
|
+
componentName: "VueUiSparkStackbar",
|
|
118
|
+
type: "dataset",
|
|
119
|
+
debug: W.value
|
|
120
|
+
}) : _.dataset.forEach((t, a) => {
|
|
121
|
+
Fe({
|
|
122
|
+
datasetObject: t,
|
|
123
|
+
requiredAttributes: ["name", "value"]
|
|
124
|
+
}).forEach((l) => {
|
|
125
|
+
oe({
|
|
126
|
+
componentName: "VueUiSparkStackbar",
|
|
127
|
+
type: "datasetSerieAttribute",
|
|
128
|
+
property: l,
|
|
129
|
+
index: a,
|
|
130
|
+
debug: W.value
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}), G();
|
|
134
|
+
}
|
|
135
|
+
const g = v({
|
|
136
|
+
width: 500,
|
|
137
|
+
height: 16
|
|
138
|
+
}), f = v([]), q = $(() => m.value.map((t) => t.value || 0).filter((t, a) => !f.value.includes(a)).reduce((t, a) => t + a, 0)), P = $(() => b.value.map((t, a) => {
|
|
139
|
+
const l = t.value || 0, o = l / q.value, y = isNaN(o) ? 0 : o, L = y * g.value.width;
|
|
140
|
+
return {
|
|
141
|
+
...t,
|
|
142
|
+
value: l,
|
|
143
|
+
proportion: y,
|
|
144
|
+
width: L,
|
|
145
|
+
seriesIndex: a,
|
|
146
|
+
proportionLabel: U({
|
|
147
|
+
v: y * 100,
|
|
148
|
+
s: "%",
|
|
149
|
+
r: e.value.style.legend.percentage.rounding
|
|
150
|
+
})
|
|
151
|
+
};
|
|
152
|
+
})), O = $(() => P.value.filter((t, a) => !f.value.includes(a)));
|
|
153
|
+
function fe(t) {
|
|
154
|
+
f.value.includes(t) ? f.value = f.value.filter((a) => a !== t) : f.value.length < b.value.length - 1 && f.value.push(t);
|
|
155
|
+
}
|
|
156
|
+
const z = $(() => {
|
|
157
|
+
let t = 0;
|
|
158
|
+
const a = [];
|
|
159
|
+
for (let l = 0; l < O.value.length; l += 1)
|
|
160
|
+
a.push({
|
|
161
|
+
...O.value[l],
|
|
162
|
+
start: t
|
|
163
|
+
}), t += O.value[l].width;
|
|
164
|
+
return a;
|
|
165
|
+
}), he = ie;
|
|
166
|
+
function H(t, a, l = !1) {
|
|
167
|
+
he("selectDatapoint", { datapoint: t, index: a }), e.value.events.datapointClick && !l && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
168
|
+
}
|
|
169
|
+
const V = v(null), B = v(!1), C = v(null);
|
|
170
|
+
function ye({ datapoint: t, seriesIndex: a }) {
|
|
171
|
+
T.value = !1, C.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
172
|
+
}
|
|
173
|
+
function me({ datapoint: t, seriesIndex: a }) {
|
|
174
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
|
|
175
|
+
return;
|
|
176
|
+
V.value = { datapoint: t, seriesIndex: a, config: e.value, series: P.value }, T.value = !0, C.value = a;
|
|
177
|
+
const l = e.value.style.tooltip.customFormat;
|
|
178
|
+
if (Ie(l))
|
|
179
|
+
try {
|
|
180
|
+
const o = l({
|
|
181
|
+
seriesIndex: t.seriesIndex,
|
|
182
|
+
datapoint: t,
|
|
183
|
+
series: P.value,
|
|
184
|
+
config: e.value
|
|
185
|
+
});
|
|
186
|
+
typeof o == "string" && (E.value = o, B.value = !0);
|
|
187
|
+
} catch {
|
|
188
|
+
console.warn("Custom format cannot be applied."), B.value = !1;
|
|
189
|
+
}
|
|
190
|
+
if (!B.value) {
|
|
191
|
+
let o = "";
|
|
192
|
+
o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, o += `<b>${t.proportionLabel}</b>`, o += `<span>(${re(
|
|
193
|
+
e.value.style.legend.value.formatter,
|
|
194
|
+
t.value,
|
|
195
|
+
U({
|
|
196
|
+
p: e.value.style.legend.value.prefix,
|
|
197
|
+
v: t.value,
|
|
198
|
+
s: e.value.style.legend.value.suffix,
|
|
199
|
+
r: e.value.style.legend.value.rounding
|
|
200
|
+
}),
|
|
201
|
+
{
|
|
202
|
+
datapoint: t,
|
|
203
|
+
seriesIndex: a
|
|
204
|
+
}
|
|
205
|
+
)})</span>`, E.value = `<div>${o}</div>`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return (t, a) => (s(), r("div", {
|
|
209
|
+
class: "vue-ui-spark-stackbar",
|
|
210
|
+
ref_key: "sparkstackbarChart",
|
|
211
|
+
ref: j,
|
|
212
|
+
style: p(`width:100%; background:${e.value.style.backgroundColor}`)
|
|
213
|
+
}, [
|
|
214
|
+
e.value.style.title.text ? (s(), r("div", {
|
|
215
|
+
key: 0,
|
|
216
|
+
style: p(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
|
|
217
|
+
}, [
|
|
218
|
+
d("div", {
|
|
219
|
+
class: "atom-title",
|
|
220
|
+
style: p(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
221
|
+
}, A(e.value.style.title.text), 5),
|
|
222
|
+
e.value.style.title.subtitle.text ? (s(), r("div", {
|
|
223
|
+
key: 0,
|
|
224
|
+
class: "atom-subtitle",
|
|
225
|
+
style: p(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
226
|
+
}, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
|
|
227
|
+
], 4)) : h("", !0),
|
|
228
|
+
(s(), r("svg", {
|
|
229
|
+
ref_key: "svgRef",
|
|
230
|
+
ref: ge,
|
|
231
|
+
xmlns: c(De),
|
|
232
|
+
width: "100%",
|
|
233
|
+
viewBox: `0 0 ${g.value.width} ${g.value.height}`
|
|
234
|
+
}, [
|
|
235
|
+
Q(c(ce)),
|
|
236
|
+
d("defs", null, [
|
|
237
|
+
(s(!0), r(k, null, F(z.value, (l, o) => (s(), r("linearGradient", {
|
|
238
|
+
key: `stack_gradient_${o}`,
|
|
239
|
+
gradientTransform: "rotate(90)",
|
|
240
|
+
id: `stack_gradient_${o}_${I.value}`
|
|
241
|
+
}, [
|
|
242
|
+
d("stop", {
|
|
243
|
+
offset: "0%",
|
|
244
|
+
"stop-color": l.color
|
|
245
|
+
}, null, 8, Ee),
|
|
246
|
+
d("stop", {
|
|
247
|
+
offset: "50%",
|
|
248
|
+
"stop-color": c(ae)(c(se)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
249
|
+
}, null, 8, Me),
|
|
250
|
+
d("stop", {
|
|
251
|
+
offset: "100%",
|
|
252
|
+
"stop-color": l.color
|
|
253
|
+
}, null, 8, Oe)
|
|
254
|
+
], 8, Te))), 128)),
|
|
255
|
+
d("clipPath", Ve, [
|
|
256
|
+
d("rect", {
|
|
257
|
+
x: "0.005",
|
|
258
|
+
y: "-2",
|
|
259
|
+
width: "0.99",
|
|
260
|
+
height: "5",
|
|
261
|
+
rx: "3",
|
|
262
|
+
ry: "3",
|
|
263
|
+
fill: e.value.style.backgroundColor
|
|
264
|
+
}, null, 8, Re)
|
|
265
|
+
])
|
|
266
|
+
]),
|
|
267
|
+
q.value > 0 ? (s(), r("g", Ue, [
|
|
268
|
+
(s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
|
|
269
|
+
key: `stack_underlayer_${o}`,
|
|
270
|
+
x: l.start,
|
|
271
|
+
y: 0,
|
|
272
|
+
width: l.width,
|
|
273
|
+
height: g.value.height,
|
|
274
|
+
fill: e.value.style.bar.gradient.underlayerColor,
|
|
275
|
+
class: N({ animated: !w.value && !c(x) }),
|
|
276
|
+
style: p({
|
|
277
|
+
opacity: C.value !== null && e.value.style.tooltip.show ? C.value === o ? 1 : 0.5 : 1
|
|
278
|
+
})
|
|
279
|
+
}, null, 14, je))), 128)),
|
|
280
|
+
(s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
|
|
281
|
+
key: `stack_${o}`,
|
|
282
|
+
x: l.start,
|
|
283
|
+
y: 0,
|
|
284
|
+
width: l.width,
|
|
285
|
+
height: g.value.height,
|
|
286
|
+
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${I.value})` : l.color,
|
|
287
|
+
stroke: e.value.style.backgroundColor,
|
|
288
|
+
"stroke-linecap": "round",
|
|
289
|
+
class: N({ animated: !w.value && !c(x) }),
|
|
290
|
+
style: p({
|
|
291
|
+
opacity: C.value !== null && e.value.style.tooltip.show ? C.value === o ? 1 : 0.5 : 1
|
|
292
|
+
})
|
|
293
|
+
}, null, 14, Ge))), 128)),
|
|
294
|
+
(s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
|
|
295
|
+
key: `stack_trap_${o}`,
|
|
296
|
+
x: l.start,
|
|
297
|
+
y: 0,
|
|
298
|
+
width: l.width,
|
|
299
|
+
height: g.value.height,
|
|
300
|
+
fill: "transparent",
|
|
301
|
+
stroke: "none",
|
|
302
|
+
class: N({ animated: !w.value && !c(x) }),
|
|
303
|
+
onClick: () => H(l, o),
|
|
304
|
+
onMouseenter: () => me({ datapoint: l, seriesIndex: o }),
|
|
305
|
+
onMouseleave: (y) => ye({ datapoint: l, seriesIndex: o })
|
|
306
|
+
}, null, 42, We))), 128))
|
|
307
|
+
])) : (s(), r("rect", {
|
|
308
|
+
key: 1,
|
|
309
|
+
x: 2,
|
|
310
|
+
y: 1,
|
|
311
|
+
width: g.value.width - 4,
|
|
312
|
+
height: g.value.height - 2,
|
|
313
|
+
stroke: "#CCCCCC",
|
|
314
|
+
"stroke-width": "2",
|
|
315
|
+
fill: "transparent",
|
|
316
|
+
rx: (g.value.height - 4) / 2
|
|
317
|
+
}, null, 8, Ye))
|
|
318
|
+
], 8, Ne)),
|
|
319
|
+
e.value.style.legend.show ? (s(), r("div", {
|
|
320
|
+
key: 1,
|
|
321
|
+
style: p(`background:transparent;margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
|
|
322
|
+
class: "vue-ui-sparkstackbar-legend"
|
|
323
|
+
}, [
|
|
324
|
+
(s(!0), r(k, null, F(P.value, (l, o) => (s(), r("div", {
|
|
325
|
+
style: p(`font-size:${e.value.style.legend.fontSize}px;`),
|
|
326
|
+
class: N({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": f.value.includes(o) }),
|
|
327
|
+
onClick: (y) => {
|
|
328
|
+
fe(o), H(l, o, !0);
|
|
329
|
+
}
|
|
330
|
+
}, [
|
|
331
|
+
d("div", He, [
|
|
332
|
+
(s(), r("svg", {
|
|
333
|
+
height: `${e.value.style.legend.fontSize}px`,
|
|
334
|
+
width: `${e.value.style.legend.fontSize}px`,
|
|
335
|
+
viewBox: "0 0 10 10"
|
|
336
|
+
}, [
|
|
337
|
+
d("defs", null, [
|
|
338
|
+
d("radialGradient", {
|
|
339
|
+
id: `legend_grad_${o}-${I.value}`
|
|
340
|
+
}, [
|
|
341
|
+
d("stop", {
|
|
342
|
+
offset: "0%",
|
|
343
|
+
"stop-color": c(x) ? "#FFFFFF" : c(ae)(c(se)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
344
|
+
}, null, 8, Ke),
|
|
345
|
+
d("stop", {
|
|
346
|
+
offset: "100%",
|
|
347
|
+
"stop-color": l.color
|
|
348
|
+
}, null, 8, Qe)
|
|
349
|
+
], 8, Je)
|
|
350
|
+
]),
|
|
351
|
+
d("circle", {
|
|
352
|
+
cx: 5,
|
|
353
|
+
cy: 5,
|
|
354
|
+
r: 5,
|
|
355
|
+
fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${o}-${I.value})` : l.color
|
|
356
|
+
}, null, 8, Ze)
|
|
357
|
+
], 8, Xe)),
|
|
358
|
+
c(x) ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
359
|
+
d("span", {
|
|
360
|
+
style: p(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
361
|
+
}, A(l.name), 5),
|
|
362
|
+
w.value ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
363
|
+
e.value.style.legend.percentage.show ? (s(), r("span", {
|
|
364
|
+
key: 0,
|
|
365
|
+
style: p(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
|
|
366
|
+
}, A(f.value.includes(o) ? " - " : l.proportionLabel), 5)) : h("", !0),
|
|
367
|
+
e.value.style.legend.value.show ? (s(), r("span", {
|
|
368
|
+
key: 1,
|
|
369
|
+
style: p(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
|
|
370
|
+
}, " (" + A(c(re)(
|
|
371
|
+
e.value.style.legend.value.formatter,
|
|
372
|
+
l.value,
|
|
373
|
+
c(U)({
|
|
374
|
+
p: e.value.style.legend.value.prefix,
|
|
375
|
+
v: l.value,
|
|
376
|
+
s: e.value.style.legend.value.suffix,
|
|
377
|
+
r: e.value.style.legend.value.rounding
|
|
378
|
+
}),
|
|
379
|
+
{ datapoint: l, seriesIndex: o }
|
|
380
|
+
)) + ") ", 5)) : h("", !0)
|
|
381
|
+
], 64))
|
|
382
|
+
], 64))
|
|
383
|
+
])
|
|
384
|
+
], 14, qe))), 256))
|
|
385
|
+
], 4)) : h("", !0),
|
|
386
|
+
Q(c(de), {
|
|
387
|
+
show: T.value && e.value.style.tooltip.show,
|
|
388
|
+
parent: j.value,
|
|
389
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
390
|
+
color: e.value.style.tooltip.color,
|
|
391
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
392
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
393
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
394
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
395
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
396
|
+
position: e.value.style.tooltip.position,
|
|
397
|
+
content: E.value,
|
|
398
|
+
isCustom: B.value,
|
|
399
|
+
offsetY: -124 + e.value.style.tooltip.offsetY,
|
|
400
|
+
blockShiftY: !0,
|
|
401
|
+
smooth: e.value.style.tooltip.smooth,
|
|
402
|
+
backdropFilter: e.value.style.tooltip.backdropFilter
|
|
403
|
+
}, {
|
|
404
|
+
"tooltip-before": Z(() => [
|
|
405
|
+
R(t.$slots, "tooltip-before", ee(te({ ...V.value })), void 0, !0)
|
|
406
|
+
]),
|
|
407
|
+
"tooltip-after": Z(() => [
|
|
408
|
+
R(t.$slots, "tooltip-after", ee(te({ ...V.value })), void 0, !0)
|
|
409
|
+
]),
|
|
410
|
+
_: 3
|
|
411
|
+
}, 8, ["show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter"]),
|
|
412
|
+
t.$slots.source ? (s(), r("div", et, [
|
|
413
|
+
R(t.$slots, "source", {}, void 0, !0)
|
|
414
|
+
], 512)) : h("", !0),
|
|
415
|
+
c(x) ? (s(), _e(Be, { key: 3 })) : h("", !0)
|
|
416
|
+
], 4));
|
|
417
|
+
}
|
|
418
|
+
}, ut = /* @__PURE__ */ Le(tt, [["__scopeId", "data-v-6ef55310"]]);
|
|
419
|
+
export {
|
|
420
|
+
ut as default
|
|
421
|
+
};
|