vue-data-ui 3.0.0-next.3 → 3.0.0-next.31

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.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/{Arrow-C8ztMhxn.js → Arrow-CjrRAMiU.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DoA1cXmQ.js → BaseDraggableDialog-Bat9k7_9.js} +2 -2
  4. package/dist/{BaseIcon-TJm1JI2f.js → BaseIcon-DGtQbkFy.js} +1 -1
  5. package/dist/{useLoading-Bt5Doa8m.js → BaseScanner-DIK2NTdp.js} +11 -11
  6. package/dist/{ColorPicker-DwhabPvD.js → ColorPicker-DowMg7RO.js} +2 -2
  7. package/dist/{DataTable-DObwKftY.js → DataTable-DAZn6udI.js} +2 -2
  8. package/dist/{Legend-C-EDWcHp.js → Legend-DCsRNGsk.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-Cmy4Opaq.js → NonSvgPenAndPaper-BhfZ3RsC.js} +3 -3
  10. package/dist/{PackageVersion-B_SVQo0g.js → PackageVersion-CJPhC_FI.js} +1 -1
  11. package/dist/{PenAndPaper-CFbTGuB_.js → PenAndPaper-kGe5NPSy.js} +3 -3
  12. package/dist/{Shape-DGduPk8q.js → Shape-D6ahkZT8.js} +1 -1
  13. package/dist/{Slicer-VumiAmDi.js → Slicer-CUUN5Npc.js} +2 -2
  14. package/dist/{SparkTooltip-DrRmoIkR.js → SparkTooltip-1EkqR7Qj.js} +7 -7
  15. package/dist/{Title-Dahu_Ia-.js → Title-gfAAMBE3.js} +1 -1
  16. package/dist/{Tooltip-j8grOyYT.js → Tooltip-eZi8Q0Mr.js} +23 -19
  17. package/dist/{UserOptions-BOIQ8NtD.js → UserOptions-Dd0OHMn7.js} +2 -2
  18. package/dist/{dom-to-png-00aHI4Vj.js → dom-to-png-CwBiVDQT.js} +1 -1
  19. package/dist/{img-DFeNRkbq.js → img-FayRC7eM.js} +1 -1
  20. package/dist/{index-DKjAxJY6.js → index-CvyDwC1y.js} +1305 -1181
  21. package/dist/{pdf-COmwjbLG.js → pdf-B_EkQtoL.js} +1 -1
  22. package/dist/style.css +1 -1
  23. package/dist/types/vue-data-ui.d.cts +144 -15
  24. package/dist/types/vue-data-ui.d.ts +144 -15
  25. package/dist/{useNestedProp-Cmx8ApWu.js → useNestedProp-B-ULAHAH.js} +1 -1
  26. package/dist/{usePrinter-BefhLUKK.js → usePrinter-BAQfJI9j.js} +2 -2
  27. package/dist/useTimeLabelCollider-V7AOiPLB.js +71 -0
  28. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DFkUfjfs.js} +211 -152
  29. package/dist/{vue-data-ui-kdcEQgS0.js → vue-data-ui-Drw9rZ27.js} +80 -74
  30. package/dist/vue-data-ui.js +58 -56
  31. package/dist/{vue-ui-3d-bar-Lv9eoXpT.js → vue-ui-3d-bar-Bu68MVtW.js} +6 -6
  32. package/dist/{vue-ui-accordion-BhrF0D_h.js → vue-ui-accordion-ErGvIA2d.js} +3 -3
  33. package/dist/{vue-ui-age-pyramid-DN94DM1L.js → vue-ui-age-pyramid-CeTpdJmu.js} +11 -9
  34. package/dist/{vue-ui-annotator-D-YFzFco.js → vue-ui-annotator-DneaduAI.js} +2 -2
  35. package/dist/{vue-ui-bullet--c-hIC1J.js → vue-ui-bullet-gol3S_xU.js} +7 -7
  36. package/dist/vue-ui-candlestick-BIjOGylw.js +991 -0
  37. package/dist/{vue-ui-carousel-table-Bg4_nEqO.js → vue-ui-carousel-table-DMIknisD.js} +4 -4
  38. package/dist/{vue-ui-chestnut-D9BP8n-D.js → vue-ui-chestnut-BpaWvBdS.js} +5 -5
  39. package/dist/{vue-ui-chord-DDa4TTtv.js → vue-ui-chord-BxtcK3_z.js} +8 -8
  40. package/dist/{vue-ui-circle-pack-DWxEHCSN.js → vue-ui-circle-pack-C1VhKFJH.js} +26 -26
  41. package/dist/{vue-ui-cursor-BtLD4k-n.js → vue-ui-cursor-BfBzN6pL.js} +2 -2
  42. package/dist/{vue-ui-dashboard-DvyNEYA8.js → vue-ui-dashboard-BkJ-_5VM.js} +62 -62
  43. package/dist/{vue-ui-digits-XkSs-Fvw.js → vue-ui-digits-DiVIJnu1.js} +2 -2
  44. package/dist/{vue-ui-donut-BO2QuXBj.js → vue-ui-donut-Bzs1fvFg.js} +408 -381
  45. package/dist/vue-ui-donut-evolution-CphzEyQm.js +1072 -0
  46. package/dist/{vue-ui-dumbbell-jtJmPKky.js → vue-ui-dumbbell-DZ_K-uO1.js} +7 -7
  47. package/dist/{vue-ui-flow-D1hSlRXa.js → vue-ui-flow-B1Smp670.js} +12 -10
  48. package/dist/{vue-ui-funnel-BlLlAOtx.js → vue-ui-funnel-MxaU-Y6j.js} +6 -6
  49. package/dist/{vue-ui-galaxy-BZAhXSnB.js → vue-ui-galaxy-CuIvJuky.js} +51 -49
  50. package/dist/{vue-ui-gauge-FdnYVol9.js → vue-ui-gauge-CQa1ARJW.js} +6 -6
  51. package/dist/{vue-ui-gizmo-BXiMNDNp.js → vue-ui-gizmo-CYD2DkWS.js} +3 -3
  52. package/dist/{vue-ui-heatmap-BUmZvmK0.js → vue-ui-heatmap-DPKVxs97.js} +32 -30
  53. package/dist/{vue-ui-history-plot-CTT0NO2g.js → vue-ui-history-plot-CfaqUSG0.js} +12 -10
  54. package/dist/{vue-ui-kpi-BNNqPORJ.js → vue-ui-kpi-BF7LY0ml.js} +3 -3
  55. package/dist/{vue-ui-mini-loader-wa4WjqZj.js → vue-ui-mini-loader-paPzy6bc.js} +2 -2
  56. package/dist/{vue-ui-molecule-NGbWYvw-.js → vue-ui-molecule-s8MbsyOD.js} +35 -33
  57. package/dist/{vue-ui-mood-radar-Dz2YUYPG.js → vue-ui-mood-radar-DJVB6bAz.js} +7 -7
  58. package/dist/vue-ui-nested-donuts-Cj6UWI-E.js +1286 -0
  59. package/dist/{vue-ui-onion-DUeU3zvH.js → vue-ui-onion-CZPQVM2E.js} +46 -44
  60. package/dist/{vue-ui-parallel-coordinate-plot-5158EX3T.js → vue-ui-parallel-coordinate-plot-BFjFaGPP.js} +69 -67
  61. package/dist/{vue-ui-quadrant-BEaCxPxR.js → vue-ui-quadrant-BliWKYkH.js} +59 -57
  62. package/dist/{vue-ui-quick-chart-C3yTivjK.js → vue-ui-quick-chart-BnsIAVwN.js} +269 -265
  63. package/dist/{vue-ui-radar-CwRo-de_.js → vue-ui-radar-BKWpjRbP.js} +12 -10
  64. package/dist/{vue-ui-rating-nHTBjTie.js → vue-ui-rating-BfGF_GEg.js} +2 -2
  65. package/dist/{vue-ui-relation-circle-w7TYrdHz.js → vue-ui-relation-circle-5U3oW2sT.js} +6 -6
  66. package/dist/{vue-ui-ridgeline-Dk9xpHSw.js → vue-ui-ridgeline-Ch5zmtxC.js} +9 -9
  67. package/dist/{vue-ui-rings-tCL5utj_.js → vue-ui-rings-B0NyCg-p.js} +13 -11
  68. package/dist/{vue-ui-scatter-BJUJRCto.js → vue-ui-scatter-Xv9oRiGO.js} +72 -70
  69. package/dist/{vue-ui-skeleton-Cf09cngz.js → vue-ui-skeleton-B-AdrWNd.js} +3 -3
  70. package/dist/{vue-ui-smiley-BvoOjmJx.js → vue-ui-smiley-snwlluW9.js} +2 -2
  71. package/dist/{vue-ui-spark-trend-Bdz2gHnU.js → vue-ui-spark-trend-DSdhsrCl.js} +3 -3
  72. package/dist/{vue-ui-sparkbar-CS1FzyFk.js → vue-ui-sparkbar-eABecvjz.js} +3 -3
  73. package/dist/{vue-ui-sparkgauge-auWy_YMm.js → vue-ui-sparkgauge-DFsW13y7.js} +3 -3
  74. package/dist/{vue-ui-sparkhistogram-yA_F8Ls5.js → vue-ui-sparkhistogram-DPzGXjFj.js} +4 -4
  75. package/dist/vue-ui-sparkline-B5OPRjNU.js +489 -0
  76. package/dist/{vue-ui-sparkstackbar-BhqOPIZT.js → vue-ui-sparkstackbar-CVBdITIs.js} +55 -53
  77. package/dist/vue-ui-stackbar-BTr1BBN4.js +1360 -0
  78. package/dist/{vue-ui-strip-plot-D7KgSU5y.js → vue-ui-strip-plot-54NtDb0A.js} +30 -28
  79. package/dist/{vue-ui-table-BDJg5T9l.js → vue-ui-table-B3FWWAuR.js} +3 -3
  80. package/dist/{vue-ui-table-heatmap-Pp2gbL5G.js → vue-ui-table-heatmap-BTWwkQXu.js} +5 -5
  81. package/dist/{vue-ui-table-sparkline-CmZBjiWv.js → vue-ui-table-sparkline-L_VfVY3_.js} +4 -4
  82. package/dist/{vue-ui-thermometer-ClY99Umm.js → vue-ui-thermometer-BYg-tLqb.js} +6 -6
  83. package/dist/{vue-ui-timer-_Bck3rxo.js → vue-ui-timer-Bsm1nthM.js} +5 -5
  84. package/dist/{vue-ui-tiremarks-C2CtoJT_.js → vue-ui-tiremarks-DDNjDbqV.js} +6 -6
  85. package/dist/{vue-ui-treemap-CM-zqI6U.js → vue-ui-treemap-4Rb7juUd.js} +13 -11
  86. package/dist/vue-ui-vertical-bar-BBUHbyBk.js +1108 -0
  87. package/dist/{vue-ui-waffle-B21kT4HO.js → vue-ui-waffle-B0pPICBw.js} +13 -11
  88. package/dist/{vue-ui-wheel-Dqv-ta7L.js → vue-ui-wheel-DsxxqjAU.js} +6 -6
  89. package/dist/{vue-ui-word-cloud-DHjvCwD8.js → vue-ui-word-cloud-Bcy11LqK.js} +12 -10
  90. package/dist/{vue-ui-world-h3Csu0YN.js → vue-ui-world-6gaLWJY0.js} +11 -9
  91. package/dist/vue-ui-xy-DH1dcD0K.js +3031 -0
  92. package/dist/{vue-ui-xy-canvas-sIRUM_Be.js → vue-ui-xy-canvas-dEh72fwk.js} +265 -264
  93. package/package.json +1 -1
  94. package/dist/vue-ui-candlestick-Dz0D7t8f.js +0 -873
  95. package/dist/vue-ui-donut-evolution-CQDtCf7k.js +0 -903
  96. package/dist/vue-ui-nested-donuts-ywwGdEJO.js +0 -1177
  97. package/dist/vue-ui-sparkline-B-sCAUEL.js +0 -459
  98. package/dist/vue-ui-stackbar-CZzqF-ZH.js +0 -1207
  99. package/dist/vue-ui-vertical-bar-CET-9MDi.js +0 -980
  100. package/dist/vue-ui-xy-CZ7mScyg.js +0 -2958
