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