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