vue-data-ui 3.0.0-next.7 → 3.0.0-next.70

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 (136) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
  11. package/dist/Slicer-D8a4Wv1q.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
  19. package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +600 -22
  22. package/dist/types/vue-data-ui.d.ts +600 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-DtUATNAU.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
  37. package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
  38. package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
  41. package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
  48. package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
  49. package/dist/vue-ui-flow-B1AOqk14.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
  51. package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
  52. package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
  53. package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
  54. package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
  55. package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
  59. package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
  60. package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
  61. package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
  65. package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
  67. package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
  68. package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
  69. package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
  70. package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
  73. package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
  74. package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
  75. package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
  77. package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
  79. package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
  80. package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
  81. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
  82. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
  84. package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
  86. package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
  87. package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
  89. package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
  90. package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
  91. package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
  93. package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  109. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  110. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  111. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  112. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  113. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  114. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  115. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  116. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  117. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  118. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  119. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  120. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  121. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  122. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  123. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  124. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  125. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  126. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  127. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  128. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  129. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  130. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  131. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  132. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  133. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  134. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  135. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  136. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,965 +0,0 @@
1
- import { defineAsyncComponent as J, useSlots as Ot, onMounted as st, computed as b, ref as $, shallowRef as B, watch as _t, onBeforeUnmount as St, createElementBlock as y, openBlock as h, unref as d, normalizeStyle as L, normalizeClass as $e, createBlock as Q, createCommentVNode as _, createElementVNode as S, createVNode as xe, createSlots as It, withCtx as O, renderSlot as w, normalizeProps as ee, guardReactiveProps as te, Fragment as ge, renderList as Te, withKeys as ut, withModifiers as Oe, mergeProps as rt, createTextVNode as _e, toDisplayString as X, nextTick as Ft } from "vue";
2
- import { u as Nt, c as Se, t as Pt, p as I, a as zt, b as At, o as Rt, e as Vt, d as ye, i as me, f as ie, X as Lt, l as it, F as ct, x as dt, q as Mt, r as Dt, y as Bt } from "./index-Cg-RjxqH.js";
3
- import { t as Ht, u as Ut } from "./useResponsive-DfdjqQps.js";
4
- import { u as vt } from "./useNestedProp-C_G5E08Y.js";
5
- import { u as Et } from "./usePrinter-BUzmyQf9.js";
6
- import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as qt } from "./useChartAccessibility-9icAAmYg.js";
8
- import Gt from "./BaseIcon-BCZfTCeM.js";
9
- import Xt from "./Title-B7Xb3YuE.js";
10
- import jt from "./Legend-B2hrDh4G.js";
11
- import Yt from "./img-D72yZNUg.js";
12
- import { _ as Kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- function ht(n, r) {
14
- const s = n.length;
15
- if (s === 0)
16
- throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
17
- {
18
- let i = 1 / 0, u = -1 / 0, v = 0;
19
- for (let g = 0; g < s; g += 1) {
20
- const p = n[g].normalizedValue;
21
- p < i && (i = p), p > u && (u = p), v += p;
22
- }
23
- return Math.max(
24
- r ** 2 * u / v ** 2,
25
- v ** 2 / (r ** 2 * i)
26
- );
27
- }
28
- }
29
- function pt(n) {
30
- const { xOffset: r, yOffset: s, width: i, height: u } = n;
31
- return {
32
- x0: r,
33
- y0: s,
34
- x1: r + i,
35
- y1: s + u
36
- };
37
- }
38
- function Zt(n, r, s) {
39
- if (n.length === 0)
40
- return !0;
41
- {
42
- const i = n.concat(r), u = ht(
43
- n,
44
- s
45
- ), v = ht(i, s);
46
- return u >= v;
47
- }
48
- }
49
- function Jt(n) {
50
- const r = [], s = n.length;
51
- for (let i = 0; i < s; i += 1) {
52
- const u = n[i], v = u.length;
53
- for (let c = 0; c < v; c += 1)
54
- r.push(u[c]);
55
- }
56
- return r;
57
- }
58
- function Qt(n, r) {
59
- const s = {
60
- ...r,
61
- children: n
62
- };
63
- return gt(s);
64
- }
65
- function el(n) {
66
- return (n.x1 - n.x0) * (n.y1 - n.y0);
67
- }
68
- function ft(n, r) {
69
- const { width: s, height: i, xOffset: u, yOffset: v } = Ie(r), c = n.length, g = n.map((m) => m.normalizedValue || 0).reduce((m, x) => m + x, 0), p = g / i, H = g / s;
70
- let P = u, k = v;
71
- const C = [];
72
- if (s >= i) {
73
- for (let m = 0; m < c; m += 1) {
74
- const x = n[m], M = k + x.normalizedValue / p, z = {
75
- x0: P,
76
- y0: k,
77
- x1: P + p,
78
- y1: M
79
- }, N = Object.assign({}, x, z);
80
- k = M, C.push(N);
81
- }
82
- return C;
83
- } else {
84
- for (let m = 0; m < c; m += 1) {
85
- const x = n[m], M = P + x.normalizedValue / H, z = {
86
- x0: P,
87
- y0: k,
88
- x1: M,
89
- y1: k + H
90
- }, N = Object.assign({}, x, z);
91
- P = M, C.push(N);
92
- }
93
- return C;
94
- }
95
- }
96
- function tl(n) {
97
- const r = Ie(n), s = r.width, i = r.height;
98
- return Math.min(s, i);
99
- }
100
- function ll(n, r) {
101
- const s = n.length, i = n.map((p) => p.value ?? 0).reduce((p, H) => p + H, 0), u = r / i, v = [];
102
- let c, g;
103
- for (let p = 0; p < s; p += 1)
104
- g = n[p], c = Object.assign({}, g, {
105
- normalizedValue: g.value * (u || 0)
106
- }), v.push(c);
107
- return v;
108
- }
109
- function Ie(n) {
110
- const { x0: r, y0: s, x1: i, y1: u } = n;
111
- return {
112
- xOffset: r,
113
- yOffset: s,
114
- width: i - r,
115
- height: u - s
116
- };
117
- }
118
- function ol(n, r, s, i) {
119
- let u = n, v = r, c = s, g = i;
120
- for (; ; ) {
121
- const p = u.length;
122
- if (p === 0) {
123
- const C = ft(v, c);
124
- return g.concat(C);
125
- }
126
- const H = tl(c), P = u[0], k = u.slice(1, p);
127
- if (Zt(v, P, H)) {
128
- const C = v.concat(P);
129
- u = k, v = C, c = c, g = g;
130
- } else {
131
- const C = v.length;
132
- let m = 0;
133
- for (let N = 0; N < C; N += 1)
134
- m += v[N].normalizedValue;
135
- const x = al(c, m), M = ft(v, c), z = g.concat(M);
136
- u = u, v = [], c = x, g = z;
137
- }
138
- }
139
- }
140
- function gt(n) {
141
- if (typeof n.children > "u" || !n.children.length)
142
- return [n];
143
- {
144
- const r = ll(
145
- n.children,
146
- el(n)
147
- ), s = ol(r, [], n, []), i = s.length, u = [];
148
- for (let c = 0; c < i; c += 1)
149
- u.push(gt(s[c]));
150
- return Jt(u);
151
- }
152
- }
153
- function al(n, r) {
154
- const { width: s, height: i, xOffset: u, yOffset: v } = Ie(n);
155
- if (s >= i) {
156
- const c = r / i, g = s - c, p = {
157
- xOffset: u + c,
158
- yOffset: v,
159
- width: g,
160
- height: i
161
- };
162
- return pt(p);
163
- } else {
164
- const c = r / s, g = i - c, p = {
165
- xOffset: u,
166
- yOffset: v + c,
167
- width: s,
168
- height: g
169
- };
170
- return pt(p);
171
- }
172
- }
173
- const nl = ["id"], sl = {
174
- key: 4,
175
- class: "vue-ui-treemap-breadcrumbs",
176
- "data-dom-to-png-ignore": ""
177
- }, ul = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], rl = { class: "vue-ui-treemap-crumb-unit" }, il = { class: "vue-ui-treemap-crumb-unit-label" }, cl = {
178
- key: 0,
179
- style: { width: "24px", display: "flex", "align-items": "center" }
180
- }, dl = {
181
- key: 0,
182
- class: "vue-ui-treemap-crumb-unit-arrow"
183
- }, vl = ["xmlns", "viewBox"], hl = { key: 0 }, pl = ["id"], fl = ["stop-color"], gl = ["stop-color"], yl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], ml = ["x", "y", "height", "width"], bl = {
184
- style: { width: "100%", height: "100%" },
185
- class: "vue-ui-treemap-cell"
186
- }, wl = {
187
- key: 6,
188
- class: "vue-data-ui-watermark"
189
- }, kl = ["onClick"], Cl = ["innerHTML"], $l = {
190
- __name: "vue-ui-treemap",
191
- props: {
192
- config: {
193
- type: Object,
194
- default() {
195
- return {};
196
- }
197
- },
198
- dataset: {
199
- type: Array,
200
- default() {
201
- return [];
202
- }
203
- }
204
- },
205
- emits: ["selectLegend", "selectDatapoint"],
206
- setup(n, { expose: r, emit: s }) {
207
- const i = J(() => import("./DataTable-mQ6Wd-rR.js")), u = J(() => import("./PenAndPaper-DhSxfUrQ.js")), v = J(() => import("./vue-ui-accordion-CRomxzaL.js")), c = J(() => import("./vue-ui-skeleton-CUOhCY4p.js")), g = J(() => import("./Tooltip-BidRoM5E.js")), p = J(() => import("./UserOptions-0tvMM8PF.js")), H = J(() => import("./PackageVersion-CeEYZfaH.js")), { vue_ui_treemap: P } = Nt(), k = n, C = s, m = Ot();
208
- st(() => {
209
- m["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
210
- });
211
- const x = b(() => !!k.dataset && k.dataset.length), M = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), z = $(Se()), N = $(!1), be = $(""), le = $(!1), Fe = $(0), A = $([]), U = B(null), Ne = B(null), Pe = B(null), ze = B(null), Ae = B(null), Re = $(0), Ve = $(0), Le = $(0), e = b({
212
- get: () => He(),
213
- set: (t) => t
214
- }), { userOptionsVisible: we, setUserOptionsVisibility: Me, keepUserOptionState: De } = Wt({ config: e.value }), { svgRef: Be } = qt({ config: e.value.style.chart.title });
215
- function He() {
216
- const t = vt({
217
- userConfig: k.config,
218
- defaultConfig: P
219
- });
220
- return t.theme ? {
221
- ...vt({
222
- userConfig: zt.vue_ui_treemap[t.theme] || k.config,
223
- defaultConfig: t
224
- }),
225
- customPalette: Pt[t.theme] || I
226
- } : t;
227
- }
228
- _t(() => k.config, (t) => {
229
- e.value = He(), we.value = !e.value.userOptions.showOnChartHover, Re.value += 1, Ve.value += 1, Le.value += 1, R.value.showTable = e.value.table.show, R.value.showTooltip = e.value.style.chart.tooltip.show;
230
- }, { deep: !0 });
231
- const { isPrinting: Ue, isImaging: Ee, generatePdf: We, generateImage: qe } = Et({
232
- elementId: `treemap_${z.value}`,
233
- fileName: e.value.style.chart.title.text || "vue-ui-treemap",
234
- options: e.value.userOptions.print
235
- }), yt = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), ce = b(() => At(e.value.customPalette)), R = $({
236
- showTable: e.value.table.show,
237
- showTooltip: e.value.style.chart.tooltip.show
238
- }), E = $({
239
- height: e.value.style.chart.height,
240
- width: e.value.style.chart.width
241
- }), j = b(() => ({
242
- bottom: E.value.height - e.value.style.chart.padding.bottom,
243
- height: E.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
244
- left: e.value.style.chart.padding.left,
245
- right: E.value.width - e.value.style.chart.padding.right,
246
- top: e.value.style.chart.padding.top,
247
- vbHeight: E.value.height,
248
- vbWidth: E.value.width,
249
- width: E.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
250
- }));
251
- function Ge(t) {
252
- t.forEach((o, l) => {
253
- o.id = Se(), o.color = ye(o.color) || ce.value[l] || I[l] || I[l % I.length], o.children && (o.children.forEach((a) => {
254
- a.parentId = o.id, a.color = o.color;
255
- }), Ge(o.children));
256
- });
257
- }
258
- const W = B(k.dataset), q = B(null), oe = B(null);
259
- st(() => {
260
- mt();
261
- });
262
- function mt() {
263
- if (Rt(k.dataset) && Vt({
264
- componentName: "VueUiTreemap",
265
- type: "dataset"
266
- }), Ge(W.value), e.value.responsive) {
267
- const t = Ht(() => {
268
- const { width: o, height: l } = Ut({
269
- chart: U.value,
270
- title: e.value.style.chart.title.text ? Ne.value : null,
271
- legend: e.value.style.chart.legend.show ? Pe.value : null,
272
- source: ze.value,
273
- noTitle: Ae.value
274
- });
275
- requestAnimationFrame(() => {
276
- E.value.width = o, E.value.height = l;
277
- });
278
- });
279
- q.value && (oe.value && q.value.unobserve(oe.value), q.value.disconnect()), q.value = new ResizeObserver(t), oe.value = U.value.parentNode, q.value.observe(oe.value);
280
- }
281
- }
282
- St(() => {
283
- q.value && (oe.value && q.value.unobserve(oe.value), q.value.disconnect());
284
- });
285
- const ae = $(W.value), ue = b(() => ae.value.map((t, o) => ({
286
- ...t,
287
- color: ye(t.color) || ce.value[o] || I[o] || I[o % I.length]
288
- })).filter((t) => !A.value.includes(t.id))), ne = b(() => W.value.filter((t) => !A.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), Xe = b({
289
- get() {
290
- let t = [...ue.value];
291
- return e.value.style.chart.layout.sorted && (t = [...ue.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
292
- ...o
293
- }));
294
- },
295
- set(t) {
296
- return t;
297
- }
298
- });
299
- function je(t, o) {
300
- return t.value / o;
301
- }
302
- function bt(t, o, l) {
303
- const a = e.value.style.chart.layout.rects.colorRatio - je(o, l);
304
- return it(t, a < 0 ? 0 : a);
305
- }
306
- function Ye(t, o, l, a) {
307
- return t.map((f, T) => {
308
- const fe = bt(ye(o) || ce.value[T] || I[T] || I[T % I.length], f, a), Tt = je(f, a);
309
- return {
310
- ...f,
311
- color: fe,
312
- proportion: Tt,
313
- parentName: l,
314
- children: f.children ? Ye(f.children, fe, f.name, a) : void 0
315
- };
316
- });
317
- }
318
- const re = b(() => Qt(
319
- Xe.value.map((t, o) => {
320
- const l = t.children ? t.children.reduce((a, f) => a + f.value, 0) : t.value;
321
- return {
322
- value: t.value,
323
- id: t.id || Se(),
324
- children: t.children ? Ye(t.children.sort((a, f) => f.value - a.value), t.color, t.name, l) : void 0,
325
- color: t.color,
326
- name: t.name
327
- };
328
- }),
329
- { x0: j.value.left * 2, y0: j.value.top, x1: j.value.width, y1: j.value.height }
330
- ));
331
- function Ke({ y0: t, y1: o }) {
332
- return o - t <= 0 ? 1e-4 : o - t;
333
- }
334
- function Ze({ x0: t, x1: o }) {
335
- return o - t <= 0 ? 1e-4 : o - t;
336
- }
337
- function Y(t) {
338
- const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
339
- return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
340
- }
341
- function Je(t) {
342
- le.value = t, Fe.value += 1;
343
- }
344
- const se = b(() => ({
345
- startX: 0,
346
- startY: 0,
347
- width: j.value.vbWidth,
348
- height: j.value.vbHeight
349
- }));
350
- function K(t, o = W.value) {
351
- for (const l of o) {
352
- if (l.id === t)
353
- return l;
354
- if (l.children) {
355
- const a = K(t, l.children);
356
- if (a)
357
- return a;
358
- }
359
- }
360
- return null;
361
- }
362
- const F = $([]), Z = b(() => F.value.length > 0);
363
- function de(t) {
364
- if (!t) {
365
- ae.value = W.value.slice(), C("selectDatapoint", void 0), F.value = [];
366
- return;
367
- }
368
- const o = K(t.id);
369
- if (o && o.children?.length)
370
- F.value.push(o.id), ae.value = o.children.slice(), C("selectDatapoint", t);
371
- else if (t.parentId) {
372
- F.value.push(t.parentId);
373
- const l = K(t.parentId);
374
- ae.value = l.children.slice(), C("selectDatapoint", t);
375
- } else if (F.value.length > 0) {
376
- F.value.pop();
377
- const l = F.value[F.value.length - 1];
378
- if (l) {
379
- const a = K(l);
380
- ae.value = a.children.slice();
381
- } else
382
- ae.value = W.value.slice(), F.value = [], C("selectDatapoint", void 0);
383
- }
384
- }
385
- function wt(t) {
386
- return !!(K(t.id)?.children?.length || t.parentId);
387
- }
388
- const G = b(() => {
389
- const t = [
390
- { id: null, label: "All" }
391
- ];
392
- if (F.value.length > 0) {
393
- let o = K(F.value[F.value.length - 1]);
394
- const l = [];
395
- for (; o; )
396
- l.unshift(o), o = o.parentId ? K(o.parentId) : null;
397
- for (const a of l)
398
- t.push({
399
- id: a.id,
400
- label: a.name,
401
- node: a
402
- });
403
- }
404
- return t;
405
- }), V = B(null), Qe = b(() => W.value.map((t, o) => ({
406
- ...t,
407
- color: ye(t.color) || ce.value[o] || I[o] || I[o % I.length],
408
- shape: "square"
409
- })).sort((t, o) => o.value - t.value).map((t, o) => ({
410
- ...t,
411
- proportion: t.value / W.value.map((l) => l.value).reduce((l, a) => l + a, 0),
412
- opacity: A.value.includes(t.id) ? 0.5 : 1
413
- }))), kt = b(() => ({
414
- cy: "treemap-div-legend",
415
- backgroundColor: e.value.style.chart.legend.backgroundColor,
416
- color: e.value.style.chart.legend.color,
417
- fontSize: e.value.style.chart.legend.fontSize,
418
- paddingBottom: 12,
419
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
420
- }));
421
- function et(t) {
422
- V.value = null, A.value.includes(t.id) ? A.value = A.value.filter((o) => o !== t.id) : A.value.length < k.dataset.length - 1 && A.value.push(t.id), C("selectLegend", Xe.value);
423
- }
424
- const ke = $(null);
425
- function Ct({ datapoint: t, seriesIndex: o }) {
426
- V.value = t, ke.value = { datapoint: t, seriesIndex: o, config: e.value, series: ue.value };
427
- const l = e.value.style.chart.tooltip.customFormat;
428
- if (dt(l) && Bt(() => l({
429
- seriesIndex: o,
430
- datapoint: t,
431
- series: ue.value,
432
- config: e.value
433
- })))
434
- be.value = l({
435
- seriesIndex: o,
436
- datapoint: t,
437
- series: ue.value,
438
- config: e.value
439
- });
440
- else {
441
- let a = "";
442
- a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${t.color}"/></svg>`, a += `<b>${me(
443
- e.value.style.chart.layout.labels.formatter,
444
- t.value,
445
- ie({
446
- p: e.value.style.chart.layout.labels.prefix,
447
- v: t.value,
448
- s: e.value.style.chart.layout.labels.suffix,
449
- r: e.value.style.chart.tooltip.roundingValue
450
- }),
451
- { datapoint: t, seriesIndex: o }
452
- )}</b>`, be.value = `<div>${a}</div>`;
453
- }
454
- N.value = !0;
455
- }
456
- const D = b(() => {
457
- const t = re.value.map((l) => ({
458
- name: l.name,
459
- color: l.color
460
- })), o = re.value.map((l) => l.value);
461
- return { head: t, body: o };
462
- });
463
- function tt(t = null) {
464
- Ft(() => {
465
- const o = D.value.head.map((f, T) => [[
466
- f.name
467
- ], [D.value.body[T]], [isNaN(D.value.body[T] / ne.value) ? "-" : D.value.body[T] / ne.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = Mt(l);
468
- t ? t(a) : Dt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
469
- });
470
- }
471
- const ve = b(() => {
472
- const t = [
473
- e.value.table.columnNames.series,
474
- e.value.table.columnNames.value,
475
- e.value.table.columnNames.percentage
476
- ], o = D.value.head.map((f, T) => {
477
- const fe = me(
478
- e.value.style.chart.layout.labels.formatter,
479
- D.value.body[T],
480
- ie({
481
- p: e.value.style.chart.layout.labels.prefix,
482
- v: D.value.body[T],
483
- s: e.value.style.chart.layout.labels.suffix,
484
- r: e.value.table.td.roundingValue
485
- })
486
- );
487
- return [
488
- {
489
- color: f.color,
490
- name: f.name,
491
- shape: "square"
492
- },
493
- fe,
494
- isNaN(D.value.body[T] / ne.value) ? "-" : ie({
495
- v: D.value.body[T] / ne.value * 100,
496
- s: "%",
497
- r: e.value.table.td.roundingPercentage
498
- })
499
- ];
500
- }), l = {
501
- th: {
502
- backgroundColor: e.value.table.th.backgroundColor,
503
- color: e.value.table.th.color,
504
- outline: e.value.table.th.outline
505
- },
506
- td: {
507
- backgroundColor: e.value.table.td.backgroundColor,
508
- color: e.value.table.td.color,
509
- outline: e.value.table.td.outline
510
- },
511
- breakpoint: e.value.table.responsiveBreakpoint
512
- };
513
- return {
514
- colNames: [
515
- e.value.table.columnNames.series,
516
- e.value.table.columnNames.value
517
- ],
518
- head: t,
519
- body: o,
520
- config: l
521
- };
522
- });
523
- function $t() {
524
- return re.value;
525
- }
526
- function lt() {
527
- R.value.showTable = !R.value.showTable;
528
- }
529
- function ot() {
530
- R.value.showTooltip = !R.value.showTooltip;
531
- }
532
- const he = $(!1);
533
- function Ce() {
534
- he.value = !he.value;
535
- }
536
- const pe = $(null);
537
- function at(t) {
538
- pe.value = t;
539
- }
540
- function nt() {
541
- pe.value = null;
542
- }
543
- async function xt({ scale: t = 2 } = {}) {
544
- if (!U.value) return;
545
- const { width: o, height: l } = U.value.getBoundingClientRect(), a = o / l, { imageUri: f, base64: T } = await Yt({ domElement: U.value, base64: !0, img: !0, scale: t });
546
- return {
547
- imageUri: f,
548
- base64: T,
549
- title: e.value.style.chart.title.text,
550
- width: o,
551
- height: l,
552
- aspectRatio: a
553
- };
554
- }
555
- return r({
556
- getData: $t,
557
- getImage: xt,
558
- generateCsv: tt,
559
- generateImage: qe,
560
- generatePdf: We,
561
- toggleTable: lt,
562
- toggleTooltip: ot,
563
- toggleAnnotator: Ce,
564
- toggleFullscreen: Je
565
- }), (t, o) => (h(), y("div", {
566
- ref_key: "treemapChart",
567
- ref: U,
568
- class: $e(`vue-ui-treemap ${le.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
569
- style: L(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
570
- id: `treemap_${z.value}`,
571
- onMouseenter: o[3] || (o[3] = () => d(Me)(!0)),
572
- onMouseleave: o[4] || (o[4] = () => d(Me)(!1))
573
- }, [
574
- e.value.userOptions.buttons.annotator ? (h(), Q(d(u), {
575
- key: 0,
576
- svgRef: d(Be),
577
- backgroundColor: e.value.style.chart.backgroundColor,
578
- color: e.value.style.chart.color,
579
- active: he.value,
580
- onClose: Ce
581
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
582
- yt.value ? (h(), y("div", {
583
- key: 1,
584
- ref_key: "noTitle",
585
- ref: Ae,
586
- class: "vue-data-ui-no-title-space",
587
- style: "height:36px; width: 100%;background:transparent"
588
- }, null, 512)) : _("", !0),
589
- e.value.style.chart.title.text ? (h(), y("div", {
590
- key: 2,
591
- ref_key: "chartTitle",
592
- ref: Ne,
593
- style: L(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
594
- }, [
595
- (h(), Q(Xt, {
596
- key: `title_${Re.value}`,
597
- config: {
598
- title: {
599
- cy: "treemap-div-title",
600
- ...e.value.style.chart.title
601
- },
602
- subtitle: {
603
- cy: "treemap-div-subtitle",
604
- ...e.value.style.chart.title.subtitle
605
- }
606
- }
607
- }, null, 8, ["config"]))
608
- ], 4)) : _("", !0),
609
- e.value.userOptions.show && x.value && (d(De) || d(we)) ? (h(), Q(d(p), {
610
- ref: "details",
611
- key: `user_option_${Fe.value}`,
612
- backgroundColor: e.value.style.chart.backgroundColor,
613
- color: e.value.style.chart.color,
614
- isPrinting: d(Ue),
615
- isImaging: d(Ee),
616
- uid: z.value,
617
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
618
- hasPdf: e.value.userOptions.buttons.pdf,
619
- hasXls: e.value.userOptions.buttons.csv,
620
- hasImg: e.value.userOptions.buttons.img,
621
- hasTable: e.value.userOptions.buttons.table,
622
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
623
- isFullscreen: le.value,
624
- isTooltip: R.value.showTooltip,
625
- titles: { ...e.value.userOptions.buttonTitles },
626
- chartElement: U.value,
627
- position: e.value.userOptions.position,
628
- hasAnnotator: e.value.userOptions.buttons.annotator,
629
- isAnnotation: he.value,
630
- callbacks: e.value.userOptions.callbacks,
631
- printScale: e.value.userOptions.print.scale,
632
- onToggleFullscreen: Je,
633
- onGeneratePdf: d(We),
634
- onGenerateCsv: tt,
635
- onGenerateImage: d(qe),
636
- onToggleTable: lt,
637
- onToggleTooltip: ot,
638
- onToggleAnnotator: Ce,
639
- style: L({
640
- visibility: d(De) ? d(we) ? "visible" : "hidden" : "visible"
641
- })
642
- }, It({ _: 2 }, [
643
- t.$slots.menuIcon ? {
644
- name: "menuIcon",
645
- fn: O(({ isOpen: l, color: a }) => [
646
- w(t.$slots, "menuIcon", ee(te({ isOpen: l, color: a })), void 0, !0)
647
- ]),
648
- key: "0"
649
- } : void 0,
650
- t.$slots.optionTooltip ? {
651
- name: "optionTooltip",
652
- fn: O(() => [
653
- w(t.$slots, "optionTooltip", {}, void 0, !0)
654
- ]),
655
- key: "1"
656
- } : void 0,
657
- t.$slots.optionPdf ? {
658
- name: "optionPdf",
659
- fn: O(() => [
660
- w(t.$slots, "optionPdf", {}, void 0, !0)
661
- ]),
662
- key: "2"
663
- } : void 0,
664
- t.$slots.optionCsv ? {
665
- name: "optionCsv",
666
- fn: O(() => [
667
- w(t.$slots, "optionCsv", {}, void 0, !0)
668
- ]),
669
- key: "3"
670
- } : void 0,
671
- t.$slots.optionImg ? {
672
- name: "optionImg",
673
- fn: O(() => [
674
- w(t.$slots, "optionImg", {}, void 0, !0)
675
- ]),
676
- key: "4"
677
- } : void 0,
678
- t.$slots.optionTable ? {
679
- name: "optionTable",
680
- fn: O(() => [
681
- w(t.$slots, "optionTable", {}, void 0, !0)
682
- ]),
683
- key: "5"
684
- } : void 0,
685
- t.$slots.optionFullscreen ? {
686
- name: "optionFullscreen",
687
- fn: O(({ toggleFullscreen: l, isFullscreen: a }) => [
688
- w(t.$slots, "optionFullscreen", ee(te({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
689
- ]),
690
- key: "6"
691
- } : void 0,
692
- t.$slots.optionAnnotator ? {
693
- name: "optionAnnotator",
694
- fn: O(({ toggleAnnotator: l, isAnnotator: a }) => [
695
- w(t.$slots, "optionAnnotator", ee(te({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
696
- ]),
697
- key: "7"
698
- } : void 0
699
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : _("", !0),
700
- G.value.length > 1 ? (h(), y("nav", sl, [
701
- (h(!0), y(ge, null, Te(G.value, (l, a) => (h(), y("span", {
702
- role: "button",
703
- tabindex: a < G.value.length - 1 ? 0 : void 0,
704
- key: l.id || "root",
705
- onClick: (f) => a === G.value.length - 1 ? () => {
706
- } : de(l.node),
707
- onKeydown: [
708
- ut(Oe((f) => a === G.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["enter"]),
709
- ut(Oe((f) => a === G.value.length - 1 ? void 0 : de(l.node), ["prevent"]), ["space"])
710
- ],
711
- class: "vue-ui-treemap-crumb",
712
- "data-last-crumb": a === G.value.length - 1,
713
- style: L({
714
- color: e.value.style.chart.color
715
- }),
716
- onMouseenter: (f) => at(a),
717
- onMouseleave: nt,
718
- onFocus: (f) => at(a),
719
- onBlur: nt
720
- }, [
721
- S("span", rl, [
722
- S("span", il, [
723
- w(t.$slots, "breadcrumb-label", rt({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: pe.value === a }), () => [
724
- a === 0 ? (h(), y("div", cl, [
725
- xe(Gt, {
726
- name: pe.value === 0 ? "homeFilled" : "home",
727
- stroke: e.value.style.chart.color
728
- }, null, 8, ["name", "stroke"])
729
- ])) : (h(), y(ge, { key: 1 }, [
730
- _e(X(l.label), 1)
731
- ], 64))
732
- ], !0)
733
- ]),
734
- a < G.value.length - 1 ? (h(), y("span", dl, [
735
- w(t.$slots, "breadcrumb-arrow", {}, () => [
736
- o[5] || (o[5] = _e(" › "))
737
- ], !0)
738
- ])) : _("", !0)
739
- ])
740
- ], 44, ul))), 128))
741
- ])) : _("", !0),
742
- x.value ? (h(), y("svg", {
743
- key: 5,
744
- ref_key: "svgRef",
745
- ref: Be,
746
- xmlns: d(Lt),
747
- class: $e({ "vue-data-ui-fullscreen--on": le.value, "vue-data-ui-fulscreen--off": !le.value, "vue-data-ui-zoom-plus": !Z.value, "vue-data-ui-zoom-minus": Z.value }),
748
- viewBox: `${se.value.startX} ${se.value.startY} ${se.value.width <= 0 ? 10 : se.value.width} ${se.value.height <= 0 ? 10 : se.value.height}`,
749
- style: L(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
750
- }, [
751
- xe(d(H)),
752
- (h(!0), y(ge, null, Te(re.value, (l, a) => (h(), y("g", {
753
- key: `tgrad_${l.id}`
754
- }, [
755
- e.value.style.chart.layout.rects.gradient.show ? (h(), y("defs", hl, [
756
- S("radialGradient", {
757
- id: `tgrad_${l.id}`,
758
- gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
759
- }, [
760
- S("stop", {
761
- offset: "18%",
762
- "stop-color": l.color
763
- }, null, 8, fl),
764
- S("stop", {
765
- offset: "100%",
766
- "stop-color": d(it)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
767
- }, null, 8, gl)
768
- ], 8, pl)
769
- ])) : _("", !0)
770
- ]))), 128)),
771
- (h(!0), y(ge, null, Te(re.value, (l, a) => (h(), y("g", {
772
- key: `k_${l.id}`
773
- }, [
774
- S("rect", {
775
- x: l.x0,
776
- y: l.y0,
777
- height: Ke(l),
778
- width: Ze(l),
779
- fill: M.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
780
- rx: e.value.style.chart.layout.rects.borderRadius,
781
- stroke: V.value && V.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
782
- "stroke-width": V.value && V.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
783
- onClick: Oe((f) => de(l), ["stop"]),
784
- onMouseenter: () => Ct({
785
- datapoint: l,
786
- seriesIndex: a
787
- }),
788
- onMouseleave: o[0] || (o[0] = (f) => {
789
- V.value = null, N.value = !1;
790
- }),
791
- style: L(`opacity:${V.value ? V.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
792
- class: $e([
793
- "vue-ui-treemap-rect",
794
- wt(l) ? "vue-data-ui-zoom-plus" : Z.value ? "vue-data-ui-zoom-minus" : ""
795
- ])
796
- }, null, 46, yl),
797
- (h(), y("foreignObject", {
798
- x: l.x0,
799
- y: l.y0,
800
- height: Ke(l),
801
- width: Ze(l),
802
- class: "vue-ui-treemap-cell-foreignObject"
803
- }, [
804
- S("div", bl, [
805
- e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Z.value) ? (h(), y("div", {
806
- key: 0,
807
- class: "vue-ui-treemap-cell-default",
808
- style: L(`width:calc(100% - ${Y(l) / 1.5}px);text-align:left;line-height:${Y(l) < 14 ? 14 : Y(l)}px;padding:${Y(l) / 3}px; color:${d(ct)(l.color)}`)
809
- }, [
810
- S("span", {
811
- style: L(`width:100%;font-size:${Y(l)}px;`)
812
- }, X(l.name), 5),
813
- o[6] || (o[6] = S("br", null, null, -1)),
814
- S("span", {
815
- style: L(`width:100%;font-size:${Y(l)}px;`)
816
- }, X(d(me)(
817
- e.value.style.chart.layout.labels.formatter,
818
- l.value,
819
- d(ie)({
820
- p: e.value.style.chart.layout.labels.prefix,
821
- v: l.value,
822
- s: e.value.style.chart.layout.labels.suffix,
823
- r: e.value.style.chart.layout.labels.rounding
824
- }),
825
- { datapoint: l }
826
- )), 5)
827
- ], 4)) : _("", !0),
828
- w(t.$slots, "rect", rt({ ref_for: !0 }, {
829
- rect: l,
830
- shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Z.value,
831
- fontSize: Y(l),
832
- isZoom: Z.value,
833
- textColor: d(ct)(l.color)
834
- }), void 0, !0)
835
- ])
836
- ], 8, ml))
837
- ]))), 128)),
838
- w(t.$slots, "svg", ee(te({ svg: j.value, isZoom: Z.value, rect: V.value, config: e.value })), void 0, !0)
839
- ], 14, vl)) : _("", !0),
840
- t.$slots.watermark ? (h(), y("div", wl, [
841
- w(t.$slots, "watermark", ee(te({ isPrinting: d(Ue) || d(Ee) })), void 0, !0)
842
- ])) : _("", !0),
843
- x.value ? _("", !0) : (h(), Q(d(c), {
844
- key: 7,
845
- config: {
846
- type: "treemap",
847
- style: {
848
- backgroundColor: e.value.style.chart.backgroundColor,
849
- treemap: {
850
- color: "#CCCCCC"
851
- }
852
- }
853
- }
854
- }, null, 8, ["config"])),
855
- S("div", {
856
- ref_key: "chartLegend",
857
- ref: Pe
858
- }, [
859
- e.value.style.chart.legend.show ? (h(), Q(jt, {
860
- key: `legend_${Le.value}`,
861
- legendSet: Qe.value,
862
- config: kt.value,
863
- id: `treemap_legend_${z.value}`,
864
- onClickMarker: o[1] || (o[1] = ({ legend: l }) => et(l))
865
- }, {
866
- item: O(({ legend: l, index: a }) => [
867
- S("div", {
868
- onClick: (f) => et(l),
869
- style: L(`opacity:${A.value.includes(l.id) ? 0.5 : 1}`)
870
- }, X(l.name) + X(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + X(e.value.style.chart.legend.showValue ? d(me)(
871
- e.value.style.chart.layout.labels.formatter,
872
- l.value,
873
- d(ie)({
874
- p: e.value.style.chart.layout.labels.prefix,
875
- v: l.value,
876
- s: e.value.style.chart.layout.labels.suffix,
877
- r: e.value.style.chart.legend.roundingValue
878
- }),
879
- { datapoint: l }
880
- ) : "") + " " + X(e.value.style.chart.legend.showPercentage ? A.value.includes(l.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / ne.value) ? "-" : (l.value / ne.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, kl)
881
- ]),
882
- _: 1
883
- }, 8, ["legendSet", "config", "id"])) : w(t.$slots, "legend", {
884
- key: 1,
885
- legend: Qe.value
886
- }, void 0, !0)
887
- ], 512),
888
- t.$slots.source ? (h(), y("div", {
889
- key: 8,
890
- ref_key: "source",
891
- ref: ze,
892
- dir: "auto"
893
- }, [
894
- w(t.$slots, "source", {}, void 0, !0)
895
- ], 512)) : _("", !0),
896
- xe(d(g), {
897
- show: R.value.showTooltip && N.value,
898
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
899
- color: e.value.style.chart.tooltip.color,
900
- fontSize: e.value.style.chart.tooltip.fontSize,
901
- borderRadius: e.value.style.chart.tooltip.borderRadius,
902
- borderColor: e.value.style.chart.tooltip.borderColor,
903
- borderWidth: e.value.style.chart.tooltip.borderWidth,
904
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
905
- position: e.value.style.chart.tooltip.position,
906
- offsetY: e.value.style.chart.tooltip.offsetY,
907
- parent: U.value,
908
- content: be.value,
909
- isFullscreen: le.value,
910
- isCustom: d(dt)(e.value.style.chart.tooltip.customFormat)
911
- }, {
912
- "tooltip-before": O(() => [
913
- w(t.$slots, "tooltip-before", ee(te({ ...ke.value })), void 0, !0)
914
- ]),
915
- "tooltip-after": O(() => [
916
- w(t.$slots, "tooltip-after", ee(te({ ...ke.value })), void 0, !0)
917
- ]),
918
- _: 3
919
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
920
- x.value ? (h(), Q(d(v), {
921
- key: 9,
922
- hideDetails: "",
923
- config: {
924
- open: R.value.showTable,
925
- maxHeight: 1e4,
926
- body: {
927
- backgroundColor: e.value.style.chart.backgroundColor,
928
- color: e.value.style.chart.color
929
- },
930
- head: {
931
- backgroundColor: e.value.style.chart.backgroundColor,
932
- color: e.value.style.chart.color
933
- }
934
- }
935
- }, {
936
- content: O(() => [
937
- (h(), Q(d(i), {
938
- key: `table_${Ve.value}`,
939
- colNames: ve.value.colNames,
940
- head: ve.value.head,
941
- body: ve.value.body,
942
- config: ve.value.config,
943
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
944
- onClose: o[2] || (o[2] = (l) => R.value.showTable = !1)
945
- }, {
946
- th: O(({ th: l }) => [
947
- S("div", {
948
- innerHTML: l,
949
- style: { display: "flex", "align-items": "center" }
950
- }, null, 8, Cl)
951
- ]),
952
- td: O(({ td: l }) => [
953
- _e(X(l.name || l), 1)
954
- ]),
955
- _: 1
956
- }, 8, ["colNames", "head", "body", "config", "title"]))
957
- ]),
958
- _: 1
959
- }, 8, ["config"])) : _("", !0)
960
- ], 46, nl));
961
- }
962
- }, Vl = /* @__PURE__ */ Kt($l, [["__scopeId", "data-v-69c6df1d"]]);
963
- export {
964
- Vl as default
965
- };