vue-data-ui 2.3.88 → 2.3.90
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/{Arrow-kIoRmLea.js → Arrow-C_Fnn6al.js} +1 -1
- package/dist/{Arrow-CaBSHqw3.cjs → Arrow-D1pymKl6.cjs} +1 -1
- package/dist/{BaseIcon-dAh8thfs.js → BaseIcon-BMfi5PnL.js} +1 -1
- package/dist/{BaseIcon-B2zEAYL0.cjs → BaseIcon-CnFXP_n9.cjs} +1 -1
- package/dist/{DataTable-BLGE-au6.js → DataTable-Cmbf3abv.js} +2 -2
- package/dist/{DataTable-DEvCstuA.cjs → DataTable-cOEA6Z37.cjs} +1 -1
- package/dist/{Legend-BAZwLtW5.js → Legend-CCq0mNRg.js} +1 -1
- package/dist/{Legend-D9oHmbQR.cjs → Legend-XqP6-7Ac.cjs} +1 -1
- package/dist/{Shape-yv-533z4.cjs → Shape-B51JGReT.cjs} +1 -1
- package/dist/{Shape-Bw52scDY.js → Shape-BNocET8E.js} +1 -1
- package/dist/{Slicer-eP9UH3h4.js → Slicer-BKszZXjM.js} +2 -2
- package/dist/{Slicer-CnyR7m1m.cjs → Slicer-Bc7OWCcl.cjs} +1 -1
- package/dist/{Title-BOtOowG-.cjs → Title-BaR4XyXa.cjs} +1 -1
- package/dist/{Title-vxOwL9mI.js → Title-DlBwa3-X.js} +1 -1
- package/dist/{Tooltip-B25UdCt3.cjs → Tooltip-CX57w9Q9.cjs} +1 -1
- package/dist/{Tooltip-FDQ6j0dy.js → Tooltip-w32n-8sY.js} +1 -1
- package/dist/img-BFCs759q.cjs +1 -0
- package/dist/img-DGzWcJ4Y.js +15 -0
- package/dist/{index-BzFQHG8B.cjs → index-B8EMsnjU.cjs} +1 -1
- package/dist/{index-Bkzd7TEp.js → index-DQl1TFXa.js} +1 -1
- package/dist/pdf-9cRTLjY8.cjs +1 -0
- package/dist/{pdf-97UbtKC2.js → pdf-B7oVat64.js} +7 -7
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BU19Uk2G.cjs → useNestedProp-DlCe_zZz.cjs} +1 -1
- package/dist/{useNestedProp-BjKkGjnV.js → useNestedProp-lmeFt-ev.js} +1 -1
- package/dist/usePrinter-BmXrEJ99.cjs +1 -0
- package/dist/{usePrinter-BO99ut-7.js → usePrinter-DgKGVvJC.js} +155 -156
- package/dist/{vue-data-ui-9X87OiUw.js → vue-data-ui-Byrb_Y3k.js} +57 -57
- package/dist/{vue-data-ui-C4vMufw3.cjs → vue-data-ui-DQurgvN8.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BQs0ss6E.js → vue-ui-3d-bar-CM_usP2U.js} +7 -7
- package/dist/{vue-ui-3d-bar-DW_P_GEm.cjs → vue-ui-3d-bar-Ce-Re50D.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dq8PnOQI.js → vue-ui-accordion-CroZrm7T.js} +3 -3
- package/dist/{vue-ui-accordion-D9rDPTxC.cjs → vue-ui-accordion-DRI-fN6I.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BtQBOmuj.js → vue-ui-age-pyramid-BZU-WI_a.js} +8 -8
- package/dist/{vue-ui-age-pyramid-w1cHqmfP.cjs → vue-ui-age-pyramid-C08rTXJn.cjs} +1 -1
- package/dist/{vue-ui-annotator-DN8dHbpa.cjs → vue-ui-annotator-BpzM25VY.cjs} +1 -1
- package/dist/{vue-ui-annotator-yL2aaXSM.js → vue-ui-annotator-CsfYgmrC.js} +1 -1
- package/dist/{vue-ui-candlestick-DvI-paAZ.js → vue-ui-candlestick-BPi7aBEf.js} +9 -9
- package/dist/{vue-ui-candlestick-Bb3gE99L.cjs → vue-ui-candlestick-m8fjxbj-.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DrnpUyMB.cjs → vue-ui-carousel-table-CpodLcgX.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CFOGiUYF.js → vue-ui-carousel-table-tbviS8Fo.js} +4 -4
- package/dist/{vue-ui-chestnut--s6irU0q.cjs → vue-ui-chestnut-Y0gQvbbf.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BsAh9hFC.js → vue-ui-chestnut-ql9yEs6j.js} +6 -6
- package/dist/{vue-ui-cursor-B-XJpQPg.cjs → vue-ui-cursor-B3w0SgJP.cjs} +1 -1
- package/dist/{vue-ui-cursor-C4ReYD2O.js → vue-ui-cursor-Dw7_R_Pd.js} +2 -2
- package/dist/{vue-ui-dashboard-B9vNbg0W.js → vue-ui-dashboard-DAY0cdat.js} +3 -3
- package/dist/vue-ui-dashboard-enrB5B3P.cjs +1 -0
- package/dist/{vue-ui-digits-DMXN0q7k.cjs → vue-ui-digits-3Q6uZCzD.cjs} +1 -1
- package/dist/{vue-ui-digits-BWo3eCH7.js → vue-ui-digits-DN6CRpXc.js} +2 -2
- package/dist/{vue-ui-donut-Cel6UjXl.js → vue-ui-donut-B3yDJvZI.js} +9 -9
- package/dist/{vue-ui-donut-B0iDrljg.cjs → vue-ui-donut-CCm7GJsm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-daM3GjWu.js → vue-ui-donut-evolution-CzBvVRKG.js} +9 -9
- package/dist/{vue-ui-donut-evolution-D94iUNlt.cjs → vue-ui-donut-evolution-DiN8Jm0n.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-AimehlIj.cjs → vue-ui-dumbbell-lb72j7bY.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DY_AhNS1.js → vue-ui-dumbbell-vQ5YRGwJ.js} +8 -8
- package/dist/{vue-ui-flow-BhnVwgW5.cjs → vue-ui-flow-B5Gxaqvl.cjs} +1 -1
- package/dist/{vue-ui-flow-DHemHIqr.js → vue-ui-flow-DAOKURA6.js} +7 -7
- package/dist/{vue-ui-galaxy-D8uc51fE.js → vue-ui-galaxy-B86BK1JM.js} +9 -9
- package/dist/{vue-ui-galaxy-DlS-pSHI.cjs → vue-ui-galaxy-Ck5cPkrh.cjs} +1 -1
- package/dist/{vue-ui-gauge-DkgiaTIQ.cjs → vue-ui-gauge-BwIhwSUw.cjs} +1 -1
- package/dist/{vue-ui-gauge-BDP3AbQP.js → vue-ui-gauge-n8TilFo9.js} +5 -5
- package/dist/{vue-ui-gizmo-Bw-drsvJ.js → vue-ui-gizmo-CFIBlG4V.js} +2 -2
- package/dist/{vue-ui-gizmo-d48XB9Y7.cjs → vue-ui-gizmo-DrGaoiM_.cjs} +1 -1
- package/dist/{vue-ui-heatmap-qXivxpXK.cjs → vue-ui-heatmap-BLc6thGZ.cjs} +1 -1
- package/dist/{vue-ui-heatmap-D6rhUBIv.js → vue-ui-heatmap-ZkmD9EAg.js} +8 -8
- package/dist/{vue-ui-kpi-CaJNQu-7.js → vue-ui-kpi-CtJ3t6GX.js} +3 -3
- package/dist/{vue-ui-kpi-DYtYBfVS.cjs → vue-ui-kpi-D6Myg0y1.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Bd3n8Eh7.cjs → vue-ui-mini-loader-BjJ_YYZj.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C8WE9mmc.js → vue-ui-mini-loader-Cosy9XjR.js} +2 -2
- package/dist/{vue-ui-molecule-DCOIE2Oz.cjs → vue-ui-molecule-CAj1HFit.cjs} +1 -1
- package/dist/{vue-ui-molecule-BJ78cyz2.js → vue-ui-molecule-DTFOBjgC.js} +9 -9
- package/dist/{vue-ui-mood-radar-xc7ZIj7B.cjs → vue-ui-mood-radar-CV2in2wO.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BcKbxhUb.js → vue-ui-mood-radar-J_dI9m_i.js} +9 -9
- package/dist/{vue-ui-nested-donuts-1AnFMRQE.cjs → vue-ui-nested-donuts-4vO23n9z.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DmqrKtK-.js → vue-ui-nested-donuts-CtqU4xxu.js} +9 -9
- package/dist/{vue-ui-onion-B-CQQFDn.cjs → vue-ui-onion-B3mtn6xf.cjs} +1 -1
- package/dist/{vue-ui-onion-B7-Luph_.js → vue-ui-onion-BMo0Ye54.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-Cg7rXYJl.cjs → vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cl2fIY0h.js → vue-ui-parallel-coordinate-plot-yKLZbDS5.js} +10 -10
- package/dist/{vue-ui-quadrant-BMRu5C6_.js → vue-ui-quadrant-BrRasVaj.js} +10 -10
- package/dist/{vue-ui-quadrant-DzqQM8zj.cjs → vue-ui-quadrant-CpJX1Jwa.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D6Y5lQZz.cjs → vue-ui-quick-chart-CTxsI2tk.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-bdjkTZCJ.js → vue-ui-quick-chart-uH33UIjX.js} +7 -7
- package/dist/{vue-ui-radar-DUBmmYCM.js → vue-ui-radar-BJ3qMHP4.js} +10 -10
- package/dist/{vue-ui-radar-CmIznCHB.cjs → vue-ui-radar-DFjsXmJ3.cjs} +1 -1
- package/dist/{vue-ui-rating-D353kmjW.cjs → vue-ui-rating-BEWaQMBR.cjs} +1 -1
- package/dist/{vue-ui-rating-vn6QGQ1T.js → vue-ui-rating-BFskhiyh.js} +2 -2
- package/dist/{vue-ui-relation-circle-Dd_nf_ni.cjs → vue-ui-relation-circle-DXuKdCih.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Enjx6oV8.js → vue-ui-relation-circle-DdK4qk0P.js} +5 -5
- package/dist/{vue-ui-rings-D3n403nM.js → vue-ui-rings-BqHSq6Wt.js} +9 -9
- package/dist/{vue-ui-rings-BggXdDcB.cjs → vue-ui-rings-D_T_D6AS.cjs} +1 -1
- package/dist/{vue-ui-scatter-D8gjIVvT.js → vue-ui-scatter-C0gfF6NJ.js} +10 -10
- package/dist/{vue-ui-scatter-C5kTB_at.cjs → vue-ui-scatter-DPByFMNL.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BOtaOWHH.js → vue-ui-screenshot-6tOLntj9.js} +1 -1
- package/dist/{vue-ui-screenshot-BOtri9ZP.cjs → vue-ui-screenshot-CbvIYfYU.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B1pWkVPT.js → vue-ui-skeleton-BVJGmYjj.js} +2 -2
- package/dist/{vue-ui-skeleton-B_ed6BaF.cjs → vue-ui-skeleton-Bli7jLZ7.cjs} +1 -1
- package/dist/{vue-ui-smiley-Fx2vCfWl.js → vue-ui-smiley-2EoxEmXW.js} +2 -2
- package/dist/{vue-ui-smiley-BHwhptXa.cjs → vue-ui-smiley-CUgH2tnV.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BbGJLy6v.js → vue-ui-spark-trend-DjNPMOkN.js} +4 -4
- package/dist/{vue-ui-spark-trend-DYeF_f9D.cjs → vue-ui-spark-trend-sfgUJ32Q.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D4zOXsmw.js → vue-ui-sparkbar-BBm3DE1P.js} +3 -3
- package/dist/{vue-ui-sparkbar-waCPID8a.cjs → vue-ui-sparkbar-CKWYzriN.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-ByLoId02.cjs → vue-ui-sparkgauge-D0q9F9Nz.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CrOeVBM6.js → vue-ui-sparkgauge-IIW24eJQ.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Du-8Djku.cjs → vue-ui-sparkhistogram-CywhBkm2.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-m8HxSpNJ.js → vue-ui-sparkhistogram-DVXxA6ji.js} +4 -4
- package/dist/{vue-ui-sparkline-Ccq4xp69.cjs → vue-ui-sparkline-Besp8Ffy.cjs} +1 -1
- package/dist/{vue-ui-sparkline-KMDtu_Z0.js → vue-ui-sparkline-CH89kcaa.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-D3YWcJ_H.js → vue-ui-sparkstackbar-Bcod5yu_.js} +112 -96
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +1 -0
- package/dist/{vue-ui-stackbar-DlfuJps0.cjs → vue-ui-stackbar-D0fGVkCR.cjs} +1 -1
- package/dist/{vue-ui-stackbar-D6oKKqGM.js → vue-ui-stackbar-Djjcgtyg.js} +10 -10
- package/dist/{vue-ui-strip-plot-BbAVQ73Y.js → vue-ui-strip-plot-ByPCQ4xk.js} +9 -9
- package/dist/{vue-ui-strip-plot-CtJyMV8c.cjs → vue-ui-strip-plot-XDj8rL9m.cjs} +1 -1
- package/dist/{vue-ui-table-B1feGzci.cjs → vue-ui-table-B6Kpda3o.cjs} +1 -1
- package/dist/{vue-ui-table-C3fDr-79.js → vue-ui-table-D8Sm2fzX.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DTTq642Y.cjs → vue-ui-table-heatmap-DjEN0l12.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Bs11u_Bn.js → vue-ui-table-heatmap-mlq_J56h.js} +4 -4
- package/dist/{vue-ui-table-sparkline-C9v0ZCRY.cjs → vue-ui-table-sparkline-DByva7rj.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BmnqHZCN.js → vue-ui-table-sparkline-DF29_qZk.js} +5 -5
- package/dist/{vue-ui-thermometer-BF0EfLSS.js → vue-ui-thermometer-BKf-rGuS.js} +5 -5
- package/dist/{vue-ui-thermometer-DH4J5XrN.cjs → vue-ui-thermometer-C3T56ras.cjs} +1 -1
- package/dist/{vue-ui-timer-Dex5u9Ug.js → vue-ui-timer-B8jW8M60.js} +4 -4
- package/dist/{vue-ui-timer-BoF6_mg_.cjs → vue-ui-timer-B_ZvV1ON.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DEhFA_QA.cjs → vue-ui-tiremarks-DRbSpTgq.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-i2bIrejU.js → vue-ui-tiremarks-riEfve5q.js} +5 -5
- package/dist/{vue-ui-treemap-CkHKUr9H.js → vue-ui-treemap-5F0ynBnb.js} +9 -9
- package/dist/{vue-ui-treemap-BXfhAmfw.cjs → vue-ui-treemap-CtKUTs2G.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Co4Vz7W1.cjs → vue-ui-vertical-bar-BBIWdeXH.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Ui-eKo2G.js → vue-ui-vertical-bar-CxRBvHZy.js} +9 -9
- package/dist/{vue-ui-waffle-DJIU32yG.cjs → vue-ui-waffle-9a3C4Nj-.cjs} +1 -1
- package/dist/{vue-ui-waffle-IjZAL-JJ.js → vue-ui-waffle-B8G4i5WH.js} +9 -9
- package/dist/{vue-ui-wheel-WTP6VSQg.cjs → vue-ui-wheel-CErxlmqw.cjs} +1 -1
- package/dist/{vue-ui-wheel-CEyocXra.js → vue-ui-wheel-DmzkGeCY.js} +5 -5
- package/dist/{vue-ui-word-cloud-CanNB33d.js → vue-ui-word-cloud-dMBTVGVk.js} +7 -7
- package/dist/{vue-ui-word-cloud-Cg-5NUED.cjs → vue-ui-word-cloud-nmx846H2.cjs} +1 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-DQCerSdP.cjs → vue-ui-xy-canvas-CCwtKYgd.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CtYuW5vo.js → vue-ui-xy-canvas-nraUv13Y.js} +10 -10
- package/dist/{vue-ui-xy-Ea4QdEJG.js → vue-ui-xy-iUQyB_PL.js} +769 -762
- package/package.json +1 -1
- package/dist/pdf-Cz3729tZ.cjs +0 -1
- package/dist/usePrinter-BY2kEF_E.cjs +0 -1
- package/dist/vue-ui-dashboard-DRPAfzVQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BbG_IuZ6.cjs +0 -1
- package/dist/vue-ui-xy-B5Wip8Yp.cjs +0 -3
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as G } from "./useNestedProp-
|
|
4
|
-
import oe from "./vue-ui-skeleton-
|
|
1
|
+
import { computed as f, ref as k, watch as I, onMounted as X, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as d, toDisplayString as _, createCommentVNode as y, unref as b, Fragment as D, renderList as P, normalizeClass as N, createBlock as W } from "vue";
|
|
2
|
+
import { u as J, c as U, t as K, a as Q, p as i, d as C, b as R, o as Y, e as O, g as Z, f as V, X as ee, s as te, w as le, i as ae } from "./index-DQl1TFXa.js";
|
|
3
|
+
import { u as G } from "./useNestedProp-lmeFt-ev.js";
|
|
4
|
+
import oe from "./vue-ui-skeleton-BVJGmYjj.js";
|
|
5
5
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-color"], ce = ["stop-color"], de = {
|
|
7
7
|
id: "stackPill",
|
|
8
8
|
clipPathUnits: "objectBoundingBox"
|
|
9
|
-
}, ve = ["fill"], ge = {
|
|
9
|
+
}, ve = ["fill"], ge = {
|
|
10
|
+
key: 0,
|
|
11
|
+
"clip-path": "url(#stackPill)"
|
|
12
|
+
}, pe = ["height", "width", "fill"], he = ["onClick", "x", "width", "height", "fill", "stroke"], fe = ["width", "height", "rx"], ye = ["onClick"], me = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, ke = ["height", "width"], _e = ["fill"], be = {
|
|
10
13
|
__name: "vue-ui-sparkstackbar",
|
|
11
14
|
props: {
|
|
12
15
|
config: {
|
|
@@ -24,60 +27,60 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
24
27
|
},
|
|
25
28
|
emits: ["selectDatapoint"],
|
|
26
29
|
setup(M, { emit: T }) {
|
|
27
|
-
const
|
|
28
|
-
get: () =>
|
|
30
|
+
const u = M, { vue_ui_sparkstackbar: q } = J(), z = f(() => !!u.dataset && u.dataset.length), A = k(U()), e = f({
|
|
31
|
+
get: () => L(),
|
|
29
32
|
set: (t) => t
|
|
30
33
|
});
|
|
31
|
-
function
|
|
34
|
+
function L() {
|
|
32
35
|
const t = G({
|
|
33
|
-
userConfig:
|
|
36
|
+
userConfig: u.config,
|
|
34
37
|
defaultConfig: q
|
|
35
38
|
});
|
|
36
39
|
return t.theme ? {
|
|
37
40
|
...G({
|
|
38
|
-
userConfig:
|
|
41
|
+
userConfig: K.vue_ui_sparkstackbar[t.theme] || u.config,
|
|
39
42
|
defaultConfig: t
|
|
40
43
|
}),
|
|
41
|
-
customPalette:
|
|
44
|
+
customPalette: Q[t.theme] || i
|
|
42
45
|
} : t;
|
|
43
46
|
}
|
|
44
|
-
I(() =>
|
|
45
|
-
e.value =
|
|
46
|
-
}, { deep: !0 }), I(() =>
|
|
47
|
-
|
|
47
|
+
I(() => u.config, (t) => {
|
|
48
|
+
e.value = L(), B();
|
|
49
|
+
}, { deep: !0 }), I(() => u.dataset, (t) => {
|
|
50
|
+
m.value = u.dataset.map((a, l) => ({
|
|
48
51
|
...a,
|
|
49
|
-
color: a.color ?
|
|
52
|
+
color: a.color ? C(a.color) : x.value[l] || i[l] || i[l % i.length]
|
|
50
53
|
}));
|
|
51
54
|
}, { deep: !0 });
|
|
52
|
-
const
|
|
55
|
+
const x = f(() => R(e.value.customPalette)), m = k(u.dataset.map((t, a) => ({
|
|
53
56
|
...t,
|
|
54
57
|
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
55
|
-
color: t.color ?
|
|
56
|
-
}))),
|
|
58
|
+
color: t.color ? C(t.color) : x.value[a] || i[a] || i[a % i.length]
|
|
59
|
+
}))), w = k(!0);
|
|
57
60
|
X(() => {
|
|
58
|
-
if (
|
|
59
|
-
let
|
|
60
|
-
o += l / t, o < l ? (
|
|
61
|
+
if (B(), e.value.style.animation.show) {
|
|
62
|
+
let h = function() {
|
|
63
|
+
o += l / t, o < l ? (m.value = m.value.map((s, c) => ({
|
|
61
64
|
...s,
|
|
62
|
-
value: s.value += a[
|
|
63
|
-
color: s.color ?
|
|
64
|
-
})), requestAnimationFrame(
|
|
65
|
+
value: s.value += a[c],
|
|
66
|
+
color: s.color ? C(s.color) : x.value[c] || i[c] || i[c % i.length]
|
|
67
|
+
})), requestAnimationFrame(h)) : (w.value = !1, m.value = u.dataset.map((s, c) => ({
|
|
65
68
|
...s,
|
|
66
69
|
value: s.value || 0,
|
|
67
|
-
color: s.color ?
|
|
70
|
+
color: s.color ? C(s.color) : x.value[c] || i[c] || i[c % i.length],
|
|
68
71
|
id: U()
|
|
69
72
|
})));
|
|
70
73
|
};
|
|
71
|
-
const t = e.value.style.animation.animationFrames, a =
|
|
74
|
+
const t = e.value.style.animation.animationFrames, a = u.dataset.map((s, c) => s.value / t), l = u.dataset.map((s) => s.value || 0).reduce((s, c) => s + c, 0);
|
|
72
75
|
let o = 0;
|
|
73
|
-
|
|
76
|
+
w.value = !0, h();
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
|
-
function
|
|
77
|
-
Y(
|
|
79
|
+
function B() {
|
|
80
|
+
Y(u.dataset) ? O({
|
|
78
81
|
componentName: "VueUiSparkStackbar",
|
|
79
82
|
type: "dataset"
|
|
80
|
-
}) :
|
|
83
|
+
}) : u.dataset.forEach((t, a) => {
|
|
81
84
|
Z({
|
|
82
85
|
datasetObject: t,
|
|
83
86
|
requiredAttributes: ["name", "value"]
|
|
@@ -91,24 +94,27 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
91
94
|
});
|
|
92
95
|
});
|
|
93
96
|
}
|
|
94
|
-
const
|
|
97
|
+
const p = k({
|
|
95
98
|
width: 500,
|
|
96
99
|
height: 16
|
|
97
|
-
}), v =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
}), v = k([]), F = f(() => u.dataset.map((t) => t.value || 0).filter((t, a) => !v.value.includes(a)).reduce((t, a) => t + a, 0)), j = f(() => m.value.map((t, a) => {
|
|
101
|
+
const l = t.value || 0, o = l / F.value, h = isNaN(o) ? 0 : o, s = h * p.value.width;
|
|
102
|
+
return {
|
|
103
|
+
...t,
|
|
104
|
+
value: l,
|
|
105
|
+
proportion: h,
|
|
106
|
+
width: s,
|
|
107
|
+
proportionLabel: V({
|
|
108
|
+
v: h * 100,
|
|
109
|
+
s: "%",
|
|
110
|
+
r: e.value.style.legend.percentage.rounding
|
|
111
|
+
})
|
|
112
|
+
};
|
|
113
|
+
})), $ = f(() => j.value.filter((t, a) => !v.value.includes(a)));
|
|
108
114
|
function H(t) {
|
|
109
|
-
v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.length <
|
|
115
|
+
v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.length < m.value.length - 1 && v.value.push(t);
|
|
110
116
|
}
|
|
111
|
-
const S =
|
|
117
|
+
const S = f(() => {
|
|
112
118
|
let t = 0;
|
|
113
119
|
const a = [];
|
|
114
120
|
for (let l = 0; l < $.value.length; l += 1)
|
|
@@ -121,48 +127,48 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
121
127
|
function E(t, a) {
|
|
122
128
|
T("selectDatapoint", { datapoint: t, index: a });
|
|
123
129
|
}
|
|
124
|
-
return (t, a) => (n(),
|
|
130
|
+
return (t, a) => (n(), r("div", {
|
|
125
131
|
style: g(`width:100%; background:${e.value.style.backgroundColor}`)
|
|
126
132
|
}, [
|
|
127
|
-
e.value.style.title.text ? (n(),
|
|
133
|
+
e.value.style.title.text ? (n(), r("div", {
|
|
128
134
|
key: 0,
|
|
129
135
|
style: g(`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}`)
|
|
130
136
|
}, [
|
|
131
|
-
|
|
137
|
+
d("div", {
|
|
132
138
|
style: g(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
133
|
-
},
|
|
134
|
-
e.value.style.title.subtitle.text ? (n(),
|
|
139
|
+
}, _(e.value.style.title.text), 5),
|
|
140
|
+
e.value.style.title.subtitle.text ? (n(), r("div", {
|
|
135
141
|
key: 0,
|
|
136
142
|
style: g(`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"}`)
|
|
137
|
-
},
|
|
138
|
-
], 4)) :
|
|
139
|
-
|
|
143
|
+
}, _(e.value.style.title.subtitle.text), 5)) : y("", !0)
|
|
144
|
+
], 4)) : y("", !0),
|
|
145
|
+
z.value ? (n(), r("svg", {
|
|
140
146
|
key: 1,
|
|
141
|
-
xmlns:
|
|
147
|
+
xmlns: b(ee),
|
|
142
148
|
width: "100%",
|
|
143
|
-
viewBox: `0 0 ${
|
|
149
|
+
viewBox: `0 0 ${p.value.width} ${p.value.height}`
|
|
144
150
|
}, [
|
|
145
|
-
|
|
146
|
-
(n(!0),
|
|
151
|
+
d("defs", null, [
|
|
152
|
+
(n(!0), r(D, null, P(S.value, (l, o) => (n(), r("linearGradient", {
|
|
147
153
|
key: `stack_gradient_${o}`,
|
|
148
154
|
gradientTransform: "rotate(90)",
|
|
149
|
-
id: `stack_gradient_${o}_${
|
|
155
|
+
id: `stack_gradient_${o}_${A.value}`
|
|
150
156
|
}, [
|
|
151
|
-
|
|
157
|
+
d("stop", {
|
|
152
158
|
offset: "0%",
|
|
153
159
|
"stop-color": l.color
|
|
154
160
|
}, null, 8, ue),
|
|
155
|
-
|
|
161
|
+
d("stop", {
|
|
156
162
|
offset: "50%",
|
|
157
|
-
"stop-color":
|
|
163
|
+
"stop-color": b(te)(b(le)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
158
164
|
}, null, 8, ie),
|
|
159
|
-
|
|
165
|
+
d("stop", {
|
|
160
166
|
offset: "100%",
|
|
161
167
|
"stop-color": l.color
|
|
162
168
|
}, null, 8, ce)
|
|
163
169
|
], 8, re))), 128)),
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
d("clipPath", de, [
|
|
171
|
+
d("rect", {
|
|
166
172
|
x: "0.005",
|
|
167
173
|
y: "-2",
|
|
168
174
|
width: "0.99",
|
|
@@ -173,30 +179,40 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
173
179
|
}, null, 8, ve)
|
|
174
180
|
])
|
|
175
181
|
]),
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
F.value > 0 ? (n(), r("g", ge, [
|
|
183
|
+
d("rect", {
|
|
178
184
|
x: 0,
|
|
179
185
|
y: 0,
|
|
180
|
-
height:
|
|
186
|
+
height: p.value.height,
|
|
181
187
|
width: S.value.map((l) => l.width).reduce((l, o) => l + o, 0),
|
|
182
188
|
fill: e.value.style.bar.gradient.underlayerColor,
|
|
183
|
-
class:
|
|
189
|
+
class: N({ animated: !w.value })
|
|
184
190
|
}, null, 10, pe),
|
|
185
|
-
(n(!0),
|
|
191
|
+
(n(!0), r(D, null, P(S.value, (l, o) => (n(), r("rect", {
|
|
186
192
|
key: `stack_${o}`,
|
|
187
193
|
onClick: () => E(l, o),
|
|
188
194
|
x: l.start,
|
|
189
195
|
y: 0,
|
|
190
196
|
width: l.width,
|
|
191
|
-
height:
|
|
192
|
-
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${
|
|
197
|
+
height: p.value.height,
|
|
198
|
+
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${A.value})` : l.color,
|
|
193
199
|
stroke: e.value.style.backgroundColor,
|
|
194
200
|
"stroke-linecap": "round",
|
|
195
|
-
class:
|
|
201
|
+
class: N({ animated: !w.value })
|
|
196
202
|
}, null, 10, he))), 128))
|
|
197
|
-
])
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
])) : (n(), r("rect", {
|
|
204
|
+
key: 1,
|
|
205
|
+
x: 2,
|
|
206
|
+
y: 1,
|
|
207
|
+
width: p.value.width - 4,
|
|
208
|
+
height: p.value.height - 2,
|
|
209
|
+
stroke: "#CCCCCC",
|
|
210
|
+
"stroke-width": "2",
|
|
211
|
+
fill: "transparent",
|
|
212
|
+
rx: (p.value.height - 4) / 2
|
|
213
|
+
}, null, 8, fe))
|
|
214
|
+
], 8, ne)) : y("", !0),
|
|
215
|
+
z.value ? y("", !0) : (n(), W(oe, {
|
|
200
216
|
key: 2,
|
|
201
217
|
config: {
|
|
202
218
|
type: "sparkStackbar",
|
|
@@ -208,58 +224,58 @@ const ne = ["xmlns", "viewBox"], re = ["id"], ue = ["stop-color"], ie = ["stop-c
|
|
|
208
224
|
}
|
|
209
225
|
}
|
|
210
226
|
}, null, 8, ["config"])),
|
|
211
|
-
e.value.style.legend.show ? (n(),
|
|
227
|
+
e.value.style.legend.show ? (n(), r("div", {
|
|
212
228
|
key: 3,
|
|
213
229
|
style: g(`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"}`),
|
|
214
230
|
class: "vue-ui-sparkstackbar-legend"
|
|
215
231
|
}, [
|
|
216
|
-
(n(!0),
|
|
232
|
+
(n(!0), r(D, null, P(j.value, (l, o) => (n(), r("div", {
|
|
217
233
|
style: g(`font-size:${e.value.style.legend.fontSize}px;`),
|
|
218
|
-
class:
|
|
219
|
-
onClick: (
|
|
234
|
+
class: N({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": v.value.includes(o) }),
|
|
235
|
+
onClick: (h) => {
|
|
220
236
|
H(o), E(l, o);
|
|
221
237
|
}
|
|
222
238
|
}, [
|
|
223
|
-
|
|
224
|
-
(n(),
|
|
239
|
+
d("div", me, [
|
|
240
|
+
(n(), r("svg", {
|
|
225
241
|
height: `${e.value.style.legend.fontSize}px`,
|
|
226
242
|
width: `${e.value.style.legend.fontSize}px`,
|
|
227
243
|
viewBox: "0 0 10 10"
|
|
228
244
|
}, [
|
|
229
|
-
|
|
245
|
+
d("circle", {
|
|
230
246
|
cx: 5,
|
|
231
247
|
cy: 5,
|
|
232
248
|
r: 5,
|
|
233
249
|
fill: l.color
|
|
234
|
-
}, null, 8,
|
|
235
|
-
], 8,
|
|
236
|
-
|
|
250
|
+
}, null, 8, _e)
|
|
251
|
+
], 8, ke)),
|
|
252
|
+
d("span", {
|
|
237
253
|
style: g(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
238
|
-
},
|
|
239
|
-
e.value.style.legend.percentage.show ? (n(),
|
|
254
|
+
}, _(l.name), 5),
|
|
255
|
+
e.value.style.legend.percentage.show ? (n(), r("span", {
|
|
240
256
|
key: 0,
|
|
241
257
|
style: g(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
|
|
242
|
-
},
|
|
243
|
-
e.value.style.legend.value.show ? (n(),
|
|
258
|
+
}, _(v.value.includes(o) ? " - " : l.proportionLabel), 5)) : y("", !0),
|
|
259
|
+
e.value.style.legend.value.show ? (n(), r("span", {
|
|
244
260
|
key: 1,
|
|
245
261
|
style: g(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
|
|
246
|
-
}, " (" +
|
|
262
|
+
}, " (" + _(b(ae)(
|
|
247
263
|
e.value.style.legend.value.formatter,
|
|
248
264
|
l.value,
|
|
249
|
-
|
|
265
|
+
b(V)({
|
|
250
266
|
p: e.value.style.legend.value.prefix,
|
|
251
267
|
v: l.value,
|
|
252
268
|
s: e.value.style.legend.value.suffix,
|
|
253
269
|
r: e.value.style.legend.value.rounding
|
|
254
270
|
}),
|
|
255
271
|
{ datapoint: l, seriesIndex: o }
|
|
256
|
-
)) + ") ", 5)) :
|
|
272
|
+
)) + ") ", 5)) : y("", !0)
|
|
257
273
|
])
|
|
258
|
-
], 14,
|
|
259
|
-
], 4)) :
|
|
274
|
+
], 14, ye))), 256))
|
|
275
|
+
], 4)) : y("", !0)
|
|
260
276
|
], 4));
|
|
261
277
|
}
|
|
262
|
-
},
|
|
278
|
+
}, De = /* @__PURE__ */ se(be, [["__scopeId", "data-v-25e78abf"]]);
|
|
263
279
|
export {
|
|
264
|
-
|
|
280
|
+
De as default
|
|
265
281
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B8EMsnjU.cjs"),B=require("./useNestedProp-DlCe_zZz.cjs"),V=require("./vue-ui-skeleton-Bli7jLZ7.cjs"),z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),D=["xmlns","viewBox"],P=["id"],L=["stop-color"],A=["stop-color"],F=["stop-color"],U={id:"stackPill",clipPathUnits:"objectBoundingBox"},j=["fill"],q={key:0,"clip-path":"url(#stackPill)"},T=["height","width","fill"],H=["onClick","x","width","height","fill","stroke"],I=["width","height","rx"],O=["onClick"],M={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},G=["height","width"],W=["fill"],X={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(S,{emit:E}){const u=S,{vue_ui_sparkstackbar:N}=o.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length),k=e.ref(o.createUid()),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=B.useNestedProp({userConfig:u.config,defaultConfig:N});return l.theme?{...B.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>u.config,l=>{t.value=_(),b()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map((n,a)=>({...n,color:n.color?o.convertColorToHex(n.color):g.value[a]||o.palette[a]||o.palette[a%o.palette.length]}))},{deep:!0});const g=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),v=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):g.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),m=e.ref(!0);e.onMounted(()=>{if(b(),t.value.style.animation.show){let p=function(){r+=a/l,r<a?(v.value=v.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(p)):(m.value=!1,v.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;m.value=!0,p()}});function b(){o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})})}const d=e.ref({width:500,height:16}),c=e.ref([]),C=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),x=e.computed(()=>v.value.map((l,n)=>{const a=l.value||0,r=a/C.value,p=isNaN(r)?0:r,s=p*d.value.width;return{...l,value:a,proportion:p,width:s,proportionLabel:o.dataLabel({v:p*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),h=e.computed(()=>x.value.filter((l,n)=>!c.value.includes(n)));function $(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<v.value.length-1&&c.value.push(l)}const y=e.computed(()=>{let l=0;const n=[];for(let a=0;a<h.value.length;a+=1)n.push({...h.value[a],start:l}),l+=h.value[a].width;return n});function w(l,n){E("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${d.value.width} ${d.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${k.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,L),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,F)],8,P))),128)),e.createElementVNode("clipPath",U,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,j)])]),C.value>0?(e.openBlock(),e.createElementBlock("g",q,[e.createElementVNode("rect",{x:0,y:0,height:d.value.height,width:y.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!m.value})},null,10,T),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>w(a,r),x:a.start,y:0,width:a.width,height:d.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${k.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!m.value})},null,10,H))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:d.value.width-4,height:d.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(d.value.height-4)/2},null,8,I))],8,D)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:p=>{$(r),w(a,r)}},[e.createElementVNode("div",M,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,W)],8,G)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,O))),256))],4)):e.createCommentVNode("",!0)],4))}},J=z._export_sfc(X,[["__scopeId","data-v-25e78abf"]]);exports.default=J;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BzFQHG8B.cjs"),we=require("./useNestedProp-BU19Uk2G.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-BY2kEF_E.cjs"),We=require("./Slicer-CnyR7m1m.cjs"),Ue=require("./Tooltip-B25UdCt3.cjs"),Xe=require("./Title-BOtOowG-.cjs"),Ye=require("./Legend-D9oHmbQR.cjs"),Ge=require("./vue-ui-accordion-D9rDPTxC.cjs"),Je=require("./DataTable-DEvCstuA.cjs"),Ze=require("./vue-ui-skeleton-B_ed6BaF.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Qe=["id"],je=["xmlns","viewBox"],et={key:0},tt=["id"],at=["stop-color"],lt=["stop-color"],ot=["stop-color"],rt=["x1","x2","y1","y2","stroke"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x","y","height","rx","width","fill","stroke","stroke-width"],ct=["x","y","width","rx","height","fill","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x","y","font-size","fill","font-weight"],gt=["transform","font-size","fill","font-weight"],yt=["x","y","font-size","fill","font-weight"],mt={key:0},bt=["x","y","font-size","font-weight","fill"],pt=["x","y","font-size","fill","font-weight"],ft={key:0},kt=["x","y","font-size","font-weight","fill"],xt=["x1","x2","y1","y2","stroke"],wt=["x","y","font-size","font-weight","fill"],Ct=["x1","x2","y1","y2","stroke"],Bt=["font-size","font-weight","fill","text-anchor","transform"],Lt=["text-anchor","font-size","font-weight","fill","transform"],St=["font-size","font-weight","fill","x","y"],zt=["x","y","width","height","onClick","onMouseenter","fill"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt={key:3,class:"vue-data-ui-watermark"},Et=["onClick"],Mt=["innerHTML"],$t={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-B8EMsnjU.cjs"),we=require("./useNestedProp-DlCe_zZz.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-BmXrEJ99.cjs"),We=require("./Slicer-Bc7OWCcl.cjs"),Ue=require("./Tooltip-CX57w9Q9.cjs"),Xe=require("./Title-BaR4XyXa.cjs"),Ye=require("./Legend-XqP6-7Ac.cjs"),Ge=require("./vue-ui-accordion-DRI-fN6I.cjs"),Je=require("./DataTable-cOEA6Z37.cjs"),Ze=require("./vue-ui-skeleton-Bli7jLZ7.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Qe=["id"],je=["xmlns","viewBox"],et={key:0},tt=["id"],at=["stop-color"],lt=["stop-color"],ot=["stop-color"],rt=["x1","x2","y1","y2","stroke"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x","y","height","rx","width","fill","stroke","stroke-width"],ct=["x","y","width","rx","height","fill","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x","y","font-size","fill","font-weight"],gt=["transform","font-size","fill","font-weight"],yt=["x","y","font-size","fill","font-weight"],mt={key:0},bt=["x","y","font-size","font-weight","fill"],pt=["x","y","font-size","fill","font-weight"],ft={key:0},kt=["x","y","font-size","font-weight","fill"],xt=["x1","x2","y1","y2","stroke"],wt=["x","y","font-size","font-weight","fill"],Ct=["x1","x2","y1","y2","stroke"],Bt=["font-size","font-weight","fill","text-anchor","transform"],Lt=["text-anchor","font-size","font-weight","fill","transform"],St=["font-size","font-weight","fill","x","y"],zt=["x","y","width","height","onClick","onMouseenter","fill"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt={key:3,class:"vue-data-ui-watermark"},Et=["onClick"],Mt=["innerHTML"],$t={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
|
|
2
2
|
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
3
3
|
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${f.id})`:f.color}"/></svg>
|
|
4
4
|
${f.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:f.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(f.value/o)?0:Math.abs(f.value)/o*100,s:"%",r:z}):""}${_[1]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as p, ref as b, onMounted as He, watch as Be, openBlock as s, createElementBlock as u, normalizeClass as ve, normalizeStyle as B, renderSlot as C, createVNode as he, createCommentVNode as v, createBlock as Q, unref as _, createSlots as ft, withCtx as z, normalizeProps as W, guardReactiveProps as X, Fragment as h, renderList as f, createElementVNode as D, toDisplayString as S, createTextVNode as mt } from "vue";
|
|
2
|
-
import { u as pt, c as We, t as xt, a as kt, p as oe, L as Xe, b as wt, o as Ct, e as Ue, g as _t, d as zt, a2 as se, _ as Ye, C as Ge, X as Lt, l as St, F as Je, f as E, x as qe, i as Ze, y as Mt, q as $t, r as Tt } from "./index-
|
|
3
|
-
import { u as Ke } from "./useNestedProp-
|
|
2
|
+
import { u as pt, c as We, t as xt, a as kt, p as oe, L as Xe, b as wt, o as Ct, e as Ue, g as _t, d as zt, a2 as se, _ as Ye, C as Ge, X as Lt, l as St, F as Je, f as E, x as qe, i as Ze, y as Mt, q as $t, r as Tt } from "./index-DQl1TFXa.js";
|
|
3
|
+
import { u as Ke } from "./useNestedProp-lmeFt-ev.js";
|
|
4
4
|
import { t as Nt, u as Ot } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import { u as Pt, U as Rt } from "./usePrinter-
|
|
6
|
-
import { S as It } from "./Slicer-
|
|
7
|
-
import { _ as Ft } from "./Tooltip-
|
|
8
|
-
import { _ as Vt } from "./Title-
|
|
9
|
-
import { L as At } from "./Legend-
|
|
10
|
-
import Dt from "./vue-ui-accordion-
|
|
11
|
-
import { D as Et } from "./DataTable-
|
|
12
|
-
import Ht from "./vue-ui-skeleton-
|
|
5
|
+
import { u as Pt, U as Rt } from "./usePrinter-DgKGVvJC.js";
|
|
6
|
+
import { S as It } from "./Slicer-BKszZXjM.js";
|
|
7
|
+
import { _ as Ft } from "./Tooltip-w32n-8sY.js";
|
|
8
|
+
import { _ as Vt } from "./Title-DlBwa3-X.js";
|
|
9
|
+
import { L as At } from "./Legend-CCq0mNRg.js";
|
|
10
|
+
import Dt from "./vue-ui-accordion-CroZrm7T.js";
|
|
11
|
+
import { D as Et } from "./DataTable-Cmbf3abv.js";
|
|
12
|
+
import Ht from "./vue-ui-skeleton-BVJGmYjj.js";
|
|
13
13
|
import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Wt = ["id"], Xt = ["xmlns", "viewBox"], Ut = { key: 0 }, Yt = ["id"], Gt = ["stop-color"], Jt = ["stop-color"], qt = ["stop-color"], Zt = ["x1", "x2", "y1", "y2", "stroke"], Kt = ["x1", "x2", "y1", "y2", "stroke"], Qt = ["x1", "x2", "y1", "y2", "stroke"], jt = ["x1", "x2", "y1", "y2", "stroke"], ea = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], ta = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], aa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], la = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ra = ["x", "y", "font-size", "fill", "font-weight"], oa = ["transform", "font-size", "fill", "font-weight"], sa = ["x", "y", "font-size", "fill", "font-weight"], ia = { key: 0 }, ua = ["x", "y", "font-size", "font-weight", "fill"], na = ["x", "y", "font-size", "fill", "font-weight"], ca = { key: 0 }, va = ["x", "y", "font-size", "font-weight", "fill"], ha = ["x1", "x2", "y1", "y2", "stroke"], da = ["x", "y", "font-size", "font-weight", "fill"], ya = ["x1", "x2", "y1", "y2", "stroke"], ga = ["font-size", "font-weight", "fill", "text-anchor", "transform"], ba = ["text-anchor", "font-size", "font-weight", "fill", "transform"], fa = ["font-size", "font-weight", "fill", "x", "y"], ma = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], pa = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], xa = {
|
|
15
15
|
key: 3,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as p, ref as n, watch as ze, onMounted as Ne, onBeforeUnmount as Ae, openBlock as s, createElementBlock as i, normalizeClass as F, normalizeStyle as q, createBlock as P, createCommentVNode as c, unref as h, createSlots as Oe, withCtx as b, renderSlot as m, normalizeProps as H, guardReactiveProps as R, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as Fe, createVNode as We, createTextVNode as Ie, nextTick as Me } from "vue";
|
|
2
|
-
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as be, b as He, d as me, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as ge, y as Ye, q as Je, r as qe, E as Ke } from "./index-
|
|
2
|
+
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as be, b as He, d as me, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as ge, y as Ye, q as Je, r as qe, E as Ke } from "./index-DQl1TFXa.js";
|
|
3
3
|
import { t as Qe, u as Ze } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as et } from "./Title-
|
|
5
|
-
import { u as tt, U as lt } from "./usePrinter-
|
|
6
|
-
import { _ as at } from "./Tooltip-
|
|
7
|
-
import { D as ot } from "./DataTable-
|
|
8
|
-
import st from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as rt } from "./Shape-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as xe } from "./useNestedProp-
|
|
4
|
+
import { _ as et } from "./Title-DlBwa3-X.js";
|
|
5
|
+
import { u as tt, U as lt } from "./usePrinter-DgKGVvJC.js";
|
|
6
|
+
import { _ as at } from "./Tooltip-w32n-8sY.js";
|
|
7
|
+
import { D as ot } from "./DataTable-Cmbf3abv.js";
|
|
8
|
+
import st from "./vue-ui-skeleton-BVJGmYjj.js";
|
|
9
|
+
import { _ as rt } from "./Shape-BNocET8E.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-CroZrm7T.js";
|
|
11
|
+
import { u as xe } from "./useNestedProp-lmeFt-ev.js";
|
|
12
12
|
import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 }, dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], pt = { key: 1 }, yt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "fill", "font-size"], gt = ["x", "y", "font-size", "fill"], xt = ["fill", "font-size", "transform"], kt = ["fill", "font-size", "x", "y"], Ct = ["x1", "x2", "y1", "y2", "stroke"], wt = ["cx", "cy", "fill"], _t = ["cx", "cy", "fill"], $t = ["id"], Tt = ["stop-color"], Lt = ["stop-color"], St = ["stop-color"], Pt = { key: 0 }, zt = ["x", "y", "font-size", "fill"], Nt = {
|
|
14
14
|
key: 3,
|