vue-data-ui 3.4.9 → 3.5.1
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 +114 -37
- package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
- package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
- package/dist/{PackageVersion-CTUqGqWV.js → PackageVersion-DQvyATVa.js} +1 -1
- package/dist/PenAndPaper-SZQIAgkg.js +388 -0
- package/dist/{Title-l36lOBMx.js → Title-isbiM8i8.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +17 -8
- package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-DjGXw6S9.js} +22 -8
- package/dist/{vue-data-ui-DjxWWa78.js → vue-data-ui-B_RxfmEm.js} +113 -107
- package/dist/vue-data-ui.js +64 -64
- package/dist/{vue-ui-3d-bar-CLE7f9pl.js → vue-ui-3d-bar-CMNYyVa2.js} +454 -434
- package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-CqhVCfc2.js} +1 -1
- package/dist/{vue-ui-age-pyramid-D73uIOPm.js → vue-ui-age-pyramid-Vqa9iYXE.js} +180 -160
- package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-nNv10fBm.js} +3 -3
- package/dist/{vue-ui-bullet-Bybo0xK2.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
- package/dist/{vue-ui-candlestick-D_FyMdqH.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
- package/dist/{vue-ui-carousel-table-BvMlNdVo.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
- package/dist/{vue-ui-chestnut-DA0g0bDV.js → vue-ui-chestnut-BGz1TLXG.js} +375 -355
- package/dist/vue-ui-chord-CebhS7ln.js +1153 -0
- package/dist/{vue-ui-circle-pack-BPDm-ro5.js → vue-ui-circle-pack-7PJVyKjp.js} +289 -269
- package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-qYLAwvzn.js} +1 -1
- package/dist/vue-ui-dashboard-DcmMvhgM.js +432 -0
- package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-DyE8eU1m.js} +1 -1
- package/dist/vue-ui-donut-CxZcJFTo.js +1681 -0
- package/dist/{vue-ui-donut-evolution-Ca3Svr0B.js → vue-ui-donut-evolution-BVYL-BUJ.js} +480 -444
- package/dist/{vue-ui-dumbbell-CxCE2luV.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
- package/dist/{vue-ui-flow-DEvwXd4W.js → vue-ui-flow-DEI5LRch.js} +339 -319
- package/dist/{vue-ui-funnel-Bgcx7xia.js → vue-ui-funnel-B_A5orFg.js} +218 -198
- package/dist/{vue-ui-galaxy-BWr1EMob.js → vue-ui-galaxy-CUoDRr-O.js} +313 -277
- package/dist/{vue-ui-gauge-DQricvo2.js → vue-ui-gauge-46tSRZN5.js} +311 -291
- package/dist/{vue-ui-gizmo-C-fKe3io.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
- package/dist/{vue-ui-heatmap-B-o_i7Hu.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
- package/dist/{vue-ui-history-plot-DzQ9DPUJ.js → vue-ui-history-plot-C6p_aThr.js} +478 -442
- package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-B1yJ83aF.js} +2 -2
- package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-BudcNBg-.js} +1 -1
- package/dist/{vue-ui-molecule-I2OhrCR2.js → vue-ui-molecule-L90GnHee.js} +156 -136
- package/dist/{vue-ui-mood-radar-BAT7kZUy.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
- package/dist/{vue-ui-nested-donuts-CjhJDAQi.js → vue-ui-nested-donuts-D0MCLs5n.js} +597 -557
- package/dist/vue-ui-onion-B7yPJ3gL.js +915 -0
- package/dist/vue-ui-parallel-coordinate-plot-DY21ivNe.js +1051 -0
- package/dist/{vue-ui-quadrant-DGnasrCR.js → vue-ui-quadrant-b0vMRaq-.js} +532 -495
- package/dist/{vue-ui-quick-chart-Cam_sWet.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
- package/dist/{vue-ui-radar-DNI9WI2R.js → vue-ui-radar-B5Vkoz9M.js} +412 -373
- package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
- package/dist/{vue-ui-relation-circle-Dj1jhcsl.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
- package/dist/{vue-ui-ridgeline-adIls6bj.js → vue-ui-ridgeline-CAMNq-p_.js} +517 -481
- package/dist/vue-ui-rings-ImGOqm_J.js +855 -0
- package/dist/vue-ui-scatter-CterNJYe.js +1590 -0
- package/dist/{vue-ui-skeleton-DUdI2uOO.js → vue-ui-skeleton-CykXHWj-.js} +2 -2
- package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-DnGm6qrK.js} +1 -1
- package/dist/{vue-ui-spark-trend-DxpRfUJz.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
- package/dist/{vue-ui-sparkbar-B44oER5n.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
- package/dist/{vue-ui-sparkgauge-ix12NZ7M.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Cs-QDYBR.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
- package/dist/{vue-ui-sparkline-Cb8ZmyUq.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
- package/dist/vue-ui-sparkstackbar-BXNy6nuw.js +441 -0
- package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
- package/dist/{vue-ui-strip-plot-BjG-Jxnb.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
- package/dist/{vue-ui-table-DdBdLrAL.js → vue-ui-table-DSsIrT4L.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-DXFHy7-E.js} +1 -1
- package/dist/{vue-ui-table-sparkline-EpCo2Be5.js → vue-ui-table-sparkline-DpqY_4ay.js} +2 -2
- package/dist/vue-ui-thermometer-CMKvSA8p.js +584 -0
- package/dist/{vue-ui-timer-Br3wp8hG.js → vue-ui-timer-BpdCY_wg.js} +3 -3
- package/dist/vue-ui-tiremarks-CNipzVli.js +450 -0
- package/dist/vue-ui-treemap-DPE8SY0_.js +1330 -0
- package/dist/{vue-ui-vertical-bar-yfbEfLqy.js → vue-ui-vertical-bar-ZU1GCbX0.js} +484 -448
- package/dist/{vue-ui-waffle-m-9sqQik.js → vue-ui-waffle-z7nuSuSV.js} +398 -362
- package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
- package/dist/{vue-ui-word-cloud-vNwswYZD.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
- package/dist/{vue-ui-world-BsCNyZy_.js → vue-ui-world-goXYnTyM.js} +287 -267
- package/dist/{vue-ui-xy-CIrw1lWQ.js → vue-ui-xy-NDDbNbds.js} +1263 -1227
- package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-2a6NlQe3.js} +338 -322
- package/package.json +4 -4
- package/dist/PenAndPaper-DSvu9dwa.js +0 -373
- package/dist/vue-ui-chord-CDgzolI-.js +0 -1133
- package/dist/vue-ui-dashboard-CeJwbiON.js +0 -412
- package/dist/vue-ui-donut-DjQXHBJE.js +0 -1645
- package/dist/vue-ui-onion-DTY2p87s.js +0 -873
- package/dist/vue-ui-parallel-coordinate-plot-C8aWTcNn.js +0 -1014
- package/dist/vue-ui-rings-CnTMFK6R.js +0 -813
- package/dist/vue-ui-scatter-fzR2c0St.js +0 -1554
- package/dist/vue-ui-sparkstackbar-BiRZ51OU.js +0 -424
- package/dist/vue-ui-stackbar-DubS6Pg8.js +0 -1708
- package/dist/vue-ui-thermometer-DTnfnf9z.js +0 -564
- package/dist/vue-ui-tiremarks-CrC_tlIx.js +0 -430
- package/dist/vue-ui-treemap-kyuyi2ES.js +0 -1294
- package/dist/vue-ui-wheel-BasM7FWt.js +0 -643
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { defineAsyncComponent as K, useSlots as we, onMounted as Q, ref as v, toRefs as Ce, watch as Z, computed as S, createElementBlock as r, openBlock as s, normalizeStyle as f, createCommentVNode as h, createVNode as ee, createBlock as $e, createElementVNode as d, toDisplayString as A, unref as c, Fragment as k, renderList as I, normalizeClass as L, withCtx as te, renderSlot as R, normalizeProps as le, guardReactiveProps as oe } from "vue";
|
|
2
|
+
import { c as ae, t as Se, b as Fe, p as i, h as D, e as Ae, o as Ie, f as se, g as De, d as j, X as Te, s as re, i as ne, a as ue, G as Pe } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { u as ze, a as ie } from "./useNestedProp-DjGXw6S9.js";
|
|
4
|
+
import { u as Be } from "./useChartAccessibility-9icAAmYg.js";
|
|
5
|
+
import { t as Le } from "./themes-AUNCOb2G.js";
|
|
6
|
+
import { u as Ne, B as Ve } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Ue = ["xmlns", "viewBox"], Me = ["id"], Oe = ["stop-color"], Re = ["stop-color"], je = ["stop-color"], Ge = {
|
|
9
|
+
id: "stackPill",
|
|
10
|
+
clipPathUnits: "objectBoundingBox"
|
|
11
|
+
}, We = ["fill"], Ye = {
|
|
12
|
+
key: 0,
|
|
13
|
+
"clip-path": "url(#stackPill)"
|
|
14
|
+
}, qe = ["x", "width", "height", "fill"], He = ["x", "width", "height", "fill", "stroke"], Xe = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], Je = ["width", "height", "rx"], Ke = ["onClick"], Qe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, Ze = ["height", "width"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], ot = ["fill"], at = {
|
|
15
|
+
key: 2,
|
|
16
|
+
ref: "source",
|
|
17
|
+
dir: "auto"
|
|
18
|
+
}, st = {
|
|
19
|
+
__name: "vue-ui-sparkstackbar",
|
|
20
|
+
props: {
|
|
21
|
+
config: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
dataset: {
|
|
28
|
+
type: Array,
|
|
29
|
+
default() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ["selectDatapoint"],
|
|
35
|
+
setup(ce, { expose: de, emit: ve }) {
|
|
36
|
+
const pe = K(() => import("./PackageVersion-DQvyATVa.js")), fe = K(() => import("./Tooltip-oWCO1HKy.js")), { vue_ui_sparkstackbar: ge } = ze(), _ = ce, he = we();
|
|
37
|
+
Q(() => {
|
|
38
|
+
he["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
|
|
39
|
+
});
|
|
40
|
+
const G = v(null), T = v(ae()), N = v(!1), V = v(""), e = v(E()), { loading: x, FINAL_DATASET: m } = Ne({
|
|
41
|
+
...Ce(_),
|
|
42
|
+
FINAL_CONFIG: e,
|
|
43
|
+
prepareConfig: E,
|
|
44
|
+
skeletonDataset: [
|
|
45
|
+
{ name: "_", value: 8, color: "#808080" },
|
|
46
|
+
{ name: "_", value: 5, color: "#ADADAD" },
|
|
47
|
+
{ name: "_", value: 3, color: "#DBDBDB" }
|
|
48
|
+
],
|
|
49
|
+
skeletonConfig: Se({
|
|
50
|
+
defaultConfig: e.value,
|
|
51
|
+
userConfig: {
|
|
52
|
+
style: {
|
|
53
|
+
backgroundColor: "#99999930",
|
|
54
|
+
animation: { show: !1 },
|
|
55
|
+
bar: { gradient: { inderlayerColor: "#6A6A6A" } },
|
|
56
|
+
title: {
|
|
57
|
+
backgroundColor: "transparent"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}), { svgRef: ye } = Be({ config: e.value.style.title });
|
|
63
|
+
function E() {
|
|
64
|
+
const t = ie({
|
|
65
|
+
userConfig: _.config,
|
|
66
|
+
defaultConfig: ge
|
|
67
|
+
});
|
|
68
|
+
return t.theme ? {
|
|
69
|
+
...ie({
|
|
70
|
+
userConfig: Le.vue_ui_sparkstackbar[t.theme] || _.config,
|
|
71
|
+
defaultConfig: t
|
|
72
|
+
}),
|
|
73
|
+
customPalette: Fe[t.theme] || i
|
|
74
|
+
} : t;
|
|
75
|
+
}
|
|
76
|
+
Z(() => _.config, (t) => {
|
|
77
|
+
e.value = E(), q();
|
|
78
|
+
}, { deep: !0 }), Z(() => m.value, (t) => {
|
|
79
|
+
b.value = m.value.map((o, l) => ({
|
|
80
|
+
...o,
|
|
81
|
+
color: o.color ? D(o.color) : F.value[l] || i[l] || i[l % i.length]
|
|
82
|
+
})), W();
|
|
83
|
+
}, { deep: !0 });
|
|
84
|
+
const F = S(() => Ae(e.value.customPalette)), b = v(m.value.map((t, o) => ({
|
|
85
|
+
...t,
|
|
86
|
+
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
87
|
+
color: t.color ? D(t.color) : F.value[o] || i[o] || i[o % i.length]
|
|
88
|
+
}))), w = v(!0);
|
|
89
|
+
function W() {
|
|
90
|
+
if (!e.value.style.animation.show) return;
|
|
91
|
+
const t = e.value.style.animation.animationFrames, o = m.value.map((n) => n.value || 0), l = o.map((n) => n / t), a = o.reduce((n, u) => n + u, 0);
|
|
92
|
+
let y = 0;
|
|
93
|
+
w.value = !0, b.value = m.value.map((n, u) => ({
|
|
94
|
+
...n,
|
|
95
|
+
value: 0,
|
|
96
|
+
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
|
|
97
|
+
}));
|
|
98
|
+
function B() {
|
|
99
|
+
y += a / t, y < a ? (b.value = b.value.map((n, u) => ({
|
|
100
|
+
...n,
|
|
101
|
+
value: Math.min(n.value + l[u], o[u]),
|
|
102
|
+
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
|
|
103
|
+
})), requestAnimationFrame(B)) : (w.value = !1, b.value = m.value.map((n, u) => ({
|
|
104
|
+
...n,
|
|
105
|
+
value: o[u],
|
|
106
|
+
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length],
|
|
107
|
+
id: ae()
|
|
108
|
+
})));
|
|
109
|
+
}
|
|
110
|
+
B();
|
|
111
|
+
}
|
|
112
|
+
Q(() => {
|
|
113
|
+
q();
|
|
114
|
+
});
|
|
115
|
+
const Y = S(() => e.value.debug);
|
|
116
|
+
function q() {
|
|
117
|
+
Ie(_.dataset) ? se({
|
|
118
|
+
componentName: "VueUiSparkStackbar",
|
|
119
|
+
type: "dataset",
|
|
120
|
+
debug: Y.value
|
|
121
|
+
}) : _.dataset.forEach((t, o) => {
|
|
122
|
+
De({
|
|
123
|
+
datasetObject: t,
|
|
124
|
+
requiredAttributes: ["name", "value"]
|
|
125
|
+
}).forEach((l) => {
|
|
126
|
+
se({
|
|
127
|
+
componentName: "VueUiSparkStackbar",
|
|
128
|
+
type: "datasetSerieAttribute",
|
|
129
|
+
property: l,
|
|
130
|
+
index: o,
|
|
131
|
+
debug: Y.value
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}), W();
|
|
135
|
+
}
|
|
136
|
+
const g = v({
|
|
137
|
+
width: 500,
|
|
138
|
+
height: 16
|
|
139
|
+
}), p = v([]), H = S(() => m.value.map((t) => t.value || 0).filter((t, o) => !p.value.includes(o)).reduce((t, o) => t + o, 0)), C = S(() => b.value.map((t, o) => {
|
|
140
|
+
const l = t.value || 0, a = l / H.value, y = isNaN(a) ? 0 : a, B = y * g.value.width;
|
|
141
|
+
return {
|
|
142
|
+
...t,
|
|
143
|
+
value: l,
|
|
144
|
+
proportion: y,
|
|
145
|
+
width: B,
|
|
146
|
+
seriesIndex: o,
|
|
147
|
+
proportionLabel: j({
|
|
148
|
+
v: y * 100,
|
|
149
|
+
s: "%",
|
|
150
|
+
r: e.value.style.legend.percentage.rounding
|
|
151
|
+
})
|
|
152
|
+
};
|
|
153
|
+
})), U = S(() => C.value.filter((t, o) => !p.value.includes(o)));
|
|
154
|
+
function M(t) {
|
|
155
|
+
p.value.includes(t) ? p.value = p.value.filter((o) => o !== t) : p.value.length < b.value.length - 1 && p.value.push(t);
|
|
156
|
+
}
|
|
157
|
+
function X(t) {
|
|
158
|
+
if (!C.value.length)
|
|
159
|
+
return e.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null;
|
|
160
|
+
const o = C.value.find((l) => l.name === t);
|
|
161
|
+
return o || (e.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${t}"`), null);
|
|
162
|
+
}
|
|
163
|
+
function me(t) {
|
|
164
|
+
const o = X(t);
|
|
165
|
+
o !== null && p.value.includes(o.id) && M(o.seriesIndex);
|
|
166
|
+
}
|
|
167
|
+
function be(t) {
|
|
168
|
+
const o = X(t);
|
|
169
|
+
o !== null && (p.value.includes(o.id) || M(o.seriesIndex));
|
|
170
|
+
}
|
|
171
|
+
const P = S(() => {
|
|
172
|
+
let t = 0;
|
|
173
|
+
const o = [];
|
|
174
|
+
for (let l = 0; l < U.value.length; l += 1)
|
|
175
|
+
o.push({
|
|
176
|
+
...U.value[l],
|
|
177
|
+
start: t
|
|
178
|
+
}), t += U.value[l].width;
|
|
179
|
+
return o;
|
|
180
|
+
}), ke = ve;
|
|
181
|
+
function J(t, o, l = !1) {
|
|
182
|
+
ke("selectDatapoint", { datapoint: t, index: o }), e.value.events.datapointClick && !l && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
183
|
+
}
|
|
184
|
+
const O = v(null), z = v(!1), $ = v(null);
|
|
185
|
+
function _e({ datapoint: t, seriesIndex: o }) {
|
|
186
|
+
N.value = !1, $.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
187
|
+
}
|
|
188
|
+
function xe({ datapoint: t, seriesIndex: o }) {
|
|
189
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
|
|
190
|
+
return;
|
|
191
|
+
O.value = { datapoint: t, seriesIndex: o, config: e.value, series: C.value }, N.value = !0, $.value = o;
|
|
192
|
+
const l = e.value.style.tooltip.customFormat;
|
|
193
|
+
if (Pe(l))
|
|
194
|
+
try {
|
|
195
|
+
const a = l({
|
|
196
|
+
seriesIndex: t.seriesIndex,
|
|
197
|
+
datapoint: t,
|
|
198
|
+
series: C.value,
|
|
199
|
+
config: e.value
|
|
200
|
+
});
|
|
201
|
+
typeof a == "string" && (V.value = a, z.value = !0);
|
|
202
|
+
} catch {
|
|
203
|
+
console.warn("Custom format cannot be applied."), z.value = !1;
|
|
204
|
+
}
|
|
205
|
+
if (!z.value) {
|
|
206
|
+
let a = "";
|
|
207
|
+
a += `<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>`, a += `<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>`, a += `<b>${t.proportionLabel}</b>`, a += `<span>(${ue(
|
|
208
|
+
e.value.style.legend.value.formatter,
|
|
209
|
+
t.value,
|
|
210
|
+
j({
|
|
211
|
+
p: e.value.style.legend.value.prefix,
|
|
212
|
+
v: t.value,
|
|
213
|
+
s: e.value.style.legend.value.suffix,
|
|
214
|
+
r: e.value.style.legend.value.rounding
|
|
215
|
+
}),
|
|
216
|
+
{
|
|
217
|
+
datapoint: t,
|
|
218
|
+
seriesIndex: o
|
|
219
|
+
}
|
|
220
|
+
)})</span>`, V.value = `<div>${a}</div>`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return de({
|
|
224
|
+
hideSeries: be,
|
|
225
|
+
showSeries: me
|
|
226
|
+
}), (t, o) => (s(), r("div", {
|
|
227
|
+
class: "vue-data-ui-component vue-ui-spark-stackbar",
|
|
228
|
+
ref_key: "sparkstackbarChart",
|
|
229
|
+
ref: G,
|
|
230
|
+
style: f(`width:100%; background:${e.value.style.backgroundColor}`)
|
|
231
|
+
}, [
|
|
232
|
+
e.value.style.title.text ? (s(), r("div", {
|
|
233
|
+
key: 0,
|
|
234
|
+
style: f(`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}`)
|
|
235
|
+
}, [
|
|
236
|
+
d("div", {
|
|
237
|
+
class: "atom-title",
|
|
238
|
+
style: f(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
239
|
+
}, A(e.value.style.title.text), 5),
|
|
240
|
+
e.value.style.title.subtitle.text ? (s(), r("div", {
|
|
241
|
+
key: 0,
|
|
242
|
+
class: "atom-subtitle",
|
|
243
|
+
style: f(`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"}`)
|
|
244
|
+
}, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
|
|
245
|
+
], 4)) : h("", !0),
|
|
246
|
+
(s(), r("svg", {
|
|
247
|
+
ref_key: "svgRef",
|
|
248
|
+
ref: ye,
|
|
249
|
+
xmlns: c(Te),
|
|
250
|
+
width: "100%",
|
|
251
|
+
viewBox: `0 0 ${g.value.width} ${g.value.height}`
|
|
252
|
+
}, [
|
|
253
|
+
ee(c(pe)),
|
|
254
|
+
d("defs", null, [
|
|
255
|
+
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("linearGradient", {
|
|
256
|
+
key: `stack_gradient_${a}`,
|
|
257
|
+
gradientTransform: "rotate(90)",
|
|
258
|
+
id: `stack_gradient_${a}_${T.value}`
|
|
259
|
+
}, [
|
|
260
|
+
d("stop", {
|
|
261
|
+
offset: "0%",
|
|
262
|
+
"stop-color": l.color
|
|
263
|
+
}, null, 8, Oe),
|
|
264
|
+
d("stop", {
|
|
265
|
+
offset: "50%",
|
|
266
|
+
"stop-color": c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
267
|
+
}, null, 8, Re),
|
|
268
|
+
d("stop", {
|
|
269
|
+
offset: "100%",
|
|
270
|
+
"stop-color": l.color
|
|
271
|
+
}, null, 8, je)
|
|
272
|
+
], 8, Me))), 128)),
|
|
273
|
+
d("clipPath", Ge, [
|
|
274
|
+
d("rect", {
|
|
275
|
+
x: "0.005",
|
|
276
|
+
y: "-2",
|
|
277
|
+
width: "0.99",
|
|
278
|
+
height: "5",
|
|
279
|
+
rx: "3",
|
|
280
|
+
ry: "3",
|
|
281
|
+
fill: e.value.style.backgroundColor
|
|
282
|
+
}, null, 8, We)
|
|
283
|
+
])
|
|
284
|
+
]),
|
|
285
|
+
H.value > 0 ? (s(), r("g", Ye, [
|
|
286
|
+
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
287
|
+
key: `stack_underlayer_${a}`,
|
|
288
|
+
x: l.start,
|
|
289
|
+
y: 0,
|
|
290
|
+
width: l.width,
|
|
291
|
+
height: g.value.height,
|
|
292
|
+
fill: e.value.style.bar.gradient.underlayerColor,
|
|
293
|
+
class: L({ animated: !w.value && !c(x) }),
|
|
294
|
+
style: f({
|
|
295
|
+
opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
|
|
296
|
+
})
|
|
297
|
+
}, null, 14, qe))), 128)),
|
|
298
|
+
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
299
|
+
key: `stack_${a}`,
|
|
300
|
+
x: l.start,
|
|
301
|
+
y: 0,
|
|
302
|
+
width: l.width,
|
|
303
|
+
height: g.value.height,
|
|
304
|
+
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${a}_${T.value})` : l.color,
|
|
305
|
+
stroke: e.value.style.backgroundColor,
|
|
306
|
+
"stroke-linecap": "round",
|
|
307
|
+
class: L({ animated: !w.value && !c(x) }),
|
|
308
|
+
style: f({
|
|
309
|
+
opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
|
|
310
|
+
})
|
|
311
|
+
}, null, 14, He))), 128)),
|
|
312
|
+
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
313
|
+
key: `stack_trap_${a}`,
|
|
314
|
+
x: l.start,
|
|
315
|
+
y: 0,
|
|
316
|
+
width: l.width,
|
|
317
|
+
height: g.value.height,
|
|
318
|
+
fill: "transparent",
|
|
319
|
+
stroke: "none",
|
|
320
|
+
class: L({ animated: !w.value && !c(x) }),
|
|
321
|
+
onClick: () => J(l, a),
|
|
322
|
+
onMouseenter: () => xe({ datapoint: l, seriesIndex: a }),
|
|
323
|
+
onMouseleave: (y) => _e({ datapoint: l, seriesIndex: a })
|
|
324
|
+
}, null, 42, Xe))), 128))
|
|
325
|
+
])) : (s(), r("rect", {
|
|
326
|
+
key: 1,
|
|
327
|
+
x: 2,
|
|
328
|
+
y: 1,
|
|
329
|
+
width: g.value.width - 4,
|
|
330
|
+
height: g.value.height - 2,
|
|
331
|
+
stroke: "#CCCCCC",
|
|
332
|
+
"stroke-width": "2",
|
|
333
|
+
fill: "transparent",
|
|
334
|
+
rx: (g.value.height - 4) / 2
|
|
335
|
+
}, null, 8, Je))
|
|
336
|
+
], 8, Ue)),
|
|
337
|
+
e.value.style.legend.show ? (s(), r("div", {
|
|
338
|
+
key: 1,
|
|
339
|
+
style: f(`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"}`),
|
|
340
|
+
class: "vue-ui-sparkstackbar-legend"
|
|
341
|
+
}, [
|
|
342
|
+
(s(!0), r(k, null, I(C.value, (l, a) => (s(), r("div", {
|
|
343
|
+
style: f(`font-size:${e.value.style.legend.fontSize}px;`),
|
|
344
|
+
class: L({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": p.value.includes(a) }),
|
|
345
|
+
onClick: (y) => {
|
|
346
|
+
M(a), J(l, a, !0);
|
|
347
|
+
}
|
|
348
|
+
}, [
|
|
349
|
+
d("div", Qe, [
|
|
350
|
+
(s(), r("svg", {
|
|
351
|
+
height: `${e.value.style.legend.fontSize}px`,
|
|
352
|
+
width: `${e.value.style.legend.fontSize}px`,
|
|
353
|
+
viewBox: "0 0 10 10"
|
|
354
|
+
}, [
|
|
355
|
+
d("defs", null, [
|
|
356
|
+
d("radialGradient", {
|
|
357
|
+
id: `legend_grad_${a}-${T.value}`
|
|
358
|
+
}, [
|
|
359
|
+
d("stop", {
|
|
360
|
+
offset: "0%",
|
|
361
|
+
"stop-color": c(x) ? "#FFFFFF" : c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
362
|
+
}, null, 8, tt),
|
|
363
|
+
d("stop", {
|
|
364
|
+
offset: "100%",
|
|
365
|
+
"stop-color": l.color
|
|
366
|
+
}, null, 8, lt)
|
|
367
|
+
], 8, et)
|
|
368
|
+
]),
|
|
369
|
+
d("circle", {
|
|
370
|
+
cx: 5,
|
|
371
|
+
cy: 5,
|
|
372
|
+
r: 5,
|
|
373
|
+
fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${a}-${T.value})` : l.color
|
|
374
|
+
}, null, 8, ot)
|
|
375
|
+
], 8, Ze)),
|
|
376
|
+
c(x) ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
377
|
+
d("span", {
|
|
378
|
+
style: f(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
379
|
+
}, A(l.name), 5),
|
|
380
|
+
w.value ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
381
|
+
e.value.style.legend.percentage.show ? (s(), r("span", {
|
|
382
|
+
key: 0,
|
|
383
|
+
style: f(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
|
|
384
|
+
}, A(p.value.includes(a) ? " - " : l.proportionLabel), 5)) : h("", !0),
|
|
385
|
+
e.value.style.legend.value.show ? (s(), r("span", {
|
|
386
|
+
key: 1,
|
|
387
|
+
style: f(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
|
|
388
|
+
}, " (" + A(c(ue)(
|
|
389
|
+
e.value.style.legend.value.formatter,
|
|
390
|
+
l.value,
|
|
391
|
+
c(j)({
|
|
392
|
+
p: e.value.style.legend.value.prefix,
|
|
393
|
+
v: l.value,
|
|
394
|
+
s: e.value.style.legend.value.suffix,
|
|
395
|
+
r: e.value.style.legend.value.rounding
|
|
396
|
+
}),
|
|
397
|
+
{ datapoint: l, seriesIndex: a }
|
|
398
|
+
)) + ") ", 5)) : h("", !0)
|
|
399
|
+
], 64))
|
|
400
|
+
], 64))
|
|
401
|
+
])
|
|
402
|
+
], 14, Ke))), 256))
|
|
403
|
+
], 4)) : h("", !0),
|
|
404
|
+
ee(c(fe), {
|
|
405
|
+
show: N.value && e.value.style.tooltip.show,
|
|
406
|
+
parent: G.value,
|
|
407
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
408
|
+
color: e.value.style.tooltip.color,
|
|
409
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
410
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
411
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
412
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
413
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
414
|
+
position: e.value.style.tooltip.position,
|
|
415
|
+
content: V.value,
|
|
416
|
+
isCustom: z.value,
|
|
417
|
+
offsetY: -124 + e.value.style.tooltip.offsetY,
|
|
418
|
+
blockShiftY: !0,
|
|
419
|
+
smooth: e.value.style.tooltip.smooth,
|
|
420
|
+
backdropFilter: e.value.style.tooltip.backdropFilter,
|
|
421
|
+
smoothForce: e.value.style.tooltip.smoothForce,
|
|
422
|
+
smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
|
|
423
|
+
}, {
|
|
424
|
+
"tooltip-before": te(() => [
|
|
425
|
+
R(t.$slots, "tooltip-before", le(oe({ ...O.value })), void 0, !0)
|
|
426
|
+
]),
|
|
427
|
+
"tooltip-after": te(() => [
|
|
428
|
+
R(t.$slots, "tooltip-after", le(oe({ ...O.value })), void 0, !0)
|
|
429
|
+
]),
|
|
430
|
+
_: 3
|
|
431
|
+
}, 8, ["show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
432
|
+
t.$slots.source ? (s(), r("div", at, [
|
|
433
|
+
R(t.$slots, "source", {}, void 0, !0)
|
|
434
|
+
], 512)) : h("", !0),
|
|
435
|
+
c(x) ? (s(), $e(Ve, { key: 3 })) : h("", !0)
|
|
436
|
+
], 4));
|
|
437
|
+
}
|
|
438
|
+
}, pt = /* @__PURE__ */ Ee(st, [["__scopeId", "data-v-ffa64d8d"]]);
|
|
439
|
+
export {
|
|
440
|
+
pt as default
|
|
441
|
+
};
|