vue-data-ui 2.12.5 → 2.12.7-beta.0
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.
- package/README.md +56 -1
- package/dist/{Arrow-CD7YT-M0.js → Arrow-CmqjRRUl.js} +1 -1
- package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
- package/dist/{BaseIcon-CgSWwnK7.js → BaseIcon-CZdMutjs.js} +1 -1
- package/dist/{ColorPicker-w8R8Tqdv.js → ColorPicker-DvVKgyAl.js} +23 -24
- package/dist/{DataTable-CicthvOV.js → DataTable-Cv9CIz-a.js} +11 -11
- package/dist/{Legend-0UY0Mmli.js → Legend-DFunFf8i.js} +8 -8
- package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
- package/dist/PackageVersion-CLY-udAA.js +10 -0
- package/dist/{PenAndPaper-DLsvRwoD.js → PenAndPaper-B9na2mbr.js} +8 -10
- package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
- package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
- package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
- package/dist/{Shape-DICeBEtN.js → Shape-D3w9qas1.js} +2 -2
- package/dist/{Slicer-D1nsbsWE.js → Slicer-ncY8krrM.js} +2 -2
- package/dist/SparkTooltip-CwThutH2.js +68 -0
- package/dist/{Title-xO1jFsSw.js → Title-B5qqUI3M.js} +2 -2
- package/dist/Tooltip-C9rxJ-Ru.js +149 -0
- package/dist/{usePrinter-CcgJXHIK.js → UserOptions-Ddy6CuLC.js} +172 -231
- package/dist/{dom-to-png-CS4NRYd_.js → dom-to-png-DDlooC9r.js} +1 -1
- package/dist/{img-CsXjm5I4.js → img-m9g7lR5d.js} +1 -1
- package/dist/{index-vjCxtaM0.js → index-BiHmNd1-.js} +153 -118
- package/dist/{pdf-DHexTTpK.js → pdf-BqM953uL.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +96 -2
- package/dist/types/vue-data-ui.d.ts +96 -2
- package/dist/useChartAccessibility-9icAAmYg.js +12 -0
- package/dist/useMouse-AicQS8Vf.js +13 -0
- package/dist/{useNestedProp-Du1hnYFA.js → useNestedProp-tRqS0ZAM.js} +1 -1
- package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
- package/dist/usePrinter-CRCbl1WG.js +53 -0
- package/dist/vClickOutside-C6WiFswA.js +13 -0
- package/dist/{vue-data-ui-BOrA3Tc9.js → vue-data-ui-D9uTDt73.js} +63 -63
- package/dist/vue-data-ui.js +42 -40
- package/dist/{vue-ui-3d-bar-Z8yAd4bw.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
- package/dist/{vue-ui-accordion-CAN430Oy.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
- package/dist/{vue-ui-age-pyramid-C6PZU9Ez.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
- package/dist/{vue-ui-annotator-CqoDLx3t.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
- package/dist/{vue-ui-bullet-DZC3aY3d.js → vue-ui-bullet-D25qNQfb.js} +137 -140
- package/dist/{vue-ui-candlestick-B5mq_lgW.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
- package/dist/{vue-ui-carousel-table-CBwerU49.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
- package/dist/{vue-ui-chestnut-COyOAY28.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
- package/dist/{vue-ui-chord-Cw0F_jHM.js → vue-ui-chord-C4evlXYB.js} +356 -365
- package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
- package/dist/{vue-ui-cursor-CWXqmlVy.js → vue-ui-cursor-DgpSttlt.js} +2 -2
- package/dist/{vue-ui-dashboard-Ba2tF4md.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
- package/dist/{vue-ui-digits-BV7yyUdY.js → vue-ui-digits-BhjAxXgm.js} +2 -2
- package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
- package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
- package/dist/{vue-ui-dumbbell-SDCcLJIc.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
- package/dist/{vue-ui-flow-CrqGSDNK.js → vue-ui-flow-BVRkH0PS.js} +291 -300
- package/dist/{vue-ui-funnel-CcDOoxp8.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
- package/dist/{vue-ui-galaxy-jlDp0DRJ.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
- package/dist/{vue-ui-gauge-8t8rWb1C.js → vue-ui-gauge-B48eMvOR.js} +240 -243
- package/dist/{vue-ui-gizmo-CFwdrMYP.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
- package/dist/{vue-ui-heatmap-BT-mIeZp.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
- package/dist/{vue-ui-history-plot-crLloc7J.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
- package/dist/{vue-ui-kpi-96v4ZIYo.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
- package/dist/{vue-ui-mini-loader-rBHBxNIT.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
- package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
- package/dist/{vue-ui-mood-radar-DrVSXIY4.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
- package/dist/{vue-ui-nested-donuts-C9Ah9lgv.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
- package/dist/{vue-ui-onion-DwNPyn4X.js → vue-ui-onion-P8k6T724.js} +252 -258
- package/dist/{vue-ui-parallel-coordinate-plot-tSuK6xWu.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
- package/dist/{vue-ui-quadrant-C0Kaoo7K.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
- package/dist/{vue-ui-quick-chart-xMh_Ygct.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
- package/dist/{vue-ui-radar-C1jSDQt_.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
- package/dist/{vue-ui-rating-6Kb7hsKF.js → vue-ui-rating-gryk_h_6.js} +2 -2
- package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
- package/dist/{vue-ui-ridgeline-BBvPVQjC.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
- package/dist/{vue-ui-rings-B92cXv7f.js → vue-ui-rings-BRBXektJ.js} +262 -269
- package/dist/{vue-ui-scatter-Bt1aty87.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
- package/dist/{vue-ui-skeleton-DfOIDTJM.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
- package/dist/{vue-ui-smiley-sVgBnkbx.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
- package/dist/{vue-ui-spark-trend-D6uzJ4Qd.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
- package/dist/{vue-ui-sparkbar-D4c2EE7J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
- package/dist/{vue-ui-sparkgauge-DaQ6iz98.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
- package/dist/{vue-ui-sparkhistogram-D_YnmM2T.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
- package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
- package/dist/{vue-ui-sparkstackbar-DecnmqgJ.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
- package/dist/{vue-ui-stackbar-D1eNs1j_.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
- package/dist/{vue-ui-strip-plot-iPZ8Hhmr.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
- package/dist/{vue-ui-table-BFjE28sw.js → vue-ui-table-DBaT_TfA.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DipFDu39.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
- package/dist/{vue-ui-table-sparkline-CGAecOZh.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
- package/dist/{vue-ui-thermometer-Cx_yr-hs.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
- package/dist/{vue-ui-timer-ClVmS8MH.js → vue-ui-timer-D9FfRWN5.js} +180 -181
- package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
- package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
- package/dist/{vue-ui-vertical-bar-BHYCnFEN.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
- package/dist/{vue-ui-waffle-DEPUbrOt.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
- package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
- package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
- package/dist/{vue-ui-world-DStJ5i0i.js → vue-ui-world-CPIGEswq.js} +430 -442
- package/dist/{vue-ui-xy-CEop49z6.js → vue-ui-xy-9e_epIN4.js} +845 -846
- package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
- package/package.json +6 -6
- package/dist/BaseDraggableDialog-BjFEob7i.js +0 -186
- package/dist/PackageVersion-Cw2caN1c.js +0 -10
- package/dist/Tooltip-LKe8L-Mg.js +0 -158
- package/dist/useChartAccessibility-BWojgys7.js +0 -13
- package/dist/vue-ui-circle-pack-BtpaZLYs.js +0 -659
- package/dist/vue-ui-donut-CRdQFQgA.js +0 -1292
- package/dist/vue-ui-donut-evolution-De3-5OgR.js +0 -871
- package/dist/vue-ui-molecule-DSr_bHGG.js +0 -782
- package/dist/vue-ui-relation-circle-fh0Hl9m0.js +0 -528
- package/dist/vue-ui-sparkline-C2HuTMDz.js +0 -519
- package/dist/vue-ui-tiremarks-4Sa3RCSv.js +0 -344
- package/dist/vue-ui-treemap-CD5pPg7v.js +0 -956
- package/dist/vue-ui-wheel-qU0bgJsi.js +0 -338
- package/dist/vue-ui-word-cloud-z2ZguOdy.js +0 -648
- package/dist/vue-ui-xy-canvas-DV0BVdZb.js +0 -1673
|
@@ -1,956 +0,0 @@
|
|
|
1
|
-
import { useSlots as pt, onMounted as je, computed as C, ref as g, watch as gt, onBeforeUnmount as mt, createElementBlock as y, openBlock as v, unref as m, normalizeStyle as L, normalizeClass as me, createBlock as X, createCommentVNode as _, createElementVNode as O, createVNode as ye, createSlots as yt, withCtx as x, renderSlot as $, normalizeProps as j, guardReactiveProps as Y, Fragment as ce, renderList as be, withKeys as Ye, withModifiers as ke, mergeProps as Ke, createTextVNode as de, toDisplayString as K, nextTick as bt } from "vue";
|
|
2
|
-
import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-vjCxtaM0.js";
|
|
3
|
-
import { _ as Nt } from "./Title-xO1jFsSw.js";
|
|
4
|
-
import { u as zt, U as Ft } from "./usePrinter-CcgJXHIK.js";
|
|
5
|
-
import { _ as At } from "./Tooltip-LKe8L-Mg.js";
|
|
6
|
-
import { L as Pt } from "./Legend-0UY0Mmli.js";
|
|
7
|
-
import Rt from "./vue-ui-skeleton-DfOIDTJM.js";
|
|
8
|
-
import { D as Lt } from "./DataTable-CicthvOV.js";
|
|
9
|
-
import Dt from "./vue-ui-accordion-CAN430Oy.js";
|
|
10
|
-
import { t as Mt, u as Vt } from "./useResponsive-JZ9xq-JV.js";
|
|
11
|
-
import { u as tt } from "./useNestedProp-Du1hnYFA.js";
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-Cw2caN1c.js";
|
|
13
|
-
import { _ as Ht } from "./PenAndPaper-DLsvRwoD.js";
|
|
14
|
-
import { u as Ut } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
|
-
import Et from "./BaseIcon-CgSWwnK7.js";
|
|
17
|
-
import { _ as Gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
|
-
function ot(n, r) {
|
|
19
|
-
const u = n.length;
|
|
20
|
-
if (u === 0)
|
|
21
|
-
throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
|
|
22
|
-
{
|
|
23
|
-
let i = 1 / 0, s = -1 / 0, c = 0;
|
|
24
|
-
for (let f = 0; f < u; f += 1) {
|
|
25
|
-
const p = n[f].normalizedValue;
|
|
26
|
-
p < i && (i = p), p > s && (s = p), c += p;
|
|
27
|
-
}
|
|
28
|
-
return Math.max(
|
|
29
|
-
r ** 2 * s / c ** 2,
|
|
30
|
-
c ** 2 / (r ** 2 * i)
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function lt(n) {
|
|
35
|
-
const { xOffset: r, yOffset: u, width: i, height: s } = n;
|
|
36
|
-
return {
|
|
37
|
-
x0: r,
|
|
38
|
-
y0: u,
|
|
39
|
-
x1: r + i,
|
|
40
|
-
y1: u + s
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function qt(n, r, u) {
|
|
44
|
-
if (n.length === 0)
|
|
45
|
-
return !0;
|
|
46
|
-
{
|
|
47
|
-
const i = n.concat(r), s = ot(
|
|
48
|
-
n,
|
|
49
|
-
u
|
|
50
|
-
), c = ot(i, u);
|
|
51
|
-
return s >= c;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function Xt(n) {
|
|
55
|
-
const r = [], u = n.length;
|
|
56
|
-
for (let i = 0; i < u; i += 1) {
|
|
57
|
-
const s = n[i], c = s.length;
|
|
58
|
-
for (let d = 0; d < c; d += 1)
|
|
59
|
-
r.push(s[d]);
|
|
60
|
-
}
|
|
61
|
-
return r;
|
|
62
|
-
}
|
|
63
|
-
function jt(n, r) {
|
|
64
|
-
const u = {
|
|
65
|
-
...r,
|
|
66
|
-
children: n
|
|
67
|
-
};
|
|
68
|
-
return nt(u);
|
|
69
|
-
}
|
|
70
|
-
function Yt(n) {
|
|
71
|
-
return (n.x1 - n.x0) * (n.y1 - n.y0);
|
|
72
|
-
}
|
|
73
|
-
function at(n, r) {
|
|
74
|
-
const { width: u, height: i, xOffset: s, yOffset: c } = we(r), d = n.length, f = n.map((k) => k.normalizedValue || 0).reduce((k, b) => k + b, 0), p = f / i, z = f / u;
|
|
75
|
-
let I = s, F = c;
|
|
76
|
-
const w = [];
|
|
77
|
-
if (u >= i) {
|
|
78
|
-
for (let k = 0; k < d; k += 1) {
|
|
79
|
-
const b = n[k], T = F + b.normalizedValue / p, M = {
|
|
80
|
-
x0: I,
|
|
81
|
-
y0: F,
|
|
82
|
-
x1: I + p,
|
|
83
|
-
y1: T
|
|
84
|
-
}, A = Object.assign({}, b, M);
|
|
85
|
-
F = T, w.push(A);
|
|
86
|
-
}
|
|
87
|
-
return w;
|
|
88
|
-
} else {
|
|
89
|
-
for (let k = 0; k < d; k += 1) {
|
|
90
|
-
const b = n[k], T = I + b.normalizedValue / z, M = {
|
|
91
|
-
x0: I,
|
|
92
|
-
y0: F,
|
|
93
|
-
x1: T,
|
|
94
|
-
y1: F + z
|
|
95
|
-
}, A = Object.assign({}, b, M);
|
|
96
|
-
I = T, w.push(A);
|
|
97
|
-
}
|
|
98
|
-
return w;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function Kt(n) {
|
|
102
|
-
const r = we(n), u = r.width, i = r.height;
|
|
103
|
-
return Math.min(u, i);
|
|
104
|
-
}
|
|
105
|
-
function Zt(n, r) {
|
|
106
|
-
const u = n.length, i = n.map((p) => p.value ?? 0).reduce((p, z) => p + z, 0), s = r / i, c = [];
|
|
107
|
-
let d, f;
|
|
108
|
-
for (let p = 0; p < u; p += 1)
|
|
109
|
-
f = n[p], d = Object.assign({}, f, {
|
|
110
|
-
normalizedValue: f.value * (s || 0)
|
|
111
|
-
}), c.push(d);
|
|
112
|
-
return c;
|
|
113
|
-
}
|
|
114
|
-
function we(n) {
|
|
115
|
-
const { x0: r, y0: u, x1: i, y1: s } = n;
|
|
116
|
-
return {
|
|
117
|
-
xOffset: r,
|
|
118
|
-
yOffset: u,
|
|
119
|
-
width: i - r,
|
|
120
|
-
height: s - u
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function Jt(n, r, u, i) {
|
|
124
|
-
let s = n, c = r, d = u, f = i;
|
|
125
|
-
for (; ; ) {
|
|
126
|
-
const p = s.length;
|
|
127
|
-
if (p === 0) {
|
|
128
|
-
const w = at(c, d);
|
|
129
|
-
return f.concat(w);
|
|
130
|
-
}
|
|
131
|
-
const z = Kt(d), I = s[0], F = s.slice(1, p);
|
|
132
|
-
if (qt(c, I, z)) {
|
|
133
|
-
const w = c.concat(I);
|
|
134
|
-
s = F, c = w, d = d, f = f;
|
|
135
|
-
} else {
|
|
136
|
-
const w = c.length;
|
|
137
|
-
let k = 0;
|
|
138
|
-
for (let A = 0; A < w; A += 1)
|
|
139
|
-
k += c[A].normalizedValue;
|
|
140
|
-
const b = Qt(d, k), T = at(c, d), M = f.concat(T);
|
|
141
|
-
s = s, c = [], d = b, f = M;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function nt(n) {
|
|
146
|
-
if (typeof n.children > "u" || !n.children.length)
|
|
147
|
-
return [n];
|
|
148
|
-
{
|
|
149
|
-
const r = Zt(
|
|
150
|
-
n.children,
|
|
151
|
-
Yt(n)
|
|
152
|
-
), u = Jt(r, [], n, []), i = u.length, s = [];
|
|
153
|
-
for (let d = 0; d < i; d += 1)
|
|
154
|
-
s.push(nt(u[d]));
|
|
155
|
-
return Xt(s);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function Qt(n, r) {
|
|
159
|
-
const { width: u, height: i, xOffset: s, yOffset: c } = we(n);
|
|
160
|
-
if (u >= i) {
|
|
161
|
-
const d = r / i, f = u - d, p = {
|
|
162
|
-
xOffset: s + d,
|
|
163
|
-
yOffset: c,
|
|
164
|
-
width: f,
|
|
165
|
-
height: i
|
|
166
|
-
};
|
|
167
|
-
return lt(p);
|
|
168
|
-
} else {
|
|
169
|
-
const d = r / u, f = i - d, p = {
|
|
170
|
-
xOffset: s,
|
|
171
|
-
yOffset: c + d,
|
|
172
|
-
width: u,
|
|
173
|
-
height: f
|
|
174
|
-
};
|
|
175
|
-
return lt(p);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
const eo = ["id"], to = {
|
|
179
|
-
key: 4,
|
|
180
|
-
class: "vue-ui-treemap-breadcrumbs",
|
|
181
|
-
"data-dom-to-png-ignore": ""
|
|
182
|
-
}, oo = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], lo = { class: "vue-ui-treemap-crumb-unit" }, ao = { class: "vue-ui-treemap-crumb-unit-label" }, no = {
|
|
183
|
-
key: 0,
|
|
184
|
-
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
185
|
-
}, so = {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
188
|
-
}, uo = ["xmlns", "viewBox"], ro = { key: 0 }, io = ["id"], co = ["stop-color"], vo = ["stop-color"], ho = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], fo = ["x", "y", "height", "width"], po = {
|
|
189
|
-
style: { width: "100%", height: "100%" },
|
|
190
|
-
class: "vue-ui-treemap-cell"
|
|
191
|
-
}, go = {
|
|
192
|
-
key: 6,
|
|
193
|
-
class: "vue-data-ui-watermark"
|
|
194
|
-
}, mo = ["onClick"], yo = { key: 0 }, bo = { key: 1 }, ko = ["innerHTML"], wo = {
|
|
195
|
-
__name: "vue-ui-treemap",
|
|
196
|
-
props: {
|
|
197
|
-
config: {
|
|
198
|
-
type: Object,
|
|
199
|
-
default() {
|
|
200
|
-
return {};
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
dataset: {
|
|
204
|
-
type: Array,
|
|
205
|
-
default() {
|
|
206
|
-
return [];
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
emits: ["selectLegend", "selectDatapoint"],
|
|
211
|
-
setup(n, { expose: r, emit: u }) {
|
|
212
|
-
const { vue_ui_treemap: i } = kt(), s = n, c = u, d = pt();
|
|
213
|
-
je(() => {
|
|
214
|
-
d["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
215
|
-
});
|
|
216
|
-
const f = C(() => !!s.dataset && s.dataset.length), p = C(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), z = g(Ze()), I = g(!1), F = g(""), w = g(!1), k = g(0), b = g([]), T = g(null), M = g(null), A = g(null), Ce = g(null), $e = g(null), xe = g(0), Te = g(0), _e = g(0), t = C({
|
|
217
|
-
get: () => Ne(),
|
|
218
|
-
set: (e) => e
|
|
219
|
-
}), { userOptionsVisible: fe, setUserOptionsVisibility: Oe, keepUserOptionState: Se } = Ut({ config: t.value }), { svgRef: Ie } = Wt({ config: t.value.style.chart.title });
|
|
220
|
-
function Ne() {
|
|
221
|
-
const e = tt({
|
|
222
|
-
userConfig: s.config,
|
|
223
|
-
defaultConfig: i
|
|
224
|
-
});
|
|
225
|
-
return e.theme ? {
|
|
226
|
-
...tt({
|
|
227
|
-
userConfig: Ct.vue_ui_treemap[e.theme] || s.config,
|
|
228
|
-
defaultConfig: e
|
|
229
|
-
}),
|
|
230
|
-
customPalette: wt[e.theme] || S
|
|
231
|
-
} : e;
|
|
232
|
-
}
|
|
233
|
-
gt(() => s.config, (e) => {
|
|
234
|
-
t.value = Ne(), fe.value = !t.value.userOptions.showOnChartHover, xe.value += 1, Te.value += 1, _e.value += 1, P.value.showTable = t.value.table.show, P.value.showTooltip = t.value.style.chart.tooltip.show;
|
|
235
|
-
}, { deep: !0 });
|
|
236
|
-
const { isPrinting: ze, isImaging: Fe, generatePdf: Ae, generateImage: Pe } = zt({
|
|
237
|
-
elementId: `treemap_${z.value}`,
|
|
238
|
-
fileName: t.value.style.chart.title.text || "vue-ui-treemap",
|
|
239
|
-
options: t.value.userOptions.print
|
|
240
|
-
}), st = C(() => t.value.userOptions.show && !t.value.style.chart.title.text), le = C(() => $t(t.value.customPalette)), P = g({
|
|
241
|
-
showTable: t.value.table.show,
|
|
242
|
-
showTooltip: t.value.style.chart.tooltip.show
|
|
243
|
-
}), V = g({
|
|
244
|
-
height: t.value.style.chart.height,
|
|
245
|
-
width: t.value.style.chart.width
|
|
246
|
-
}), E = C(() => ({
|
|
247
|
-
bottom: V.value.height - t.value.style.chart.padding.bottom,
|
|
248
|
-
height: V.value.height - t.value.style.chart.padding.top - t.value.style.chart.padding.bottom,
|
|
249
|
-
left: t.value.style.chart.padding.left,
|
|
250
|
-
right: V.value.width - t.value.style.chart.padding.right,
|
|
251
|
-
top: t.value.style.chart.padding.top,
|
|
252
|
-
vbHeight: V.value.height,
|
|
253
|
-
vbWidth: V.value.width,
|
|
254
|
-
width: V.value.width - t.value.style.chart.padding.left - t.value.style.chart.padding.right
|
|
255
|
-
}));
|
|
256
|
-
function Re(e) {
|
|
257
|
-
e.forEach((l, o) => {
|
|
258
|
-
l.id = Ze(), l.color = ve(l.color) || le.value[o] || S[o] || S[o % S.length], l.children && (l.children.forEach((a) => {
|
|
259
|
-
a.parentId = l.id, a.color = l.color;
|
|
260
|
-
}), Re(l.children));
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
const B = g(s.dataset), ae = g(null);
|
|
264
|
-
je(() => {
|
|
265
|
-
ut();
|
|
266
|
-
});
|
|
267
|
-
function ut() {
|
|
268
|
-
if (xt(s.dataset) && Tt({
|
|
269
|
-
componentName: "VueUiTreemap",
|
|
270
|
-
type: "dataset"
|
|
271
|
-
}), Re(B.value), t.value.responsive) {
|
|
272
|
-
const e = Mt(() => {
|
|
273
|
-
const { width: l, height: o } = Vt({
|
|
274
|
-
chart: T.value,
|
|
275
|
-
title: t.value.style.chart.title.text ? M.value : null,
|
|
276
|
-
legend: t.value.style.chart.legend.show ? A.value : null,
|
|
277
|
-
source: Ce.value,
|
|
278
|
-
noTitle: $e.value
|
|
279
|
-
});
|
|
280
|
-
requestAnimationFrame(() => {
|
|
281
|
-
V.value.width = l, V.value.height = o;
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
ae.value = new ResizeObserver(e), ae.value.observe(T.value.parentNode);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
mt(() => {
|
|
288
|
-
ae.value && ae.value.disconnect();
|
|
289
|
-
});
|
|
290
|
-
const Z = g(B.value), ee = C(() => Z.value.map((e, l) => ({
|
|
291
|
-
...e,
|
|
292
|
-
color: ve(e.color) || le.value[l] || S[l] || S[l % S.length]
|
|
293
|
-
})).filter((e) => !b.value.includes(e.id))), J = C(() => B.value.filter((e) => !b.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), Le = C({
|
|
294
|
-
get() {
|
|
295
|
-
let e = [...ee.value];
|
|
296
|
-
return t.value.style.chart.layout.sorted && (e = [...ee.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
|
|
297
|
-
...l
|
|
298
|
-
}));
|
|
299
|
-
},
|
|
300
|
-
set(e) {
|
|
301
|
-
return e;
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
function De(e, l) {
|
|
305
|
-
return e.value / l;
|
|
306
|
-
}
|
|
307
|
-
function rt(e, l, o) {
|
|
308
|
-
const a = t.value.style.chart.layout.rects.colorRatio - De(l, o);
|
|
309
|
-
return Je(e, a < 0 ? 0 : a);
|
|
310
|
-
}
|
|
311
|
-
function Me(e, l, o, a) {
|
|
312
|
-
return e.map((h, W) => {
|
|
313
|
-
const ie = rt(ve(l) || le.value[W] || S[W] || S[W % S.length], h, a), ft = De(h, a);
|
|
314
|
-
return {
|
|
315
|
-
...h,
|
|
316
|
-
color: ie,
|
|
317
|
-
proportion: ft,
|
|
318
|
-
parentName: o,
|
|
319
|
-
children: h.children ? Me(h.children, ie, h.name, a) : void 0
|
|
320
|
-
};
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
const te = C(() => jt(
|
|
324
|
-
Le.value.map((e, l) => {
|
|
325
|
-
const o = e.children ? e.children.reduce((a, h) => a + h.value, 0) : e.value;
|
|
326
|
-
return {
|
|
327
|
-
value: e.value,
|
|
328
|
-
id: e.id,
|
|
329
|
-
children: e.children ? Me(e.children.sort((a, h) => h.value - a.value), e.color, e.name, o) : void 0,
|
|
330
|
-
color: e.color,
|
|
331
|
-
name: e.name
|
|
332
|
-
};
|
|
333
|
-
}),
|
|
334
|
-
{ x0: E.value.left * 2, y0: E.value.top, x1: E.value.width, y1: E.value.height }
|
|
335
|
-
));
|
|
336
|
-
function Ve({ y0: e, y1: l }) {
|
|
337
|
-
return l - e <= 0 ? 1e-4 : l - e;
|
|
338
|
-
}
|
|
339
|
-
function Be({ x0: e, x1: l }) {
|
|
340
|
-
return l - e <= 0 ? 1e-4 : l - e;
|
|
341
|
-
}
|
|
342
|
-
function G(e) {
|
|
343
|
-
const l = t.value.style.chart.layout.labels.fontSize * (e.proportion * 2 > 1 ? 1 : e.proportion * 2);
|
|
344
|
-
return l < t.value.style.chart.layout.labels.minFontSize ? t.value.style.chart.layout.labels.minFontSize : l;
|
|
345
|
-
}
|
|
346
|
-
function it(e) {
|
|
347
|
-
w.value = e, k.value += 1;
|
|
348
|
-
}
|
|
349
|
-
const Q = C(() => ({
|
|
350
|
-
startX: 0,
|
|
351
|
-
startY: 0,
|
|
352
|
-
width: E.value.vbWidth,
|
|
353
|
-
height: E.value.vbHeight
|
|
354
|
-
}));
|
|
355
|
-
function q(e, l = B.value) {
|
|
356
|
-
for (const o of l) {
|
|
357
|
-
if (o.id === e)
|
|
358
|
-
return o;
|
|
359
|
-
if (o.children) {
|
|
360
|
-
const a = q(e, o.children);
|
|
361
|
-
if (a)
|
|
362
|
-
return a;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return null;
|
|
366
|
-
}
|
|
367
|
-
const N = g([]), H = C(() => N.value.length > 0);
|
|
368
|
-
function ne(e) {
|
|
369
|
-
var o;
|
|
370
|
-
if (!e) {
|
|
371
|
-
Z.value = B.value.slice(), c("selectDatapoint", void 0), N.value = [];
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
const l = q(e.id);
|
|
375
|
-
if (l && ((o = l.children) != null && o.length))
|
|
376
|
-
N.value.push(l.id), Z.value = l.children.slice(), c("selectDatapoint", e);
|
|
377
|
-
else if (e.parentId) {
|
|
378
|
-
N.value.push(e.parentId);
|
|
379
|
-
const a = q(e.parentId);
|
|
380
|
-
Z.value = a.children.slice(), c("selectDatapoint", e);
|
|
381
|
-
} else if (N.value.length > 0) {
|
|
382
|
-
N.value.pop();
|
|
383
|
-
const a = N.value[N.value.length - 1];
|
|
384
|
-
if (a) {
|
|
385
|
-
const h = q(a);
|
|
386
|
-
Z.value = h.children.slice();
|
|
387
|
-
} else
|
|
388
|
-
Z.value = B.value.slice(), N.value = [], c("selectDatapoint", void 0);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function ct(e) {
|
|
392
|
-
var o;
|
|
393
|
-
const l = q(e.id);
|
|
394
|
-
return !!((o = l == null ? void 0 : l.children) != null && o.length || e.parentId);
|
|
395
|
-
}
|
|
396
|
-
const U = C(() => {
|
|
397
|
-
const e = [
|
|
398
|
-
{ id: null, label: "All" }
|
|
399
|
-
];
|
|
400
|
-
if (N.value.length > 0) {
|
|
401
|
-
let l = q(N.value[N.value.length - 1]);
|
|
402
|
-
const o = [];
|
|
403
|
-
for (; l; )
|
|
404
|
-
o.unshift(l), l = l.parentId ? q(l.parentId) : null;
|
|
405
|
-
for (const a of o)
|
|
406
|
-
e.push({
|
|
407
|
-
id: a.id,
|
|
408
|
-
label: a.name,
|
|
409
|
-
node: a
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
return e;
|
|
413
|
-
}), R = g(null), He = C(() => B.value.map((e, l) => ({
|
|
414
|
-
...e,
|
|
415
|
-
color: ve(e.color) || le.value[l] || S[l] || S[l % S.length],
|
|
416
|
-
shape: "square"
|
|
417
|
-
})).sort((e, l) => l.value - e.value).map((e, l) => ({
|
|
418
|
-
...e,
|
|
419
|
-
proportion: e.value / B.value.map((o) => o.value).reduce((o, a) => o + a, 0),
|
|
420
|
-
opacity: b.value.includes(e.id) ? 0.5 : 1
|
|
421
|
-
}))), dt = C(() => ({
|
|
422
|
-
cy: "treemap-div-legend",
|
|
423
|
-
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
424
|
-
color: t.value.style.chart.legend.color,
|
|
425
|
-
fontSize: t.value.style.chart.legend.fontSize,
|
|
426
|
-
paddingBottom: 12,
|
|
427
|
-
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
428
|
-
}));
|
|
429
|
-
function Ue(e) {
|
|
430
|
-
H.value = !1, R.value = null, b.value.includes(e.id) ? b.value = b.value.filter((l) => l !== e.id) : b.value.length < s.dataset.length - 1 && b.value.push(e.id), c("selectLegend", Le.value);
|
|
431
|
-
}
|
|
432
|
-
const pe = g(null);
|
|
433
|
-
function vt({ datapoint: e, seriesIndex: l }) {
|
|
434
|
-
R.value = e, pe.value = { datapoint: e, seriesIndex: l, config: t.value, series: ee.value };
|
|
435
|
-
const o = t.value.style.chart.tooltip.customFormat;
|
|
436
|
-
if (et(o) && It(() => o({
|
|
437
|
-
seriesIndex: l,
|
|
438
|
-
datapoint: e,
|
|
439
|
-
series: ee.value,
|
|
440
|
-
config: t.value
|
|
441
|
-
})))
|
|
442
|
-
F.value = o({
|
|
443
|
-
seriesIndex: l,
|
|
444
|
-
datapoint: e,
|
|
445
|
-
series: ee.value,
|
|
446
|
-
config: t.value
|
|
447
|
-
});
|
|
448
|
-
else {
|
|
449
|
-
let a = "";
|
|
450
|
-
a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.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="${e.color}"/></svg>`, a += `<b>${he(
|
|
451
|
-
t.value.style.chart.layout.labels.formatter,
|
|
452
|
-
e.value,
|
|
453
|
-
oe({
|
|
454
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
455
|
-
v: e.value,
|
|
456
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
457
|
-
r: t.value.style.chart.tooltip.roundingValue
|
|
458
|
-
}),
|
|
459
|
-
{ datapoint: e, seriesIndex: l }
|
|
460
|
-
)}</b>`, F.value = `<div>${a}</div>`;
|
|
461
|
-
}
|
|
462
|
-
I.value = !0;
|
|
463
|
-
}
|
|
464
|
-
const D = C(() => {
|
|
465
|
-
const e = te.value.map((o) => ({
|
|
466
|
-
name: o.name,
|
|
467
|
-
color: o.color
|
|
468
|
-
})), l = te.value.map((o) => o.value);
|
|
469
|
-
return { head: e, body: l };
|
|
470
|
-
});
|
|
471
|
-
function We() {
|
|
472
|
-
bt(() => {
|
|
473
|
-
const e = D.value.head.map((a, h) => [[
|
|
474
|
-
a.name
|
|
475
|
-
], [D.value.body[h]], [isNaN(D.value.body[h] / J.value) ? "-" : D.value.body[h] / J.value * 100]]), l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(e), o = Ot(l);
|
|
476
|
-
St({ csvContent: o, title: t.value.style.chart.title.text || "vue-ui-treemap" });
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
const se = C(() => {
|
|
480
|
-
const e = [
|
|
481
|
-
t.value.table.columnNames.series,
|
|
482
|
-
t.value.table.columnNames.value,
|
|
483
|
-
t.value.table.columnNames.percentage
|
|
484
|
-
], l = D.value.head.map((h, W) => {
|
|
485
|
-
const ie = he(
|
|
486
|
-
t.value.style.chart.layout.labels.formatter,
|
|
487
|
-
D.value.body[W],
|
|
488
|
-
oe({
|
|
489
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
490
|
-
v: D.value.body[W],
|
|
491
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
492
|
-
r: t.value.table.td.roundingValue
|
|
493
|
-
})
|
|
494
|
-
);
|
|
495
|
-
return [
|
|
496
|
-
{
|
|
497
|
-
color: h.color,
|
|
498
|
-
name: h.name,
|
|
499
|
-
shape: "square"
|
|
500
|
-
},
|
|
501
|
-
ie,
|
|
502
|
-
isNaN(D.value.body[W] / J.value) ? "-" : oe({
|
|
503
|
-
v: D.value.body[W] / J.value * 100,
|
|
504
|
-
s: "%",
|
|
505
|
-
r: t.value.table.td.roundingPercentage
|
|
506
|
-
})
|
|
507
|
-
];
|
|
508
|
-
}), o = {
|
|
509
|
-
th: {
|
|
510
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
511
|
-
color: t.value.table.th.color,
|
|
512
|
-
outline: t.value.table.th.outline
|
|
513
|
-
},
|
|
514
|
-
td: {
|
|
515
|
-
backgroundColor: t.value.table.td.backgroundColor,
|
|
516
|
-
color: t.value.table.td.color,
|
|
517
|
-
outline: t.value.table.td.outline
|
|
518
|
-
},
|
|
519
|
-
breakpoint: t.value.table.responsiveBreakpoint
|
|
520
|
-
};
|
|
521
|
-
return {
|
|
522
|
-
colNames: [
|
|
523
|
-
t.value.table.columnNames.series,
|
|
524
|
-
t.value.table.columnNames.value
|
|
525
|
-
],
|
|
526
|
-
head: e,
|
|
527
|
-
body: l,
|
|
528
|
-
config: o
|
|
529
|
-
};
|
|
530
|
-
});
|
|
531
|
-
function ht() {
|
|
532
|
-
return te.value;
|
|
533
|
-
}
|
|
534
|
-
function Ee() {
|
|
535
|
-
P.value.showTable = !P.value.showTable;
|
|
536
|
-
}
|
|
537
|
-
function Ge() {
|
|
538
|
-
P.value.showTooltip = !P.value.showTooltip;
|
|
539
|
-
}
|
|
540
|
-
const ue = g(!1);
|
|
541
|
-
function ge() {
|
|
542
|
-
ue.value = !ue.value;
|
|
543
|
-
}
|
|
544
|
-
const re = g(null);
|
|
545
|
-
function qe(e) {
|
|
546
|
-
re.value = e;
|
|
547
|
-
}
|
|
548
|
-
function Xe() {
|
|
549
|
-
re.value = null;
|
|
550
|
-
}
|
|
551
|
-
return r({
|
|
552
|
-
getData: ht,
|
|
553
|
-
generateCsv: We,
|
|
554
|
-
generateImage: Pe,
|
|
555
|
-
generatePdf: Ae,
|
|
556
|
-
toggleTable: Ee,
|
|
557
|
-
toggleTooltip: Ge,
|
|
558
|
-
toggleAnnotator: ge
|
|
559
|
-
}), (e, l) => (v(), y("div", {
|
|
560
|
-
ref_key: "treemapChart",
|
|
561
|
-
ref: T,
|
|
562
|
-
class: me(`vue-ui-treemap ${w.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
563
|
-
style: L(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
564
|
-
id: `treemap_${z.value}`,
|
|
565
|
-
onMouseenter: l[3] || (l[3] = () => m(Oe)(!0)),
|
|
566
|
-
onMouseleave: l[4] || (l[4] = () => m(Oe)(!1))
|
|
567
|
-
}, [
|
|
568
|
-
t.value.userOptions.buttons.annotator ? (v(), X(Ht, {
|
|
569
|
-
key: 0,
|
|
570
|
-
svgRef: m(Ie),
|
|
571
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
572
|
-
color: t.value.style.chart.color,
|
|
573
|
-
active: ue.value,
|
|
574
|
-
onClose: ge
|
|
575
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
|
|
576
|
-
st.value ? (v(), y("div", {
|
|
577
|
-
key: 1,
|
|
578
|
-
ref_key: "noTitle",
|
|
579
|
-
ref: $e,
|
|
580
|
-
class: "vue-data-ui-no-title-space",
|
|
581
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
582
|
-
}, null, 512)) : _("", !0),
|
|
583
|
-
t.value.style.chart.title.text ? (v(), y("div", {
|
|
584
|
-
key: 2,
|
|
585
|
-
ref_key: "chartTitle",
|
|
586
|
-
ref: M,
|
|
587
|
-
style: L(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
588
|
-
}, [
|
|
589
|
-
(v(), X(Nt, {
|
|
590
|
-
key: `title_${xe.value}`,
|
|
591
|
-
config: {
|
|
592
|
-
title: {
|
|
593
|
-
cy: "treemap-div-title",
|
|
594
|
-
...t.value.style.chart.title
|
|
595
|
-
},
|
|
596
|
-
subtitle: {
|
|
597
|
-
cy: "treemap-div-subtitle",
|
|
598
|
-
...t.value.style.chart.title.subtitle
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}, null, 8, ["config"]))
|
|
602
|
-
], 4)) : _("", !0),
|
|
603
|
-
t.value.userOptions.show && f.value && (m(Se) || m(fe)) ? (v(), X(Ft, {
|
|
604
|
-
ref: "details",
|
|
605
|
-
key: `user_option_${k.value}`,
|
|
606
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
607
|
-
color: t.value.style.chart.color,
|
|
608
|
-
isPrinting: m(ze),
|
|
609
|
-
isImaging: m(Fe),
|
|
610
|
-
uid: z.value,
|
|
611
|
-
hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
|
|
612
|
-
hasPdf: t.value.userOptions.buttons.pdf,
|
|
613
|
-
hasXls: t.value.userOptions.buttons.csv,
|
|
614
|
-
hasImg: t.value.userOptions.buttons.img,
|
|
615
|
-
hasTable: t.value.userOptions.buttons.table,
|
|
616
|
-
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
617
|
-
isFullscreen: w.value,
|
|
618
|
-
isTooltip: P.value.showTooltip,
|
|
619
|
-
titles: { ...t.value.userOptions.buttonTitles },
|
|
620
|
-
chartElement: T.value,
|
|
621
|
-
position: t.value.userOptions.position,
|
|
622
|
-
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
623
|
-
isAnnotation: ue.value,
|
|
624
|
-
onToggleFullscreen: it,
|
|
625
|
-
onGeneratePdf: m(Ae),
|
|
626
|
-
onGenerateCsv: We,
|
|
627
|
-
onGenerateImage: m(Pe),
|
|
628
|
-
onToggleTable: Ee,
|
|
629
|
-
onToggleTooltip: Ge,
|
|
630
|
-
onToggleAnnotator: ge,
|
|
631
|
-
style: L({
|
|
632
|
-
visibility: m(Se) ? m(fe) ? "visible" : "hidden" : "visible"
|
|
633
|
-
})
|
|
634
|
-
}, yt({ _: 2 }, [
|
|
635
|
-
e.$slots.menuIcon ? {
|
|
636
|
-
name: "menuIcon",
|
|
637
|
-
fn: x(({ isOpen: o, color: a }) => [
|
|
638
|
-
$(e.$slots, "menuIcon", j(Y({ isOpen: o, color: a })), void 0, !0)
|
|
639
|
-
]),
|
|
640
|
-
key: "0"
|
|
641
|
-
} : void 0,
|
|
642
|
-
e.$slots.optionTooltip ? {
|
|
643
|
-
name: "optionTooltip",
|
|
644
|
-
fn: x(() => [
|
|
645
|
-
$(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
646
|
-
]),
|
|
647
|
-
key: "1"
|
|
648
|
-
} : void 0,
|
|
649
|
-
e.$slots.optionPdf ? {
|
|
650
|
-
name: "optionPdf",
|
|
651
|
-
fn: x(() => [
|
|
652
|
-
$(e.$slots, "optionPdf", {}, void 0, !0)
|
|
653
|
-
]),
|
|
654
|
-
key: "2"
|
|
655
|
-
} : void 0,
|
|
656
|
-
e.$slots.optionCsv ? {
|
|
657
|
-
name: "optionCsv",
|
|
658
|
-
fn: x(() => [
|
|
659
|
-
$(e.$slots, "optionCsv", {}, void 0, !0)
|
|
660
|
-
]),
|
|
661
|
-
key: "3"
|
|
662
|
-
} : void 0,
|
|
663
|
-
e.$slots.optionImg ? {
|
|
664
|
-
name: "optionImg",
|
|
665
|
-
fn: x(() => [
|
|
666
|
-
$(e.$slots, "optionImg", {}, void 0, !0)
|
|
667
|
-
]),
|
|
668
|
-
key: "4"
|
|
669
|
-
} : void 0,
|
|
670
|
-
e.$slots.optionTable ? {
|
|
671
|
-
name: "optionTable",
|
|
672
|
-
fn: x(() => [
|
|
673
|
-
$(e.$slots, "optionTable", {}, void 0, !0)
|
|
674
|
-
]),
|
|
675
|
-
key: "5"
|
|
676
|
-
} : void 0,
|
|
677
|
-
e.$slots.optionFullscreen ? {
|
|
678
|
-
name: "optionFullscreen",
|
|
679
|
-
fn: x(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
680
|
-
$(e.$slots, "optionFullscreen", j(Y({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
681
|
-
]),
|
|
682
|
-
key: "6"
|
|
683
|
-
} : void 0,
|
|
684
|
-
e.$slots.optionAnnotator ? {
|
|
685
|
-
name: "optionAnnotator",
|
|
686
|
-
fn: x(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
687
|
-
$(e.$slots, "optionAnnotator", j(Y({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
688
|
-
]),
|
|
689
|
-
key: "7"
|
|
690
|
-
} : void 0
|
|
691
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : _("", !0),
|
|
692
|
-
U.value.length > 1 ? (v(), y("nav", to, [
|
|
693
|
-
(v(!0), y(ce, null, be(U.value, (o, a) => (v(), y("span", {
|
|
694
|
-
role: "button",
|
|
695
|
-
tabindex: a < U.value.length - 1 ? 0 : void 0,
|
|
696
|
-
key: o.id || "root",
|
|
697
|
-
onClick: (h) => a === U.value.length - 1 ? () => {
|
|
698
|
-
} : ne(o.node),
|
|
699
|
-
onKeydown: [
|
|
700
|
-
Ye(ke((h) => a === U.value.length - 1 ? void 0 : ne(o.node), ["prevent"]), ["enter"]),
|
|
701
|
-
Ye(ke((h) => a === U.value.length - 1 ? void 0 : ne(o.node), ["prevent"]), ["space"])
|
|
702
|
-
],
|
|
703
|
-
class: "vue-ui-treemap-crumb",
|
|
704
|
-
"data-last-crumb": a === U.value.length - 1,
|
|
705
|
-
style: L({
|
|
706
|
-
color: t.value.style.chart.color
|
|
707
|
-
}),
|
|
708
|
-
onMouseenter: (h) => qe(a),
|
|
709
|
-
onMouseleave: Xe,
|
|
710
|
-
onFocus: (h) => qe(a),
|
|
711
|
-
onBlur: Xe
|
|
712
|
-
}, [
|
|
713
|
-
O("span", lo, [
|
|
714
|
-
O("span", ao, [
|
|
715
|
-
$(e.$slots, "breadcrumb-label", Ke({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: re.value === a }), () => [
|
|
716
|
-
a === 0 ? (v(), y("div", no, [
|
|
717
|
-
ye(Et, {
|
|
718
|
-
name: re.value === 0 ? "homeFilled" : "home",
|
|
719
|
-
stroke: t.value.style.chart.color
|
|
720
|
-
}, null, 8, ["name", "stroke"])
|
|
721
|
-
])) : (v(), y(ce, { key: 1 }, [
|
|
722
|
-
de(K(o.label), 1)
|
|
723
|
-
], 64))
|
|
724
|
-
], !0)
|
|
725
|
-
]),
|
|
726
|
-
a < U.value.length - 1 ? (v(), y("span", so, [
|
|
727
|
-
$(e.$slots, "breadcrumb-arrow", {}, () => [
|
|
728
|
-
l[5] || (l[5] = de(" › "))
|
|
729
|
-
], !0)
|
|
730
|
-
])) : _("", !0)
|
|
731
|
-
])
|
|
732
|
-
], 44, oo))), 128))
|
|
733
|
-
])) : _("", !0),
|
|
734
|
-
f.value ? (v(), y("svg", {
|
|
735
|
-
key: 5,
|
|
736
|
-
ref_key: "svgRef",
|
|
737
|
-
ref: Ie,
|
|
738
|
-
xmlns: m(_t),
|
|
739
|
-
class: me({ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value, "vue-data-ui-zoom-plus": !H.value, "vue-data-ui-zoom-minus": H.value }),
|
|
740
|
-
viewBox: `${Q.value.startX} ${Q.value.startY} ${Q.value.width <= 0 ? 10 : Q.value.width} ${Q.value.height <= 0 ? 10 : Q.value.height}`,
|
|
741
|
-
style: L(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
|
|
742
|
-
}, [
|
|
743
|
-
ye(Bt),
|
|
744
|
-
(v(!0), y(ce, null, be(te.value, (o, a) => (v(), y("g", null, [
|
|
745
|
-
t.value.style.chart.layout.rects.gradient.show ? (v(), y("defs", ro, [
|
|
746
|
-
O("radialGradient", {
|
|
747
|
-
id: `tgrad_${o.id}`,
|
|
748
|
-
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
749
|
-
}, [
|
|
750
|
-
O("stop", {
|
|
751
|
-
offset: "18%",
|
|
752
|
-
"stop-color": o.color
|
|
753
|
-
}, null, 8, co),
|
|
754
|
-
O("stop", {
|
|
755
|
-
offset: "100%",
|
|
756
|
-
"stop-color": m(Je)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
757
|
-
}, null, 8, vo)
|
|
758
|
-
], 8, io)
|
|
759
|
-
])) : _("", !0)
|
|
760
|
-
]))), 256)),
|
|
761
|
-
(v(!0), y(ce, null, be(te.value, (o, a) => (v(), y("g", null, [
|
|
762
|
-
O("rect", {
|
|
763
|
-
x: o.x0,
|
|
764
|
-
y: o.y0,
|
|
765
|
-
height: Ve(o),
|
|
766
|
-
width: Be(o),
|
|
767
|
-
fill: p.value ? o.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
|
|
768
|
-
rx: t.value.style.chart.layout.rects.borderRadius,
|
|
769
|
-
stroke: R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
|
|
770
|
-
"stroke-width": R.value && R.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
|
|
771
|
-
onClick: ke((h) => ne(o), ["stop"]),
|
|
772
|
-
onMouseenter: () => vt({
|
|
773
|
-
datapoint: o,
|
|
774
|
-
seriesIndex: a
|
|
775
|
-
}),
|
|
776
|
-
onMouseleave: l[0] || (l[0] = (h) => {
|
|
777
|
-
R.value = null, I.value = !1;
|
|
778
|
-
}),
|
|
779
|
-
style: L(`opacity:${R.value ? R.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
780
|
-
class: me([
|
|
781
|
-
"vue-ui-treemap-rect",
|
|
782
|
-
ct(o) ? "vue-data-ui-zoom-plus" : H.value ? "vue-data-ui-zoom-minus" : ""
|
|
783
|
-
])
|
|
784
|
-
}, null, 46, ho),
|
|
785
|
-
(v(), y("foreignObject", {
|
|
786
|
-
x: o.x0,
|
|
787
|
-
y: o.y0,
|
|
788
|
-
height: Ve(o),
|
|
789
|
-
width: Be(o),
|
|
790
|
-
class: "vue-ui-treemap-cell-foreignObject"
|
|
791
|
-
}, [
|
|
792
|
-
O("div", po, [
|
|
793
|
-
t.value.style.chart.layout.labels.showDefaultLabels && (o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || H.value) ? (v(), y("div", {
|
|
794
|
-
key: 0,
|
|
795
|
-
class: "vue-ui-treemap-cell-default",
|
|
796
|
-
style: L(`width:calc(100% - ${G(o) / 1.5}px);text-align:left;line-height:${G(o) < 14 ? 14 : G(o)}px;padding:${G(o) / 3}px; color:${m(Qe)(o.color)}`)
|
|
797
|
-
}, [
|
|
798
|
-
O("span", {
|
|
799
|
-
style: L(`width:100%;font-size:${G(o)}px;`)
|
|
800
|
-
}, K(o.name), 5),
|
|
801
|
-
l[6] || (l[6] = O("br", null, null, -1)),
|
|
802
|
-
O("span", {
|
|
803
|
-
style: L(`width:100%;font-size:${G(o)}px;`)
|
|
804
|
-
}, K(m(he)(
|
|
805
|
-
t.value.style.chart.layout.labels.formatter,
|
|
806
|
-
o.value,
|
|
807
|
-
m(oe)({
|
|
808
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
809
|
-
v: o.value,
|
|
810
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
811
|
-
r: t.value.style.chart.layout.labels.rounding
|
|
812
|
-
}),
|
|
813
|
-
{ datapoint: o }
|
|
814
|
-
)), 5)
|
|
815
|
-
], 4)) : _("", !0),
|
|
816
|
-
$(e.$slots, "rect", Ke({ ref_for: !0 }, {
|
|
817
|
-
rect: o,
|
|
818
|
-
shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || H.value,
|
|
819
|
-
fontSize: G(o),
|
|
820
|
-
isZoom: H.value,
|
|
821
|
-
textColor: m(Qe)(o.color)
|
|
822
|
-
}), void 0, !0)
|
|
823
|
-
])
|
|
824
|
-
], 8, fo))
|
|
825
|
-
]))), 256)),
|
|
826
|
-
$(e.$slots, "svg", j(Y({ svg: E.value, isZoom: H.value, rect: R.value, config: t.value })), void 0, !0)
|
|
827
|
-
], 14, uo)) : _("", !0),
|
|
828
|
-
e.$slots.watermark ? (v(), y("div", go, [
|
|
829
|
-
$(e.$slots, "watermark", j(Y({ isPrinting: m(ze) || m(Fe) })), void 0, !0)
|
|
830
|
-
])) : _("", !0),
|
|
831
|
-
f.value ? _("", !0) : (v(), X(Rt, {
|
|
832
|
-
key: 7,
|
|
833
|
-
config: {
|
|
834
|
-
type: "treemap",
|
|
835
|
-
style: {
|
|
836
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
837
|
-
treemap: {
|
|
838
|
-
color: "#CCCCCC"
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
}, null, 8, ["config"])),
|
|
843
|
-
O("div", {
|
|
844
|
-
ref_key: "chartLegend",
|
|
845
|
-
ref: A
|
|
846
|
-
}, [
|
|
847
|
-
t.value.style.chart.legend.show ? (v(), X(Pt, {
|
|
848
|
-
key: `legend_${_e.value}`,
|
|
849
|
-
legendSet: He.value,
|
|
850
|
-
config: dt.value,
|
|
851
|
-
id: `treemap_legend_${z.value}`,
|
|
852
|
-
onClickMarker: l[1] || (l[1] = ({ legend: o }) => Ue(o))
|
|
853
|
-
}, {
|
|
854
|
-
item: x(({ legend: o, index: a }) => [
|
|
855
|
-
O("div", {
|
|
856
|
-
onClick: (h) => Ue(o),
|
|
857
|
-
style: L(`opacity:${b.value.includes(o.id) ? 0.5 : 1}`)
|
|
858
|
-
}, [
|
|
859
|
-
de(K(o.name) + ": " + K(m(he)(
|
|
860
|
-
t.value.style.chart.layout.labels.formatter,
|
|
861
|
-
o.value,
|
|
862
|
-
m(oe)({
|
|
863
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
864
|
-
v: o.value,
|
|
865
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
866
|
-
r: t.value.style.chart.legend.roundingValue
|
|
867
|
-
}),
|
|
868
|
-
{ datapoint: o }
|
|
869
|
-
)) + " ", 1),
|
|
870
|
-
b.value.includes(o.id) ? (v(), y("span", bo, " ( - % ) ")) : (v(), y("span", yo, " (" + K(isNaN(o.value / J.value) ? "-" : (o.value / J.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
871
|
-
], 12, mo)
|
|
872
|
-
]),
|
|
873
|
-
_: 1
|
|
874
|
-
}, 8, ["legendSet", "config", "id"])) : $(e.$slots, "legend", {
|
|
875
|
-
key: 1,
|
|
876
|
-
legend: He.value
|
|
877
|
-
}, void 0, !0)
|
|
878
|
-
], 512),
|
|
879
|
-
e.$slots.source ? (v(), y("div", {
|
|
880
|
-
key: 8,
|
|
881
|
-
ref_key: "source",
|
|
882
|
-
ref: Ce,
|
|
883
|
-
dir: "auto"
|
|
884
|
-
}, [
|
|
885
|
-
$(e.$slots, "source", {}, void 0, !0)
|
|
886
|
-
], 512)) : _("", !0),
|
|
887
|
-
ye(At, {
|
|
888
|
-
show: P.value.showTooltip && I.value,
|
|
889
|
-
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
890
|
-
color: t.value.style.chart.tooltip.color,
|
|
891
|
-
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
892
|
-
borderRadius: t.value.style.chart.tooltip.borderRadius,
|
|
893
|
-
borderColor: t.value.style.chart.tooltip.borderColor,
|
|
894
|
-
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
895
|
-
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
896
|
-
position: t.value.style.chart.tooltip.position,
|
|
897
|
-
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
898
|
-
parent: T.value,
|
|
899
|
-
content: F.value,
|
|
900
|
-
isFullscreen: w.value,
|
|
901
|
-
isCustom: m(et)(t.value.style.chart.tooltip.customFormat)
|
|
902
|
-
}, {
|
|
903
|
-
"tooltip-before": x(() => [
|
|
904
|
-
$(e.$slots, "tooltip-before", j(Y({ ...pe.value })), void 0, !0)
|
|
905
|
-
]),
|
|
906
|
-
"tooltip-after": x(() => [
|
|
907
|
-
$(e.$slots, "tooltip-after", j(Y({ ...pe.value })), void 0, !0)
|
|
908
|
-
]),
|
|
909
|
-
_: 3
|
|
910
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
911
|
-
f.value ? (v(), X(Dt, {
|
|
912
|
-
key: 9,
|
|
913
|
-
hideDetails: "",
|
|
914
|
-
config: {
|
|
915
|
-
open: P.value.showTable,
|
|
916
|
-
maxHeight: 1e4,
|
|
917
|
-
body: {
|
|
918
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
919
|
-
color: t.value.style.chart.color
|
|
920
|
-
},
|
|
921
|
-
head: {
|
|
922
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
923
|
-
color: t.value.style.chart.color
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}, {
|
|
927
|
-
content: x(() => [
|
|
928
|
-
(v(), X(Lt, {
|
|
929
|
-
key: `table_${Te.value}`,
|
|
930
|
-
colNames: se.value.colNames,
|
|
931
|
-
head: se.value.head,
|
|
932
|
-
body: se.value.body,
|
|
933
|
-
config: se.value.config,
|
|
934
|
-
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
935
|
-
onClose: l[2] || (l[2] = (o) => P.value.showTable = !1)
|
|
936
|
-
}, {
|
|
937
|
-
th: x(({ th: o }) => [
|
|
938
|
-
O("div", {
|
|
939
|
-
innerHTML: o,
|
|
940
|
-
style: { display: "flex", "align-items": "center" }
|
|
941
|
-
}, null, 8, ko)
|
|
942
|
-
]),
|
|
943
|
-
td: x(({ td: o }) => [
|
|
944
|
-
de(K(o.name || o), 1)
|
|
945
|
-
]),
|
|
946
|
-
_: 1
|
|
947
|
-
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
948
|
-
]),
|
|
949
|
-
_: 1
|
|
950
|
-
}, 8, ["config"])) : _("", !0)
|
|
951
|
-
], 46, eo));
|
|
952
|
-
}
|
|
953
|
-
}, Vo = /* @__PURE__ */ Gt(wo, [["__scopeId", "data-v-c7aece99"]]);
|
|
954
|
-
export {
|
|
955
|
-
Vo as default
|
|
956
|
-
};
|