@@ -0,0 +1,1360 @@
1
+ import { defineAsyncComponent as te, useSlots as ga, computed as k, ref as b, onMounted as Lt, toRefs as ba, watch as Fe, shallowRef as zt, onBeforeUnmount as Ct, watchEffect as St, nextTick as _t, createElementBlock as o, openBlock as s, unref as v, normalizeStyle as Z, normalizeClass as ae, createBlock as K, createCommentVNode as y, renderSlot as L, createElementVNode as Q, createVNode as we, createSlots as $t, withCtx as C, normalizeProps as U, guardReactiveProps as H, Fragment as g, renderList as m, mergeProps as De, toDisplayString as M, createTextVNode as fa } from "vue";
2
+ import { u as ma, c as Tt, A as pa, t as xa, p as Le, a as ka, C as le, b as wa, o as Mt, e as At, g as La, d as za, an as ze, ac as Nt, D as It, X as Ca, l as Sa, aa as Ce, F as Rt, i as Se, f as j, I as _a, a0 as $a, x as Ot, q as Ta, r as Ma, y as Aa } from "./index-CvyDwC1y.js";
3
+ import { u as Pt } from "./useNestedProp-B-ULAHAH.js";
4
+ import { t as Ue, u as Na } from "./useResponsive-DfdjqQps.js";
5
+ import { u as Ia } from "./usePrinter-BAQfJI9j.js";
6
+ import { u as Ra } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Oa } from "./useChartAccessibility-9icAAmYg.js";
8
+ import { u as Pa } from "./useTimeLabelCollider-V7AOiPLB.js";
9
+ import Va from "./Legend-DCsRNGsk.js";
10
+ import { S as Ea } from "./Slicer-CUUN5Npc.js";
11
+ import Fa from "./Title-gfAAMBE3.js";
12
+ import { _ as Da } from "./Shape-D6ahkZT8.js";
13
+ import { u as Ua } from "./useTimeLabels-DFkUfjfs.js";
14
+ import Ha from "./img-FayRC7eM.js";
15
+ import { u as Ba, B as Wa } from "./BaseScanner-DIK2NTdp.js";
16
+ import { _ as Ya } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
+ const Xa = ["id"], Ga = ["xmlns", "viewBox"], Ja = ["x", "y", "width", "height"], qa = { key: 1 }, Za = ["id"], Ka = ["stop-color"], Qa = ["stop-color"], ja = ["stop-color"], el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], tl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ll = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], rl = { key: 0 }, sl = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], ol = { key: 0 }, il = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], nl = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], ul = { key: 0 }, cl = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], hl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], dl = ["x", "y", "font-size", "fill", "font-weight"], yl = ["transform", "font-size", "fill", "font-weight"], gl = ["x", "y", "font-size", "fill", "font-weight"], bl = ["x", "y", "font-size", "font-weight", "fill"], fl = ["x", "y", "font-size", "fill", "font-weight"], ml = ["x", "y", "font-size", "font-weight", "fill"], pl = ["x1", "x2", "y1", "y2", "stroke"], xl = ["x", "y", "font-size", "font-weight", "fill"], kl = ["x1", "x2", "y1", "y2", "stroke"], wl = ["font-size", "font-weight", "fill", "text-anchor", "transform"], Ll = { key: 0 }, zl = { key: 1 }, Cl = ["text-anchor", "font-size", "font-weight", "fill", "transform", "onClick"], Sl = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], _l = { key: 0 }, $l = { key: 1 }, Tl = ["font-size", "font-weight", "fill", "x", "y", "onClick"], Ml = ["font-size", "font-weight", "fill", "x", "y", "onClick", "innerHTML"], Al = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], Nl = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], Il = {
18
+ key: 3,
19
+ class: "vue-data-ui-watermark"
20
+ }, Rl = ["onClick"], Ol = ["innerHTML"], Pl = {
21
+ __name: "vue-ui-stackbar",
22
+ props: {
23
+ config: {
24
+ type: Object,
25
+ default() {
26
+ return {};
27
+ }
28
+ },
29
+ dataset: {
30
+ type: Array,
31
+ default() {
32
+ return [];
33
+ }
34
+ }
35
+ },
36
+ emits: ["selectDatapoint", "selectLegend", "selectTimeLabel"],
37
+ setup(_e, { expose: Vt, emit: Et }) {
38
+ const Ft = te(() => import("./vue-ui-accordion-ErGvIA2d.js")), Dt = te(() => import("./DataTable-DAZn6udI.js")), Ut = te(() => import("./PackageVersion-CJPhC_FI.js")), Ht = te(() => import("./PenAndPaper-kGe5NPSy.js")), Bt = te(() => import("./Tooltip-eZi8Q0Mr.js")), Wt = te(() => import("./UserOptions-Dd0OHMn7.js")), { vue_ui_stackbar: Yt } = ma(), Xt = ga(), f = _e, $e = Et, ie = k({
39
+ get() {
40
+ return !!f.dataset && f.dataset.length;
41
+ },
42
+ set(a) {
43
+ return a;
44
+ }
45
+ }), P = b(null), V = b(Tt()), ne = b(!1), Te = b(null), Me = b(""), _ = b([]), He = b(0), Be = b(null), We = b(null), Ye = b(null), Xe = b(null), Ge = b(0), ue = b(!1), re = b(null), B = b(!1), Je = b(0), Gt = b(0), Jt = b(0), qe = b(null), Ae = b(null), Ne = b(null), W = b(null), Y = b(null), qt = b(null), Ze = b(null);
46
+ Lt(() => {
47
+ Pe();
48
+ });
49
+ const e = b(Re()), { loading: ce, FINAL_DATASET: he, manualLoading: ve } = Ba({
50
+ ...ba(f),
51
+ FINAL_CONFIG: e,
52
+ prepareConfig: Re,
53
+ callback: () => {
54
+ Promise.resolve().then(async () => {
55
+ await Ve();
56
+ });
57
+ },
58
+ skeletonDataset: [
59
+ {
60
+ name: "",
61
+ series: [2, 3, 5, 8, 13, 21],
62
+ color: "#BABABA"
63
+ },
64
+ {
65
+ name: "",
66
+ series: [1, 2, 3, 5, 8, 13],
67
+ color: "#CACACA"
68
+ }
69
+ ],
70
+ skeletonConfig: pa({
71
+ defaultConfig: e.value,
72
+ userConfig: {
73
+ userOptions: { show: !1 },
74
+ useCssAnimation: !1,
75
+ table: { show: !1 },
76
+ tooltip: { show: !1 },
77
+ style: {
78
+ chart: {
79
+ backgroundColor: "#99999930",
80
+ bars: {
81
+ totalValues: { show: !1 },
82
+ dataLabels: { show: !1 }
83
+ },
84
+ grid: {
85
+ scale: {
86
+ scaleMin: 0,
87
+ scaleMax: 40
88
+ },
89
+ x: {
90
+ axisColor: "#6A6A6A",
91
+ linesColor: "#6A6A6A",
92
+ axisName: { show: !1 },
93
+ timeLabels: { show: !1 }
94
+ },
95
+ y: {
96
+ axisColor: "#6A6A6A",
97
+ linesColor: "#6A6A6A",
98
+ axisName: { show: !1 },
99
+ axisLabels: { show: !1 }
100
+ }
101
+ },
102
+ legend: {
103
+ backgroundColor: "transparent"
104
+ },
105
+ padding: {
106
+ left: 24,
107
+ right: 24,
108
+ bottom: 12
109
+ },
110
+ zoom: {
111
+ show: !1,
112
+ startIndex: null,
113
+ endIndex: null
114
+ }
115
+ }
116
+ }
117
+ }
118
+ })
119
+ }), { userOptionsVisible: Ie, setUserOptionsVisibility: Ke, keepUserOptionState: Qe } = Ra({ config: e.value }), { svgRef: je } = Oa({ config: e.value.style.chart.title });
120
+ function Re() {
121
+ const a = Pt({
122
+ userConfig: f.config,
123
+ defaultConfig: Yt
124
+ });
125
+ let r = {};
126
+ return a.theme ? r = {
127
+ ...Pt({
128
+ userConfig: ka.vue_ui_stackbar[a.theme] || f.config,
129
+ defaultConfig: a
130
+ }),
131
+ customPalette: xa[a.theme] || Le
132
+ } : r = a, f.config && le(f.config, "style.chart.grid.scale.scaleMin") ? r.style.chart.grid.scale.scaleMin = f.config.style.chart.grid.scale.scaleMin : r.style.chart.grid.scale.scaleMin = null, f.config && le(f.config, "style.chart.grid.scale.scaleMax") ? r.style.chart.grid.scale.scaleMax = f.config.style.chart.grid.scale.scaleMax : r.style.chart.grid.scale.scaleMax = null, f.config && le(f.config, "style.chart.zoom.startIndex") ? r.style.chart.zoom.startIndex = f.config.style.chart.zoom.startIndex : r.style.chart.zoom.startIndex = null, f.config && le(f.config, "style.chart.zoom.endIndex") ? r.style.chart.zoom.endIndex = f.config.style.chart.zoom.endIndex : r.style.chart.zoom.endIndex = null, f.config && le(f.config, "style.chart.bars.dataLabels.hideUnderValue") ? r.style.chart.bars.dataLabels.hideUnderValue = f.config.style.chart.bars.dataLabels.hideUnderValue : r.style.chart.bars.dataLabels.hideUnderValue = null, f.config && le(f.config, "style.chart.bars.dataLabels.hideUnderPercentage") ? r.style.chart.bars.dataLabels.hideUnderPercentage = f.config.style.chart.bars.dataLabels.hideUnderPercentage : r.style.chart.bars.dataLabels.hideUnderPercentage = null, r;
133
+ }
134
+ const et = k(() => e.value.style.chart.bars.dataLabels.hideUnderValue !== null), tt = k(() => e.value.style.chart.bars.dataLabels.hideUnderPercentage !== null);
135
+ Fe(() => f.config, (a) => {
136
+ ce.value || (e.value = Re()), Ie.value = !e.value.userOptions.showOnChartHover, Pe(), Je.value += 1, Gt.value += 1, Jt.value += 1, z.value.dataLabels.show = e.value.style.chart.bars.dataLabels.show, z.value.showTable = e.value.table.show, z.value.showTooltip = e.value.style.chart.tooltip.show;
137
+ }, { deep: !0 }), Fe(() => f.dataset, (a) => {
138
+ Array.isArray(a) && a.length > 0 && (ve.value = !1), nt();
139
+ }, { deep: !0 });
140
+ const z = b({
141
+ dataLabels: {
142
+ show: e.value.style.chart.bars.dataLabels.show
143
+ },
144
+ showTable: e.value.table.show,
145
+ showTooltip: e.value.style.chart.tooltip.show
146
+ });
147
+ Fe(e, () => {
148
+ z.value = {
149
+ dataLabels: {
150
+ show: e.value.style.chart.bars.dataLabels.show
151
+ },
152
+ showTable: e.value.table.show,
153
+ showTooltip: e.value.style.chart.tooltip.show
154
+ };
155
+ }, { immediate: !0 });
156
+ const { isPrinting: at, isImaging: lt, generatePdf: rt, generateImage: st } = Ia({
157
+ elementId: `stackbar_${V.value}`,
158
+ fileName: e.value.style.chart.title.text || "vue-ui-stackbar",
159
+ options: e.value.userOptions.print
160
+ }), de = b({
161
+ width: e.value.style.chart.width,
162
+ height: e.value.style.chart.height,
163
+ paddingRatio: {
164
+ top: e.value.style.chart.padding.top / e.value.style.chart.height,
165
+ right: e.value.style.chart.padding.right / e.value.style.chart.width,
166
+ bottom: e.value.style.chart.padding.bottom / e.value.style.chart.height,
167
+ left: e.value.style.chart.padding.left / e.value.style.chart.width
168
+ }
169
+ }), Zt = k(() => wa(e.value.customPalette)), E = zt(null), ee = zt(null), ot = b(null);
170
+ Lt(() => {
171
+ Pe();
172
+ });
173
+ const Oe = k(() => !!e.value.debug);
174
+ function Pe() {
175
+ if (Mt(f.dataset) ? (At({
176
+ componentName: "VueUiStackbar",
177
+ type: "dataset",
178
+ debug: Oe.value
179
+ }), ve.value = !0) : f.dataset.forEach((a, r) => {
180
+ La({
181
+ datasetObject: a,
182
+ requiredAttributes: ["name", "series"]
183
+ }).forEach((t) => {
184
+ ie.value = !1, At({
185
+ componentName: "VueUiStackbar",
186
+ type: "datasetSerieAttribute",
187
+ property: t,
188
+ index: r,
189
+ debug: Oe.value
190
+ }), ve.value = !0;
191
+ });
192
+ }), Mt(f.dataset) || (ve.value = e.value.loading), setTimeout(() => {
193
+ B.value = !0;
194
+ }, 10), e.value.responsive) {
195
+ const a = Ue(() => {
196
+ B.value = !1;
197
+ const { width: r, height: t } = Na({
198
+ chart: P.value,
199
+ title: e.value.style.chart.title.text ? Be.value : null,
200
+ legend: e.value.style.chart.legend.show ? We.value : null,
201
+ slicer: e.value.style.chart.zoom.show && D.value > 1 ? Ye.value : null,
202
+ source: Xe.value
203
+ });
204
+ requestAnimationFrame(() => {
205
+ de.value.width = r, de.value.height = t - 12, clearTimeout(ot.value), ot.value = setTimeout(() => {
206
+ B.value = !0;
207
+ }, 10);
208
+ });
209
+ });
210
+ E.value && (ee.value && E.value.unobserve(ee.value), E.value.disconnect()), E.value = new ResizeObserver(a), ee.value = P.value.parentNode, E.value.observe(ee.value);
211
+ }
212
+ Ve();
213
+ }
214
+ Ct(() => {
215
+ E.value && (ee.value && E.value.unobserve(ee.value), E.value.disconnect());
216
+ });
217
+ function Kt() {
218
+ let a = 0;
219
+ e.value.orientation === "vertical" && W.value && (a = Array.from(W.value.querySelectorAll("text")).reduce((l, c) => {
220
+ const u = c.getComputedTextLength();
221
+ return u > l ? u : l;
222
+ }, 0)), e.value.orientation === "horizontal" && Y.value && (a = Array.from(Y.value.querySelectorAll("text")).reduce((l, c) => {
223
+ const u = c.getComputedTextLength();
224
+ return u > l ? u : l;
225
+ }, 0));
226
+ const r = Ne.value ? Ne.value.getBoundingClientRect().width : 0;
227
+ return a + r + (r ? 24 : 0);
228
+ }
229
+ const ye = b(0), ge = b(0), Qt = Ue((a) => {
230
+ ye.value = a;
231
+ }, 100);
232
+ St((a) => {
233
+ const r = e.value.orientation === "vertical" ? Y.value : W.value;
234
+ if (!r) return;
235
+ const t = new ResizeObserver((l) => {
236
+ Qt(l[0].contentRect.height);
237
+ });
238
+ t.observe(r), a(() => t.disconnect());
239
+ });
240
+ const jt = Ue((a) => {
241
+ ge.value = a + e.value.style.chart.bars.totalValues.fontSize;
242
+ }, 100);
243
+ St((a) => {
244
+ if (e.value.orientation === "vertical") return;
245
+ const r = Ze.value;
246
+ if (!r) return;
247
+ const t = new ResizeObserver((l) => {
248
+ jt(l[0].contentRect.width);
249
+ });
250
+ t.observe(r), a(() => t.disconnect());
251
+ }), Ct(() => {
252
+ ye.value = 0, ge.value = 0;
253
+ });
254
+ const it = k(() => {
255
+ let a = 0;
256
+ Ae.value && (a = Ae.value.getBBox().height);
257
+ let r = 0;
258
+ return e.value.orientation === "vertical" && Y.value && (r = ye.value), e.value.orientation === "horizontal" && W.value && (r = ye.value), a + r;
259
+ }), n = k(() => {
260
+ const { height: a, width: r } = de.value, { right: t } = de.value.paddingRatio;
261
+ let l = e.value.style.chart.bars.totalValues.show && f.dataset && f.dataset.length > 1 ? e.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, c = 0;
262
+ e.value.style.chart.grid.y.axisLabels.show && (c = Kt());
263
+ const u = e.value.style.chart.padding.top + l, S = r - r * t - ge.value, X = a - e.value.style.chart.padding.bottom - it.value - l, G = e.value.style.chart.padding.left + c, J = r - G - r * t - ge.value, R = a - u - e.value.style.chart.padding.bottom - it.value - l;
264
+ return {
265
+ chartHeight: a,
266
+ chartWidth: r,
267
+ top: u,
268
+ right: S,
269
+ bottom: X,
270
+ left: G,
271
+ width: Math.max(0, J),
272
+ height: Math.max(0, R)
273
+ };
274
+ }), F = k(() => he.value.map((a, r) => {
275
+ const t = za(a.color) || Zt.value[r] || Le[r] || Le[r % Le.length];
276
+ return {
277
+ ...a,
278
+ // In distributed mode, all values are converted to positive
279
+ series: JSON.parse(JSON.stringify(a.series)).map((l) => e.value.style.chart.bars.distributed ? Math.abs(l) : l),
280
+ // Store signs to manage display of neg values in distributed mode
281
+ signedSeries: a.series.map((l) => l >= 0 ? 1 : -1),
282
+ absoluteIndex: r,
283
+ id: Tt(),
284
+ color: t
285
+ };
286
+ })), D = k(() => Math.max(...F.value.filter((a) => !_.value.includes(a.id)).map((a) => a.series.length))), h = b({
287
+ start: 0,
288
+ end: Math.max(...he.value.map((a) => a.series.length))
289
+ });
290
+ function nt() {
291
+ Ve();
292
+ }
293
+ async function Ve() {
294
+ await _t(), await _t();
295
+ const { startIndex: a, endIndex: r } = e.value.style.chart.zoom, t = qe.value, l = Math.max(...he.value.map((c) => c.series.length));
296
+ (a != null || r != null) && t ? (a != null && t.setStartValue(a), r != null && t.setEndValue(ea(r + 1))) : (h.value = { start: 0, end: l }, Ge.value += 1);
297
+ }
298
+ function ea(a) {
299
+ const r = Math.max(...he.value.map((t) => t.series.length));
300
+ return a > r ? r : a < 0 || e.value.style.chart.zoom.startIndex !== null && a < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : a;
301
+ }
302
+ const d = k(() => {
303
+ let a;
304
+ return e.value.orientation === "vertical" ? a = n.value.width / (h.value.end - h.value.start) : a = n.value.height / (h.value.end - h.value.start), a <= 0 ? 0 : a;
305
+ }), se = k(() => ze(F.value.filter((a) => !_.value.includes(a.id))).slice(h.value.start, h.value.end)), ta = k(() => ze(F.value.filter((a) => !_.value.includes(a.id)).map((a) => ({
306
+ ...a,
307
+ series: a.series.map((r, t) => a.signedSeries[t] === -1 && r >= 0 ? -r : r)
308
+ }))).slice(h.value.start, h.value.end)), be = k(() => {
309
+ const a = F.value.filter((r) => !_.value.includes(r.id));
310
+ return {
311
+ positive: ze(a.map((r) => ({
312
+ ...r,
313
+ series: r.series.slice(h.value.start, h.value.end).map((t) => t >= 0 ? t : 0)
314
+ }))),
315
+ negative: ze(a.map((r) => ({
316
+ ...r,
317
+ series: r.series.slice(h.value.start, h.value.end).map((t) => t < 0 ? t : 0)
318
+ })))
319
+ };
320
+ }), I = k(() => {
321
+ const a = e.value.style.chart.grid.scale.scaleMax !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMax : Math.max(...be.value.positive), r = Math.min(...be.value.negative), t = e.value.style.chart.grid.scale.scaleMin !== null && !e.value.style.chart.bars.distributed ? e.value.style.chart.grid.scale.scaleMin : [-1 / 0, 1 / 0, NaN, void 0, null].includes(r) ? 0 : r, l = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Nt(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks) : It(t > 0 ? 0 : t, a < 0 ? 0 : a, e.value.style.chart.grid.scale.ticks);
322
+ return l.ticks.map((c) => ({
323
+ zero: n.value.bottom - n.value.height * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
324
+ y: n.value.bottom - n.value.height * ((c + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
325
+ x: n.value.left - 8,
326
+ horizontal_zero: n.value.left + n.value.width * (Math.abs(l.min) / (l.max + Math.abs(l.min))),
327
+ horizontal_x: n.value.left + n.value.width * ((c + Math.abs(l.min)) / (l.max + Math.abs(l.min))),
328
+ horizontal_y: n.value.bottom - 8,
329
+ value: c
330
+ }));
331
+ }), $ = k(() => Ua({
332
+ values: e.value.style.chart.grid.x.timeLabels.values,
333
+ maxDatapoints: D.value,
334
+ formatter: e.value.style.chart.grid.x.timeLabels.datetimeFormatter,
335
+ start: h.value.start,
336
+ end: h.value.end
337
+ })), w = k(() => {
338
+ if (!ie.value && !ce.value) return [];
339
+ let a = Array(D.value).fill(0), r = Array(D.value).fill(0), t = Array(D.value).fill(0), l = Array(D.value).fill(0);
340
+ const c = Math.max(...be.value.positive) || 0, u = Math.min(...be.value.negative), S = [-1 / 0, 1 / 0, NaN, void 0, null].includes(u) ? 0 : u, X = !e.value.style.chart.bars.distributed && (e.value.style.chart.grid.scale.scaleMax !== null || e.value.style.chart.grid.scale.scaleMin !== null) ? Nt(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks) : It(e.value.style.chart.grid.scale.scaleMin !== null ? e.value.style.chart.grid.scale.scaleMin : S > 0 ? 0 : S, e.value.style.chart.grid.scale.scaleMax !== null ? e.value.style.chart.grid.scale.scaleMax : c < 0 ? 0 : c, e.value.style.chart.grid.scale.ticks), { min: G, max: J } = X, R = J + (G >= 0 ? 0 : Math.abs(G)) || 1, T = n.value.height, ke = n.value.width, kt = I.value[0] ? I.value[0].zero : n.value.bottom, wt = I.value[0] ? I.value[0].horizontal_zero : n.value.left;
341
+ return F.value.filter((oe) => !_.value.includes(oe.id)).map((oe) => {
342
+ const O = oe.series.slice(h.value.start, h.value.end), ia = oe.signedSeries.slice(h.value.start, h.value.end), na = O.map((p, x) => n.value.left + d.value * x + d.value * e.value.style.chart.bars.gapRatio / 4), ua = O.map((p, x) => n.value.top + d.value * x + d.value * e.value.style.chart.bars.gapRatio / 4), ca = O.map((p, x) => {
343
+ const A = e.value.style.chart.bars.distributed ? (p || 0) / se.value[x] : (p || 0) / R;
344
+ let q, N;
345
+ return p > 0 ? (N = T * A, q = kt - N - a[x], a[x] += N) : (N = T * A, q = kt + t[x], t[x] += Math.abs(N)), q;
346
+ }), ha = O.map((p, x) => {
347
+ const A = e.value.style.chart.bars.distributed ? (p || 0) / se.value[x] : (p || 0) / R;
348
+ let q, N;
349
+ return p > 0 ? (N = ke * A, q = wt + r[x], r[x] += N) : (N = ke * A, q = wt - Math.abs(N) - l[x], l[x] += Math.abs(N)), q;
350
+ }), va = O.map((p, x) => {
351
+ const A = e.value.style.chart.bars.distributed ? (p || 0) / se.value[x] : (p || 0) / R;
352
+ return p > 0 ? T * A : T * Math.abs(A);
353
+ }), da = O.map((p, x) => {
354
+ const A = e.value.style.chart.bars.distributed ? (p || 0) / se.value[x] : (p || 0) / R;
355
+ return p > 0 ? ke * A : ke * Math.abs(A);
356
+ }), ya = O.map((p) => Math.abs(p)).reduce((p, x) => p + x, 0);
357
+ return {
358
+ ...oe,
359
+ proportions: O.map((p, x) => e.value.style.chart.bars.distributed ? (p || 0) / se.value[x] : (p || 0) / ya),
360
+ series: O,
361
+ signedSeries: ia,
362
+ x: na,
363
+ y: ca,
364
+ height: va,
365
+ horizontal_width: da,
366
+ horizontal_y: ua,
367
+ horizontal_x: ha
368
+ };
369
+ });
370
+ }), ut = k(() => ta.value.map((a, r) => ({
371
+ value: a,
372
+ sign: a >= 0 ? 1 : -1
373
+ })));
374
+ function fe(a, r, t, l, c) {
375
+ const u = c === -1 && a >= 0 ? -a : a;
376
+ return Se(
377
+ e.value.style.chart.bars.dataLabels.formatter,
378
+ u,
379
+ j({
380
+ p: e.value.style.chart.bars.dataLabels.prefix,
381
+ v: u,
382
+ s: e.value.style.chart.bars.dataLabels.suffix,
383
+ r: e.value.style.chart.bars.dataLabels.rounding
384
+ }),
385
+ { datapoint: r, seriesIndex: t, datapointIndex: l }
386
+ );
387
+ }
388
+ function ct(a, r, t, l) {
389
+ return Se(
390
+ e.value.style.chart.bars.dataLabels.formatter,
391
+ a,
392
+ j({
393
+ v: isNaN(a) ? 0 : a,
394
+ s: "%",
395
+ r: e.value.style.chart.bars.dataLabels.rounding
396
+ }),
397
+ { datapoint: r, seriesIndex: t, datapointIndex: l }
398
+ );
399
+ }
400
+ function ht(a) {
401
+ const r = JSON.parse(JSON.stringify(w.value)).map((t) => ({
402
+ name: t.name,
403
+ value: t.series[a] === 0 ? 0 : t.series[a] || null,
404
+ proportion: t.proportions[a] || null,
405
+ color: t.color,
406
+ id: t.id
407
+ }));
408
+ $e("selectDatapoint", { datapoint: r, period: $.value[a] });
409
+ }
410
+ function vt(a) {
411
+ re.value = a, ne.value = !0;
412
+ const r = e.value.style.chart.tooltip.customFormat, t = JSON.parse(JSON.stringify(w.value)).map((c) => ({
413
+ name: c.name,
414
+ absoluteIndex: c.absoluteIndex,
415
+ value: c.series[a] === 0 ? 0 : (c.signedSeries[a] === -1 && c.series[a] >= 0 ? -c.series[a] : c.series[a]) || null,
416
+ proportion: c.proportions[a] || null,
417
+ color: c.color,
418
+ id: c.id
419
+ }));
420
+ Te.value = {
421
+ datapoint: t,
422
+ seriesIndex: a,
423
+ config: e.value,
424
+ series: w.value
425
+ };
426
+ const l = t.map((c) => Math.abs(c.value)).reduce((c, u) => c + u, 0);
427
+ if (Ot(r) && Aa(() => r({
428
+ seriesIndex: a,
429
+ datapoint: t,
430
+ series: w.value,
431
+ config: e.value
432
+ })))
433
+ Me.value = r({
434
+ seriesIndex: a,
435
+ datapoint: t,
436
+ series: w.value,
437
+ config: e.value
438
+ });
439
+ else {
440
+ const {
441
+ showValue: c,
442
+ showPercentage: u,
443
+ borderColor: S,
444
+ roundingValue: X,
445
+ roundingPercentage: G
446
+ } = e.value.style.chart.tooltip;
447
+ let J = "";
448
+ $.value[a] && $.value[a].text && e.value.style.chart.tooltip.showTimeLabel && (J += `<div style="width:100%;text-align:center;border-bottom:1px solid ${S};padding-bottom:6px;margin-bottom:3px;">${$.value[a].text}</div>`);
449
+ const R = [
450
+ c && u ? "(" : "",
451
+ c && u ? ")" : ""
452
+ ];
453
+ t.reverse().forEach((T) => {
454
+ J += `
455
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
456
+ <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${e.value.style.chart.bars.gradient.show ? `url(#gradient_${T.id})` : T.color}"/>${Xt.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${V.value}_${T.absoluteIndex})"/>` : ""}</svg>
457
+ ${T.name}${c || u ? ":" : ""} ${c ? j({
458
+ p: e.value.style.chart.bars.dataLabels.prefix,
459
+ v: T.value,
460
+ s: e.value.style.chart.bars.dataLabels.suffix,
461
+ r: X
462
+ }) : ""} ${R[0]}${u ? j({
463
+ v: isNaN(T.value / l) ? 0 : Math.abs(T.value) / l * 100,
464
+ // Negs are absed to show relative proportion to absolute total. It's opinionated.
465
+ s: "%",
466
+ r: G
467
+ }) : ""}${R[1]}
468
+ </div>
469
+ `;
470
+ }), Me.value = `<div>${J}</div>`;
471
+ }
472
+ }
473
+ Pa({
474
+ timeLabelsEls: e.value.orientation === "vertical" ? Y : W,
475
+ timeLabels: $,
476
+ slicer: h,
477
+ configRef: e,
478
+ rotationPath: ["style", "chart", "grid", "x", "timeLabels", "rotation"],
479
+ autoRotatePath: ["style", "chart", "grid", "x", "timeLabels", "autoRotate"],
480
+ isAutoSize: !1
481
+ });
482
+ function dt(a) {
483
+ ue.value = a, He.value += 1;
484
+ }
485
+ function yt() {
486
+ z.value.showTable = !z.value.showTable;
487
+ }
488
+ function gt() {
489
+ z.value.dataLabels.show = !z.value.dataLabels.show;
490
+ }
491
+ function bt() {
492
+ z.value.showTooltip = !z.value.showTooltip;
493
+ }
494
+ function aa() {
495
+ return w.value;
496
+ }
497
+ const ft = k(() => {
498
+ if (w.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
499
+ const a = w.value.map(({ name: t, color: l }) => ({
500
+ label: t,
501
+ color: l
502
+ })), r = [];
503
+ return $.value.forEach((t) => {
504
+ const l = [e.value.style.chart.grid.x.timeLabels.values[t.absoluteIndex] ? t.text : i + 1];
505
+ F.value.forEach((c) => {
506
+ l.push(Number((c.series[t.absoluteIndex] || 0).toFixed(e.value.table.td.roundingValue)));
507
+ }), r.push(l);
508
+ }), { head: a, body: r };
509
+ });
510
+ function mt(a = null) {
511
+ const r = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = ["", ...ft.value.head.map((S) => S.label)], l = ft.value.body, c = r.concat([t]).concat(l), u = Ta(c);
512
+ a ? a(u) : Ma({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-stackbar" });
513
+ }
514
+ const me = k(() => {
515
+ const a = [""].concat(w.value.map((c) => c.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>');
516
+ let r = [];
517
+ for (let c = 0; c < D.value; c += 1) {
518
+ const u = w.value.map((S) => S.series[c] ?? 0).reduce((S, X) => S + X, 0);
519
+ r.push([e.value.style.chart.grid.x.timeLabels.values.slice(h.value.start, h.value.end)[c] ? $.value[c].text : c + 1].concat(w.value.map((S) => (S.series[c] ?? 0).toFixed(e.value.table.td.roundingValue))).concat((u ?? 0).toFixed(e.value.table.td.roundingValue)));
520
+ }
521
+ const t = {
522
+ th: {
523
+ backgroundColor: e.value.table.th.backgroundColor,
524
+ color: e.value.table.th.color,
525
+ outline: e.value.table.th.outline
526
+ },
527
+ td: {
528
+ backgroundColor: e.value.table.td.backgroundColor,
529
+ color: e.value.table.td.color,
530
+ outline: e.value.table.td.outline
531
+ },
532
+ breakpoint: e.value.table.responsiveBreakpoint
533
+ }, l = [e.value.table.columnNames.period].concat(w.value.map((c) => c.name)).concat(e.value.table.columnNames.total);
534
+ return { head: a, body: r.slice(0, h.value.end - h.value.start), config: t, colNames: l };
535
+ });
536
+ function la(a, r) {
537
+ if ($e("selectLegend", w.value.find((t) => t.absoluteIndex === a)), _.value.includes(r.id))
538
+ _.value = _.value.filter((t) => t !== r.id);
539
+ else {
540
+ if (_.value.length === F.value.length - 1) return;
541
+ _.value.push(r.id);
542
+ }
543
+ }
544
+ const pt = k(() => F.value.map((a, r) => ({
545
+ ...a,
546
+ shape: "square"
547
+ })).map((a) => ({
548
+ ...a,
549
+ opacity: _.value.includes(a.id) ? 0.5 : 1,
550
+ segregate: () => la(a.absoluteIndex, a),
551
+ isSegregated: _.value.includes(a.id)
552
+ }))), ra = k(() => ({
553
+ cy: "stackbar-legend",
554
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
555
+ color: e.value.style.chart.legend.color,
556
+ fontSize: e.value.style.chart.legend.fontSize,
557
+ paddingBottom: 12,
558
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
559
+ })), pe = b(!1);
560
+ function Ee() {
561
+ pe.value = !pe.value;
562
+ }
563
+ function xe(a, r) {
564
+ const t = JSON.parse(JSON.stringify(w.value)).map((l) => ({
565
+ name: l.name,
566
+ value: l.series[r] === 0 ? 0 : (l.signedSeries[r] === -1 && l.series[r] >= 0 ? -l.series[r] : l.series[r]) || null,
567
+ proportion: l.proportions[r] || null,
568
+ color: l.color,
569
+ id: l.id
570
+ }));
571
+ $e("selectTimeLabel", {
572
+ datapoint: t,
573
+ absoluteIndex: a.absoluteIndex,
574
+ label: a.text
575
+ });
576
+ }
577
+ const sa = k(() => Math.max(...w.value.flatMap((a) => a.series)));
578
+ function xt(a, r) {
579
+ return e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? tt.value ? r * 100 >= e.value.style.chart.bars.dataLabels.hideUnderPercentage : e.value.style.chart.bars.dataLabels.hideEmptyPercentages ? r > 0 : !0 : tt.value ? (et.value && Oe.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), a > sa.value * e.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : et.value ? Math.abs(a) >= e.value.style.chart.bars.dataLabels.hideUnderValue : e.value.style.chart.bars.dataLabels.hideEmptyValues ? a !== 0 : !0;
580
+ }
581
+ async function oa({ scale: a = 2 } = {}) {
582
+ if (!P.value) return;
583
+ const { width: r, height: t } = P.value.getBoundingClientRect(), l = r / t, { imageUri: c, base64: u } = await Ha({ domElement: P.value, base64: !0, img: !0, scale: a });
584
+ return {
585
+ imageUri: c,
586
+ base64: u,
587
+ title: e.value.style.chart.title.text,
588
+ width: r,
589
+ height: t,
590
+ aspectRatio: l
591
+ };
592
+ }
593
+ return Vt({
594
+ getData: aa,
595
+ getImage: oa,
596
+ generatePdf: rt,
597
+ generateCsv: mt,
598
+ generateImage: st,
599
+ toggleTable: yt,
600
+ toggleLabels: gt,
601
+ toggleTooltip: bt,
602
+ toggleAnnotator: Ee,
603
+ toggleFullscreen: dt
604
+ }), (a, r) => (s(), o("div", {
605
+ id: `stackbar_${V.value}`,
606
+ ref_key: "stackbarChart",
607
+ ref: P,
608
+ class: ae({ "vue-ui-stackbar": !0, "vue-data-ui-wrapper-fullscreen": ue.value }),
609
+ style: Z(`background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color};font-family:${e.value.style.fontFamily}; position: relative; ${e.value.responsive ? "height: 100%" : ""}`),
610
+ onMouseenter: r[6] || (r[6] = () => v(Ke)(!0)),
611
+ onMouseleave: r[7] || (r[7] = () => v(Ke)(!1))
612
+ }, [
613
+ e.value.userOptions.buttons.annotator ? (s(), K(v(Ht), {
614
+ key: 0,
615
+ svgRef: v(je),
616
+ backgroundColor: e.value.style.chart.backgroundColor,
617
+ color: e.value.style.chart.color,
618
+ active: pe.value,
619
+ onClose: Ee
620
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
621
+ L(a.$slots, "userConfig", {}, void 0, !0),
622
+ e.value.style.chart.title.text ? (s(), o("div", {
623
+ key: 1,
624
+ ref_key: "chartTitle",
625
+ ref: Be,
626
+ style: "width:100%;background:transparent;padding-bottom:24px"
627
+ }, [
628
+ (s(), K(Fa, {
629
+ key: `title_${Je.value}`,
630
+ config: {
631
+ title: {
632
+ cy: "stackbar-title",
633
+ ...e.value.style.chart.title
634
+ },
635
+ subtitle: {
636
+ cy: "stackbar-subtitle",
637
+ ...e.value.style.chart.title.subtitle
638
+ }
639
+ }
640
+ }, null, 8, ["config"]))
641
+ ], 512)) : y("", !0),
642
+ e.value.userOptions.show && ie.value && (v(Qe) || v(Ie)) ? (s(), K(v(Wt), {
643
+ ref: "details",
644
+ key: `user_option_${He.value}`,
645
+ backgroundColor: e.value.style.chart.backgroundColor,
646
+ color: e.value.style.chart.color,
647
+ isPrinting: v(at),
648
+ isImaging: v(lt),
649
+ uid: V.value,
650
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
651
+ hasPdf: e.value.userOptions.buttons.pdf,
652
+ hasImg: e.value.userOptions.buttons.img,
653
+ hasXls: e.value.userOptions.buttons.csv,
654
+ hasTable: e.value.userOptions.buttons.table,
655
+ hasLabel: e.value.userOptions.buttons.labels,
656
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
657
+ isFullscreen: ue.value,
658
+ chartElement: P.value,
659
+ position: e.value.userOptions.position,
660
+ isTooltip: z.value.showTooltip,
661
+ titles: { ...e.value.userOptions.buttonTitles },
662
+ hasAnnotator: e.value.userOptions.buttons.annotator,
663
+ isAnnotation: pe.value,
664
+ callbacks: e.value.userOptions.callbacks,
665
+ printScale: e.value.userOptions.print.scale,
666
+ onToggleFullscreen: dt,
667
+ onGeneratePdf: v(rt),
668
+ onGenerateCsv: mt,
669
+ onGenerateImage: v(st),
670
+ onToggleTable: yt,
671
+ onToggleLabels: gt,
672
+ onToggleTooltip: bt,
673
+ onToggleAnnotator: Ee,
674
+ style: Z({
675
+ visibility: v(Qe) ? v(Ie) ? "visible" : "hidden" : "visible"
676
+ })
677
+ }, $t({ _: 2 }, [
678
+ a.$slots.menuIcon ? {
679
+ name: "menuIcon",
680
+ fn: C(({ isOpen: t, color: l }) => [
681
+ L(a.$slots, "menuIcon", U(H({ isOpen: t, color: l })), void 0, !0)
682
+ ]),
683
+ key: "0"
684
+ } : void 0,
685
+ a.$slots.optionTooltip ? {
686
+ name: "optionTooltip",
687
+ fn: C(() => [
688
+ L(a.$slots, "optionTooltip", {}, void 0, !0)
689
+ ]),
690
+ key: "1"
691
+ } : void 0,
692
+ a.$slots.optionPdf ? {
693
+ name: "optionPdf",
694
+ fn: C(() => [
695
+ L(a.$slots, "optionPdf", {}, void 0, !0)
696
+ ]),
697
+ key: "2"
698
+ } : void 0,
699
+ a.$slots.optionCsv ? {
700
+ name: "optionCsv",
701
+ fn: C(() => [
702
+ L(a.$slots, "optionCsv", {}, void 0, !0)
703
+ ]),
704
+ key: "3"
705
+ } : void 0,
706
+ a.$slots.optionImg ? {
707
+ name: "optionImg",
708
+ fn: C(() => [
709
+ L(a.$slots, "optionImg", {}, void 0, !0)
710
+ ]),
711
+ key: "4"
712
+ } : void 0,
713
+ a.$slots.optionTable ? {
714
+ name: "optionTable",
715
+ fn: C(() => [
716
+ L(a.$slots, "optionTable", {}, void 0, !0)
717
+ ]),
718
+ key: "5"
719
+ } : void 0,
720
+ a.$slots.optionLabels ? {
721
+ name: "optionLabels",
722
+ fn: C(() => [
723
+ L(a.$slots, "optionLabels", {}, void 0, !0)
724
+ ]),
725
+ key: "6"
726
+ } : void 0,
727
+ a.$slots.optionFullscreen ? {
728
+ name: "optionFullscreen",
729
+ fn: C(({ toggleFullscreen: t, isFullscreen: l }) => [
730
+ L(a.$slots, "optionFullscreen", U(H({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
731
+ ]),
732
+ key: "7"
733
+ } : void 0,
734
+ a.$slots.optionAnnotator ? {
735
+ name: "optionAnnotator",
736
+ fn: C(({ toggleAnnotator: t, isAnnotator: l }) => [
737
+ L(a.$slots, "optionAnnotator", U(H({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
738
+ ]),
739
+ key: "8"
740
+ } : void 0
741
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
742
+ (s(), o("svg", {
743
+ ref_key: "svgRef",
744
+ ref: je,
745
+ xmlns: v(Ca),
746
+ viewBox: `0 0 ${n.value.chartWidth <= 0 ? 10 : n.value.chartWidth} ${n.value.chartHeight <= 0 ? 10 : n.value.chartHeight}`,
747
+ class: ae({ "vue-data-ui-loading": v(ce) }),
748
+ style: Z(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
749
+ }, [
750
+ we(v(Ut)),
751
+ a.$slots["chart-background"] ? (s(), o("foreignObject", {
752
+ key: 0,
753
+ x: n.value.left,
754
+ y: n.value.top,
755
+ width: n.value.width <= 0 ? 10 : n.value.width,
756
+ height: n.value.height <= 0 ? 10 : n.value.height,
757
+ style: {
758
+ pointerEvents: "none"
759
+ }
760
+ }, [
761
+ L(a.$slots, "chart-background", {}, void 0, !0)
762
+ ], 8, Ja)) : y("", !0),
763
+ e.value.style.chart.bars.gradient.show ? (s(), o("defs", qa, [
764
+ (s(!0), o(g, null, m(w.value, (t, l) => (s(), o("linearGradient", {
765
+ id: `gradient_${t.id}`,
766
+ x1: "0%",
767
+ y1: "0%",
768
+ x2: "0%",
769
+ y2: "100%"
770
+ }, [
771
+ Q("stop", {
772
+ offset: "0%",
773
+ "stop-color": t.color
774
+ }, null, 8, Ka),
775
+ Q("stop", {
776
+ offset: "61.8%",
777
+ "stop-color": v(Sa)(t.color, e.value.style.chart.bars.gradient.intensity / 100)
778
+ }, null, 8, Qa),
779
+ Q("stop", {
780
+ offset: "100%",
781
+ "stop-color": t.color
782
+ }, null, 8, ja)
783
+ ], 8, Za))), 256))
784
+ ])) : y("", !0),
785
+ e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "vertical" ? (s(!0), o(g, { key: 2 }, m(I.value, (t, l) => (s(), o("line", {
786
+ x1: n.value.left,
787
+ x2: n.value.right,
788
+ y1: t.y,
789
+ y2: t.y,
790
+ stroke: e.value.style.chart.grid.x.linesColor,
791
+ "stroke-width": e.value.style.chart.grid.x.linesThickness,
792
+ "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
793
+ "stroke-linecap": "round"
794
+ }, null, 8, el))), 256)) : y("", !0),
795
+ e.value.style.chart.grid.x.showHorizontalLines && e.value.orientation === "horizontal" ? (s(!0), o(g, { key: 3 }, m(h.value.end - h.value.start + 1, (t, l) => (s(), o("line", {
796
+ x1: n.value.left,
797
+ x2: n.value.right,
798
+ y1: n.value.top + d.value * l,
799
+ y2: n.value.top + d.value * l,
800
+ stroke: e.value.style.chart.grid.x.linesColor,
801
+ "stroke-width": e.value.style.chart.grid.x.linesThickness,
802
+ "stroke-dasharray": e.value.style.chart.grid.x.linesStrokeDasharray,
803
+ "stroke-linecap": "round"
804
+ }, null, 8, tl))), 256)) : y("", !0),
805
+ e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "vertical" ? (s(!0), o(g, { key: 4 }, m(h.value.end - h.value.start + 1, (t, l) => (s(), o("line", {
806
+ x1: n.value.left + d.value * l,
807
+ x2: n.value.left + d.value * l,
808
+ y1: n.value.top,
809
+ y2: n.value.bottom,
810
+ stroke: e.value.style.chart.grid.y.linesColor,
811
+ "stroke-width": e.value.style.chart.grid.y.linesThickness,
812
+ "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
813
+ "stroke-linecap": "round"
814
+ }, null, 8, al))), 256)) : y("", !0),
815
+ e.value.style.chart.grid.y.showVerticalLines && e.value.orientation === "horizontal" ? (s(!0), o(g, { key: 5 }, m(I.value, (t, l) => (s(), o("line", {
816
+ x1: t.horizontal_x,
817
+ x2: t.horizontal_x,
818
+ y1: n.value.top,
819
+ y2: n.value.bottom,
820
+ stroke: e.value.style.chart.grid.y.linesColor,
821
+ "stroke-width": e.value.style.chart.grid.y.linesThickness,
822
+ "stroke-dasharray": e.value.style.chart.grid.y.linesStrokeDasharray,
823
+ "stroke-linecap": "round"
824
+ }, null, 8, ll))), 256)) : y("", !0),
825
+ (s(!0), o(g, null, m(w.value, (t, l) => (s(), o("g", null, [
826
+ a.$slots.pattern ? (s(), o("defs", rl, [
827
+ L(a.$slots, "pattern", De({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${V.value}_${t.absoluteIndex}` }), void 0, !0)
828
+ ])) : y("", !0),
829
+ e.value.orientation === "vertical" ? (s(), o(g, { key: 1 }, [
830
+ (s(!0), o(g, null, m(t.x, (c, u) => (s(), o("rect", {
831
+ x: c,
832
+ y: t.y[u] < 0 ? 0 : t.y[u],
833
+ height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
834
+ rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
835
+ width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
836
+ fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
837
+ stroke: e.value.style.chart.backgroundColor,
838
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
839
+ "stroke-linecap": "round",
840
+ "stroke-linejoin": "round",
841
+ class: ae({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": B.value })
842
+ }, null, 10, sl))), 256)),
843
+ a.$slots.pattern ? (s(), o("g", ol, [
844
+ (s(!0), o(g, null, m(t.x, (c, u) => (s(), o("rect", {
845
+ x: c,
846
+ y: t.y[u] < 0 ? 0 : t.y[u],
847
+ height: t.height[u] < 0 ? 1e-4 : t.height[u] || 0,
848
+ rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
849
+ width: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
850
+ fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
851
+ stroke: e.value.style.chart.backgroundColor,
852
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
853
+ "stroke-linecap": "round",
854
+ "stroke-linejoin": "round",
855
+ class: ae({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": B.value })
856
+ }, null, 10, il))), 256))
857
+ ])) : y("", !0)
858
+ ], 64)) : (s(), o(g, { key: 2 }, [
859
+ (s(!0), o(g, null, m(t.horizontal_x, (c, u) => (s(), o("rect", {
860
+ x: v(Ce)(c, n.value.left),
861
+ y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
862
+ width: v(Ce)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
863
+ rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
864
+ height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
865
+ fill: e.value.style.chart.bars.gradient.show ? `url(#gradient_${t.id})` : t.color,
866
+ stroke: e.value.style.chart.backgroundColor,
867
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
868
+ "stroke-linecap": "round",
869
+ "stroke-linejoin": "round",
870
+ class: ae({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": B.value })
871
+ }, null, 10, nl))), 256)),
872
+ a.$slots.pattern ? (s(), o("g", ul, [
873
+ (s(!0), o(g, null, m(t.horizontal_x, (c, u) => (s(), o("rect", {
874
+ x: v(Ce)(c, n.value.left),
875
+ y: t.horizontal_y[u] < 0 ? 0 : t.horizontal_y[u],
876
+ width: v(Ce)(t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]),
877
+ rx: e.value.style.chart.bars.borderRadius > t.height[u] / 2 ? (t.height[u] < 0 ? 0 : t.height[u]) / 2 : e.value.style.chart.bars.borderRadius,
878
+ height: d.value * (1 - e.value.style.chart.bars.gapRatio / 2),
879
+ fill: `url(#pattern_${V.value}_${t.absoluteIndex})`,
880
+ stroke: e.value.style.chart.backgroundColor,
881
+ "stroke-width": e.value.style.chart.bars.strokeWidth,
882
+ "stroke-linecap": "round",
883
+ "stroke-linejoin": "round",
884
+ class: ae({ "vue-data-ui-bar-animated": e.value.useCssAnimation, "vue-data-ui-bar-transition": B.value })
885
+ }, null, 10, cl))), 256))
886
+ ])) : y("", !0)
887
+ ], 64))
888
+ ]))), 256)),
889
+ e.value.style.chart.grid.x.showAxis ? (s(), o("line", {
890
+ key: 6,
891
+ x1: n.value.left,
892
+ x2: n.value.right,
893
+ y1: n.value.bottom,
894
+ y2: n.value.bottom,
895
+ stroke: e.value.style.chart.grid.x.axisColor,
896
+ "stroke-width": e.value.style.chart.grid.x.axisThickness,
897
+ "stroke-linecap": "round",
898
+ "stroke-linejoin": "round"
899
+ }, null, 8, hl)) : y("", !0),
900
+ e.value.style.chart.grid.y.showAxis && !e.value.style.chart.bars.distributed ? (s(), o("line", {
901
+ key: 7,
902
+ x1: n.value.left,
903
+ x2: n.value.left,
904
+ y1: n.value.top,
905
+ y2: n.value.bottom,
906
+ stroke: e.value.style.chart.grid.y.axisColor,
907
+ "stroke-width": e.value.style.chart.grid.y.axisThickness,
908
+ "stroke-linecap": "round",
909
+ "stroke-linejoin": "round"
910
+ }, null, 8, vl)) : y("", !0),
911
+ e.value.style.chart.grid.x.axisName.show && e.value.style.chart.grid.x.axisName.text ? (s(), o("text", {
912
+ key: 8,
913
+ ref_key: "xAxisLabel",
914
+ ref: Ae,
915
+ x: n.value.left + n.value.width / 2,
916
+ y: n.value.chartHeight - 3,
917
+ "font-size": e.value.style.chart.grid.x.axisName.fontSize,
918
+ fill: e.value.style.chart.grid.x.axisName.color,
919
+ "font-weight": e.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
920
+ "text-anchor": "middle"
921
+ }, M(e.value.style.chart.grid.x.axisName.text), 9, dl)) : y("", !0),
922
+ e.value.style.chart.grid.y.axisName.show && e.value.style.chart.grid.y.axisName.text ? (s(), o("text", {
923
+ key: 9,
924
+ ref_key: "yAxisLabel",
925
+ ref: Ne,
926
+ transform: `translate(${e.value.style.chart.grid.y.axisName.fontSize}, ${n.value.top + n.value.height / 2}) rotate(-90)`,
927
+ "font-size": e.value.style.chart.grid.y.axisName.fontSize,
928
+ fill: e.value.style.chart.grid.y.axisName.color,
929
+ "font-weight": e.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
930
+ "text-anchor": "middle"
931
+ }, M(e.value.style.chart.grid.y.axisName.text), 9, yl)) : y("", !0),
932
+ z.value.dataLabels.show && e.value.orientation === "vertical" ? (s(), o(g, { key: 10 }, [
933
+ (s(!0), o(g, null, m(w.value, (t, l) => (s(), o("g", null, [
934
+ (s(!0), o(g, null, m(t.x, (c, u) => (s(), o(g, null, [
935
+ xt(t.series[u], t.proportions[u]) ? (s(), o("text", {
936
+ key: 0,
937
+ x: c + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2,
938
+ y: t.y[u] + t.height[u] / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
939
+ "font-size": e.value.style.chart.bars.dataLabels.fontSize,
940
+ fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? v(Rt)(t.color) : e.value.style.chart.bars.dataLabels.color,
941
+ "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
942
+ "text-anchor": "middle"
943
+ }, M(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ct(t.proportions[u] * 100, t, l, u) : fe(t.series[u], t, l, u, t.signedSeries[u])), 9, gl)) : y("", !0)
944
+ ], 64))), 256))
945
+ ]))), 256)),
946
+ e.value.style.chart.bars.totalValues.show && w.value.length > 1 ? (s(), o("g", {
947
+ key: 0,
948
+ ref_key: "sumTop",
949
+ ref: qt
950
+ }, [
951
+ (s(!0), o(g, null, m(ut.value, (t, l) => (s(), o(g, null, [
952
+ !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), o("text", {
953
+ key: 0,
954
+ x: n.value.left + d.value * l + d.value / 2,
955
+ y: e.value.style.chart.bars.totalValues.fontSize,
956
+ "text-anchor": "middle",
957
+ "font-size": e.value.style.chart.bars.totalValues.fontSize,
958
+ "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
959
+ fill: e.value.style.chart.bars.totalValues.color
960
+ }, M(fe(t.value, t, l, t.sign)), 9, bl)) : y("", !0)
961
+ ], 64))), 256))
962
+ ], 512)) : y("", !0)
963
+ ], 64)) : y("", !0),
964
+ z.value.dataLabels.show && e.value.orientation === "horizontal" ? (s(), o(g, { key: 11 }, [
965
+ (s(!0), o(g, null, m(w.value, (t, l) => (s(), o("g", null, [
966
+ (s(!0), o(g, null, m(t.horizontal_x, (c, u) => (s(), o(g, null, [
967
+ xt(t.series[u], t.proportions[u]) ? (s(), o("text", {
968
+ key: 0,
969
+ x: c + (t.horizontal_width[u] < 0 ? 1e-4 : t.horizontal_width[u]) / 2,
970
+ y: t.horizontal_y[u] + d.value * (1 - e.value.style.chart.bars.gapRatio / 2) / 2 + e.value.style.chart.bars.dataLabels.fontSize / 3,
971
+ "font-size": e.value.style.chart.bars.dataLabels.fontSize,
972
+ fill: e.value.style.chart.bars.dataLabels.adaptColorToBackground ? v(Rt)(t.color) : e.value.style.chart.bars.dataLabels.color,
973
+ "font-weight": e.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
974
+ "text-anchor": "middle"
975
+ }, M(e.value.style.chart.bars.showDistributedPercentage && e.value.style.chart.bars.distributed ? ct(t.proportions[u] * 100, t, l, u) : fe(t.series[u], t, l, u, t.signedSeries[u])), 9, fl)) : y("", !0)
976
+ ], 64))), 256))
977
+ ]))), 256)),
978
+ e.value.style.chart.bars.totalValues.show && w.value.length > 1 ? (s(), o("g", {
979
+ key: 0,
980
+ ref_key: "sumRight",
981
+ ref: Ze
982
+ }, [
983
+ (s(!0), o(g, null, m(ut.value, (t, l) => (s(), o(g, null, [
984
+ !e.value.style.chart.bars.dataLabels.hideEmptyValues || t.value !== 0 ? (s(), o("text", {
985
+ key: 0,
986
+ x: n.value.right + e.value.style.chart.bars.totalValues.fontSize / 3,
987
+ y: n.value.top + d.value * l + d.value / 2,
988
+ "text-anchor": "start",
989
+ "font-size": e.value.style.chart.bars.totalValues.fontSize,
990
+ "font-weight": e.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
991
+ fill: e.value.style.chart.bars.totalValues.color
992
+ }, M(fe(t.value, t, l, t.sign)), 9, ml)) : y("", !0)
993
+ ], 64))), 256))
994
+ ], 512)) : y("", !0)
995
+ ], 64)) : y("", !0),
996
+ e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "vertical" ? (s(), o("g", {
997
+ key: 12,
998
+ ref_key: "scaleLabels",
999
+ ref: W
1000
+ }, [
1001
+ (s(!0), o(g, null, m(I.value, (t, l) => (s(), o("line", {
1002
+ x1: n.value.left,
1003
+ x2: n.value.left - 6,
1004
+ y1: t.y,
1005
+ y2: t.y,
1006
+ stroke: e.value.style.chart.grid.x.axisColor,
1007
+ "stroke-width": 1
1008
+ }, null, 8, pl))), 256)),
1009
+ (s(!0), o(g, null, m(I.value, (t, l) => (s(), o("text", {
1010
+ x: t.x,
1011
+ y: t.y + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1012
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1013
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1014
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1015
+ "text-anchor": "end"
1016
+ }, M(v(Se)(
1017
+ e.value.style.chart.grid.y.axisLabels.formatter,
1018
+ t.value,
1019
+ v(j)({
1020
+ p: e.value.style.chart.bars.dataLabels.prefix,
1021
+ v: t.value,
1022
+ s: e.value.style.chart.bars.dataLabels.suffix,
1023
+ r: e.value.style.chart.grid.y.axisLabels.rounding
1024
+ }),
1025
+ { datapoint: t }
1026
+ )), 9, xl))), 256))
1027
+ ], 512)) : y("", !0),
1028
+ e.value.style.chart.grid.y.axisLabels.show && !e.value.style.chart.bars.distributed && e.value.orientation === "horizontal" ? (s(), o("g", {
1029
+ key: 13,
1030
+ ref_key: "scaleLabels",
1031
+ ref: W
1032
+ }, [
1033
+ (s(!0), o(g, null, m(I.value, (t, l) => (s(), o("line", {
1034
+ x1: t.horizontal_x,
1035
+ x2: t.horizontal_x,
1036
+ y1: n.value.bottom,
1037
+ y2: n.value.bottom + 6,
1038
+ stroke: e.value.style.chart.grid.x.axisColor,
1039
+ "stroke-width": 1,
1040
+ "stroke-linecap": "round"
1041
+ }, null, 8, kl))), 256)),
1042
+ (s(!0), o(g, null, m(I.value, (t, l) => (s(), o("text", {
1043
+ class: "vue-data-ui-time-label",
1044
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1045
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1046
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1047
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1048
+ transform: `translate(${t.horizontal_x}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`
1049
+ }, M(v(Se)(
1050
+ e.value.style.chart.grid.y.axisLabels.formatter,
1051
+ t.value,
1052
+ v(j)({
1053
+ p: e.value.style.chart.bars.dataLabels.prefix,
1054
+ v: t.value,
1055
+ s: e.value.style.chart.bars.dataLabels.suffix,
1056
+ r: e.value.style.chart.grid.y.axisLabels.rounding
1057
+ }),
1058
+ { datapoint: t }
1059
+ )), 9, wl))), 256))
1060
+ ], 512)) : y("", !0),
1061
+ e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "vertical" ? (s(), o("g", {
1062
+ key: 14,
1063
+ ref_key: "timeLabelsEls",
1064
+ ref: Y
1065
+ }, [
1066
+ a.$slots["time-label"] ? (s(), o("g", Ll, [
1067
+ (s(!0), o(g, null, m($.value, (t, l) => (s(), o("g", null, [
1068
+ L(a.$slots, "time-label", De({ ref_for: !0 }, {
1069
+ x: n.value.left + d.value * l + d.value / 2,
1070
+ y: n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY,
1071
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1072
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1073
+ transform: `translate(${n.value.left + d.value * l + d.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1074
+ absoluteIndex: t.absoluteIndex,
1075
+ content: t.text,
1076
+ textAnchor: e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1077
+ show: !0
1078
+ }), void 0, !0)
1079
+ ]))), 256))
1080
+ ])) : (s(), o("g", zl, [
1081
+ (s(!0), o(g, null, m($.value, (t, l) => (s(), o("g", null, [
1082
+ String(t.text).includes(`
1083
+ `) ? (s(), o("text", {
1084
+ key: l + "-multi",
1085
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1086
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1087
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1088
+ transform: `
1089
+ translate(
1090
+ ${n.value.left + d.value * l + d.value / 2},
1091
+ ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}
1092
+ ),
1093
+ rotate(${e.value.style.chart.grid.x.timeLabels.rotation})
1094
+ `,
1095
+ style: { cursor: "pointer" },
1096
+ innerHTML: v(_a)({
1097
+ content: String(t.text),
1098
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1099
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1100
+ x: 0,
1101
+ y: 0
1102
+ }),
1103
+ onClick: () => xe(t, l)
1104
+ }, null, 8, Sl)) : (s(), o("text", {
1105
+ class: "vue-data-ui-time-label",
1106
+ key: l,
1107
+ "text-anchor": e.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : e.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1108
+ "font-size": e.value.style.chart.grid.x.timeLabels.fontSize,
1109
+ "font-weight": e.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1110
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1111
+ transform: `translate(${n.value.left + d.value * l + d.value / 2}, ${n.value.bottom + e.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + e.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${e.value.style.chart.grid.x.timeLabels.rotation})`,
1112
+ style: { cursor: "pointer" },
1113
+ onClick: () => xe(t, l)
1114
+ }, M(t.text), 9, Cl))
1115
+ ]))), 256))
1116
+ ]))
1117
+ ], 512)) : y("", !0),
1118
+ e.value.style.chart.grid.x.timeLabels.show && e.value.orientation === "horizontal" ? (s(), o("g", {
1119
+ key: 15,
1120
+ ref_key: "timeLabelsEls",
1121
+ ref: Y
1122
+ }, [
1123
+ a.$slots["time-label"] ? (s(), o("g", _l, [
1124
+ (s(!0), o(g, null, m($.value, (t, l) => (s(), o("g", null, [
1125
+ L(a.$slots, "time-label", De({ ref_for: !0 }, {
1126
+ x: n.value.left - 8,
1127
+ y: n.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1128
+ fontSize: e.value.style.chart.grid.x.timeLabels.fontSize,
1129
+ fill: e.value.style.chart.grid.x.timeLabels.color,
1130
+ transform: null,
1131
+ absoluteIndex: t.absoluteIndex,
1132
+ content: t.text,
1133
+ textAnchor: "end",
1134
+ show: !0
1135
+ }), void 0, !0)
1136
+ ]))), 256))
1137
+ ])) : (s(), o("g", $l, [
1138
+ (s(!0), o(g, null, m($.value, (t, l) => (s(), o("g", null, [
1139
+ String(t.text).includes(`
1140
+ `) ? (s(), o("text", {
1141
+ key: 1,
1142
+ "text-anchor": "end",
1143
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1144
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1145
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1146
+ x: n.value.left - 8,
1147
+ y: n.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1148
+ style: { cursor: "pointer" },
1149
+ onClick: () => xe(t, l),
1150
+ innerHTML: v($a)({
1151
+ content: String(t.text),
1152
+ fontSize: e.value.style.chart.grid.y.axisLabels.fontSize,
1153
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1154
+ x: n.value.left - 8,
1155
+ y: 0
1156
+ })
1157
+ }, null, 8, Ml)) : (s(), o("text", {
1158
+ key: 0,
1159
+ "text-anchor": "end",
1160
+ "font-size": e.value.style.chart.grid.y.axisLabels.fontSize,
1161
+ "font-weight": e.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1162
+ fill: e.value.style.chart.grid.y.axisLabels.color,
1163
+ x: n.value.left - 8,
1164
+ y: n.value.top + d.value * l + d.value / 2 + e.value.style.chart.grid.y.axisLabels.fontSize / 3,
1165
+ style: {
1166
+ cursor: "pointer"
1167
+ },
1168
+ onClick: () => xe(t, l)
1169
+ }, M(t.text), 9, Tl))
1170
+ ]))), 256))
1171
+ ]))
1172
+ ], 512)) : y("", !0),
1173
+ z.value.showTooltip && e.value.orientation === "vertical" ? (s(!0), o(g, { key: 16 }, m(h.value.end - h.value.start, (t, l) => (s(), o("rect", {
1174
+ x: n.value.left + l * d.value,
1175
+ y: n.value.top,
1176
+ width: d.value,
1177
+ height: n.value.height < 0 ? 0 : n.value.height,
1178
+ onClick: (c) => ht(l),
1179
+ onMouseenter: (c) => vt(l),
1180
+ onMouseleave: r[0] || (r[0] = (c) => {
1181
+ re.value = null, ne.value = !1;
1182
+ }),
1183
+ fill: l === re.value ? e.value.style.chart.highlighter.color : "transparent",
1184
+ style: Z({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1185
+ }, null, 44, Al))), 256)) : y("", !0),
1186
+ z.value.showTooltip && e.value.orientation === "horizontal" ? (s(!0), o(g, { key: 17 }, m(h.value.end - h.value.start, (t, l) => (s(), o("rect", {
1187
+ x: n.value.left,
1188
+ y: n.value.top + l * d.value,
1189
+ width: n.value.width < 0 ? 0 : n.value.width,
1190
+ height: d.value,
1191
+ onClick: (c) => ht(l),
1192
+ onMouseenter: (c) => vt(l),
1193
+ onMouseleave: r[1] || (r[1] = (c) => {
1194
+ re.value = null, ne.value = !1;
1195
+ }),
1196
+ fill: l === re.value ? e.value.style.chart.highlighter.color : "transparent",
1197
+ style: Z({ opacity: e.value.style.chart.highlighter.opacity / 100 })
1198
+ }, null, 44, Nl))), 256)) : y("", !0),
1199
+ L(a.$slots, "svg", U(H({ ...n.value })), void 0, !0)
1200
+ ], 14, Ga)),
1201
+ a.$slots.watermark ? (s(), o("div", Il, [
1202
+ L(a.$slots, "watermark", U(H({ isPrinting: v(at) || v(lt) })), void 0, !0)
1203
+ ])) : y("", !0),
1204
+ Q("div", {
1205
+ ref_key: "chartSlicer",
1206
+ ref: Ye,
1207
+ style: Z(`width:100%;background:${e.value.style.chart.backgroundColor}`),
1208
+ "data-dom-to-png-ignore": ""
1209
+ }, [
1210
+ e.value.style.chart.zoom.show && D.value > 1 ? (s(), K(Ea, {
1211
+ ref_key: "slicerComponent",
1212
+ ref: qe,
1213
+ key: `slicer_${Ge.value}`,
1214
+ background: e.value.style.chart.zoom.color,
1215
+ borderColor: e.value.style.chart.backgroundColor,
1216
+ fontSize: e.value.style.chart.zoom.fontSize,
1217
+ useResetSlot: e.value.style.chart.zoom.useResetSlot,
1218
+ labelLeft: e.value.style.chart.grid.x.timeLabels.values[h.value.start] ? $.value[0].text : "",
1219
+ labelRight: e.value.style.chart.grid.x.timeLabels.values[h.value.end - 1] ? $.value.at(-1).text : "",
1220
+ textColor: e.value.style.chart.color,
1221
+ inputColor: e.value.style.chart.zoom.color,
1222
+ selectColor: e.value.style.chart.zoom.highlightColor,
1223
+ max: Math.max(..._e.dataset.map((t) => t.series.length)),
1224
+ min: 0,
1225
+ valueStart: h.value.start,
1226
+ valueEnd: h.value.end,
1227
+ start: h.value.start,
1228
+ "onUpdate:start": r[2] || (r[2] = (t) => h.value.start = t),
1229
+ end: h.value.end,
1230
+ "onUpdate:end": r[3] || (r[3] = (t) => h.value.end = t),
1231
+ refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
1232
+ refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : Math.max(..._e.dataset.map((t) => t.series.length)),
1233
+ enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
1234
+ enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
1235
+ onReset: nt
1236
+ }, {
1237
+ "reset-action": C(({ reset: t }) => [
1238
+ L(a.$slots, "reset-action", U(H({ reset: t })), void 0, !0)
1239
+ ]),
1240
+ _: 3
1241
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : y("", !0)
1242
+ ], 4),
1243
+ we(v(Bt), {
1244
+ show: z.value.showTooltip && ne.value,
1245
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1246
+ color: e.value.style.chart.tooltip.color,
1247
+ fontSize: e.value.style.chart.tooltip.fontSize,
1248
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1249
+ borderColor: e.value.style.chart.tooltip.borderColor,
1250
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1251
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1252
+ position: e.value.style.chart.tooltip.position,
1253
+ offsetY: e.value.style.chart.tooltip.offsetY,
1254
+ parent: P.value,
1255
+ content: Me.value,
1256
+ isFullscreen: ue.value,
1257
+ isCustom: v(Ot)(e.value.style.chart.tooltip.customFormat),
1258
+ smooth: e.value.style.chart.tooltip.smooth,
1259
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
1260
+ }, {
1261
+ "tooltip-before": C(() => [
1262
+ L(a.$slots, "tooltip-before", U(H({ ...Te.value })), void 0, !0)
1263
+ ]),
1264
+ "tooltip-after": C(() => [
1265
+ L(a.$slots, "tooltip-after", U(H({ ...Te.value })), void 0, !0)
1266
+ ]),
1267
+ _: 3
1268
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
1269
+ Q("div", {
1270
+ ref_key: "chartLegend",
1271
+ ref: We
1272
+ }, [
1273
+ e.value.style.chart.legend.show && ie.value ? (s(), K(Va, {
1274
+ key: 0,
1275
+ legendSet: pt.value,
1276
+ config: ra.value,
1277
+ onClickMarker: r[4] || (r[4] = ({ legend: t }) => t.segregate())
1278
+ }, $t({
1279
+ item: C(({ legend: t }) => [
1280
+ Q("div", {
1281
+ onClick: (l) => t.segregate(),
1282
+ style: Z(`opacity:${_.value.includes(t.id) ? 0.5 : 1}`)
1283
+ }, M(t.name), 13, Rl)
1284
+ ]),
1285
+ _: 2
1286
+ }, [
1287
+ a.$slots.pattern ? {
1288
+ name: "legend-pattern",
1289
+ fn: C(({ legend: t, index: l }) => [
1290
+ we(Da, {
1291
+ shape: t.shape,
1292
+ radius: 30,
1293
+ stroke: "none",
1294
+ plot: { x: 30, y: 30 },
1295
+ fill: `url(#pattern_${V.value}_${l})`
1296
+ }, null, 8, ["shape", "fill"])
1297
+ ]),
1298
+ key: "0"
1299
+ } : void 0
1300
+ ]), 1032, ["legendSet", "config"])) : L(a.$slots, "legend", {
1301
+ key: 1,
1302
+ legend: pt.value
1303
+ }, void 0, !0)
1304
+ ], 512),
1305
+ a.$slots.source ? (s(), o("div", {
1306
+ key: 4,
1307
+ ref_key: "source",
1308
+ ref: Xe,
1309
+ dir: "auto"
1310
+ }, [
1311
+ L(a.$slots, "source", {}, void 0, !0)
1312
+ ], 512)) : y("", !0),
1313
+ h.value.end - h.value.start < 200 ? (s(), K(v(Ft), {
1314
+ key: 5,
1315
+ hideDetails: "",
1316
+ config: {
1317
+ open: z.value.showTable,
1318
+ maxHeight: 1e4,
1319
+ body: {
1320
+ backgroundColor: e.value.style.chart.backgroundColor,
1321
+ color: e.value.style.chart.color
1322
+ },
1323
+ head: {
1324
+ backgroundColor: e.value.style.chart.backgroundColor,
1325
+ color: e.value.style.chart.color
1326
+ }
1327
+ }
1328
+ }, {
1329
+ content: C(() => [
1330
+ we(v(Dt), {
1331
+ colNames: me.value.colNames,
1332
+ head: me.value.head,
1333
+ body: me.value.body,
1334
+ config: me.value.config,
1335
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1336
+ onClose: r[5] || (r[5] = (t) => z.value.showTable = !1)
1337
+ }, {
1338
+ th: C(({ th: t }) => [
1339
+ Q("div", { innerHTML: t }, null, 8, Ol)
1340
+ ]),
1341
+ td: C(({ td: t }) => [
1342
+ fa(M(isNaN(Number(t)) ? t : v(j)({
1343
+ p: e.value.style.chart.bars.dataLabels.prefix,
1344
+ v: t,
1345
+ s: e.value.style.chart.bars.dataLabels.suffix,
1346
+ r: e.value.table.td.roundingValue
1347
+ })), 1)
1348
+ ]),
1349
+ _: 1
1350
+ }, 8, ["colNames", "head", "body", "config", "title"])
1351
+ ]),
1352
+ _: 1
1353
+ }, 8, ["config"])) : y("", !0),
1354
+ v(ce) ? (s(), K(Wa, { key: 6 })) : y("", !0)
1355
+ ], 46, Xa));
1356
+ }
1357
+ }, jl = /* @__PURE__ */ Ya(Pl, [["__scopeId", "data-v-eeccc9b1"]]);
1358
+ export {
1359
+ jl as default
1360
+ };