vue-data-ui 2.3.43 → 2.3.45
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 +1 -1
- package/dist/{Arrow-CWpE_zpe.js → Arrow-Ctlg95U8.js} +1 -1
- package/dist/{Arrow-BX4nehl3.cjs → Arrow-HEq-nlrw.cjs} +1 -1
- package/dist/{BaseIcon-DExFkY_J.cjs → BaseIcon-DAllT7Xd.cjs} +1 -1
- package/dist/{BaseIcon-CvUiZjEX.js → BaseIcon-SOUJcJNI.js} +1 -1
- package/dist/{DataTable-BwXjoB6L.cjs → DataTable-CpDBCn7U.cjs} +1 -1
- package/dist/{DataTable-DxcXjsBO.js → DataTable-zx4eBGpA.js} +2 -2
- package/dist/{Legend-CsoM5Opb.cjs → Legend-Ch4wH-kK.cjs} +1 -1
- package/dist/{Legend-WlisJgNx.js → Legend-DHmy6Ryw.js} +1 -1
- package/dist/{Shape-KaYj09DC.js → Shape-CQnpEROe.js} +1 -1
- package/dist/{Shape-BFjPrzUQ.cjs → Shape-Va1vqZKB.cjs} +1 -1
- package/dist/{Slicer-CMyTqI-E.cjs → Slicer-7qUL39RL.cjs} +1 -1
- package/dist/{Slicer-CdefiSuP.js → Slicer-CwVoKTxE.js} +1 -1
- package/dist/{Title-BtxIcOzw.js → Title-Cw7gk_b-.js} +1 -1
- package/dist/{Title-CO92NMAL.cjs → Title-tPZ6dD7n.cjs} +1 -1
- package/dist/{Tooltip-LICk5YoE.js → Tooltip-Dh7Rk7h8.js} +1 -1
- package/dist/{Tooltip-CAVFRdaz.cjs → Tooltip-mwVno8dy.cjs} +1 -1
- package/dist/index-B2yAjO70.cjs +4 -0
- package/dist/{index-Bbk73zTN.js → index-BtUHRUym.js} +4 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -0
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useNestedProp-UmsAOi8p.cjs → useNestedProp-BgiHePG5.cjs} +1 -1
- package/dist/{useNestedProp-DyRlubve.js → useNestedProp-dj8NfogN.js} +1 -1
- package/dist/{usePrinter-BmgVJQqN.js → usePrinter-CG4wyZaf.js} +1 -1
- package/dist/{usePrinter-C98FQ0-q.cjs → usePrinter-DWElqLH0.cjs} +1 -1
- package/dist/{vue-data-ui-CBnsql5A.js → vue-data-ui-D9OmfznV.js} +57 -57
- package/dist/{vue-data-ui-CU0iVEcI.cjs → vue-data-ui-DlEHOUpL.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-DjO8gk8_.js → vue-ui-3d-bar-BuoAlWbG.js} +7 -7
- package/dist/{vue-ui-3d-bar-D7Hgh9_L.cjs → vue-ui-3d-bar-vH1iEHhl.cjs} +1 -1
- package/dist/{vue-ui-accordion-CL_FobK9.js → vue-ui-accordion-BN4KrzlD.js} +3 -3
- package/dist/{vue-ui-accordion-CM5vg9Tx.cjs → vue-ui-accordion-CqQkjoPn.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-RYNu3tHb.cjs → vue-ui-age-pyramid-B3d0MOlW.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CAJyYi0a.js → vue-ui-age-pyramid-NwacHWds.js} +8 -8
- package/dist/{vue-ui-annotator-Cm1zAF7m.cjs → vue-ui-annotator-4CFg58OC.cjs} +1 -1
- package/dist/{vue-ui-annotator-DFadnHMB.js → vue-ui-annotator-ByXR1gL3.js} +1 -1
- package/dist/{vue-ui-candlestick-DxKxcHMq.js → vue-ui-candlestick-BfqazfiH.js} +9 -9
- package/dist/{vue-ui-candlestick-DG4ZvO5e.cjs → vue-ui-candlestick-DyA-ghJ9.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BVkgLC3s.cjs → vue-ui-carousel-table-CD2K7H-l.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Blb5YFEv.js → vue-ui-carousel-table-DYsH2Yp1.js} +4 -4
- package/dist/{vue-ui-chestnut-B8Hz3FYZ.js → vue-ui-chestnut-SRnaEdid.js} +6 -6
- package/dist/{vue-ui-chestnut-DWApH23R.cjs → vue-ui-chestnut-ZF9-nCi_.cjs} +1 -1
- package/dist/{vue-ui-cursor-D9asBQMh.cjs → vue-ui-cursor-BeDk95cI.cjs} +1 -1
- package/dist/{vue-ui-cursor-BxcQpwOY.js → vue-ui-cursor-BeoGVuIZ.js} +2 -2
- package/dist/{vue-ui-dashboard-CEvxFYWL.cjs → vue-ui-dashboard-B46dE1gK.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DgcdkN2P.js → vue-ui-dashboard-DXbVeu6w.js} +2 -2
- package/dist/{vue-ui-digits-B6mHBfpO.cjs → vue-ui-digits-B7fD81ff.cjs} +1 -1
- package/dist/{vue-ui-digits-CQyz7F1E.js → vue-ui-digits-DizgKes0.js} +2 -2
- package/dist/{vue-ui-donut-MAqy-4_Q.js → vue-ui-donut-B5vgDoBi.js} +9 -9
- package/dist/{vue-ui-donut-Bk9ZauPi.cjs → vue-ui-donut-BrI09Is-.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-LwQMywJy.js → vue-ui-donut-evolution-C47y1eQp.js} +9 -9
- package/dist/{vue-ui-donut-evolution-D8rLY20T.cjs → vue-ui-donut-evolution-DQuNz9i2.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B82B7yyh.js → vue-ui-dumbbell-3rDmDs-o.js} +8 -8
- package/dist/{vue-ui-dumbbell-DeIwE9rZ.cjs → vue-ui-dumbbell-DU2QkGgz.cjs} +1 -1
- package/dist/{vue-ui-flow-MAa_-OBP.cjs → vue-ui-flow-B_x2ipPe.cjs} +1 -1
- package/dist/{vue-ui-flow-hFsm0I_o.js → vue-ui-flow-DOZhKpWR.js} +7 -7
- package/dist/{vue-ui-galaxy-DGCAtMPJ.cjs → vue-ui-galaxy-BesSgZcY.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CA4vT6T9.js → vue-ui-galaxy-DlLG0xKi.js} +9 -9
- package/dist/{vue-ui-gauge-DnoClf1q.js → vue-ui-gauge-8RafppPz.js} +5 -5
- package/dist/{vue-ui-gauge-adb9MqKU.cjs → vue-ui-gauge-BxwG1Kwo.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CM2rrjW-.js → vue-ui-gizmo-7kvomyBv.js} +2 -2
- package/dist/{vue-ui-gizmo-tANH2jdv.cjs → vue-ui-gizmo-BLGwCunm.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CBlqLxiH.cjs → vue-ui-heatmap-Cio9d_p1.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B1s4zxvm.js → vue-ui-heatmap-DrYunXgc.js} +8 -8
- package/dist/{vue-ui-kpi-BFTk7ZU3.cjs → vue-ui-kpi-BqaqS0Sc.cjs} +1 -1
- package/dist/{vue-ui-kpi-DqKvoNCy.js → vue-ui-kpi-d1wsMxlV.js} +3 -3
- package/dist/{vue-ui-mini-loader-D-AqqkAZ.js → vue-ui-mini-loader-CJwfVr_M.js} +2 -2
- package/dist/{vue-ui-mini-loader-BXwRtFgE.cjs → vue-ui-mini-loader-DhJ12J5b.cjs} +1 -1
- package/dist/{vue-ui-molecule-h4UuWEAW.cjs → vue-ui-molecule-DxWAKzbW.cjs} +1 -1
- package/dist/{vue-ui-molecule-DzHocdro.js → vue-ui-molecule-Uzqk850W.js} +9 -9
- package/dist/{vue-ui-mood-radar-CS7QJHs3.cjs → vue-ui-mood-radar-DY8gtaPz.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-1Tlf6aw2.js → vue-ui-mood-radar-psceCBqR.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BeCVjHuA.cjs → vue-ui-nested-donuts-Bu9OL68Y.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Du7HPk1D.js → vue-ui-nested-donuts-CFiRn0jk.js} +9 -9
- package/dist/{vue-ui-onion-CKIprro6.cjs → vue-ui-onion-CAxDBRGS.cjs} +1 -1
- package/dist/{vue-ui-onion-D6mP-ozX.js → vue-ui-onion-kPRNeXuX.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-4duj4p9w.js → vue-ui-parallel-coordinate-plot-CYBmGnIu.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-rOpV6LMo.cjs → vue-ui-parallel-coordinate-plot-DaVxlANN.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BucLsuLe.js → vue-ui-quadrant-COeLNV2o.js} +10 -10
- package/dist/{vue-ui-quadrant-t8JYBTSb.cjs → vue-ui-quadrant-D182YkSv.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-iWzK1xOC.cjs → vue-ui-quick-chart-DdsSfSj4.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-QV_7Fkz8.js → vue-ui-quick-chart-S7bmmFTP.js} +6 -6
- package/dist/{vue-ui-radar-BqDGkijn.cjs → vue-ui-radar-BNYp4Cvf.cjs} +1 -1
- package/dist/{vue-ui-radar-BjHAeK_r.js → vue-ui-radar-BjdwArGH.js} +10 -10
- package/dist/{vue-ui-rating-Urv4VkCQ.cjs → vue-ui-rating-Bms5i1i6.cjs} +1 -1
- package/dist/{vue-ui-rating-DCBbo_zw.js → vue-ui-rating-D3wjp0wH.js} +2 -2
- package/dist/{vue-ui-relation-circle-D5mWVeOH.cjs → vue-ui-relation-circle-Bh_LkmOB.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Dqus5AEv.js → vue-ui-relation-circle-D49d4Zkk.js} +5 -5
- package/dist/{vue-ui-rings-CenKPWLm.js → vue-ui-rings-C16aSDsP.js} +9 -9
- package/dist/{vue-ui-rings-BASFY1MR.cjs → vue-ui-rings-D99azl6b.cjs} +1 -1
- package/dist/{vue-ui-scatter-C7_wKZgM.cjs → vue-ui-scatter-C70x1iYX.cjs} +1 -1
- package/dist/{vue-ui-scatter-DKVRfyEx.js → vue-ui-scatter-DfcaiZ96.js} +10 -10
- package/dist/{vue-ui-screenshot-BbsapvVI.js → vue-ui-screenshot-Bf1vsmAF.js} +1 -1
- package/dist/{vue-ui-screenshot-BPVBFgZc.cjs → vue-ui-screenshot-DvDE7zxX.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B5cqEJh5.js → vue-ui-skeleton-BcXNZYl9.js} +2 -2
- package/dist/{vue-ui-skeleton-0RSYEYO5.cjs → vue-ui-skeleton-c-ouk0AX.cjs} +1 -1
- package/dist/{vue-ui-smiley-BVh_PrQG.cjs → vue-ui-smiley-CLoPBQAZ.cjs} +1 -1
- package/dist/{vue-ui-smiley-c3WVJntN.js → vue-ui-smiley-CreoeEFq.js} +2 -2
- package/dist/{vue-ui-spark-trend-CXxzIkgB.cjs → vue-ui-spark-trend-DUb_IRKf.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-k-2KrIOw.js → vue-ui-spark-trend-D_tOD4Ta.js} +4 -4
- package/dist/{vue-ui-sparkbar-BHmNelWN.cjs → vue-ui-sparkbar-Bsq08omU.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CfMBd1i2.js → vue-ui-sparkbar-CsIEMgM0.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C4EZKUcd.js → vue-ui-sparkgauge-3YzN4m6q.js} +3 -3
- package/dist/{vue-ui-sparkgauge-C8Yzul1-.cjs → vue-ui-sparkgauge-Ctekz6Kd.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-HUZeHvwQ.cjs → vue-ui-sparkhistogram-CKDuTdfc.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CYCMk0Nn.js → vue-ui-sparkhistogram-CjWwG7Zl.js} +4 -4
- package/dist/vue-ui-sparkline-B91EoUVn.cjs +1 -0
- package/dist/vue-ui-sparkline-XrDJFglg.js +359 -0
- package/dist/{vue-ui-sparkstackbar-yntdZ_U1.js → vue-ui-sparkstackbar-BKKSkrnj.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DtE-w92H.cjs → vue-ui-sparkstackbar-r0XJQN3g.cjs} +1 -1
- package/dist/vue-ui-stackbar-CL5GsQiN.cjs +6 -0
- package/dist/vue-ui-stackbar-D4J9Z7wX.js +896 -0
- package/dist/{vue-ui-strip-plot-DnwkdcDH.cjs → vue-ui-strip-plot--P365ByW.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B7RNUPFq.js → vue-ui-strip-plot-DsuLc5K4.js} +9 -9
- package/dist/{vue-ui-table-CVZTOrVv.cjs → vue-ui-table-CGrGa90U.cjs} +1 -1
- package/dist/{vue-ui-table-D9nv-3WZ.js → vue-ui-table-DJjj6FvX.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CyoJgm-p.js → vue-ui-table-heatmap-Dql-qWPD.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Ciq5iK60.cjs → vue-ui-table-heatmap-v9N0LVg3.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BzBBbPlM.js → vue-ui-table-sparkline-C9TVGFyf.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DMHBrCHg.cjs → vue-ui-table-sparkline-LIvHkJR_.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CMwBVDKP.cjs → vue-ui-thermometer-4aCLqzTu.cjs} +1 -1
- package/dist/{vue-ui-thermometer-B7GO1JVB.js → vue-ui-thermometer-BEexIekI.js} +5 -5
- package/dist/{vue-ui-timer-DOhULfFA.js → vue-ui-timer-CY7pvqXf.js} +4 -4
- package/dist/{vue-ui-timer-DL-jbhys.cjs → vue-ui-timer-CuJ9p9tE.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CKSWZEz6.cjs → vue-ui-tiremarks-BCfOhCQd.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CdSz4A3e.js → vue-ui-tiremarks-D7LgNJ-Z.js} +5 -5
- package/dist/{vue-ui-treemap-Bnf6Dwud.js → vue-ui-treemap-Dg58TlVx.js} +9 -9
- package/dist/{vue-ui-treemap-DuidfPhy.cjs → vue-ui-treemap-HRbke0i3.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-MKgSL3sf.cjs → vue-ui-vertical-bar-BmOJ8w-M.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CanIt-Gp.js → vue-ui-vertical-bar-DYHw0QLR.js} +9 -9
- package/dist/{vue-ui-waffle-BTqxJCqj.js → vue-ui-waffle-BWDLUS-8.js} +9 -9
- package/dist/{vue-ui-waffle-CaOODGGV.cjs → vue-ui-waffle-DiNMc4kF.cjs} +1 -1
- package/dist/{vue-ui-wheel-CGeoj8Je.js → vue-ui-wheel-D5EMxg2C.js} +5 -5
- package/dist/{vue-ui-wheel-CFwuHnTA.cjs → vue-ui-wheel-DSudyI0a.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-jTnL4pfH.js → vue-ui-word-cloud-BcW7UgaX.js} +7 -7
- package/dist/{vue-ui-word-cloud-aGr6Wv6n.cjs → vue-ui-word-cloud-CXx7qEQS.cjs} +1 -1
- package/dist/{vue-ui-xy-Oy6S6E9Z.js → vue-ui-xy-CAJ3QM9F.js} +12 -12
- package/dist/{vue-ui-xy-DpqPRTcU.cjs → vue-ui-xy-JfWTcv1D.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas--KPN7UHp.cjs → vue-ui-xy-canvas-BFRvVrf9.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D9QelGDC.js → vue-ui-xy-canvas-BPAwiR3E.js} +10 -10
- package/package.json +1 -1
- package/dist/index-CSbGUkq2.cjs +0 -4
- package/dist/vue-ui-sparkline-BDrgcGQT.cjs +0 -1
- package/dist/vue-ui-sparkline-CqaXadBL.js +0 -342
- package/dist/vue-ui-stackbar-7edtVj-o.cjs +0 -6
- package/dist/vue-ui-stackbar-7wKRXzJb.js +0 -786
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { computed as v, ref as m, onMounted as ee, openBlock as n, createElementBlock as r, normalizeStyle as N, renderSlot as T, normalizeProps as te, guardReactiveProps as ae, createElementVNode as f, toDisplayString as B, createCommentVNode as y, unref as c, Fragment as P, renderList as A, createBlock as le } from "vue";
|
|
2
|
+
import { u as ue, c as se, t as oe, o as ne, e as E, g as re, s as I, R as ie, S as de, X as ve, v as C, M as O, i as R, f as j } from "./index-BtUHRUym.js";
|
|
3
|
+
import { u as U } from "./useNestedProp-dj8NfogN.js";
|
|
4
|
+
import ce from "./vue-ui-skeleton-BcXNZYl9.js";
|
|
5
|
+
import { t as he, u as ye } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
+
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const pe = ["id"], ge = ["xmlns", "viewBox"], ke = ["id"], me = ["stop-color"], be = ["stop-color"], xe = ["id"], _e = ["stop-color"], we = ["stop-color"], $e = ["id"], Le = ["stop-color"], Ne = ["stop-color"], Ie = { key: 0 }, Ce = ["d", "fill"], Me = ["d", "fill"], Se = ["d", "stroke", "stroke-width"], ze = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ve = ["x", "y", "width", "height", "fill", "rx"], Pe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ae = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], We = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], De = ["x", "y", "font-size", "font-weight", "fill"], Fe = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ge = {
|
|
8
|
+
__name: "vue-ui-sparkline",
|
|
9
|
+
props: {
|
|
10
|
+
config: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default() {
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
dataset: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default() {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
showInfo: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
selectedIndex: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: void 0
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ["hoverIndex", "selectDatapoint"],
|
|
32
|
+
setup(x, { emit: M }) {
|
|
33
|
+
const i = x, { vue_ui_sparkline: X } = ue(), $ = v(() => !!i.dataset && i.dataset.length), p = m(se()), S = m(null), W = m(null), e = v(() => {
|
|
34
|
+
const t = U({
|
|
35
|
+
userConfig: i.config,
|
|
36
|
+
defaultConfig: X
|
|
37
|
+
});
|
|
38
|
+
return t.theme ? {
|
|
39
|
+
...U({
|
|
40
|
+
userConfig: oe.vue_ui_sparkline[t.theme] || i.config,
|
|
41
|
+
defaultConfig: t
|
|
42
|
+
})
|
|
43
|
+
} : t;
|
|
44
|
+
}), b = m(i.dataset.map((t) => e.value.style.animation.show ? {
|
|
45
|
+
...t,
|
|
46
|
+
value: null
|
|
47
|
+
} : {
|
|
48
|
+
...t,
|
|
49
|
+
value: [void 0].includes(t.value) ? null : t.value
|
|
50
|
+
})), D = m(null);
|
|
51
|
+
ee(() => {
|
|
52
|
+
if (ne(i.dataset) ? E({
|
|
53
|
+
componentName: "VueUiSparkline",
|
|
54
|
+
type: "dataset"
|
|
55
|
+
}) : i.dataset.forEach((t, u) => {
|
|
56
|
+
re({
|
|
57
|
+
datasetObject: t,
|
|
58
|
+
requiredAttributes: ["period", "value"]
|
|
59
|
+
}).forEach((a) => {
|
|
60
|
+
E({
|
|
61
|
+
componentName: "VueUiSparkline",
|
|
62
|
+
type: "datasetSerieAttribute",
|
|
63
|
+
property: a,
|
|
64
|
+
index: u
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}), e.value.style.animation.show && i.dataset.length > 1) {
|
|
68
|
+
let a = function() {
|
|
69
|
+
u < i.dataset.length ? (b.value.push(i.dataset[u]), setTimeout(() => {
|
|
70
|
+
requestAnimationFrame(a);
|
|
71
|
+
}, t)) : b.value = i.dataset, u += 1;
|
|
72
|
+
};
|
|
73
|
+
b.value = [];
|
|
74
|
+
const t = e.value.style.animation.animationFrames / i.dataset.length;
|
|
75
|
+
let u = 0;
|
|
76
|
+
a();
|
|
77
|
+
}
|
|
78
|
+
if (e.value.responsive) {
|
|
79
|
+
const t = he(() => {
|
|
80
|
+
const { width: u, height: a } = ye({
|
|
81
|
+
chart: S.value,
|
|
82
|
+
title: e.value.style.title.show && i.showInfo ? W.value : null
|
|
83
|
+
});
|
|
84
|
+
l.value.width = u, l.value.height = a, l.value.chartWidth = e.value.style.chartWidth / 500 * u, l.value.padding = 0.06 * u;
|
|
85
|
+
});
|
|
86
|
+
D.value = new ResizeObserver(t), D.value.observe(S.value.parentNode);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const l = m({
|
|
90
|
+
height: 80,
|
|
91
|
+
width: 500,
|
|
92
|
+
chartWidth: e.value.style.chartWidth,
|
|
93
|
+
padding: 30
|
|
94
|
+
}), Z = m(6), s = v(() => ({
|
|
95
|
+
top: 12,
|
|
96
|
+
left: 0,
|
|
97
|
+
right: l.value.width,
|
|
98
|
+
bottom: l.value.height - 3,
|
|
99
|
+
start: i.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? l.value.width - l.value.chartWidth : l.value.padding,
|
|
100
|
+
width: i.showInfo && e.value.style.dataLabel.show ? l.value.chartWidth : l.value.width - l.value.padding,
|
|
101
|
+
height: l.value.height - 12
|
|
102
|
+
})), z = v(() => Math.min(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), q = v(() => Math.max(...b.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), _ = v(() => {
|
|
103
|
+
const t = z.value >= 0 ? 0 : z.value;
|
|
104
|
+
return Math.abs(t);
|
|
105
|
+
}), H = v(() => q.value + _.value + Z.value), L = v(() => s.value.bottom - s.value.height * V(_.value));
|
|
106
|
+
function V(t) {
|
|
107
|
+
return t / H.value;
|
|
108
|
+
}
|
|
109
|
+
const g = v(() => i.dataset.length - 1), o = v(() => b.value.map((t, u) => {
|
|
110
|
+
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
|
|
111
|
+
return {
|
|
112
|
+
absoluteValue: a,
|
|
113
|
+
period: t.period,
|
|
114
|
+
plotValue: a + _.value,
|
|
115
|
+
toMax: V(a + _.value),
|
|
116
|
+
x: s.value.start + u * (s.value.width / (g.value + 1) > l.padding ? l.padding : s.value.width / (g.value + 1)),
|
|
117
|
+
y: s.value.bottom - s.value.height * V(a + _.value),
|
|
118
|
+
id: `plot_${p.value}_${u}`,
|
|
119
|
+
color: w.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - u / g.value)) : e.value.style.line.color,
|
|
120
|
+
width: s.value.width / (g.value + 1) > l.padding ? l.padding : s.value.width / (g.value + 1)
|
|
121
|
+
};
|
|
122
|
+
})), Y = v(() => {
|
|
123
|
+
const t = { x: o.value[0].x, y: l.value.height - 6 }, u = { x: o.value[o.value.length - 1].x, y: l.value.height - 6 }, a = [];
|
|
124
|
+
return o.value.forEach((d) => {
|
|
125
|
+
a.push(`${d.x},${d.y} `);
|
|
126
|
+
}), [t.x, t.y, ...a, u.x, u.y].toString();
|
|
127
|
+
}), h = m(void 0);
|
|
128
|
+
function J(t, u) {
|
|
129
|
+
h.value = t, M("hoverIndex", { index: u });
|
|
130
|
+
}
|
|
131
|
+
function K() {
|
|
132
|
+
h.value = void 0, M("hoverIndex", { index: void 0 });
|
|
133
|
+
}
|
|
134
|
+
const k = v(() => {
|
|
135
|
+
if ($.value) {
|
|
136
|
+
const t = o.value.map((a) => a.absoluteValue), u = t.reduce((a, d) => a + d, 0);
|
|
137
|
+
return {
|
|
138
|
+
latest: o.value[o.value.length - 1].absoluteValue,
|
|
139
|
+
sum: u,
|
|
140
|
+
average: u / o.value.length,
|
|
141
|
+
median: ie(t),
|
|
142
|
+
trend: de(o.value.map(({ x: a, y: d, absoluteValue: G }) => ({
|
|
143
|
+
x: a,
|
|
144
|
+
y: d,
|
|
145
|
+
value: G
|
|
146
|
+
}))).trend
|
|
147
|
+
};
|
|
148
|
+
} else
|
|
149
|
+
return {
|
|
150
|
+
latest: null,
|
|
151
|
+
sum: null,
|
|
152
|
+
average: null,
|
|
153
|
+
median: null,
|
|
154
|
+
trend: null
|
|
155
|
+
};
|
|
156
|
+
}), F = v(() => $.value ? e.value.style.dataLabel.valueType === "latest" ? k.value.latest : e.value.style.dataLabel.valueType === "sum" ? k.value.sum : e.value.style.dataLabel.valueType === "average" ? k.value.average : 0 : 0), w = v(() => e.value.type && e.value.type === "bar");
|
|
157
|
+
function Q(t, u) {
|
|
158
|
+
M("selectDatapoint", { datapoint: t, index: u });
|
|
159
|
+
}
|
|
160
|
+
return (t, u) => (n(), r("div", {
|
|
161
|
+
ref_key: "sparklineChart",
|
|
162
|
+
ref: S,
|
|
163
|
+
class: "vue-ui-sparkline",
|
|
164
|
+
id: p.value,
|
|
165
|
+
style: N(`width:100%;font-family:${e.value.style.fontFamily}`)
|
|
166
|
+
}, [
|
|
167
|
+
T(t.$slots, "before", te(ae({
|
|
168
|
+
selected: h.value,
|
|
169
|
+
latest: k.value.latest,
|
|
170
|
+
sum: k.value.sum,
|
|
171
|
+
average: k.value.average,
|
|
172
|
+
median: k.value.median,
|
|
173
|
+
trend: k.value.trend
|
|
174
|
+
})), void 0, !0),
|
|
175
|
+
e.value.style.title.show && x.showInfo ? (n(), r("div", {
|
|
176
|
+
key: 0,
|
|
177
|
+
ref_key: "chartTitle",
|
|
178
|
+
ref: W,
|
|
179
|
+
class: "vue-ui-sparkline-title",
|
|
180
|
+
style: N(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
|
|
181
|
+
}, [
|
|
182
|
+
f("span", {
|
|
183
|
+
style: N(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
184
|
+
}, B(h.value ? h.value.period : e.value.style.title.text), 5)
|
|
185
|
+
], 4)) : y("", !0),
|
|
186
|
+
$.value ? (n(), r("svg", {
|
|
187
|
+
key: 1,
|
|
188
|
+
xmlns: c(ve),
|
|
189
|
+
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
190
|
+
style: N(`background:${e.value.style.backgroundColor};overflow:visible`)
|
|
191
|
+
}, [
|
|
192
|
+
f("defs", null, [
|
|
193
|
+
f("linearGradient", {
|
|
194
|
+
x1: "0%",
|
|
195
|
+
y1: "0%",
|
|
196
|
+
x2: "100%",
|
|
197
|
+
y2: "0%",
|
|
198
|
+
id: `sparkline_gradient_${p.value}`
|
|
199
|
+
}, [
|
|
200
|
+
f("stop", {
|
|
201
|
+
offset: "0%",
|
|
202
|
+
"stop-color": `${c(I)(e.value.style.area.color, 0.05)}${c(C)[e.value.style.area.opacity]}`
|
|
203
|
+
}, null, 8, me),
|
|
204
|
+
f("stop", {
|
|
205
|
+
offset: "100%",
|
|
206
|
+
"stop-color": e.value.style.area.color + c(C)[e.value.style.area.opacity]
|
|
207
|
+
}, null, 8, be)
|
|
208
|
+
], 8, ke),
|
|
209
|
+
f("linearGradient", {
|
|
210
|
+
x2: "0%",
|
|
211
|
+
y2: "100%",
|
|
212
|
+
id: `sparkline_bar_gradient_pos_${p.value}`
|
|
213
|
+
}, [
|
|
214
|
+
f("stop", {
|
|
215
|
+
offset: "0%",
|
|
216
|
+
"stop-color": e.value.style.bar.color
|
|
217
|
+
}, null, 8, _e),
|
|
218
|
+
f("stop", {
|
|
219
|
+
offset: "100%",
|
|
220
|
+
"stop-color": `${c(I)(e.value.style.bar.color, 0.05)}`
|
|
221
|
+
}, null, 8, we)
|
|
222
|
+
], 8, xe),
|
|
223
|
+
f("linearGradient", {
|
|
224
|
+
x2: "0%",
|
|
225
|
+
y2: "100%",
|
|
226
|
+
id: `sparkline_bar_gradient_neg_${p.value}`
|
|
227
|
+
}, [
|
|
228
|
+
f("stop", {
|
|
229
|
+
offset: "0%",
|
|
230
|
+
"stop-color": `${c(I)(e.value.style.bar.color, 0.05)}`
|
|
231
|
+
}, null, 8, Le),
|
|
232
|
+
f("stop", {
|
|
233
|
+
offset: "100%",
|
|
234
|
+
"stop-color": e.value.style.bar.color
|
|
235
|
+
}, null, 8, Ne)
|
|
236
|
+
], 8, $e)
|
|
237
|
+
]),
|
|
238
|
+
e.value.style.area.show && !w.value && o.value[0] ? (n(), r("g", Ie, [
|
|
239
|
+
e.value.style.line.smooth ? (n(), r("path", {
|
|
240
|
+
key: 0,
|
|
241
|
+
d: `M ${o.value[0].x},${s.value.bottom} ${c(O)(o.value)} L ${o.value.at(-1).x},${s.value.bottom} Z`,
|
|
242
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${c(C)[e.value.style.area.opacity]}`
|
|
243
|
+
}, null, 8, Ce)) : (n(), r("path", {
|
|
244
|
+
key: 1,
|
|
245
|
+
d: `M${Y.value}Z`,
|
|
246
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${c(C)[e.value.style.area.opacity]}`
|
|
247
|
+
}, null, 8, Me))
|
|
248
|
+
])) : y("", !0),
|
|
249
|
+
e.value.style.line.smooth && !w.value ? (n(), r("path", {
|
|
250
|
+
key: 1,
|
|
251
|
+
d: `M ${c(O)(o.value)}`,
|
|
252
|
+
stroke: e.value.style.line.color,
|
|
253
|
+
fill: "none",
|
|
254
|
+
"stroke-width": e.value.style.line.strokeWidth,
|
|
255
|
+
"stroke-linecap": "round"
|
|
256
|
+
}, null, 8, Se)) : y("", !0),
|
|
257
|
+
(n(!0), r(P, null, A(o.value, (a, d) => (n(), r("g", null, [
|
|
258
|
+
d < o.value.length - 1 && !e.value.style.line.smooth && !w.value ? (n(), r("line", {
|
|
259
|
+
key: 0,
|
|
260
|
+
x1: a.x,
|
|
261
|
+
x2: o.value[d + 1].x,
|
|
262
|
+
y1: a.y,
|
|
263
|
+
y2: o.value[d + 1].y,
|
|
264
|
+
stroke: a.color,
|
|
265
|
+
"stroke-width": e.value.style.line.strokeWidth,
|
|
266
|
+
"stroke-linecap": "round",
|
|
267
|
+
"stroke-linejoin": "round",
|
|
268
|
+
"shape-rendering": "geometricPrecision"
|
|
269
|
+
}, null, 8, ze)) : y("", !0),
|
|
270
|
+
w.value ? (n(), r("rect", {
|
|
271
|
+
key: 1,
|
|
272
|
+
x: a.x - a.width / 2,
|
|
273
|
+
y: a.absoluteValue > 0 ? a.y : L.value,
|
|
274
|
+
width: a.width,
|
|
275
|
+
height: Math.abs(a.y - L.value),
|
|
276
|
+
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
277
|
+
rx: e.value.style.bar.borderRadius
|
|
278
|
+
}, null, 8, Ve)) : y("", !0),
|
|
279
|
+
e.value.style.verticalIndicator.show && (h.value && a.id === h.value.id || x.selectedIndex === d) ? (n(), r("line", {
|
|
280
|
+
key: 2,
|
|
281
|
+
x1: a.x,
|
|
282
|
+
x2: a.x,
|
|
283
|
+
y1: s.value.top - 6,
|
|
284
|
+
y2: s.value.bottom,
|
|
285
|
+
stroke: e.value.style.verticalIndicator.color || a.color,
|
|
286
|
+
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
287
|
+
"stroke-linecap": "round",
|
|
288
|
+
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
289
|
+
}, null, 8, Pe)) : y("", !0)
|
|
290
|
+
]))), 256)),
|
|
291
|
+
z.value < 0 ? (n(), r("line", {
|
|
292
|
+
key: 2,
|
|
293
|
+
x1: s.value.start,
|
|
294
|
+
x2: s.value.start + s.value.width - 16,
|
|
295
|
+
y1: L.value,
|
|
296
|
+
y2: L.value,
|
|
297
|
+
stroke: e.value.style.zeroLine.color,
|
|
298
|
+
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
299
|
+
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
300
|
+
"stroke-linecap": "round"
|
|
301
|
+
}, null, 8, Ae)) : y("", !0),
|
|
302
|
+
e.value.style.plot.show ? (n(!0), r(P, { key: 3 }, A(o.value, (a, d) => (n(), r("g", null, [
|
|
303
|
+
h.value && a.id === h.value.id || x.selectedIndex === d ? (n(), r("circle", {
|
|
304
|
+
key: 0,
|
|
305
|
+
cx: a.x,
|
|
306
|
+
cy: a.y,
|
|
307
|
+
r: e.value.style.plot.radius,
|
|
308
|
+
fill: a.color,
|
|
309
|
+
stroke: e.value.style.plot.stroke,
|
|
310
|
+
"stroke-width": e.value.style.plot.strokeWidth
|
|
311
|
+
}, null, 8, We)) : y("", !0)
|
|
312
|
+
]))), 256)) : y("", !0),
|
|
313
|
+
x.showInfo && e.value.style.dataLabel.show ? (n(), r("text", {
|
|
314
|
+
key: 4,
|
|
315
|
+
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : s.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
316
|
+
y: l.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
317
|
+
"font-size": e.value.style.dataLabel.fontSize,
|
|
318
|
+
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
|
|
319
|
+
fill: e.value.style.dataLabel.color
|
|
320
|
+
}, B(h.value ? c(R)(
|
|
321
|
+
e.value.style.dataLabel.formatter,
|
|
322
|
+
h.value.absoluteValue,
|
|
323
|
+
c(j)({ p: e.value.style.dataLabel.prefix, v: h.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
|
|
324
|
+
{ datapoint: h.value }
|
|
325
|
+
) : c(R)(
|
|
326
|
+
e.value.style.dataLabel.formatter,
|
|
327
|
+
F.value,
|
|
328
|
+
c(j)({ p: e.value.style.dataLabel.prefix, v: F.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
329
|
+
)), 9, De)) : y("", !0),
|
|
330
|
+
(n(!0), r(P, null, A(o.value, (a, d) => (n(), r("rect", {
|
|
331
|
+
x: a.x - (s.value.width / (g.value + 1) > l.value.padding ? l.value.padding : s.value.width / (g.value + 1)) / 2,
|
|
332
|
+
y: s.value.top - 6,
|
|
333
|
+
height: s.value.height + 6,
|
|
334
|
+
width: s.value.width / (g.value + 1) > l.value.padding ? l.value.padding : s.value.width / (g.value + 1),
|
|
335
|
+
fill: "transparent",
|
|
336
|
+
onMouseenter: (G) => J(a, d),
|
|
337
|
+
onMouseleave: K,
|
|
338
|
+
onClick: () => Q(a, d)
|
|
339
|
+
}, null, 40, Fe))), 256)),
|
|
340
|
+
T(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
341
|
+
], 12, ge)) : y("", !0),
|
|
342
|
+
$.value ? y("", !0) : (n(), le(ce, {
|
|
343
|
+
key: 2,
|
|
344
|
+
config: {
|
|
345
|
+
type: "sparkline",
|
|
346
|
+
style: {
|
|
347
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
348
|
+
sparkline: {
|
|
349
|
+
color: "#CCCCCC"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}, null, 8, ["config"]))
|
|
354
|
+
], 12, pe));
|
|
355
|
+
}
|
|
356
|
+
}, Ue = /* @__PURE__ */ fe(Ge, [["__scopeId", "data-v-a8f8425a"]]);
|
|
357
|
+
export {
|
|
358
|
+
Ue as default
|
|
359
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as p, ref as m, onMounted as T, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as u, toDisplayString as k, createCommentVNode as h, unref as b, Fragment as D, renderList as z, normalizeClass as A, createBlock as q } from "vue";
|
|
2
|
-
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-
|
|
3
|
-
import { u as U } from "./useNestedProp-
|
|
4
|
-
import te from "./vue-ui-skeleton-
|
|
2
|
+
import { u as H, c as j, t as X, a as J, p as d, b as K, d as P, o as Q, e as E, g as R, f as I, X as W, s as Y, v as Z, i as ee } from "./index-BtUHRUym.js";
|
|
3
|
+
import { u as U } from "./useNestedProp-dj8NfogN.js";
|
|
4
|
+
import te from "./vue-ui-skeleton-BcXNZYl9.js";
|
|
5
5
|
import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const ae = ["xmlns", "viewBox"], oe = ["id"], se = ["stop-color"], ne = ["stop-color"], re = ["stop-color"], ue = {
|
|
7
7
|
id: "stackPill",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B2yAjO70.cjs"),C=require("./useNestedProp-BgiHePG5.cjs"),E=require("./vue-ui-skeleton-c-ouk0AX.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=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):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(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})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.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;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("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:${t.value.style.backgroundColor};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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.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:${t.value.style.backgroundColor};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(_.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:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(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,O)],8,H)),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,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-B2yAjO70.cjs"),fe=require("./useNestedProp-BgiHePG5.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),xe=require("./usePrinter-DWElqLH0.cjs"),De=require("./Slicer-7qUL39RL.cjs"),Ie=require("./Tooltip-mwVno8dy.cjs"),Ae=require("./Title-tPZ6dD7n.cjs"),He=require("./Legend-Ch4wH-kK.cjs"),qe=require("./vue-ui-accordion-CqQkjoPn.cjs"),Ue=require("./DataTable-CpDBCn7U.cjs"),We=require("./vue-ui-skeleton-c-ouk0AX.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Ge=["xmlns","viewBox"],Je={key:0},Ze=["id"],Ke=["stop-color"],Qe=["stop-color"],je=["stop-color"],et=["x1","x2","y1","y2","stroke"],tt=["x1","x2","y1","y2","stroke"],at=["x1","x2","y1","y2","stroke"],lt=["x1","x2","y1","y2","stroke"],ot=["x","y","height","rx","width","fill","stroke","stroke-width"],rt=["x","y","width","rx","height","fill","stroke","stroke-width"],st=["x1","x2","y1","y2","stroke","stroke-width"],nt=["x1","x2","y1","y2","stroke","stroke-width"],it=["x","y","font-size","fill","font-weight"],ut=["transform","font-size","fill","font-weight"],ct=["x","y","font-size","fill","font-weight"],dt={key:0},vt=["x","y","font-size","font-weight","fill"],ht=["x","y","font-size","fill","font-weight"],mt={key:0},gt=["x","y","font-size","font-weight","fill"],yt=["x1","x2","y1","y2","stroke"],bt=["x","y","font-size","font-weight","fill"],pt=["x1","x2","y1","y2","stroke"],ft=["font-size","font-weight","fill","text-anchor","transform"],kt=["text-anchor","font-size","font-weight","fill","transform"],xt=["font-size","font-weight","fill","x","y"],wt=["x","y","width","height","onClick","onMouseenter","fill"],Ct=["x","y","width","height","onClick","onMouseenter","fill"],Bt={key:3,class:"vue-data-ui-watermark"},Lt=["onClick"],St=["innerHTML"],zt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(Y,{expose:we,emit:G}){const w=Y,{vue_ui_stackbar:Ce}=c.useConfig(),E=e.computed({get(){return!!w.dataset&&w.dataset.length},set(l){return l}}),$=e.ref(null),U=e.ref(c.createUid()),O=e.ref(!1),J=e.ref(null),W=e.ref(""),y=e.ref([]),Z=e.ref(0),K=e.ref(null),Q=e.ref(null),j=e.ref(null),ee=e.ref(0),X=e.ref(!1),T=e.ref(null),V=e.ref(!1);e.onMounted(()=>{c.objectIsEmpty(w.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):w.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(()=>{V.value=!0},10)});const t=e.computed(()=>{const l=fe.useNestedProp({userConfig:w.config,defaultConfig:Ce});return l.theme?{...fe.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||w.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:l}),g=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:te,isImaging:ae,generatePdf:le,generateImage:oe}=xe.usePrinter({elementId:`stackbar_${U.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}}),Be=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),re=e.ref(null),se=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=ke.throttle(()=>{V.value=!1;const{width:r,height:a}=ke.useResponsive({chart:$.value,title:t.value.style.chart.title.text?K.value:null,legend:t.value.style.chart.legend.show?Q.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?j.value:null});D.value.width=r,D.value.height=a,clearTimeout(se.value),se.value=setTimeout(()=>{V.value=!0},10)});re.value=new ResizeObserver(l),re.value.observe($.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,b=t.value.style.chart.padding.left,S=r-b-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:b,width:S,height:z<0?0:z}}),B=e.computed(()=>w.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Be.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=>!y.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...w.dataset.map(l=>l.series.length))});function Le(){u.value={start:0,end:Math.max(...w.dataset.map(l=>l.series.length))},ee.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}),F=e.computed(()=>c.sumSeries(B.value.filter(l=>!y.value.includes(l.id))).slice(u.value.start,u.value.end)),Se=e.computed(()=>c.sumSeries(B.value.filter(l=>!y.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=>!y.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)})))}}),x=e.computed(()=>{const l=Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=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}))}),M=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),m=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),b=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=c.calculateNiceScale(b>0?0:b,n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,p=s.value.height,q=s.value.width,be=x.value[0]?x.value[0].zero:s.value.bottom,pe=x.value[0]?x.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!y.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),$e=R.signedSeries.slice(u.value.start,u.value.end),Te=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Ve=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Fe=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;let N,k;return v>0?(k=p*f,N=be-k-l[h],l[h]+=k):(k=p*f,N=be+a[h],a[h]+=Math.abs(k)),N}),Me=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;let N,k;return v>0?(k=q*f,N=pe+r[h],r[h]+=k):(k=q*f,N=pe-Math.abs(k)-o[h],o[h]+=Math.abs(k)),N}),Pe=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;return v>0?p*f:p*Math.abs(f)}),Re=C.map((v,h)=>{const f=t.value.style.chart.bars.distributed?(v||0)/F.value[h]:(v||0)/_;return v>0?q*f:q*Math.abs(f)}),Oe=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)/F.value[h]:(v||0)/Oe),series:C,signedSeries:$e,x:Te,y:Fe,height:Pe,horizontal_width:Re,horizontal_y:Ve,horizontal_x:Me}})}),ne=e.computed(()=>Se.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 ie(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 ue(l){const r=JSON.parse(JSON.stringify(m.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}));G("selectDatapoint",{datapoint:r,period:M.value[l]})}function ce(l){T.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(m.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:m.value,config:t.value})))W.value=r({seriesIndex:l,datapoint:a,series:m.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:b,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";M.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${b};padding-bottom:6px;margin-bottom:3px;">${M.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(p=>{P+=`
|
|
2
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
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_${p.id})`:p.color}"/></svg>
|
|
4
|
+
${p.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:p.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(p.value/o)?0:Math.abs(p.value)/o*100,s:"%",r:z}):""}${_[1]}
|
|
5
|
+
</div>
|
|
6
|
+
`}),W.value=`<div>${P}</div>`}}function ze(l){X.value=l,Z.value+=1}function de(){g.value.showTable=!g.value.showTable}function ve(){g.value.dataLabels.show=!g.value.dataLabels.show}function he(){g.value.showTooltip=!g.value.showTooltip}function _e(){return m.value}const me=e.computed(()=>{if(m.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=m.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=u.value.start;a<u.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];B.value.forEach(n=>{o.push(Number((n.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function ge(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...me.value.head.map(i=>i.label)],a=me.value.body,o=l.concat([r]).concat(a),n=c.createCsvContent(o);c.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const H=e.computed(()=>{const l=[""].concat(m.value.map(n=>n.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let r=[];for(let n=0;n<L.value;n+=1){const i=m.value.map(b=>b.series[n]??0).reduce((b,S)=>b+S,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[n]??n+1].concat(m.value.map(b=>(b.series[n]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.period].concat(m.value.map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,u.value.end-u.value.start),config:a,colNames:o}});function Ne(l,r){if(G("selectLegend",m.value.find(a=>a.absoluteIndex===l)),y.value.includes(r.id))y.value=y.value.filter(a=>a!==r.id);else{if(y.value.length===B.value.length-1)return;y.value.push(r.id)}}const ye=e.computed(()=>B.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:y.value.includes(l.id)?.5:1,segregate:()=>Ne(l.absoluteIndex,l),isSegregated:y.value.includes(l.id)}))),Ee=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));return we({getData:_e,generatePdf:le,generateCsv:ge,generateImage:oe,toggleTable:de,toggleLabels:ve,toggleTooltip:he}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${U.value}`,ref_key:"stackbarChart",ref:$,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":X.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:K,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Ae._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(xe.UserOptions,{ref:"details",key:`user_option_${Z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(ae),uid:U.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,chartElement:$.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:ze,onGeneratePdf:e.unref(le),onGenerateCsv:ge,onGenerateImage:e.unref(oe),onToggleTable:de,onToggleLabels:ve,onToggleTooltip:he},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ke),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,je)],8,Ze))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,et))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,tt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,at))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,lt))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.y[i]<0?0:a.y[i],height:a.height[i]<0?1e-4:a.height[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":V.value})},null,10,ot))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.horizontal_y[i]<0?0:a.horizontal_y[i],width:a.horizontal_width[i]<0?1e-4:a.horizontal_width[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":V.value})},null,10,rt))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:5,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,st)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,nt)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,it)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,ut)):e.createCommentVNode("",!0),g.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[i]+a.height[i]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ct))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&m.value.length>1?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,vt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),g.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+(a.horizontal_width[i]<0?1e-4:a.horizontal_width[i])/2,y:a.horizontal_y[i]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ie(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ht))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&m.value.length>1?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,gt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,bt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,pt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,ft))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:13},e.renderList(M.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,kt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:14},e.renderList(M.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3},e.toDisplayString(a),9,xt))),256)):e.createCommentVNode("",!0),g.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:15},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[0]||(r[0]=n=>{T.value=null,O.value=!1}),fill:o===T.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,wt))),256)):e.createCommentVNode("",!0),g.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:n=>ue(o),onMouseenter:n=>ce(o),onMouseleave:r[1]||(r[1]=n=>{T.value=null,O.value=!1}),fill:o===T.value?t.value.style.chart.highlighter.color+e.unref(c.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,Ct))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,Ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:j,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(De.Slicer,{key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...Y.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":r[2]||(r[2]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":r[3]||(r[3]=a=>u.value.end=a),onReset:Le},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(Ie._sfc_main,{show:g.value.showTooltip&&O.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:W.value,isCustom:e.unref(c.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:Q},[t.value.style.chart.legend.show&&E.value?(e.openBlock(),e.createBlock(He.Legend,{key:0,legendSet:ye.value,config:Ee.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Lt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:ye.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(qe.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Ue.DataTable,{colNames:H.value.colNames,head:H.value.head,body:H.value.body,config:H.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>g.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,St)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ye))}},_t=Xe._export_sfc(zt,[["__scopeId","data-v-31c32788"]]);exports.default=_t;
|