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