vue-data-ui 3.0.0-next.1 → 3.0.0-next.11

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