vue-data-ui 3.0.0-next.0 → 3.0.0-next.10

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 (104) hide show
  1. package/README.md +109 -68
  2. package/dist/{Arrow-CzFtSJ1v.js → Arrow-8Wnel_lw.js} +1 -1
  3. package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-D-IcFGSE.js} +2 -2
  4. package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-RLse0qy8.js} +1 -1
  5. package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-D9dpnizT.js} +2 -2
  6. package/dist/{DataTable-BBbOgI-a.js → DataTable-IzCJ9gby.js} +2 -2
  7. package/dist/{Legend-Q4bOb-Nf.js → Legend-SfJ53F5x.js} +12 -11
  8. package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-3oZlBiCt.js} +3 -3
  9. package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-u8Hc4rJi.js} +1 -1
  10. package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-6iArlmj7.js} +32 -32
  11. package/dist/{Shape-DbsLJ-SE.js → Shape-vSWSsIaU.js} +1 -1
  12. package/dist/{Slicer-DZEFp2GU.js → Slicer-CPMTQDCj.js} +2 -2
  13. package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-sazd7MmK.js} +1 -1
  14. package/dist/{Title-D29apS4l.js → Title-CTsOHFNh.js} +1 -1
  15. package/dist/Tooltip-4cn1szzA.js +157 -0
  16. package/dist/{UserOptions-Bdit7AWO.js → UserOptions-X9Ckvwp-.js} +137 -129
  17. package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-C3BKllTG.js} +1 -1
  18. package/dist/img-D9CjuW6g.js +33 -0
  19. package/dist/{index-DMqAxz7R.js → index-DBSLpcPM.js} +1515 -1426
  20. package/dist/pdf-V4tIjxUb.js +58 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1098 -222
  23. package/dist/types/vue-data-ui.d.ts +1098 -222
  24. package/dist/useLoading-Bt5Doa8m.js +28 -0
  25. package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-BQFkJRtL.js} +1 -1
  26. package/dist/{usePrinter-COkTjv6C.js → usePrinter-CjyE7ii3.js} +2 -2
  27. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DG97x2hL.js} +139 -132
  28. package/dist/vue-data-ui-BgN2CPSV.js +320 -0
  29. package/dist/vue-data-ui.js +53 -52
  30. package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DlnRLAbw.js} +261 -245
  31. package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-yWXqkLfQ.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-C_4kFlWe.js} +233 -217
  33. package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-DVXA74Er.js} +2 -2
  34. package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-DoxSEGR4.js} +172 -156
  35. package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bke-ZK92.js} +271 -254
  36. package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-CqRuHaU6.js} +17 -16
  37. package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-BYIowBXd.js} +419 -403
  38. package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-DyA4jvyD.js} +256 -240
  39. package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-BVT22rGO.js} +230 -214
  40. package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-B3RyMKwx.js} +2 -2
  41. package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-Cgqpnpao.js} +62 -62
  42. package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-Db9yuqjo.js} +2 -2
  43. package/dist/vue-ui-donut-CdsBUcPD.js +1547 -0
  44. package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-D5eUZJuU.js} +370 -357
  45. package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-CWgs8sB6.js} +216 -200
  46. package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CL5jxEBp.js} +217 -201
  47. package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DT9BzBp3.js} +213 -197
  48. package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-hwr5J-b7.js} +215 -202
  49. package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-D_fnRyKs.js} +220 -204
  50. package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-CLni95HP.js} +3 -3
  51. package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-Bd8qoV2F.js} +244 -224
  52. package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BJvaJkPO.js} +268 -252
  53. package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-B7uO6vRA.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CTDfGO91.js} +2 -2
  55. package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-BSE6LaGt.js} +204 -188
  56. package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-CN24P-Tk.js} +206 -190
  57. package/dist/vue-ui-nested-donuts-CWL3uP-u.js +1212 -0
  58. package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-Bib32nel.js} +196 -180
  59. package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-l0O-i93L.js} +194 -178
  60. package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-D0pzeobL.js} +321 -305
  61. package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-CaLIrn96.js} +347 -331
  62. package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DXJ1WS7s.js} +193 -177
  63. package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-C6qqU59J.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-SpPQ2WhH.js} +188 -172
  65. package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-BMsbiTjU.js} +212 -196
  66. package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-ES4LhrT0.js} +223 -210
  67. package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-yV6nLFs6.js} +288 -273
  68. package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-7gkY0oe-.js} +3 -3
  69. package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-CYLqgGm1.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-kQ3dsaGO.js} +3 -3
  71. package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-Bfe8SMeM.js} +3 -3
  72. package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-Dxts3pPS.js} +3 -3
  73. package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-CC6-gQ2R.js} +4 -4
  74. package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-Ba6FPyOS.js} +3 -3
  75. package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-CQr6s7Ij.js} +3 -3
  76. package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-cJAK-x5g.js} +497 -474
  77. package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-DyU5K6-X.js} +241 -225
  78. package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-B_KeSP8f.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-CzGGjLl6.js} +26 -25
  80. package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-BoW1Y5Hh.js} +8 -7
  81. package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-ROH_nY6z.js} +170 -154
  82. package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-DmgpfYIT.js} +5 -5
  83. package/dist/vue-ui-tiremarks-CkmD6BQB.js +358 -0
  84. package/dist/vue-ui-treemap-BOxeG-ql.js +965 -0
  85. package/dist/vue-ui-vertical-bar-BoKi7wHJ.js +1106 -0
  86. package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-BIM_Qg3a.js} +234 -221
  87. package/dist/vue-ui-wheel-CGZgFZax.js +352 -0
  88. package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-Dt-X1dFo.js} +249 -233
  89. package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BrPqffT7.js} +239 -223
  90. package/dist/vue-ui-xy-CYko0Jmo.js +2982 -0
  91. package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-DVRWryRe.js} +447 -431
  92. package/package.json +2 -2
  93. package/dist/Tooltip-hVZUY_s5.js +0 -149
  94. package/dist/img-BeMVTwmF.js +0 -20
  95. package/dist/pdf-DPxOdzfi.js +0 -51
  96. package/dist/useMouse-AicQS8Vf.js +0 -13
  97. package/dist/vue-data-ui-nceqWRts.js +0 -301
  98. package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
  99. package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
  100. package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
  101. package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
  102. package/dist/vue-ui-vertical-bar-Dd4sYeAC.js +0 -958
  103. package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
  104. package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
