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

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 (91) hide show
  1. package/README.md +1 -1
  2. package/dist/{Arrow-C8ztMhxn.js → Arrow-COeGcYaf.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DoA1cXmQ.js → BaseDraggableDialog-B6a_nUd1.js} +2 -2
  4. package/dist/{BaseIcon-TJm1JI2f.js → BaseIcon-C_m_NEgt.js} +1 -1
  5. package/dist/{ColorPicker-DwhabPvD.js → ColorPicker-_xpvmgl6.js} +2 -2
  6. package/dist/{DataTable-DObwKftY.js → DataTable-kd4xY9pT.js} +2 -2
  7. package/dist/{Legend-C-EDWcHp.js → Legend-Bow74t3d.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-Cmy4Opaq.js → NonSvgPenAndPaper-cUcAGGV2.js} +3 -3
  9. package/dist/{PackageVersion-B_SVQo0g.js → PackageVersion-3ZfzB951.js} +1 -1
  10. package/dist/{PenAndPaper-CFbTGuB_.js → PenAndPaper-BZddJqUG.js} +3 -3
  11. package/dist/{Shape-DGduPk8q.js → Shape-BsptIVCm.js} +1 -1
  12. package/dist/{Slicer-VumiAmDi.js → Slicer-i0BAmgHn.js} +2 -2
  13. package/dist/{SparkTooltip-DrRmoIkR.js → SparkTooltip-BdD0e0jv.js} +1 -1
  14. package/dist/{Title-Dahu_Ia-.js → Title-FiH2Kirc.js} +1 -1
  15. package/dist/{Tooltip-j8grOyYT.js → Tooltip-BLtR7DBZ.js} +1 -1
  16. package/dist/{UserOptions-BOIQ8NtD.js → UserOptions-DOwmMJId.js} +2 -2
  17. package/dist/{dom-to-png-00aHI4Vj.js → dom-to-png-DnsK-Zal.js} +1 -1
  18. package/dist/{img-DFeNRkbq.js → img-CP2uNkKq.js} +1 -1
  19. package/dist/{index-DKjAxJY6.js → index-BnnNoGGd.js} +13 -11
  20. package/dist/{pdf-COmwjbLG.js → pdf-urw1sGoX.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +39 -10
  23. package/dist/types/vue-data-ui.d.ts +39 -10
  24. package/dist/{useNestedProp-Cmx8ApWu.js → useNestedProp-B6Dz15k2.js} +1 -1
  25. package/dist/{usePrinter-BefhLUKK.js → usePrinter-Dd-RkmL8.js} +2 -2
  26. package/dist/{vue-data-ui-kdcEQgS0.js → vue-data-ui-Dql75T3d.js} +80 -74
  27. package/dist/vue-data-ui.js +53 -52
  28. package/dist/{vue-ui-3d-bar-Lv9eoXpT.js → vue-ui-3d-bar-CUDEgTKp.js} +6 -6
  29. package/dist/{vue-ui-accordion-BhrF0D_h.js → vue-ui-accordion-qNR0BQCP.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-DN94DM1L.js → vue-ui-age-pyramid-BFWU1VGZ.js} +6 -6
  31. package/dist/{vue-ui-annotator-D-YFzFco.js → vue-ui-annotator-CeMOjHpf.js} +2 -2
  32. package/dist/{vue-ui-bullet--c-hIC1J.js → vue-ui-bullet-CmNollxj.js} +7 -7
  33. package/dist/{vue-ui-candlestick-Dz0D7t8f.js → vue-ui-candlestick-CkoAVYNh.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-Bg4_nEqO.js → vue-ui-carousel-table-CAr64-2F.js} +4 -4
  35. package/dist/{vue-ui-chestnut-D9BP8n-D.js → vue-ui-chestnut-B0zNp1jY.js} +5 -5
  36. package/dist/{vue-ui-chord-DDa4TTtv.js → vue-ui-chord-C-_tz6Tb.js} +8 -8
  37. package/dist/{vue-ui-circle-pack-DWxEHCSN.js → vue-ui-circle-pack-BSTkkKx-.js} +6 -6
  38. package/dist/{vue-ui-cursor-BtLD4k-n.js → vue-ui-cursor-Dqd6RkcK.js} +2 -2
  39. package/dist/{vue-ui-dashboard-DvyNEYA8.js → vue-ui-dashboard-CspqjC6x.js} +62 -62
  40. package/dist/{vue-ui-digits-XkSs-Fvw.js → vue-ui-digits-CazGAGyM.js} +2 -2
  41. package/dist/{vue-ui-donut-BO2QuXBj.js → vue-ui-donut-BK35Gt-7.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-CQDtCf7k.js → vue-ui-donut-evolution-SomhFGJh.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-jtJmPKky.js → vue-ui-dumbbell-CJal89Ud.js} +7 -7
  44. package/dist/{vue-ui-flow-D1hSlRXa.js → vue-ui-flow-BFsmk2iL.js} +7 -7
  45. package/dist/{vue-ui-funnel-BlLlAOtx.js → vue-ui-funnel-Dm0LCakq.js} +6 -6
  46. package/dist/{vue-ui-galaxy-BZAhXSnB.js → vue-ui-galaxy-C9poCSSD.js} +5 -5
  47. package/dist/{vue-ui-gauge-FdnYVol9.js → vue-ui-gauge-CYXXfMRC.js} +6 -6
  48. package/dist/{vue-ui-gizmo-BXiMNDNp.js → vue-ui-gizmo-B-8rhor5.js} +3 -3
  49. package/dist/{vue-ui-heatmap-BUmZvmK0.js → vue-ui-heatmap-BQzObiF9.js} +7 -7
  50. package/dist/{vue-ui-history-plot-CTT0NO2g.js → vue-ui-history-plot-C_Si7S5S.js} +7 -7
  51. package/dist/{vue-ui-kpi-BNNqPORJ.js → vue-ui-kpi-BYYBkt55.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-wa4WjqZj.js → vue-ui-mini-loader-DmHE-wrb.js} +2 -2
  53. package/dist/{vue-ui-molecule-NGbWYvw-.js → vue-ui-molecule-I2ZUVtal.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-Dz2YUYPG.js → vue-ui-mood-radar-BYUr9rcv.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-ywwGdEJO.js → vue-ui-nested-donuts-DEm7s2uC.js} +7 -7
  56. package/dist/{vue-ui-onion-DUeU3zvH.js → vue-ui-onion-BpGz1RFC.js} +7 -7
  57. package/dist/{vue-ui-parallel-coordinate-plot-5158EX3T.js → vue-ui-parallel-coordinate-plot-SkVvzSSQ.js} +8 -8
  58. package/dist/{vue-ui-quadrant-BEaCxPxR.js → vue-ui-quadrant-CByC4r8k.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-C3yTivjK.js → vue-ui-quick-chart-GEYFXShR.js} +6 -6
  60. package/dist/{vue-ui-radar-CwRo-de_.js → vue-ui-radar-CBVb6GyN.js} +7 -7
  61. package/dist/{vue-ui-rating-nHTBjTie.js → vue-ui-rating-Thf6P6AF.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-w7TYrdHz.js → vue-ui-relation-circle-Blg3GkeU.js} +6 -6
  63. package/dist/{vue-ui-ridgeline-Dk9xpHSw.js → vue-ui-ridgeline-D6kxALQN.js} +8 -8
  64. package/dist/{vue-ui-rings-tCL5utj_.js → vue-ui-rings-bBHc4cwe.js} +8 -8
  65. package/dist/{vue-ui-scatter-BJUJRCto.js → vue-ui-scatter-DS6-kGZL.js} +8 -8
  66. package/dist/{vue-ui-skeleton-Cf09cngz.js → vue-ui-skeleton-gHkpLBcj.js} +3 -3
  67. package/dist/{vue-ui-smiley-BvoOjmJx.js → vue-ui-smiley-S7qJ-dRf.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-Bdz2gHnU.js → vue-ui-spark-trend-Co-sKoQX.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-CS1FzyFk.js → vue-ui-sparkbar-G1Jhr305.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-auWy_YMm.js → vue-ui-sparkgauge-Bzm5X8us.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-yA_F8Ls5.js → vue-ui-sparkhistogram-IGnxrQK9.js} +4 -4
  72. package/dist/{vue-ui-sparkline-B-sCAUEL.js → vue-ui-sparkline-ezu4qjgC.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-BhqOPIZT.js → vue-ui-sparkstackbar-C_cbbRT_.js} +3 -3
  74. package/dist/{vue-ui-stackbar-CZzqF-ZH.js → vue-ui-stackbar-BD9gyxAb.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-D7KgSU5y.js → vue-ui-strip-plot-Cw1CDIL0.js} +7 -7
  76. package/dist/{vue-ui-table-BDJg5T9l.js → vue-ui-table-C4A73F9D.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-Pp2gbL5G.js → vue-ui-table-heatmap-DDlDAXMI.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-CmZBjiWv.js → vue-ui-table-sparkline-CQDLqNvX.js} +4 -4
  79. package/dist/{vue-ui-thermometer-ClY99Umm.js → vue-ui-thermometer-DgBtT1Ts.js} +6 -6
  80. package/dist/{vue-ui-timer-_Bck3rxo.js → vue-ui-timer-DwL2EUHc.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-C2CtoJT_.js → vue-ui-tiremarks-J9v9JAmf.js} +6 -6
  82. package/dist/{vue-ui-treemap-CM-zqI6U.js → vue-ui-treemap-BSPd3wFo.js} +8 -8
  83. package/dist/vue-ui-vertical-bar-B5b5tXjT.js +1029 -0
  84. package/dist/{vue-ui-waffle-B21kT4HO.js → vue-ui-waffle-Bh_gS8y2.js} +8 -8
  85. package/dist/{vue-ui-wheel-Dqv-ta7L.js → vue-ui-wheel-B_r_vUFd.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-DHjvCwD8.js → vue-ui-word-cloud-DqvRfwF3.js} +6 -6
  87. package/dist/{vue-ui-world-h3Csu0YN.js → vue-ui-world-DguPtgux.js} +6 -6
  88. package/dist/{vue-ui-xy-CZ7mScyg.js → vue-ui-xy-MFNbJqgb.js} +778 -756
  89. package/dist/{vue-ui-xy-canvas-sIRUM_Be.js → vue-ui-xy-canvas-Cv4Fs6Jw.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-vertical-bar-CET-9MDi.js +0 -980
@@ -0,0 +1,1029 @@
1
+ import { useCssVars as Pt, defineAsyncComponent as j, useSlots as Vt, computed as k, ref as i, watch as Ke, shallowRef as Je, onMounted as Qe, nextTick as ie, onBeforeUnmount as zt, createElementBlock as d, openBlock as u, unref as r, normalizeStyle as h, normalizeClass as E, createBlock as R, createCommentVNode as g, renderSlot as x, createVNode as ee, createSlots as me, withCtx as w, normalizeProps as q, guardReactiveProps as Y, createElementVNode as n, toDisplayString as p, Fragment as K, renderList as J, mergeProps as At, withKeys as It, createTextVNode as Ot } from "vue";
2
+ import { u as Mt, c as Bt, t as Ft, p as D, a as Et, C as ke, b as Rt, v as L, o as Ze, e as te, d as xe, i as de, f as U, X as Dt, s as _e, w as Ut, q as Xt, r as Gt, x as Ht, y as Wt } from "./index-BnnNoGGd.js";
3
+ import { t as jt, u as qt } from "./useResponsive-DfdjqQps.js";
4
+ import { u as et } from "./useNestedProp-B6Dz15k2.js";
5
+ import { u as Yt } from "./usePrinter-Dd-RkmL8.js";
6
+ import { u as Kt } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as Jt } from "./useChartAccessibility-9icAAmYg.js";
8
+ import Qt from "./vue-ui-accordion-qNR0BQCP.js";
9
+ import tt from "./Legend-Bow74t3d.js";
10
+ import Zt from "./Title-FiH2Kirc.js";
11
+ import { _ as at } from "./Shape-BsptIVCm.js";
12
+ import ea from "./img-CP2uNkKq.js";
13
+ import { _ as ta } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const aa = ["id"], la = ["onClick"], oa = ["xmlns", "viewBox"], na = ["width", "height"], ua = ["id"], sa = ["stop-color"], ra = ["stop-color"], ia = { key: 1 }, da = ["x", "y", "width", "height", "fill", "rx"], va = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ca = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ha = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ya = { class: "vue-ui-horizontal-bar-child-label" }, fa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], ga = ["x", "y", "font-size", "fill", "font-weight"], ba = { class: "vue-ui-horizontal-bar-parent-label" }, ma = ["x", "y", "font-size", "fill", "font-weight"], ka = ["x", "y", "font-size", "fill", "font-weight"], xa = ["x", "y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], _a = {
15
+ key: 6,
16
+ class: "vue-data-ui-watermark"
17
+ }, wa = ["onClick"], $a = { style: "width:100%;padding-top: 36px;position:relative" }, Ca = { class: "vue-ui-data-table" }, Ta = { key: 0 }, Sa = { style: { width: "100%" } }, La = ["data-cell"], Na = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Pa = ["data-cell"], Va = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, za = ["data-cell"], Aa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ia = ["data-cell"], Oa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ma = ["data-cell"], Ba = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Fa = ["data-cell"], Ea = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ra = ["data-cell"], Da = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ua = {
18
+ __name: "vue-ui-vertical-bar",
19
+ props: {
20
+ config: {
21
+ type: Object,
22
+ default() {
23
+ return {};
24
+ }
25
+ },
26
+ dataset: {
27
+ type: Array,
28
+ default() {
29
+ return [];
30
+ }
31
+ }
32
+ },
33
+ emits: ["selectLegend"],
34
+ setup(lt, { expose: ot, emit: nt }) {
35
+ Pt((a) => ({
36
+ "1bf7edfb": a.tdo
37
+ }));
38
+ const ut = j(() => import("./BaseIcon-C_m_NEgt.js")), st = j(() => import("./PackageVersion-3ZfzB951.js")), rt = j(() => import("./PenAndPaper-BZddJqUG.js")), it = j(() => import("./vue-ui-skeleton-gHkpLBcj.js")), dt = j(() => import("./Tooltip-BLtR7DBZ.js")), vt = j(() => import("./UserOptions-DOwmMJId.js")), { vue_ui_vertical_bar: ct } = Mt(), ht = Vt(), b = lt, ae = k(() => !!b.dataset && b.dataset.length), S = i(Bt()), pt = i(null), ve = i(!1), ce = i(""), le = i(0), yt = i(null), we = i(0), z = i(null), $e = i(null), he = i(null), Ce = i(null), Te = i(null), Se = i(0), pe = i(0), oe = i(null), ft = nt, e = k({
39
+ get: () => Ve(),
40
+ set: (a) => a
41
+ }), { userOptionsVisible: ye, setUserOptionsVisibility: Le, keepUserOptionState: Ne } = Kt({ config: e.value }), { svgRef: Pe } = Jt({ config: e.value.style.chart.title });
42
+ function Ve() {
43
+ const a = et({
44
+ userConfig: b.config,
45
+ defaultConfig: ct
46
+ });
47
+ let l = {};
48
+ return a.theme ? l = {
49
+ ...et({
50
+ userConfig: Et.vue_ui_vertical_bar[a.theme] || b.config,
51
+ defaultConfig: a
52
+ }),
53
+ customPalette: Ft[a.theme] || D
54
+ } : l = a, b.config && ke(b.config, "events.datapointEnter") ? l.events.datapointEnter = b.config.events.datapointEnter : l.events.datapointEnter = null, b.config && ke(b.config, "events.datapointLeave") ? l.events.datapointLeave = b.config.events.datapointLeave : l.events.datapointLeave = null, b.config && ke(b.config, "events.datapointClick") ? l.events.datapointClick = b.config.events.datapointClick : l.events.datapointClick = null, l;
55
+ }
56
+ Ke(() => b.config, (a) => {
57
+ e.value = Ve(), ye.value = !e.value.userOptions.showOnChartHover, Ee(), Se.value += 1, pe.value += 1, c.value = e.value.style.chart.layout.bars.height, m.value = e.value.style.chart.layout.bars.gap, $.value.showTable = e.value.table.show, $.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", $.value.showTooltip = e.value.style.chart.tooltip.show;
58
+ }, { deep: !0 }), Ke(() => b.dataset, ue, { deep: !0 });
59
+ const { isPrinting: ze, isImaging: Ae, generatePdf: Ie, generateImage: Oe } = Yt({
60
+ elementId: `vue-ui-vertical-bar_${S.value}`,
61
+ fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
62
+ options: e.value.userOptions.print
63
+ }), gt = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), Me = k(() => Rt(e.value.customPalette)), Be = i(null), Fe = i(!1), bt = k(() => e.value.table.responsiveBreakpoint), A = Je(null), X = Je(null), ne = i("0 0 10 10"), G = k(() => {
64
+ const [a, l, t, o] = ne.value.split(" ").map(Number);
65
+ return { x: a, y: l, width: t, height: o };
66
+ });
67
+ Qe(async () => {
68
+ await ie(), Ee(), H();
69
+ });
70
+ async function H() {
71
+ if (ne.value = `0 0 ${C.value.width} ${s.value.fullHeight}`, !e.value.autoSize) return;
72
+ const a = oe.value.querySelectorAll(".vue-ui-horizontal-bar-parent-label"), l = oe.value.querySelectorAll(".vue-ui-horizontal-bar-child-label");
73
+ if (a.length) {
74
+ const o = Math.max(...Array.from(a).flatMap((f) => {
75
+ const v = f.querySelectorAll("text");
76
+ return v.length ? Array.from(v).map((_) => _.getBBox().width) : 0;
77
+ })), y = Math.max(...Array.from(l).flatMap((f) => {
78
+ const v = f.querySelectorAll("text");
79
+ return v.length ? Array.from(v).map((_) => _.getBBox().width) : 0;
80
+ }));
81
+ Array.from(a).forEach((f) => {
82
+ const v = f.querySelectorAll("text");
83
+ Array.from(v).forEach(async (_) => {
84
+ _.setAttribute("x", 0), _.setAttribute("x", L(-o - y / 4));
85
+ });
86
+ });
87
+ }
88
+ await ie();
89
+ const t = oe.value.getBBox();
90
+ ne.value = [
91
+ t.x,
92
+ 0,
93
+ t.width + 12,
94
+ s.value.fullHeight
95
+ ].join(" ");
96
+ }
97
+ function Ee() {
98
+ if (Ze(b.dataset) && te({
99
+ componentName: "VueUiVerticalBar",
100
+ type: "dataset"
101
+ }), le.value = b.dataset.flatMap((a) => a.children && a.children.length > 0 ? a.children.length : 1).reduce((a, l) => a + l, 0), mt(), e.value.responsive) {
102
+ const a = jt(() => {
103
+ const { width: l, height: t } = qt({
104
+ chart: z.value,
105
+ title: e.value.style.chart.title.text ? $e.value : null,
106
+ legend: e.value.style.chart.legend.show ? he.value : null,
107
+ source: Ce.value,
108
+ noTitle: Te.value
109
+ });
110
+ requestAnimationFrame(async () => {
111
+ Ue.value = l, c.value = t / le.value - m.value * 2, await ie(), H();
112
+ });
113
+ });
114
+ A.value && (X.value && A.value.unobserve(X.value), A.value.disconnect()), A.value = new ResizeObserver(a), X.value = z.value.parentNode, A.value.observe(X.value), e.value.autoSize && H();
115
+ }
116
+ }
117
+ zt(() => {
118
+ A.value && (X.value && A.value.unobserve(X.value), A.value.disconnect());
119
+ });
120
+ function mt() {
121
+ new ResizeObserver((l) => {
122
+ l.forEach((t) => {
123
+ Fe.value = t.contentRect.width < bt.value;
124
+ });
125
+ }).observe(Be.value);
126
+ }
127
+ const $ = i({
128
+ showTable: e.value.table.show,
129
+ sortDesc: e.value.style.chart.layout.bars.sort === "desc",
130
+ showTooltip: e.value.style.chart.tooltip.show
131
+ }), Re = k(() => $.value.sortDesc), I = k(() => (b.dataset.forEach((a, l) => {
132
+ !a.value && !a.children && te({
133
+ componentName: "VueUiVerticalBar",
134
+ type: "datasetAttributeEmpty",
135
+ property: `value (index ${l})`
136
+ }), a.children && (Ze(a.children) ? te({
137
+ componentName: "VueUiVerticalBar",
138
+ type: "datasetAttributeEmpty",
139
+ property: `children (index ${l})`
140
+ }) : a.children.forEach((t, o) => {
141
+ [null, void 0].includes(t.name) && te({
142
+ componentName: "VueUiVerticalBar",
143
+ type: "datasetSerieAttribute",
144
+ property: "name",
145
+ key: "children",
146
+ index: o
147
+ });
148
+ }));
149
+ }), b.dataset.map((a, l) => {
150
+ const t = `vertical_parent_${l}_${S.value}`, o = a.children && a.children.length > 0, y = L(a.value ? a.value : o ? a.children.map((v) => v.value || 0).reduce((v, _) => v + _, 0) : 0), f = y >= 0 ? 1 : -1;
151
+ return {
152
+ ...a,
153
+ id: t,
154
+ absoluteIndex: l,
155
+ shape: "square",
156
+ opacity: N.value.includes(t) ? 0.5 : 1,
157
+ value: Math.abs(y),
158
+ sign: f,
159
+ hasChildren: o,
160
+ isChild: !1,
161
+ segregate: () => Q(t),
162
+ isSegregated: N.value.includes(t),
163
+ color: xe(a.color) || Me.value[l] || D[l] || D[l % D.length],
164
+ children: !a.children || !a.children.length ? [] : a.children.toSorted(se.value ? () => 0 : (v, _) => Re.value ? _.value - v.value : v.value - _.value).map((v, _) => ({
165
+ ...v,
166
+ value: L(Math.abs(v.value)),
167
+ absoluteIndex: l,
168
+ sign: v.value >= 0 ? 1 : -1,
169
+ isChild: !0,
170
+ parentId: t,
171
+ parentName: a.name,
172
+ parentValue: y,
173
+ parentSign: f,
174
+ id: `vertical_child_${l}_${_}_${S.value}`,
175
+ childIndex: _,
176
+ color: xe(v.color) || xe(a.color) || Me.value[l] || D[l] || D[l % D.length]
177
+ })).map((v, _) => ({
178
+ ...v,
179
+ isFirstChild: _ === 0,
180
+ isLastChild: _ === a.children.length - 1
181
+ }))
182
+ };
183
+ }).toSorted(se.value ? () => 0 : (a, l) => Re.value ? l.value - a.value : a.value - l.value))), De = k(() => ({
184
+ cy: "vertical-bar-div-legend",
185
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
186
+ color: e.value.style.chart.legend.color,
187
+ fontSize: e.value.style.chart.legend.fontSize,
188
+ paddingBottom: 12,
189
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
190
+ })), c = i(e.value.style.chart.layout.bars.height), m = i(e.value.style.chart.layout.bars.gap), kt = k(() => (c.value + m.value) * le.value), Ue = i(512), C = k(() => ({
191
+ width: Ue.value,
192
+ height: kt.value,
193
+ padding: {
194
+ top: 12,
195
+ left: (e.value.autoSize ? 0 : 128) + e.value.style.chart.layout.bars.offsetX,
196
+ right: (e.value.autoSize ? 0 : 64) + e.value.style.chart.layout.bars.paddingRight,
197
+ bottom: 12
198
+ }
199
+ })), s = k(() => ({
200
+ fullHeight: C.value.padding.top + C.value.padding.bottom + C.value.height,
201
+ top: C.value.padding.top,
202
+ left: C.value.padding.left,
203
+ right: C.value.width - C.value.padding.right,
204
+ bottom: C.value.padding.top + C.value.height,
205
+ width: C.value.width - (C.value.padding.left + C.value.padding.right)
206
+ }));
207
+ async function ue() {
208
+ le.value = M.value.flatMap((a) => a.children && a.children.length > 0 ? a.children.length : 1).reduce((a, l) => a + l, 0), e.value.autoSize && await H();
209
+ }
210
+ const N = i([]);
211
+ async function Q(a) {
212
+ if (N.value.includes(a))
213
+ N.value = N.value.filter((l) => l !== a);
214
+ else {
215
+ if (N.value.length === I.value.length - 1) return;
216
+ N.value.push(a);
217
+ }
218
+ ue(), await ie(), e.value.autoSize && H(), ft("selectLegend", M.value);
219
+ }
220
+ const M = k(() => I.value.filter((a) => !N.value.includes(a.id))), V = k(() => M.value.map((a) => Math.abs(a.value)).reduce((a, l) => a + l, 0));
221
+ function Xe(a, l = !1, t = 0) {
222
+ return l ? U({
223
+ v: L(Math.abs(a) / V.value * 100),
224
+ s: "%",
225
+ r: t
226
+ }) : Math.abs(a) / V.value;
227
+ }
228
+ const B = k(() => M.value.flatMap((a) => a.hasChildren ? a.children : a)), F = k(() => B.value.map((a) => a.sign).includes(-1)), xt = k(() => Math.max(...M.value.flatMap((a) => a.children && a.children.length ? Math.max(...a.children.map((l) => l.value)) : a.value)));
229
+ function T(a) {
230
+ const l = a / xt.value;
231
+ return s.value.width / (F.value ? 2 : 1) * l;
232
+ }
233
+ function _t(a) {
234
+ return T(a) + s.value.left;
235
+ }
236
+ function Z(a, l) {
237
+ const t = M.value.find((f) => f.id === a.parentId), o = s.value.top + (m.value + c.value) * l, y = t.children.length * (m.value + c.value);
238
+ return {
239
+ y: o + y / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
240
+ name: t.name,
241
+ value: [void 0, NaN, null].includes(t.value) ? "" : t.sign === 1 ? t.value : -t.value,
242
+ percentageToTotal: isNaN(t.value / V.value) ? "" : Xe(t.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
243
+ sign: t.sign
244
+ };
245
+ }
246
+ function wt() {
247
+ return M.value;
248
+ }
249
+ const fe = i(null), ge = i(null);
250
+ function $t({ datapoint: a, seriesIndex: l }) {
251
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: a, seriesIndex: l });
252
+ }
253
+ function Ct({ datapoint: a, seriesIndex: l }) {
254
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: a, seriesIndex: l }), yt.value = null, ve.value = !1, fe.value = null;
255
+ }
256
+ function Tt(a, l) {
257
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: a, seriesIndex: l }), ge.value = {
258
+ datapoint: a,
259
+ seriesIndex: l,
260
+ series: I.value,
261
+ config: e.value
262
+ }, ve.value = !0, fe.value = a.id;
263
+ let t = "";
264
+ const o = a.isChild ? a.parentName : a.name, y = a.isChild ? a.name : "", f = e.value.style.chart.tooltip.customFormat;
265
+ Ht(f) && Wt(() => f({
266
+ datapoint: a,
267
+ series: I.value,
268
+ config: e.value,
269
+ seriesIndex: l
270
+ })) ? ce.value = f({
271
+ datapoint: a,
272
+ series: I.value,
273
+ config: e.value,
274
+ seriesIndex: l
275
+ }) : (t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
276
+ <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${ht.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${S.value}_${a.absoluteIndex})"/>` : ""}</svg> ${o}</div>
277
+ ${y ? `<div>${y}</div>` : ""}
278
+ </div>`, e.value.style.chart.tooltip.showValue && (t += `<div>${e.value.translations.value}: <b>${de(
279
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
280
+ a.sign === 1 ? a.value : -a.value,
281
+ U({
282
+ p: e.value.style.chart.tooltip.prefix,
283
+ v: a.sign === 1 ? a.value : -a.value,
284
+ s: e.value.style.chart.tooltip.suffix,
285
+ r: e.value.style.chart.tooltip.roundingValue
286
+ }),
287
+ { datapoint: a, seriesIndex: l }
288
+ )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (t += `<div>${e.value.translations.percentageToTotal} : <b>${U({
289
+ v: Math.abs(a.value) / V.value * 100,
290
+ s: "%",
291
+ r: e.value.style.chart.tooltip.roundingPercentage
292
+ })}</b></div>`, a.isChild && (t += `<div>${e.value.translations.percentageToSerie}: <b>${U({
293
+ v: Math.abs(a.value) / Math.abs(a.parentValue) * 100,
294
+ s: "%",
295
+ r: e.value.style.chart.tooltip.roundingPercentage
296
+ })}</b></div>`)), ce.value = `<div style="text-align:left">${t}</div>`);
297
+ }
298
+ function Ge(a, l, t, o) {
299
+ if (!e.value.style.chart.layout.bars.dataLabels.value.show)
300
+ return "";
301
+ const y = de(
302
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
303
+ L(o === -1 && a >= 0 ? -a : a),
304
+ U({
305
+ p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
306
+ v: L(o === -1 && a >= 0 ? -a : a),
307
+ s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
308
+ r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
309
+ }),
310
+ { datapoint: l, seriesIndex: t }
311
+ ), f = `(${Xe(a, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
312
+ return `${y}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${f}` : ""}`;
313
+ }
314
+ const P = k(() => {
315
+ const a = [
316
+ e.value.translations.parentName,
317
+ e.value.translations.value,
318
+ e.value.translations.percentageToTotal,
319
+ e.value.translations.childName,
320
+ e.value.translations.value,
321
+ e.value.translations.percentageToSerie,
322
+ e.value.translations.percentageToTotal
323
+ ], l = B.value.map((t) => t.isChild ? t.isFirstChild ? {
324
+ color: t.color,
325
+ parentName: t.parentName,
326
+ parentValue: t.parentValue,
327
+ percentageToTotal: t.parentValue / V.value,
328
+ childName: t.name,
329
+ childValue: t.sign === 1 ? t.value : -t.value,
330
+ childPercentageToParent: Math.abs(t.value) / Math.abs(t.parentValue),
331
+ childPercentageToTotal: Math.abs(t.value) / V.value
332
+ } : {
333
+ color: "",
334
+ parentName: "",
335
+ parentValue: "",
336
+ percentageToTotal: "",
337
+ childName: t.name,
338
+ childValue: t.sign === 1 ? t.value : -t.value,
339
+ childPercentageToParent: Math.abs(t.value) / Math.abs(t.parentValue),
340
+ childPercentageToTotal: Math.abs(t.value) / V.value
341
+ } : {
342
+ color: t.color,
343
+ parentName: t.name,
344
+ parentValue: t.sign === 1 ? t.value : -t.value,
345
+ percentageToTotal: Math.abs(t.value) / V.value,
346
+ childName: "",
347
+ childValue: "",
348
+ childPercentageToParent: "",
349
+ childPercentageToTotal: ""
350
+ });
351
+ return { head: a, body: l };
352
+ });
353
+ function He(a = null) {
354
+ const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = P.value.head, o = P.value.body.map((v) => [
355
+ v.parentName,
356
+ v.parentValue,
357
+ v.percentageToTotal,
358
+ v.childName,
359
+ v.childValue,
360
+ v.childPercentageToParent,
361
+ v.childPercentageToTotal
362
+ ]), y = l.concat([t]).concat(o), f = Xt(y);
363
+ a ? a(f) : Gt({ csvContent: f, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
364
+ }
365
+ const W = i(!1);
366
+ function We(a) {
367
+ W.value = a, we.value += 1;
368
+ }
369
+ function je() {
370
+ $.value.showTable = !$.value.showTable;
371
+ }
372
+ const St = i({
373
+ none: 0,
374
+ asc: 1,
375
+ desc: 2
376
+ }), O = i(0), se = i(!1);
377
+ Qe(() => {
378
+ ["none", "asc", "desc"].includes(e.value.style.chart.layout.bars.sort) || te({
379
+ componentName: "VueUiVerticalBar",
380
+ type: "attributeWrongValue",
381
+ property: "style.chart.layout.bars.sort",
382
+ key: e.value.style.chart.layout.bars.sort
383
+ }), O.value = St.value[e.value.style.chart.layout.bars.sort], $.value.sortDesc = O.value === 2, se.value = O.value === 0;
384
+ });
385
+ function Lt() {
386
+ O.value += 1, O.value > 2 && (O.value = 0);
387
+ }
388
+ function qe() {
389
+ Lt(), $.value.sortDesc = O.value === 2, se.value = O.value === 0, ue();
390
+ }
391
+ function Ye() {
392
+ $.value.showTooltip = !$.value.showTooltip;
393
+ }
394
+ const re = i(!1);
395
+ function be() {
396
+ re.value = !re.value;
397
+ }
398
+ async function Nt({ scale: a = 2 } = {}) {
399
+ if (!z.value) return;
400
+ const { width: l, height: t } = z.value.getBoundingClientRect(), o = l / t, { imageUri: y, base64: f } = await ea({ domElement: z.value, base64: !0, img: !0, scale: a });
401
+ return {
402
+ imageUri: y,
403
+ base64: f,
404
+ title: e.value.style.chart.title.text,
405
+ width: l,
406
+ height: t,
407
+ aspectRatio: o
408
+ };
409
+ }
410
+ return ot({
411
+ autoSize: H,
412
+ // v3
413
+ getData: wt,
414
+ getImage: Nt,
415
+ recalculateHeight: ue,
416
+ generatePdf: Ie,
417
+ generateCsv: He,
418
+ generateImage: Oe,
419
+ toggleTable: je,
420
+ toggleSort: qe,
421
+ toggleTooltip: Ye,
422
+ toggleAnnotator: be,
423
+ toggleFullscreen: We
424
+ }), (a, l) => (u(), d("div", {
425
+ class: E(`vue-ui-vertical-bar ${W.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
426
+ ref_key: "verticalBarChart",
427
+ ref: z,
428
+ id: `vue-ui-vertical-bar_${S.value}`,
429
+ style: h(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
430
+ onMouseenter: l[4] || (l[4] = () => r(Le)(!0)),
431
+ onMouseleave: l[5] || (l[5] = () => r(Le)(!1))
432
+ }, [
433
+ e.value.userOptions.buttons.annotator ? (u(), R(r(rt), {
434
+ key: 0,
435
+ svgRef: r(Pe),
436
+ backgroundColor: e.value.style.chart.backgroundColor,
437
+ color: e.value.style.chart.color,
438
+ active: re.value,
439
+ onClose: be
440
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
441
+ gt.value ? (u(), d("div", {
442
+ key: 1,
443
+ ref_key: "noTitle",
444
+ ref: Te,
445
+ class: "vue-data-ui-no-title-space",
446
+ style: "height:36px; width: 100%;background:transparent"
447
+ }, null, 512)) : g("", !0),
448
+ e.value.style.chart.title.text ? (u(), d("div", {
449
+ key: 2,
450
+ ref_key: "chartTitle",
451
+ ref: $e,
452
+ style: "width:100%;background:transparent;padding-bottom:12px"
453
+ }, [
454
+ (u(), R(Zt, {
455
+ key: `title_${Se.value}`,
456
+ config: {
457
+ title: {
458
+ cy: "vertical-bar-div-title",
459
+ ...e.value.style.chart.title
460
+ },
461
+ subtitle: {
462
+ cy: "vertical-bar-div-subtitle",
463
+ ...e.value.style.chart.title.subtitle
464
+ }
465
+ }
466
+ }, null, 8, ["config"]))
467
+ ], 512)) : g("", !0),
468
+ e.value.userOptions.show && ae.value && (r(Ne) || r(ye)) ? (u(), R(r(vt), {
469
+ ref_key: "details",
470
+ ref: pt,
471
+ key: `user_options_${we.value}`,
472
+ backgroundColor: e.value.style.chart.backgroundColor,
473
+ color: e.value.style.chart.color,
474
+ isImaging: r(Ae),
475
+ isPrinting: r(ze),
476
+ uid: S.value,
477
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
478
+ hasPdf: e.value.userOptions.buttons.pdf,
479
+ hasImg: e.value.userOptions.buttons.img,
480
+ hasXls: e.value.userOptions.buttons.csv,
481
+ hasTable: e.value.userOptions.buttons.table,
482
+ hasSort: e.value.userOptions.buttons.sort,
483
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
484
+ isFullscreen: W.value,
485
+ isTooltip: $.value.showTooltip,
486
+ titles: { ...e.value.userOptions.buttonTitles },
487
+ chartElement: z.value,
488
+ position: e.value.userOptions.position,
489
+ hasAnnotator: e.value.userOptions.buttons.annotator,
490
+ isAnnotation: re.value,
491
+ callbacks: e.value.userOptions.callbacks,
492
+ printScale: e.value.userOptions.print.scale,
493
+ onToggleFullscreen: We,
494
+ onGeneratePdf: r(Ie),
495
+ onGenerateCsv: He,
496
+ onGenerateImage: r(Oe),
497
+ onToggleTable: je,
498
+ onToggleSort: qe,
499
+ onToggleTooltip: Ye,
500
+ onToggleAnnotator: be,
501
+ style: h({
502
+ visibility: r(Ne) ? r(ye) ? "visible" : "hidden" : "visible"
503
+ })
504
+ }, me({ _: 2 }, [
505
+ a.$slots.menuIcon ? {
506
+ name: "menuIcon",
507
+ fn: w(({ isOpen: t, color: o }) => [
508
+ x(a.$slots, "menuIcon", q(Y({ isOpen: t, color: o })), void 0, !0)
509
+ ]),
510
+ key: "0"
511
+ } : void 0,
512
+ a.$slots.optionTooltip ? {
513
+ name: "optionTooltip",
514
+ fn: w(() => [
515
+ x(a.$slots, "optionTooltip", {}, void 0, !0)
516
+ ]),
517
+ key: "1"
518
+ } : void 0,
519
+ a.$slots.optionPdf ? {
520
+ name: "optionPdf",
521
+ fn: w(() => [
522
+ x(a.$slots, "optionPdf", {}, void 0, !0)
523
+ ]),
524
+ key: "2"
525
+ } : void 0,
526
+ a.$slots.optionCsv ? {
527
+ name: "optionCsv",
528
+ fn: w(() => [
529
+ x(a.$slots, "optionCsv", {}, void 0, !0)
530
+ ]),
531
+ key: "3"
532
+ } : void 0,
533
+ a.$slots.optionImg ? {
534
+ name: "optionImg",
535
+ fn: w(() => [
536
+ x(a.$slots, "optionImg", {}, void 0, !0)
537
+ ]),
538
+ key: "4"
539
+ } : void 0,
540
+ a.$slots.optionTable ? {
541
+ name: "optionTable",
542
+ fn: w(() => [
543
+ x(a.$slots, "optionTable", {}, void 0, !0)
544
+ ]),
545
+ key: "5"
546
+ } : void 0,
547
+ a.$slots.optionLabels ? {
548
+ name: "optionLabels",
549
+ fn: w(() => [
550
+ x(a.$slots, "optionLabels", {}, void 0, !0)
551
+ ]),
552
+ key: "6"
553
+ } : void 0,
554
+ a.$slots.optionSort ? {
555
+ name: "optionSort",
556
+ fn: w(() => [
557
+ x(a.$slots, "optionSort", {}, void 0, !0)
558
+ ]),
559
+ key: "7"
560
+ } : void 0,
561
+ a.$slots.optionFullscreen ? {
562
+ name: "optionFullscreen",
563
+ fn: w(({ toggleFullscreen: t, isFullscreen: o }) => [
564
+ x(a.$slots, "optionFullscreen", q(Y({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
565
+ ]),
566
+ key: "8"
567
+ } : void 0,
568
+ a.$slots.optionAnnotator ? {
569
+ name: "optionAnnotator",
570
+ fn: w(({ toggleAnnotator: t, isAnnotator: o }) => [
571
+ x(a.$slots, "optionAnnotator", q(Y({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
572
+ ]),
573
+ key: "9"
574
+ } : void 0
575
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
576
+ e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (u(), d("div", {
577
+ key: 4,
578
+ ref_key: "chartLegend",
579
+ ref: he
580
+ }, [
581
+ (u(), R(tt, {
582
+ key: `legend_top_${pe.value}`,
583
+ legendSet: I.value,
584
+ config: De.value,
585
+ onClickMarker: l[0] || (l[0] = ({ legend: t }) => Q(t.id))
586
+ }, me({
587
+ item: w(({ legend: t, index: o }) => [
588
+ n("div", {
589
+ onClick: (y) => Q(t.id),
590
+ style: h(`opacity:${N.value.includes(t.id) ? 0.5 : 1}`)
591
+ }, p(t.name) + ": " + p(r(de)(
592
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
593
+ t.value,
594
+ r(U)({
595
+ p: e.value.style.chart.legend.prefix,
596
+ v: t.value,
597
+ s: e.value.style.chart.legend.suffix,
598
+ r: e.value.style.chart.legend.roundingValue
599
+ }),
600
+ { datapoint: t, seriesIndex: o }
601
+ )), 13, la)
602
+ ]),
603
+ _: 2
604
+ }, [
605
+ a.$slots.pattern ? {
606
+ name: "legend-pattern",
607
+ fn: w(({ legend: t, index: o }) => [
608
+ ee(at, {
609
+ shape: t.shape,
610
+ radius: 30,
611
+ stroke: "none",
612
+ plot: { x: 30, y: 30 },
613
+ fill: `url(#pattern_${S.value}_${o})`
614
+ }, null, 8, ["shape", "fill"])
615
+ ]),
616
+ key: "0"
617
+ } : void 0
618
+ ]), 1032, ["legendSet", "config"]))
619
+ ], 512)) : g("", !0),
620
+ ae.value ? (u(), d("svg", {
621
+ key: 5,
622
+ ref_key: "svgRef",
623
+ ref: Pe,
624
+ xmlns: r(Dt),
625
+ class: E({ "vue-data-ui-fullscreen--on": W.value, "vue-data-ui-fulscreen--off": !W.value }),
626
+ viewBox: ne.value,
627
+ style: h(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
628
+ }, [
629
+ n("g", {
630
+ ref_key: "G",
631
+ ref: oe,
632
+ class: "vue-data-ui-g"
633
+ }, [
634
+ ee(r(st)),
635
+ a.$slots["chart-background"] ? (u(), d("foreignObject", {
636
+ key: 0,
637
+ x: 0,
638
+ y: 0,
639
+ width: C.value.width <= 0 ? 10 : C.value.width,
640
+ height: s.value.fullHeight <= 0 ? 10 : s.value.fullHeight,
641
+ style: {
642
+ pointerEvents: "none"
643
+ }
644
+ }, [
645
+ x(a.$slots, "chart-background", {}, void 0, !0)
646
+ ], 8, na)) : g("", !0),
647
+ (u(!0), d(K, null, J(B.value, (t, o) => (u(), d("linearGradient", {
648
+ x1: "0%",
649
+ y1: "0%",
650
+ x2: "100%",
651
+ y2: "0%",
652
+ id: `vertical_bar_gradient_${S.value}_${o}`
653
+ }, [
654
+ n("stop", {
655
+ offset: "0%",
656
+ "stop-color": t.color
657
+ }, null, 8, sa),
658
+ n("stop", {
659
+ offset: "100%",
660
+ "stop-color": r(_e)(r(Ut)(t.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
661
+ }, null, 8, ra)
662
+ ], 8, ua))), 256)),
663
+ a.$slots.pattern ? (u(), d("g", ia, [
664
+ (u(!0), d(K, null, J(B.value, (t) => (u(), d("defs", null, [
665
+ x(a.$slots, "pattern", At({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${S.value}_${t.absoluteIndex}` }), void 0, !0)
666
+ ]))), 256))
667
+ ])) : g("", !0),
668
+ (u(!0), d(K, null, J(B.value, (t, o) => (u(), d("g", null, [
669
+ n("rect", {
670
+ x: r(L)(F.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : T(t.value) <= 0 ? 1e-4 : T(t.value)) : s.value.left),
671
+ y: s.value.top + (m.value + c.value) * o,
672
+ width: r(L)(T(t.value) <= 0 ? 1e-4 : T(t.value)),
673
+ height: c.value <= 0 ? 1e-4 : c.value,
674
+ fill: e.value.style.chart.layout.bars.underlayerColor,
675
+ rx: e.value.style.chart.layout.bars.borderRadius,
676
+ class: E({ animated: e.value.useCssAnimation })
677
+ }, null, 10, da)
678
+ ]))), 256)),
679
+ (u(!0), d(K, null, J(B.value, (t, o) => (u(), d("g", null, [
680
+ n("rect", {
681
+ x: r(L)(F.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : T(t.value) <= 0 ? 1e-4 : T(t.value)) : s.value.left),
682
+ y: s.value.top + (m.value + c.value) * o,
683
+ width: r(L)(T(t.value) <= 0 ? 1e-4 : T(t.value)),
684
+ height: c.value <= 0 ? 1e-4 : c.value,
685
+ fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${S.value}_${o})` : r(_e)(t.color, e.value.style.chart.layout.bars.fillOpacity),
686
+ rx: e.value.style.chart.layout.bars.borderRadius,
687
+ stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
688
+ "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
689
+ class: E({ animated: e.value.useCssAnimation })
690
+ }, null, 10, va),
691
+ a.$slots.pattern ? (u(), d("rect", {
692
+ key: 0,
693
+ x: r(L)(F.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : T(t.value) <= 0 ? 1e-4 : T(t.value)) : s.value.left),
694
+ y: s.value.top + (m.value + c.value) * o,
695
+ width: r(L)(T(t.value) <= 0 ? 1e-4 : T(t.value)),
696
+ height: c.value <= 0 ? 1e-4 : c.value,
697
+ fill: `url(#pattern_${S.value}_${t.absoluteIndex})`,
698
+ rx: e.value.style.chart.layout.bars.borderRadius,
699
+ stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
700
+ "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
701
+ class: E({ animated: e.value.useCssAnimation })
702
+ }, null, 10, ca)) : g("", !0),
703
+ (!t.isChild || t.isLastChild) && e.value.style.chart.layout.separators.show && o !== B.value.length - 1 ? (u(), d("line", {
704
+ key: 1,
705
+ x1: G.value.x,
706
+ x2: s.value.left,
707
+ y1: c.value + m.value / 2 + s.value.top + (m.value + c.value) * o,
708
+ y2: c.value + m.value / 2 + s.value.top + (m.value + c.value) * o,
709
+ stroke: e.value.style.chart.layout.separators.color,
710
+ "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
711
+ "stroke-linecap": "round",
712
+ style: { transition: "none !important", animation: "none !important" }
713
+ }, null, 8, ha)) : g("", !0),
714
+ F.value && e.value.style.chart.layout.separators.show ? (u(), d("line", {
715
+ key: 2,
716
+ x1: s.value.left + s.value.width / 2,
717
+ x2: s.value.left + s.value.width / 2,
718
+ y1: s.value.top,
719
+ y2: s.value.bottom,
720
+ stroke: e.value.style.chart.layout.separators.color,
721
+ "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
722
+ "stroke-linecap": "round"
723
+ }, null, 8, pa)) : g("", !0),
724
+ n("g", ya, [
725
+ n("text", {
726
+ x: F.value ? s.value.left + s.value.width / 2 + (t.sign === 1 ? -12 : 12) + (t.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : _t(t.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
727
+ y: s.value.top + (m.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
728
+ "text-anchor": !F.value || t.sign === -1 ? "start" : "end",
729
+ "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
730
+ fill: e.value.style.chart.layout.bars.dataLabels.color,
731
+ "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
732
+ }, p(Ge(t.value, t, o, t.sign)), 9, fa),
733
+ (t.isChild || !t.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (u(), d("text", {
734
+ key: 0,
735
+ "text-anchor": "end",
736
+ x: s.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
737
+ y: s.value.top + (m.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
738
+ "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
739
+ fill: e.value.style.chart.layout.bars.nameLabels.color,
740
+ "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
741
+ }, p(t.name), 9, ga)) : g("", !0)
742
+ ]),
743
+ n("g", ba, [
744
+ t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), d("text", {
745
+ key: 0,
746
+ x: e.value.autoSize ? void 0 : G.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
747
+ y: Z(t, o).y,
748
+ "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
749
+ fill: e.value.style.chart.layout.bars.parentLabels.color,
750
+ "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
751
+ "text-anchor": "start"
752
+ }, p(Z(t, o).name), 9, ma)) : g("", !0),
753
+ t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), d("text", {
754
+ key: 1,
755
+ x: e.value.autoSize ? void 0 : G.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
756
+ y: Z(t, o).y + e.value.style.chart.layout.bars.parentLabels.fontSize + 6,
757
+ "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
758
+ fill: e.value.style.chart.layout.bars.parentLabels.color,
759
+ "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
760
+ "text-anchor": "start"
761
+ }, p(Ge(Z(t, o).value), Z(t, o), o, t.parentSign || t.sign), 9, ka)) : g("", !0)
762
+ ]),
763
+ n("rect", {
764
+ x: G.value.x,
765
+ y: s.value.top + (m.value + c.value) * o - m.value / 2,
766
+ width: G.value.width,
767
+ height: c.value + m.value <= 0 ? 1e-4 : c.value + m.value,
768
+ fill: fe.value === t.id ? r(_e)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity) : "transparent",
769
+ onMouseenter: (y) => Tt(t, o),
770
+ onMouseleave: (y) => Ct({ datapoint: t, seriesIndex: o }),
771
+ onClick: (y) => $t({ datapoint: t, seriesIndex: o })
772
+ }, null, 40, xa)
773
+ ]))), 256)),
774
+ x(a.$slots, "svg", { svg: G.value }, void 0, !0)
775
+ ], 512)
776
+ ], 14, oa)) : g("", !0),
777
+ a.$slots.watermark ? (u(), d("div", _a, [
778
+ x(a.$slots, "watermark", q(Y({ isPrinting: r(ze) || r(Ae) })), void 0, !0)
779
+ ])) : g("", !0),
780
+ ae.value ? g("", !0) : (u(), R(r(it), {
781
+ key: 7,
782
+ config: {
783
+ type: "verticalBar",
784
+ style: {
785
+ backgroundColor: e.value.style.chart.backgroundColor,
786
+ verticalBar: {
787
+ axis: {
788
+ color: "#CCCCCC"
789
+ },
790
+ color: "#CCCCCC"
791
+ }
792
+ }
793
+ }
794
+ }, null, 8, ["config"])),
795
+ e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (u(), d("div", {
796
+ key: 8,
797
+ ref_key: "chartLegend",
798
+ ref: he
799
+ }, [
800
+ (u(), R(tt, {
801
+ key: `legend_bottom_${pe.value}`,
802
+ legendSet: I.value,
803
+ config: De.value,
804
+ onClickMarker: l[1] || (l[1] = ({ legend: t }) => Q(t.id))
805
+ }, me({
806
+ item: w(({ legend: t, index: o }) => [
807
+ n("div", {
808
+ onClick: (y) => Q(t.id),
809
+ style: h(`opacity:${N.value.includes(t.id) ? 0.5 : 1}`)
810
+ }, p(t.name) + ": " + p(r(de)(
811
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
812
+ t.value,
813
+ r(U)({
814
+ p: e.value.style.chart.legend.prefix,
815
+ v: t.value,
816
+ s: e.value.style.chart.legend.suffix,
817
+ r: e.value.style.chart.legend.roundingValue
818
+ }),
819
+ { datapoint: t, seriesIndex: o }
820
+ )), 13, wa)
821
+ ]),
822
+ _: 2
823
+ }, [
824
+ a.$slots.pattern ? {
825
+ name: "legend-pattern",
826
+ fn: w(({ legend: t, index: o }) => [
827
+ ee(at, {
828
+ shape: t.shape,
829
+ radius: 30,
830
+ stroke: "none",
831
+ plot: { x: 30, y: 30 },
832
+ fill: `url(#pattern_${S.value}_${o})`
833
+ }, null, 8, ["shape", "fill"])
834
+ ]),
835
+ key: "0"
836
+ } : void 0
837
+ ]), 1032, ["legendSet", "config"]))
838
+ ], 512)) : g("", !0),
839
+ x(a.$slots, "legend", { legend: I.value }, void 0, !0),
840
+ a.$slots.source ? (u(), d("div", {
841
+ key: 9,
842
+ ref_key: "source",
843
+ ref: Ce,
844
+ dir: "auto"
845
+ }, [
846
+ x(a.$slots, "source", {}, void 0, !0)
847
+ ], 512)) : g("", !0),
848
+ ee(r(dt), {
849
+ show: $.value.showTooltip && ve.value && N.value.length < b.dataset.length,
850
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
851
+ color: e.value.style.chart.tooltip.color,
852
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
853
+ borderColor: e.value.style.chart.tooltip.borderColor,
854
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
855
+ fontSize: e.value.style.chart.tooltip.fontSize,
856
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
857
+ position: e.value.style.chart.tooltip.position,
858
+ offsetY: e.value.style.chart.tooltip.offsetY,
859
+ parent: z.value,
860
+ content: ce.value,
861
+ isFullscreen: W.value,
862
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
863
+ }, {
864
+ "tooltip-before": w(() => [
865
+ x(a.$slots, "tooltip-before", q(Y({ ...ge.value })), void 0, !0)
866
+ ]),
867
+ "tooltip-after": w(() => [
868
+ x(a.$slots, "tooltip-after", q(Y({ ...ge.value })), void 0, !0)
869
+ ]),
870
+ _: 3
871
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
872
+ ae.value ? (u(), R(Qt, {
873
+ key: 10,
874
+ hideDetails: "",
875
+ config: {
876
+ open: $.value.showTable,
877
+ maxHeight: 1e4,
878
+ body: {
879
+ backgroundColor: e.value.style.chart.backgroundColor,
880
+ color: e.value.style.chart.color
881
+ },
882
+ head: {
883
+ backgroundColor: e.value.style.chart.backgroundColor,
884
+ color: e.value.style.chart.color
885
+ }
886
+ }
887
+ }, {
888
+ content: w(() => [
889
+ n("div", {
890
+ ref_key: "tableContainer",
891
+ ref: Be,
892
+ class: "vue-ui-vertical-bar-table atom-data-table"
893
+ }, [
894
+ n("div", $a, [
895
+ n("div", {
896
+ role: "button",
897
+ tabindex: "0",
898
+ style: h(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
899
+ onClick: l[2] || (l[2] = (t) => $.value.showTable = !1),
900
+ onKeypress: l[3] || (l[3] = It((t) => $.value.showTable = !1, ["enter"]))
901
+ }, [
902
+ ee(r(ut), {
903
+ name: "close",
904
+ stroke: e.value.table.th.color,
905
+ "stroke-width": 2
906
+ }, null, 8, ["stroke"])
907
+ ], 36),
908
+ n("div", {
909
+ style: { width: "100%", "container-type": "inline-size" },
910
+ class: E({ "vue-ui-responsive": Fe.value })
911
+ }, [
912
+ n("table", Ca, [
913
+ n("caption", {
914
+ style: h({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
915
+ class: "vue-ui-data-table__caption"
916
+ }, [
917
+ Ot(p(e.value.style.chart.title.text) + " ", 1),
918
+ e.value.style.chart.title.subtitle.text ? (u(), d("span", Ta, p(e.value.style.chart.title.subtitle.text), 1)) : g("", !0)
919
+ ], 4),
920
+ n("thead", null, [
921
+ n("tr", {
922
+ role: "row",
923
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
924
+ }, [
925
+ (u(!0), d(K, null, J(P.value.head, (t) => (u(), d("th", {
926
+ style: h(`outline:${e.value.table.th.outline}`)
927
+ }, [
928
+ n("div", Sa, p(t), 1)
929
+ ], 4))), 256))
930
+ ], 4),
931
+ n("tr", null, [
932
+ n("th", {
933
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
934
+ }, null, 4),
935
+ n("th", {
936
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
937
+ }, "∑ " + p(e.value.table.td.prefix) + p(isNaN(V.value) ? "" : V.value.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 5),
938
+ n("th", {
939
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
940
+ }, "100%", 4),
941
+ n("th", {
942
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
943
+ }, null, 4),
944
+ n("th", {
945
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
946
+ }, null, 4),
947
+ n("th", {
948
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
949
+ }, null, 4),
950
+ n("th", {
951
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
952
+ }, null, 4)
953
+ ])
954
+ ]),
955
+ n("tbody", null, [
956
+ (u(!0), d(K, null, J(P.value.body, (t, o) => (u(), d("tr", {
957
+ class: E({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": o % 2 === 0, "vue-ui-data-table__tbody__row-odd": o % 2 !== 0 }),
958
+ style: h(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
959
+ }, [
960
+ n("td", {
961
+ class: "vue-ui-data-table__tbody__td",
962
+ style: h(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
963
+ "data-cell": P.value.head[0] ?? ""
964
+ }, [
965
+ n("div", Na, [
966
+ t.color ? (u(), d("span", {
967
+ key: 0,
968
+ style: h(`color:${t.color};margin-right:3px`)
969
+ }, "⬤", 4)) : g("", !0),
970
+ n("span", null, p(t.parentName), 1)
971
+ ])
972
+ ], 12, La),
973
+ n("td", {
974
+ class: "vue-ui-data-table__tbody__td",
975
+ style: h(`outline:${e.value.table.td.outline}`),
976
+ "data-cell": P.value.head[1] ?? ""
977
+ }, [
978
+ n("div", Va, p(e.value.table.td.prefix) + p(["", NaN, void 0].includes(t.parentValue) ? "" : t.parentValue.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 1)
979
+ ], 12, Pa),
980
+ n("td", {
981
+ class: "vue-ui-data-table__tbody__td",
982
+ style: h(`outline:${e.value.table.td.outline}`),
983
+ "data-cell": P.value.head[2] ?? ""
984
+ }, [
985
+ n("div", Aa, p(["", NaN, void 0].includes(t.percentageToTotal) ? "" : `${(t.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
986
+ ], 12, za),
987
+ n("td", {
988
+ class: "vue-ui-data-table__tbody__td",
989
+ style: h(`outline:${e.value.table.td.outline}`),
990
+ "data-cell": P.value.head[3] ?? ""
991
+ }, [
992
+ n("div", Oa, p(t.childName), 1)
993
+ ], 12, Ia),
994
+ n("td", {
995
+ class: "vue-ui-data-table__tbody__td",
996
+ style: h(`outline:${e.value.table.td.outline}`),
997
+ "data-cell": P.value.head[4] ?? ""
998
+ }, [
999
+ n("div", Ba, p(e.value.table.td.prefix) + p(["", NaN, void 0].includes(t.childValue) ? "" : t.childValue.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 1)
1000
+ ], 12, Ma),
1001
+ n("td", {
1002
+ class: "vue-ui-data-table__tbody__td",
1003
+ style: h(`outline:${e.value.table.td.outline}`),
1004
+ "data-cell": P.value.head[5] ?? ""
1005
+ }, [
1006
+ n("div", Ea, p(["", NaN, void 0].includes(t.childPercentageToParent) ? "" : `${(t.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
1007
+ ], 12, Fa),
1008
+ n("td", {
1009
+ class: "vue-ui-data-table__tbody__td",
1010
+ style: h(`outline:${e.value.table.td.outline}`),
1011
+ "data-cell": P.value.head[6] ?? ""
1012
+ }, [
1013
+ n("div", Da, p(["", NaN, void 0].includes(t.childPercentageToTotal) ? "" : `${(t.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
1014
+ ], 12, Ra)
1015
+ ], 6))), 256))
1016
+ ])
1017
+ ])
1018
+ ], 2)
1019
+ ])
1020
+ ], 512)
1021
+ ]),
1022
+ _: 1
1023
+ }, 8, ["config"])) : g("", !0)
1024
+ ], 46, aa));
1025
+ }
1026
+ }, al = /* @__PURE__ */ ta(Ua, [["__scopeId", "data-v-5479e057"]]);
1027
+ export {
1028
+ al as default
1029
+ };