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