@@ -1,958 +0,0 @@
1
- import { useCssVars as _t, defineAsyncComponent as H, useSlots as $t, computed as m, ref as d, watch as Xe, shallowRef as He, onMounted as We, onBeforeUnmount as wt, createElementBlock as i, openBlock as u, unref as r, normalizeStyle as c, normalizeClass as B, createBlock as R, createCommentVNode as y, renderSlot as b, createVNode as Q, createSlots as pe, withCtx as k, normalizeProps as W, guardReactiveProps as G, createElementVNode as n, toDisplayString as h, Fragment as j, renderList as q, mergeProps as xt, withKeys as Ct, createTextVNode as Tt } from "vue";
2
- import { u as Lt, c as Nt, t as Pt, p as D, a as St, b as Vt, o as Ge, e as Z, v as N, d as ye, i as ne, f as E, X as It, s as ge, w as Ot, q as Ft, r as Mt, x as zt, y as At } from "./index-DMqAxz7R.js";
3
- import { t as Bt, u as Rt } from "./useResponsive-DfdjqQps.js";
4
- import { u as je } from "./useNestedProp-YgN3FV_8.js";
5
- import { u as Dt } from "./usePrinter-COkTjv6C.js";
6
- import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Ut } from "./useChartAccessibility-9icAAmYg.js";
8
- import Xt from "./vue-ui-accordion-P6eFHGQp.js";
9
- import qe from "./Legend-Q4bOb-Nf.js";
10
- import Ht from "./Title-D29apS4l.js";
11
- import { _ as Ye } from "./Shape-DbsLJ-SE.js";
12
- import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const Gt = ["id"], jt = ["onClick"], qt = ["xmlns", "viewBox"], Yt = ["width", "height"], Kt = ["id"], Jt = ["stop-color"], Qt = ["stop-color"], Zt = { key: 1 }, el = ["x", "y", "width", "height", "fill", "rx"], tl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ll = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], al = ["x2", "y1", "y2", "stroke", "stroke-width"], ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], nl = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], ul = ["x", "y", "font-size", "fill", "font-weight"], sl = ["x", "y", "font-size", "fill", "font-weight"], rl = ["x", "y", "font-size", "fill", "font-weight"], il = ["y", "width", "height", "fill", "onMouseenter"], dl = {
14
- key: 6,
15
- class: "vue-data-ui-watermark"
16
- }, vl = ["onClick"], cl = { style: "width:100%;padding-top: 36px;position:relative" }, hl = { class: "vue-ui-data-table" }, pl = { key: 0 }, yl = { style: { width: "100%" } }, gl = ["data-cell"], fl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, bl = ["data-cell"], ml = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, kl = ["data-cell"], _l = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, $l = ["data-cell"], wl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, xl = ["data-cell"], Cl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Tl = ["data-cell"], Ll = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Nl = ["data-cell"], Pl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Sl = {
17
- __name: "vue-ui-vertical-bar",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- emits: ["selectLegend"],
33
- setup(Ke, { expose: Je, emit: Qe }) {
34
- _t((l) => ({
35
- "8661a912": l.tdo
36
- }));
37
- const Ze = H(() => import("./BaseIcon-DoDjTdD5.js")), et = H(() => import("./PackageVersion-D0VPY8-5.js")), tt = H(() => import("./PenAndPaper-DhBJsnob.js")), lt = H(() => import("./vue-ui-skeleton-CjN2ZdgT.js")), at = H(() => import("./Tooltip-hVZUY_s5.js")), ot = H(() => import("./UserOptions-Bdit7AWO.js")), { vue_ui_vertical_bar: nt } = Lt(), ut = $t(), T = Ke, ee = m(() => !!T.dataset && T.dataset.length), C = d(Nt()), st = d(null), ue = d(!1), se = d(""), te = d(0), rt = d(null), fe = d(0), Y = d(null), be = d(null), re = d(null), me = d(null), ke = d(null), _e = d(0), ie = d(0), it = Qe, e = m({
38
- get: () => Ce(),
39
- set: (l) => l
40
- }), { userOptionsVisible: de, setUserOptionsVisibility: $e, keepUserOptionState: we } = Et({ config: e.value }), { svgRef: xe } = Ut({ config: e.value.style.chart.title });
41
- function Ce() {
42
- const l = je({
43
- userConfig: T.config,
44
- defaultConfig: nt
45
- });
46
- return l.theme ? {
47
- ...je({
48
- userConfig: St.vue_ui_vertical_bar[l.theme] || T.config,
49
- defaultConfig: l
50
- }),
51
- customPalette: Pt[l.theme] || D
52
- } : l;
53
- }
54
- Xe(() => T.config, (l) => {
55
- 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;
56
- }, { deep: !0 }), Xe(() => T.dataset, le, { deep: !0 });
57
- const { isPrinting: Te, isImaging: Le, generatePdf: Ne, generateImage: Pe } = Dt({
58
- elementId: `vue-ui-vertical-bar_${C.value}`,
59
- fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
60
- options: e.value.userOptions.print
61
- }), dt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), Se = m(() => Vt(e.value.customPalette)), Ve = d(null), Ie = d(!1), vt = m(() => e.value.table.responsiveBreakpoint), I = He(null), U = He(null);
62
- We(() => {
63
- Oe();
64
- });
65
- function Oe() {
66
- if (Ge(T.dataset) && Z({
67
- componentName: "VueUiVerticalBar",
68
- type: "dataset"
69
- }), te.value = T.dataset.flatMap((l) => l.children && l.children.length > 0 ? l.children.length : 1).reduce((l, a) => l + a, 0), ct(), e.value.responsive) {
70
- const l = Bt(() => {
71
- const { width: a, height: t } = Rt({
72
- chart: Y.value,
73
- title: e.value.style.chart.title.text ? be.value : null,
74
- legend: e.value.style.chart.legend.show ? re.value : null,
75
- source: me.value,
76
- noTitle: ke.value
77
- });
78
- requestAnimationFrame(() => {
79
- ze.value = a, v.value = t / te.value - f.value * 2;
80
- });
81
- });
82
- I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect()), I.value = new ResizeObserver(l), U.value = Y.value.parentNode, I.value.observe(U.value);
83
- }
84
- }
85
- wt(() => {
86
- I.value && (U.value && I.value.unobserve(U.value), I.value.disconnect());
87
- });
88
- function ct() {
89
- new ResizeObserver((a) => {
90
- a.forEach((t) => {
91
- Ie.value = t.contentRect.width < vt.value;
92
- });
93
- }).observe(Ve.value);
94
- }
95
- const $ = d({
96
- showTable: e.value.table.show,
97
- sortDesc: e.value.style.chart.layout.bars.sort === "desc",
98
- showTooltip: e.value.style.chart.tooltip.show
99
- }), Fe = m(() => $.value.sortDesc), F = m(() => (T.dataset.forEach((l, a) => {
100
- !l.value && !l.children && Z({
101
- componentName: "VueUiVerticalBar",
102
- type: "datasetAttributeEmpty",
103
- property: `value (index ${a})`
104
- }), l.children && (Ge(l.children) ? Z({
105
- componentName: "VueUiVerticalBar",
106
- type: "datasetAttributeEmpty",
107
- property: `children (index ${a})`
108
- }) : l.children.forEach((t, o) => {
109
- [null, void 0].includes(t.name) && Z({
110
- componentName: "VueUiVerticalBar",
111
- type: "datasetSerieAttribute",
112
- property: "name",
113
- key: "children",
114
- index: o
115
- });
116
- }));
117
- }), T.dataset.map((l, a) => {
118
- const t = `vertical_parent_${a}_${C.value}`, o = l.children && l.children.length > 0, _ = N(l.value ? l.value : o ? l.children.map((p) => p.value || 0).reduce((p, V) => p + V, 0) : 0), x = _ >= 0 ? 1 : -1;
119
- return {
120
- ...l,
121
- id: t,
122
- absoluteIndex: a,
123
- shape: "square",
124
- opacity: P.value.includes(t) ? 0.5 : 1,
125
- value: Math.abs(_),
126
- sign: x,
127
- hasChildren: o,
128
- isChild: !1,
129
- segregate: () => K(t),
130
- isSegregated: P.value.includes(t),
131
- color: ye(l.color) || Se.value[a] || D[a] || D[a % D.length],
132
- children: !l.children || !l.children.length ? [] : l.children.toSorted(ae.value ? () => 0 : (p, V) => Fe.value ? V.value - p.value : p.value - V.value).map((p, V) => ({
133
- ...p,
134
- value: N(Math.abs(p.value)),
135
- absoluteIndex: a,
136
- sign: p.value >= 0 ? 1 : -1,
137
- isChild: !0,
138
- parentId: t,
139
- parentName: l.name,
140
- parentValue: _,
141
- parentSign: x,
142
- id: `vertical_child_${a}_${V}_${C.value}`,
143
- childIndex: V,
144
- color: ye(p.color) || ye(l.color) || Se.value[a] || D[a] || D[a % D.length]
145
- })).map((p, V) => ({
146
- ...p,
147
- isFirstChild: V === 0,
148
- isLastChild: V === l.children.length - 1
149
- }))
150
- };
151
- }).toSorted(ae.value ? () => 0 : (l, a) => Fe.value ? a.value - l.value : l.value - a.value))), Me = m(() => ({
152
- cy: "vertical-bar-div-legend",
153
- backgroundColor: e.value.style.chart.legend.backgroundColor,
154
- color: e.value.style.chart.legend.color,
155
- fontSize: e.value.style.chart.legend.fontSize,
156
- paddingBottom: 12,
157
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
158
- })), v = d(e.value.style.chart.layout.bars.height), f = d(e.value.style.chart.layout.bars.gap), ht = m(() => (v.value + f.value) * te.value), ze = d(512), g = m(() => ({
159
- width: ze.value,
160
- height: ht.value,
161
- padding: {
162
- top: 12,
163
- left: 128 + e.value.style.chart.layout.bars.offsetX,
164
- right: 64 + e.value.style.chart.layout.bars.paddingRight,
165
- bottom: 12
166
- }
167
- })), s = m(() => ({
168
- fullHeight: g.value.padding.top + g.value.padding.bottom + g.value.height,
169
- top: g.value.padding.top,
170
- left: g.value.padding.left,
171
- right: g.value.width - g.value.padding.right,
172
- bottom: g.value.padding.top + g.value.height,
173
- width: g.value.width - (g.value.padding.left + g.value.padding.right)
174
- }));
175
- function le() {
176
- te.value = M.value.flatMap((l) => l.children && l.children.length > 0 ? l.children.length : 1).reduce((l, a) => l + a, 0);
177
- }
178
- const P = d([]);
179
- function K(l) {
180
- P.value.includes(l) ? P.value = P.value.filter((a) => a !== l) : P.value.push(l), le(), it("selectLegend", M.value);
181
- }
182
- const M = m(() => F.value.filter((l) => !P.value.includes(l.id))), S = m(() => M.value.map((l) => Math.abs(l.value)).reduce((l, a) => l + a, 0));
183
- function Ae(l, a = !1, t = 0) {
184
- return a ? E({
185
- v: N(Math.abs(l) / S.value * 100),
186
- s: "%",
187
- r: t
188
- }) : Math.abs(l) / S.value;
189
- }
190
- const z = m(() => M.value.flatMap((l) => l.hasChildren ? l.children : l)), A = m(() => z.value.map((l) => l.sign).includes(-1)), pt = m(() => Math.max(...M.value.flatMap((l) => l.children && l.children.length ? Math.max(...l.children.map((a) => a.value)) : l.value)));
191
- function w(l) {
192
- const a = l / pt.value;
193
- return s.value.width / (A.value ? 2 : 1) * a;
194
- }
195
- function yt(l) {
196
- return w(l) + s.value.left;
197
- }
198
- function J(l, a) {
199
- const t = M.value.find((x) => x.id === l.parentId), o = s.value.top + (f.value + v.value) * a, _ = t.children.length * (f.value + v.value);
200
- return {
201
- y: o + _ / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
202
- name: t.name,
203
- value: [void 0, NaN, null].includes(t.value) ? "" : t.sign === 1 ? t.value : -t.value,
204
- percentageToTotal: isNaN(t.value / S.value) ? "" : Ae(t.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
205
- sign: t.sign
206
- };
207
- }
208
- function gt() {
209
- return M.value;
210
- }
211
- const ve = d(null), ce = d(null);
212
- function ft(l, a) {
213
- ce.value = {
214
- datapoint: l,
215
- seriesIndex: a,
216
- series: F.value,
217
- config: e.value
218
- }, ue.value = !0, ve.value = l.id;
219
- let t = "";
220
- const o = l.isChild ? l.parentName : l.name, _ = l.isChild ? l.name : "", x = e.value.style.chart.tooltip.customFormat;
221
- zt(x) && At(() => x({
222
- datapoint: l,
223
- series: F.value,
224
- config: e.value,
225
- seriesIndex: a
226
- })) ? se.value = x({
227
- datapoint: l,
228
- series: F.value,
229
- config: e.value,
230
- seriesIndex: a
231
- }) : (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;">
232
- <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="${l.color}"/>${ut.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${C.value}_${l.absoluteIndex})"/>` : ""}</svg> ${o}</div>
233
- ${_ ? `<div>${_}</div>` : ""}
234
- </div>`, e.value.style.chart.tooltip.showValue && (t += `<div>${e.value.translations.value}: <b>${ne(
235
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
236
- l.sign === 1 ? l.value : -l.value,
237
- E({
238
- p: e.value.style.chart.tooltip.prefix,
239
- v: l.sign === 1 ? l.value : -l.value,
240
- s: e.value.style.chart.tooltip.suffix,
241
- r: e.value.style.chart.tooltip.roundingValue
242
- }),
243
- { datapoint: l, seriesIndex: a }
244
- )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (t += `<div>${e.value.translations.percentageToTotal} : <b>${E({
245
- v: Math.abs(l.value) / S.value * 100,
246
- s: "%",
247
- r: e.value.style.chart.tooltip.roundingPercentage
248
- })}</b></div>`, l.isChild && (t += `<div>${e.value.translations.percentageToSerie}: <b>${E({
249
- v: Math.abs(l.value) / Math.abs(l.parentValue) * 100,
250
- s: "%",
251
- r: e.value.style.chart.tooltip.roundingPercentage
252
- })}</b></div>`)), se.value = `<div style="text-align:left">${t}</div>`);
253
- }
254
- function Be(l, a, t, o) {
255
- if (!e.value.style.chart.layout.bars.dataLabels.value.show)
256
- return "";
257
- const _ = ne(
258
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
259
- N(o === -1 && l >= 0 ? -l : l),
260
- E({
261
- p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
262
- v: N(o === -1 && l >= 0 ? -l : l),
263
- s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
264
- r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
265
- }),
266
- { datapoint: a, seriesIndex: t }
267
- ), x = `(${Ae(l, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
268
- return `${_}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${x}` : ""}`;
269
- }
270
- const L = m(() => {
271
- const l = [
272
- e.value.translations.parentName,
273
- e.value.translations.value,
274
- e.value.translations.percentageToTotal,
275
- e.value.translations.childName,
276
- e.value.translations.value,
277
- e.value.translations.percentageToSerie,
278
- e.value.translations.percentageToTotal
279
- ], a = z.value.map((t) => t.isChild ? t.isFirstChild ? {
280
- color: t.color,
281
- parentName: t.parentName,
282
- parentValue: t.parentValue,
283
- percentageToTotal: t.parentValue / S.value,
284
- childName: t.name,
285
- childValue: t.sign === 1 ? t.value : -t.value,
286
- childPercentageToParent: Math.abs(t.value) / Math.abs(t.parentValue),
287
- childPercentageToTotal: Math.abs(t.value) / S.value
288
- } : {
289
- color: "",
290
- parentName: "",
291
- parentValue: "",
292
- percentageToTotal: "",
293
- childName: t.name,
294
- childValue: t.sign === 1 ? t.value : -t.value,
295
- childPercentageToParent: Math.abs(t.value) / Math.abs(t.parentValue),
296
- childPercentageToTotal: Math.abs(t.value) / S.value
297
- } : {
298
- color: t.color,
299
- parentName: t.name,
300
- parentValue: t.sign === 1 ? t.value : -t.value,
301
- percentageToTotal: Math.abs(t.value) / S.value,
302
- childName: "",
303
- childValue: "",
304
- childPercentageToParent: "",
305
- childPercentageToTotal: ""
306
- });
307
- return { head: l, body: a };
308
- });
309
- function Re(l = null) {
310
- const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], t = L.value.head, o = L.value.body.map((p) => [
311
- p.parentName,
312
- p.parentValue,
313
- p.percentageToTotal,
314
- p.childName,
315
- p.childValue,
316
- p.childPercentageToParent,
317
- p.childPercentageToTotal
318
- ]), _ = a.concat([t]).concat(o), x = Ft(_);
319
- l ? l(x) : Mt({ csvContent: x, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
320
- }
321
- const X = d(!1);
322
- function bt(l) {
323
- X.value = l, fe.value += 1;
324
- }
325
- function De() {
326
- $.value.showTable = !$.value.showTable;
327
- }
328
- const mt = d({
329
- none: 0,
330
- asc: 1,
331
- desc: 2
332
- }), O = d(0), ae = d(!1);
333
- We(() => {
334
- ["none", "asc", "desc"].includes(e.value.style.chart.layout.bars.sort) || Z({
335
- componentName: "VueUiVerticalBar",
336
- type: "attributeWrongValue",
337
- property: "style.chart.layout.bars.sort",
338
- key: e.value.style.chart.layout.bars.sort
339
- }), O.value = mt.value[e.value.style.chart.layout.bars.sort], $.value.sortDesc = O.value === 2, ae.value = O.value === 0;
340
- });
341
- function kt() {
342
- O.value += 1, O.value > 2 && (O.value = 0);
343
- }
344
- function Ee() {
345
- kt(), $.value.sortDesc = O.value === 2, ae.value = O.value === 0, le();
346
- }
347
- function Ue() {
348
- $.value.showTooltip = !$.value.showTooltip;
349
- }
350
- const oe = d(!1);
351
- function he() {
352
- oe.value = !oe.value;
353
- }
354
- return Je({
355
- getData: gt,
356
- recalculateHeight: le,
357
- generatePdf: Ne,
358
- generateCsv: Re,
359
- generateImage: Pe,
360
- toggleTable: De,
361
- toggleSort: Ee,
362
- toggleTooltip: Ue,
363
- toggleAnnotator: he
364
- }), (l, a) => (u(), i("div", {
365
- class: B(`vue-ui-vertical-bar ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
366
- ref_key: "verticalBarChart",
367
- ref: Y,
368
- id: `vue-ui-vertical-bar_${C.value}`,
369
- style: c(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
370
- onMouseenter: a[5] || (a[5] = () => r($e)(!0)),
371
- onMouseleave: a[6] || (a[6] = () => r($e)(!1))
372
- }, [
373
- e.value.userOptions.buttons.annotator ? (u(), R(r(tt), {
374
- key: 0,
375
- svgRef: r(xe),
376
- backgroundColor: e.value.style.chart.backgroundColor,
377
- color: e.value.style.chart.color,
378
- active: oe.value,
379
- onClose: he
380
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
381
- dt.value ? (u(), i("div", {
382
- key: 1,
383
- ref_key: "noTitle",
384
- ref: ke,
385
- class: "vue-data-ui-no-title-space",
386
- style: "height:36px; width: 100%;background:transparent"
387
- }, null, 512)) : y("", !0),
388
- e.value.style.chart.title.text ? (u(), i("div", {
389
- key: 2,
390
- ref_key: "chartTitle",
391
- ref: be,
392
- style: "width:100%;background:transparent;padding-bottom:12px"
393
- }, [
394
- (u(), R(Ht, {
395
- key: `title_${_e.value}`,
396
- config: {
397
- title: {
398
- cy: "vertical-bar-div-title",
399
- ...e.value.style.chart.title
400
- },
401
- subtitle: {
402
- cy: "vertical-bar-div-subtitle",
403
- ...e.value.style.chart.title.subtitle
404
- }
405
- }
406
- }, null, 8, ["config"]))
407
- ], 512)) : y("", !0),
408
- e.value.userOptions.show && ee.value && (r(we) || r(de)) ? (u(), R(r(ot), {
409
- ref_key: "details",
410
- ref: st,
411
- key: `user_options_${fe.value}`,
412
- backgroundColor: e.value.style.chart.backgroundColor,
413
- color: e.value.style.chart.color,
414
- isImaging: r(Le),
415
- isPrinting: r(Te),
416
- uid: C.value,
417
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
418
- hasPdf: e.value.userOptions.buttons.pdf,
419
- hasImg: e.value.userOptions.buttons.img,
420
- hasXls: e.value.userOptions.buttons.csv,
421
- hasTable: e.value.userOptions.buttons.table,
422
- hasSort: e.value.userOptions.buttons.sort,
423
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
424
- isFullscreen: X.value,
425
- isTooltip: $.value.showTooltip,
426
- titles: { ...e.value.userOptions.buttonTitles },
427
- chartElement: Y.value,
428
- position: e.value.userOptions.position,
429
- hasAnnotator: e.value.userOptions.buttons.annotator,
430
- isAnnotation: oe.value,
431
- callbacks: e.value.userOptions.callbacks,
432
- onToggleFullscreen: bt,
433
- onGeneratePdf: r(Ne),
434
- onGenerateCsv: Re,
435
- onGenerateImage: r(Pe),
436
- onToggleTable: De,
437
- onToggleSort: Ee,
438
- onToggleTooltip: Ue,
439
- onToggleAnnotator: he,
440
- style: c({
441
- visibility: r(we) ? r(de) ? "visible" : "hidden" : "visible"
442
- })
443
- }, pe({ _: 2 }, [
444
- l.$slots.menuIcon ? {
445
- name: "menuIcon",
446
- fn: k(({ isOpen: t, color: o }) => [
447
- b(l.$slots, "menuIcon", W(G({ isOpen: t, color: o })), void 0, !0)
448
- ]),
449
- key: "0"
450
- } : void 0,
451
- l.$slots.optionTooltip ? {
452
- name: "optionTooltip",
453
- fn: k(() => [
454
- b(l.$slots, "optionTooltip", {}, void 0, !0)
455
- ]),
456
- key: "1"
457
- } : void 0,
458
- l.$slots.optionPdf ? {
459
- name: "optionPdf",
460
- fn: k(() => [
461
- b(l.$slots, "optionPdf", {}, void 0, !0)
462
- ]),
463
- key: "2"
464
- } : void 0,
465
- l.$slots.optionCsv ? {
466
- name: "optionCsv",
467
- fn: k(() => [
468
- b(l.$slots, "optionCsv", {}, void 0, !0)
469
- ]),
470
- key: "3"
471
- } : void 0,
472
- l.$slots.optionImg ? {
473
- name: "optionImg",
474
- fn: k(() => [
475
- b(l.$slots, "optionImg", {}, void 0, !0)
476
- ]),
477
- key: "4"
478
- } : void 0,
479
- l.$slots.optionTable ? {
480
- name: "optionTable",
481
- fn: k(() => [
482
- b(l.$slots, "optionTable", {}, void 0, !0)
483
- ]),
484
- key: "5"
485
- } : void 0,
486
- l.$slots.optionLabels ? {
487
- name: "optionLabels",
488
- fn: k(() => [
489
- b(l.$slots, "optionLabels", {}, void 0, !0)
490
- ]),
491
- key: "6"
492
- } : void 0,
493
- l.$slots.optionSort ? {
494
- name: "optionSort",
495
- fn: k(() => [
496
- b(l.$slots, "optionSort", {}, void 0, !0)
497
- ]),
498
- key: "7"
499
- } : void 0,
500
- l.$slots.optionFullscreen ? {
501
- name: "optionFullscreen",
502
- fn: k(({ toggleFullscreen: t, isFullscreen: o }) => [
503
- b(l.$slots, "optionFullscreen", W(G({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
504
- ]),
505
- key: "8"
506
- } : void 0,
507
- l.$slots.optionAnnotator ? {
508
- name: "optionAnnotator",
509
- fn: k(({ toggleAnnotator: t, isAnnotator: o }) => [
510
- b(l.$slots, "optionAnnotator", W(G({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
511
- ]),
512
- key: "9"
513
- } : void 0
514
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
515
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (u(), i("div", {
516
- key: 4,
517
- ref_key: "chartLegend",
518
- ref: re
519
- }, [
520
- (u(), R(qe, {
521
- key: `legend_top_${ie.value}`,
522
- legendSet: F.value,
523
- config: Me.value,
524
- onClickMarker: a[0] || (a[0] = ({ legend: t }) => K(t.id))
525
- }, pe({
526
- item: k(({ legend: t, index: o }) => [
527
- n("div", {
528
- onClick: (_) => K(t.id),
529
- style: c(`opacity:${P.value.includes(t.id) ? 0.5 : 1}`)
530
- }, h(t.name) + ": " + h(r(ne)(
531
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
532
- t.value,
533
- r(E)({
534
- p: e.value.style.chart.legend.prefix,
535
- v: t.value,
536
- s: e.value.style.chart.legend.suffix,
537
- r: e.value.style.chart.legend.roundingValue
538
- }),
539
- { datapoint: t, seriesIndex: o }
540
- )), 13, jt)
541
- ]),
542
- _: 2
543
- }, [
544
- l.$slots.pattern ? {
545
- name: "legend-pattern",
546
- fn: k(({ legend: t, index: o }) => [
547
- Q(Ye, {
548
- shape: t.shape,
549
- radius: 30,
550
- stroke: "none",
551
- plot: { x: 30, y: 30 },
552
- fill: `url(#pattern_${C.value}_${o})`
553
- }, null, 8, ["shape", "fill"])
554
- ]),
555
- key: "0"
556
- } : void 0
557
- ]), 1032, ["legendSet", "config"]))
558
- ], 512)) : y("", !0),
559
- ee.value ? (u(), i("svg", {
560
- key: 5,
561
- ref_key: "svgRef",
562
- ref: xe,
563
- xmlns: r(It),
564
- class: B({ "vue-data-ui-fullscreen--on": X.value, "vue-data-ui-fulscreen--off": !X.value }),
565
- viewBox: `0 0 ${g.value.width <= 0 ? 10 : g.value.width} ${s.value.fullHeight <= 0 ? 10 : s.value.fullHeight}`,
566
- style: c(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
567
- }, [
568
- Q(r(et)),
569
- l.$slots["chart-background"] ? (u(), i("foreignObject", {
570
- key: 0,
571
- x: 0,
572
- y: 0,
573
- width: g.value.width <= 0 ? 10 : g.value.width,
574
- height: s.value.fullHeight <= 0 ? 10 : s.value.fullHeight,
575
- style: {
576
- pointerEvents: "none"
577
- }
578
- }, [
579
- b(l.$slots, "chart-background", {}, void 0, !0)
580
- ], 8, Yt)) : y("", !0),
581
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("linearGradient", {
582
- x1: "0%",
583
- y1: "0%",
584
- x2: "100%",
585
- y2: "0%",
586
- id: `vertical_bar_gradient_${C.value}_${o}`
587
- }, [
588
- n("stop", {
589
- offset: "0%",
590
- "stop-color": t.color
591
- }, null, 8, Jt),
592
- n("stop", {
593
- offset: "100%",
594
- "stop-color": r(ge)(r(Ot)(t.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
595
- }, null, 8, Qt)
596
- ], 8, Kt))), 256)),
597
- l.$slots.pattern ? (u(), i("g", Zt, [
598
- (u(!0), i(j, null, q(z.value, (t) => (u(), i("defs", null, [
599
- b(l.$slots, "pattern", xt({ ref_for: !0 }, { seriesIndex: t.absoluteIndex, patternId: `pattern_${C.value}_${t.absoluteIndex}` }), void 0, !0)
600
- ]))), 256))
601
- ])) : y("", !0),
602
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("g", null, [
603
- n("rect", {
604
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
605
- y: s.value.top + (f.value + v.value) * o,
606
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
607
- height: v.value <= 0 ? 1e-4 : v.value,
608
- fill: e.value.style.chart.layout.bars.underlayerColor,
609
- rx: e.value.style.chart.layout.bars.borderRadius,
610
- class: B({ animated: e.value.useCssAnimation })
611
- }, null, 10, el)
612
- ]))), 256)),
613
- (u(!0), i(j, null, q(z.value, (t, o) => (u(), i("g", null, [
614
- n("rect", {
615
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
616
- y: s.value.top + (f.value + v.value) * o,
617
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
618
- height: v.value <= 0 ? 1e-4 : v.value,
619
- 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),
620
- rx: e.value.style.chart.layout.bars.borderRadius,
621
- stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
622
- "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
623
- class: B({ animated: e.value.useCssAnimation })
624
- }, null, 10, tl),
625
- l.$slots.pattern ? (u(), i("rect", {
626
- key: 0,
627
- x: r(N)(A.value ? s.value.left + s.value.width / 2 - (t.sign === 1 ? 0 : w(t.value) <= 0 ? 1e-4 : w(t.value)) : s.value.left),
628
- y: s.value.top + (f.value + v.value) * o,
629
- width: r(N)(w(t.value) <= 0 ? 1e-4 : w(t.value)),
630
- height: v.value <= 0 ? 1e-4 : v.value,
631
- fill: `url(#pattern_${C.value}_${t.absoluteIndex})`,
632
- rx: e.value.style.chart.layout.bars.borderRadius,
633
- stroke: e.value.style.chart.layout.bars.useStroke ? t.color : "none",
634
- "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
635
- class: B({ animated: e.value.useCssAnimation })
636
- }, null, 10, ll)) : y("", !0),
637
- (!t.isChild || t.isLastChild) && e.value.style.chart.layout.separators.show && o !== z.value.length - 1 ? (u(), i("line", {
638
- key: 1,
639
- x1: 0,
640
- x2: s.value.left,
641
- y1: v.value + f.value / 2 + s.value.top + (f.value + v.value) * o,
642
- y2: v.value + f.value / 2 + s.value.top + (f.value + v.value) * o,
643
- stroke: e.value.style.chart.layout.separators.color,
644
- "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
645
- "stroke-linecap": "round"
646
- }, null, 8, al)) : y("", !0),
647
- A.value && e.value.style.chart.layout.separators.show ? (u(), i("line", {
648
- key: 2,
649
- x1: s.value.left + s.value.width / 2,
650
- x2: s.value.left + s.value.width / 2,
651
- y1: s.value.top,
652
- y2: s.value.bottom,
653
- stroke: e.value.style.chart.layout.separators.color,
654
- "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
655
- "stroke-linecap": "round"
656
- }, null, 8, ol)) : y("", !0),
657
- n("text", {
658
- x: A.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) : yt(t.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
659
- y: s.value.top + (f.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
660
- "text-anchor": !A.value || t.sign === -1 ? "start" : "end",
661
- "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
662
- fill: e.value.style.chart.layout.bars.dataLabels.color,
663
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
664
- }, h(Be(t.value, t, o, t.sign)), 9, nl),
665
- (t.isChild || !t.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (u(), i("text", {
666
- key: 3,
667
- "text-anchor": "end",
668
- x: s.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
669
- y: s.value.top + (f.value + v.value) * o + v.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
670
- "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
671
- fill: e.value.style.chart.layout.bars.nameLabels.color,
672
- "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
673
- }, h(t.name), 9, ul)) : y("", !0),
674
- t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), i("text", {
675
- key: 4,
676
- x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
677
- y: J(t, o).y,
678
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
679
- fill: e.value.style.chart.layout.bars.parentLabels.color,
680
- "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
681
- "text-anchor": "start"
682
- }, h(J(t, o).name), 9, sl)) : y("", !0),
683
- t.isChild && t.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), i("text", {
684
- key: 5,
685
- x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
686
- y: J(t, o).y + e.value.style.chart.layout.bars.parentLabels.fontSize + 6,
687
- "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
688
- fill: e.value.style.chart.layout.bars.parentLabels.color,
689
- "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
690
- "text-anchor": "start"
691
- }, h(Be(J(t, o).value), J(t, o), o, t.parentSign || t.sign), 9, rl)) : y("", !0),
692
- n("rect", {
693
- x: 0,
694
- y: s.value.top + (f.value + v.value) * o - f.value / 2,
695
- width: g.value.width <= 0 ? 1e-4 : g.value.width,
696
- height: v.value + f.value <= 0 ? 1e-4 : v.value + f.value,
697
- fill: ve.value === t.id ? r(ge)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity) : "transparent",
698
- onMouseenter: (_) => ft(t, o),
699
- onMouseleave: a[1] || (a[1] = (_) => {
700
- rt.value = null, ue.value = !1, ve.value = null;
701
- })
702
- }, null, 40, il)
703
- ]))), 256)),
704
- b(l.$slots, "svg", { svg: g.value }, void 0, !0)
705
- ], 14, qt)) : y("", !0),
706
- l.$slots.watermark ? (u(), i("div", dl, [
707
- b(l.$slots, "watermark", W(G({ isPrinting: r(Te) || r(Le) })), void 0, !0)
708
- ])) : y("", !0),
709
- ee.value ? y("", !0) : (u(), R(r(lt), {
710
- key: 7,
711
- config: {
712
- type: "verticalBar",
713
- style: {
714
- backgroundColor: e.value.style.chart.backgroundColor,
715
- verticalBar: {
716
- axis: {
717
- color: "#CCCCCC"
718
- },
719
- color: "#CCCCCC"
720
- }
721
- }
722
- }
723
- }, null, 8, ["config"])),
724
- e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (u(), i("div", {
725
- key: 8,
726
- ref_key: "chartLegend",
727
- ref: re
728
- }, [
729
- (u(), R(qe, {
730
- key: `legend_bottom_${ie.value}`,
731
- legendSet: F.value,
732
- config: Me.value,
733
- onClickMarker: a[2] || (a[2] = ({ legend: t }) => K(t.id))
734
- }, pe({
735
- item: k(({ legend: t, index: o }) => [
736
- n("div", {
737
- onClick: (_) => K(t.id),
738
- style: c(`opacity:${P.value.includes(t.id) ? 0.5 : 1}`)
739
- }, h(t.name) + ": " + h(r(ne)(
740
- e.value.style.chart.layout.bars.dataLabels.value.formatter,
741
- t.value,
742
- r(E)({
743
- p: e.value.style.chart.legend.prefix,
744
- v: t.value,
745
- s: e.value.style.chart.legend.suffix,
746
- r: e.value.style.chart.legend.roundingValue
747
- }),
748
- { datapoint: t, seriesIndex: o }
749
- )), 13, vl)
750
- ]),
751
- _: 2
752
- }, [
753
- l.$slots.pattern ? {
754
- name: "legend-pattern",
755
- fn: k(({ legend: t, index: o }) => [
756
- Q(Ye, {
757
- shape: t.shape,
758
- radius: 30,
759
- stroke: "none",
760
- plot: { x: 30, y: 30 },
761
- fill: `url(#pattern_${C.value}_${o})`
762
- }, null, 8, ["shape", "fill"])
763
- ]),
764
- key: "0"
765
- } : void 0
766
- ]), 1032, ["legendSet", "config"]))
767
- ], 512)) : y("", !0),
768
- b(l.$slots, "legend", { legend: F.value }, void 0, !0),
769
- l.$slots.source ? (u(), i("div", {
770
- key: 9,
771
- ref_key: "source",
772
- ref: me,
773
- dir: "auto"
774
- }, [
775
- b(l.$slots, "source", {}, void 0, !0)
776
- ], 512)) : y("", !0),
777
- Q(r(at), {
778
- show: $.value.showTooltip && ue.value && P.value.length < T.dataset.length,
779
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
780
- color: e.value.style.chart.tooltip.color,
781
- borderRadius: e.value.style.chart.tooltip.borderRadius,
782
- borderColor: e.value.style.chart.tooltip.borderColor,
783
- borderWidth: e.value.style.chart.tooltip.borderWidth,
784
- fontSize: e.value.style.chart.tooltip.fontSize,
785
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
786
- position: e.value.style.chart.tooltip.position,
787
- offsetY: e.value.style.chart.tooltip.offsetY,
788
- parent: Y.value,
789
- content: se.value,
790
- isFullscreen: X.value,
791
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
792
- }, {
793
- "tooltip-before": k(() => [
794
- b(l.$slots, "tooltip-before", W(G({ ...ce.value })), void 0, !0)
795
- ]),
796
- "tooltip-after": k(() => [
797
- b(l.$slots, "tooltip-after", W(G({ ...ce.value })), void 0, !0)
798
- ]),
799
- _: 3
800
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
801
- ee.value ? (u(), R(Xt, {
802
- key: 10,
803
- hideDetails: "",
804
- config: {
805
- open: $.value.showTable,
806
- maxHeight: 1e4,
807
- body: {
808
- backgroundColor: e.value.style.chart.backgroundColor,
809
- color: e.value.style.chart.color
810
- },
811
- head: {
812
- backgroundColor: e.value.style.chart.backgroundColor,
813
- color: e.value.style.chart.color
814
- }
815
- }
816
- }, {
817
- content: k(() => [
818
- n("div", {
819
- ref_key: "tableContainer",
820
- ref: Ve,
821
- class: "vue-ui-vertical-bar-table atom-data-table"
822
- }, [
823
- n("div", cl, [
824
- n("div", {
825
- role: "button",
826
- tabindex: "0",
827
- 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};`),
828
- onClick: a[3] || (a[3] = (t) => $.value.showTable = !1),
829
- onKeypress: a[4] || (a[4] = Ct((t) => $.value.showTable = !1, ["enter"]))
830
- }, [
831
- Q(r(Ze), {
832
- name: "close",
833
- stroke: e.value.table.th.color,
834
- "stroke-width": 2
835
- }, null, 8, ["stroke"])
836
- ], 36),
837
- n("div", {
838
- style: { width: "100%", "container-type": "inline-size" },
839
- class: B({ "vue-ui-responsive": Ie.value })
840
- }, [
841
- n("table", hl, [
842
- n("caption", {
843
- style: c({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
844
- class: "vue-ui-data-table__caption"
845
- }, [
846
- Tt(h(e.value.style.chart.title.text) + " ", 1),
847
- e.value.style.chart.title.subtitle.text ? (u(), i("span", pl, h(e.value.style.chart.title.subtitle.text), 1)) : y("", !0)
848
- ], 4),
849
- n("thead", null, [
850
- n("tr", {
851
- role: "row",
852
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
853
- }, [
854
- (u(!0), i(j, null, q(L.value.head, (t) => (u(), i("th", {
855
- style: c(`outline:${e.value.table.th.outline}`)
856
- }, [
857
- n("div", yl, h(t), 1)
858
- ], 4))), 256))
859
- ], 4),
860
- n("tr", null, [
861
- n("th", {
862
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
863
- }, null, 4),
864
- n("th", {
865
- 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`)
866
- }, "∑ " + 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),
867
- n("th", {
868
- 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`)
869
- }, "100%", 4),
870
- n("th", {
871
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
872
- }, null, 4),
873
- n("th", {
874
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
875
- }, null, 4),
876
- n("th", {
877
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
878
- }, null, 4),
879
- n("th", {
880
- style: c(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
881
- }, null, 4)
882
- ])
883
- ]),
884
- n("tbody", null, [
885
- (u(!0), i(j, null, q(L.value.body, (t, o) => (u(), i("tr", {
886
- class: B({ "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 }),
887
- style: c(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
888
- }, [
889
- n("td", {
890
- class: "vue-ui-data-table__tbody__td",
891
- style: c(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
892
- "data-cell": L.value.head[0] ?? ""
893
- }, [
894
- n("div", fl, [
895
- t.color ? (u(), i("span", {
896
- key: 0,
897
- style: c(`color:${t.color};margin-right:3px`)
898
- }, "⬤", 4)) : y("", !0),
899
- n("span", null, h(t.parentName), 1)
900
- ])
901
- ], 12, gl),
902
- n("td", {
903
- class: "vue-ui-data-table__tbody__td",
904
- style: c(`outline:${e.value.table.td.outline}`),
905
- "data-cell": L.value.head[1] ?? ""
906
- }, [
907
- n("div", ml, 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)
908
- ], 12, bl),
909
- n("td", {
910
- class: "vue-ui-data-table__tbody__td",
911
- style: c(`outline:${e.value.table.td.outline}`),
912
- "data-cell": L.value.head[2] ?? ""
913
- }, [
914
- n("div", _l, h(["", NaN, void 0].includes(t.percentageToTotal) ? "" : `${(t.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
915
- ], 12, kl),
916
- n("td", {
917
- class: "vue-ui-data-table__tbody__td",
918
- style: c(`outline:${e.value.table.td.outline}`),
919
- "data-cell": L.value.head[3] ?? ""
920
- }, [
921
- n("div", wl, h(t.childName), 1)
922
- ], 12, $l),
923
- n("td", {
924
- class: "vue-ui-data-table__tbody__td",
925
- style: c(`outline:${e.value.table.td.outline}`),
926
- "data-cell": L.value.head[4] ?? ""
927
- }, [
928
- n("div", Cl, 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)
929
- ], 12, xl),
930
- n("td", {
931
- class: "vue-ui-data-table__tbody__td",
932
- style: c(`outline:${e.value.table.td.outline}`),
933
- "data-cell": L.value.head[5] ?? ""
934
- }, [
935
- n("div", Ll, h(["", NaN, void 0].includes(t.childPercentageToParent) ? "" : `${(t.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
936
- ], 12, Tl),
937
- n("td", {
938
- class: "vue-ui-data-table__tbody__td",
939
- style: c(`outline:${e.value.table.td.outline}`),
940
- "data-cell": L.value.head[6] ?? ""
941
- }, [
942
- n("div", Pl, h(["", NaN, void 0].includes(t.childPercentageToTotal) ? "" : `${(t.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
943
- ], 12, Nl)
944
- ], 6))), 256))
945
- ])
946
- ])
947
- ], 2)
948
- ])
949
- ], 512)
950
- ]),
951
- _: 1
952
- }, 8, ["config"])) : y("", !0)
953
- ], 46, Gt));
954
- }
955
- }, Xl = /* @__PURE__ */ Wt(Sl, [["__scopeId", "data-v-56a29a80"]]);
956
- export {
957
- Xl as default
958
- };