vue-data-ui 3.0.22 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-C3_2GkYQ.js → Arrow-DvG07exK.js} +1 -1
- package/dist/{BaseDraggableDialog-BhxUDwEm.js → BaseDraggableDialog-O7900pGp.js} +72 -59
- package/dist/{BaseIcon-B717hnWR.js → BaseIcon-DHtro8us.js} +1 -1
- package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
- package/dist/{ColorPicker-CH5_RNaK.js → ColorPicker-CpWzNn4r.js} +2 -2
- package/dist/DataTable-DJjA2_wf.js +140 -0
- package/dist/Legend-2-dC7DVb.js +72 -0
- package/dist/{NonSvgPenAndPaper-DCJGSteM.js → NonSvgPenAndPaper-DHeE4Yuv.js} +3 -3
- package/dist/{PackageVersion-CE7HSich.js → PackageVersion-DU12WH3O.js} +1 -1
- package/dist/{PenAndPaper-BMHsOtT8.js → PenAndPaper-B7QEDgx4.js} +3 -3
- package/dist/{Shape-C3J8aKNH.js → Shape-Dj2Hl33H.js} +1 -1
- package/dist/{Slicer-BEBDljWA.js → Slicer-D99HytqX.js} +2 -2
- package/dist/{SparkTooltip-CVSZQtoP.js → SparkTooltip-B-wL07rI.js} +1 -1
- package/dist/{Title-BL-IjQmj.js → Title-Dq2_Z9kR.js} +1 -1
- package/dist/{Tooltip-CCnDaboi.js → Tooltip-Y219DXZO.js} +1 -1
- package/dist/{UserOptions-BWMV0_Ze.js → UserOptions-BuGfCdAY.js} +2 -2
- package/dist/{dom-to-png-DwUGURhV.js → dom-to-png-BhciAKaM.js} +1 -1
- package/dist/{img-DsVqerdt.js → img-JOqdlnUs.js} +1 -1
- package/dist/{index-BHb_mcWF.js → index-CDQbCd41.js} +37 -2
- package/dist/{pdf-Ckt8JtYf.js → pdf-Dd-LIJqz.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +35 -0
- package/dist/types/vue-data-ui.d.ts +35 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-Cy946l1e.js → useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js} +1 -1
- package/dist/{useNestedProp-aC9S6EFJ.js → useNestedProp-BPEHGiYX.js} +1 -1
- package/dist/{usePrinter-B7rhbRrT.js → usePrinter-Bnl1YeUU.js} +2 -2
- package/dist/{vue-data-ui-Bu7qDtf0.js → vue-data-ui-DcNYz3cZ.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BNIFAeN-.js +1369 -0
- package/dist/{vue-ui-accordion-DsnF0JuK.js → vue-ui-accordion-Bf_LHFFX.js} +3 -3
- package/dist/{vue-ui-age-pyramid-s8xyb3Gf.js → vue-ui-age-pyramid-Bz-l1afR.js} +333 -286
- package/dist/{vue-ui-annotator-DRacM62z.js → vue-ui-annotator-BcfRH2BF.js} +2 -2
- package/dist/{vue-ui-bullet-DdDrdyOJ.js → vue-ui-bullet-DK1aM9fX.js} +8 -8
- package/dist/{vue-ui-candlestick-BsNnInNt.js → vue-ui-candlestick-D6mMjvtu.js} +453 -406
- package/dist/{vue-ui-carousel-table-Ci9mrUBd.js → vue-ui-carousel-table-Vp5f238W.js} +4 -4
- package/dist/{vue-ui-chestnut-fHfJNK0V.js → vue-ui-chestnut-BKc4v-lf.js} +509 -459
- package/dist/vue-ui-chord-CquhRjf0.js +1100 -0
- package/dist/vue-ui-circle-pack-D6zLgxa3.js +755 -0
- package/dist/{vue-ui-cursor-Bk5LHg5V.js → vue-ui-cursor-DIXb2S93.js} +2 -2
- package/dist/{vue-ui-dashboard-CjZMEYs6.js → vue-ui-dashboard-DmiriAK7.js} +62 -62
- package/dist/{vue-ui-digits-nDIvHyRB.js → vue-ui-digits-CLAIo9gW.js} +2 -2
- package/dist/{vue-ui-donut-CF9FdxfC.js → vue-ui-donut-C8h_tCSO.js} +477 -431
- package/dist/{vue-ui-donut-evolution-f5k-Yu3N.js → vue-ui-donut-evolution-C3r0YhKz.js} +482 -435
- package/dist/{vue-ui-dumbbell-Dm3gsrzi.js → vue-ui-dumbbell-D-t4M00E.js} +443 -398
- package/dist/vue-ui-flow-D7_D_UNm.js +900 -0
- package/dist/vue-ui-funnel-B0QOfZRz.js +666 -0
- package/dist/vue-ui-galaxy-Ccw5uNes.js +744 -0
- package/dist/{vue-ui-gauge-DkDpUAN7.js → vue-ui-gauge-DvW7nFmK.js} +8 -8
- package/dist/{vue-ui-gizmo-BD5fLs8r.js → vue-ui-gizmo-WGQxvGPy.js} +4 -4
- package/dist/vue-ui-heatmap-BQkLujyp.js +1127 -0
- package/dist/{vue-ui-history-plot-ICoBBO-y.js → vue-ui-history-plot-eU33r_Ot.js} +408 -361
- package/dist/{vue-ui-kpi-Dp2M2EFo.js → vue-ui-kpi-CKg2i71M.js} +3 -3
- package/dist/{vue-ui-mini-loader-C5672jjA.js → vue-ui-mini-loader-BmkGQsm_.js} +2 -2
- package/dist/vue-ui-molecule-Dlu0hjSg.js +702 -0
- package/dist/{vue-ui-mood-radar-B-qhYUcB.js → vue-ui-mood-radar-DQaxfw9R.js} +342 -291
- package/dist/{vue-ui-nested-donuts-V6BvP3pF.js → vue-ui-nested-donuts-Djj9Aw_i.js} +548 -502
- package/dist/{vue-ui-onion-BKqqbWbg.js → vue-ui-onion-ZgsErXis.js} +363 -317
- package/dist/vue-ui-parallel-coordinate-plot-B5fB22Jc.js +979 -0
- package/dist/vue-ui-quadrant-CMevCtXH.js +1483 -0
- package/dist/{vue-ui-quick-chart-BVZSdQeT.js → vue-ui-quick-chart-DcparKSX.js} +7 -7
- package/dist/vue-ui-radar-DFbxoKCK.js +858 -0
- package/dist/{vue-ui-rating-CncrxDCY.js → vue-ui-rating-ZUpxCWrk.js} +2 -2
- package/dist/{vue-ui-relation-circle-VYM1dclx.js → vue-ui-relation-circle-eNKJY4Sx.js} +8 -8
- package/dist/vue-ui-ridgeline-D4shpQZd.js +1204 -0
- package/dist/vue-ui-rings-TdTHMbsa.js +785 -0
- package/dist/{vue-ui-scatter-D2b-u5dv.js → vue-ui-scatter-CVuV9ljU.js} +594 -548
- package/dist/{vue-ui-skeleton-BTuBaaE_.js → vue-ui-skeleton-CFxBU2-p.js} +3 -3
- package/dist/{vue-ui-smiley-D1UxJNbV.js → vue-ui-smiley-Har3B3aQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-BCP0BWMI.js → vue-ui-spark-trend-FPk-XEwI.js} +4 -4
- package/dist/{vue-ui-sparkbar-eBo-RSvE.js → vue-ui-sparkbar-V3eJ0w0t.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DberOXWX.js → vue-ui-sparkgauge-DKTGkWnJ.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-CoKQGG5X.js → vue-ui-sparkhistogram-DJsgFwHs.js} +5 -5
- package/dist/{vue-ui-sparkline-B_L4UNES.js → vue-ui-sparkline-Dmrm5SL5.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-iAaRIyqb.js → vue-ui-sparkstackbar-B0Pl7VMI.js} +4 -4
- package/dist/{vue-ui-stackbar-B_0PJ7R2.js → vue-ui-stackbar-CNsgBPhj.js} +525 -479
- package/dist/{vue-ui-strip-plot-CWkA4l9P.js → vue-ui-strip-plot-CYAWwYOM.js} +390 -343
- package/dist/{vue-ui-table-CILVy7YP.js → vue-ui-table-Dn6H98rP.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DL2n2Z7p.js → vue-ui-table-heatmap-COI9LRqC.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DOt2EKpe.js → vue-ui-table-sparkline-B7Gg5FfJ.js} +4 -4
- package/dist/{vue-ui-thermometer-BTP1ic_T.js → vue-ui-thermometer-Bgynq5El.js} +8 -8
- package/dist/{vue-ui-timer-Bc-zJH9j.js → vue-ui-timer-CXng51v5.js} +5 -5
- package/dist/{vue-ui-tiremarks-B9n528e1.js → vue-ui-tiremarks-Cy1U3hO1.js} +7 -7
- package/dist/vue-ui-treemap-BsvIvRmE.js +1092 -0
- package/dist/{vue-ui-vertical-bar-CK2j09gJ.js → vue-ui-vertical-bar-DHqWeDIf.js} +512 -464
- package/dist/{vue-ui-waffle-DJkqgqlR.js → vue-ui-waffle-D1Mscj3N.js} +416 -370
- package/dist/{vue-ui-wheel-CcbgpIUr.js → vue-ui-wheel-DpV-N5tF.js} +7 -7
- package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +811 -0
- package/dist/{vue-ui-world-DLmB_Z96.js → vue-ui-world-DYz6zw3x.js} +512 -466
- package/dist/{vue-ui-xy-KmrNT6qh.js → vue-ui-xy-B1nqNbzw.js} +1559 -1508
- package/dist/vue-ui-xy-canvas-D4wd-Asd.js +1291 -0
- package/package.json +1 -1
- package/dist/DataTable-Y5T9UxMO.js +0 -133
- package/dist/Legend-DkU3at-b.js +0 -72
- package/dist/vue-ui-3d-bar-CBfQ3Pcb.js +0 -1323
- package/dist/vue-ui-chord-0wf798ls.js +0 -1049
- package/dist/vue-ui-circle-pack-CuRHG8gr.js +0 -709
- package/dist/vue-ui-flow-K7UBguES.js +0 -852
- package/dist/vue-ui-funnel-DoDZbsTp.js +0 -620
- package/dist/vue-ui-galaxy-BsDlHxzE.js +0 -691
- package/dist/vue-ui-heatmap-DOT2tBy_.js +0 -1078
- package/dist/vue-ui-molecule-DgqVh2k0.js +0 -656
- package/dist/vue-ui-parallel-coordinate-plot-BZf24Zur.js +0 -927
- package/dist/vue-ui-quadrant-S58B2LrQ.js +0 -1432
- package/dist/vue-ui-radar-Dh67mQ9E.js +0 -807
- package/dist/vue-ui-ridgeline-CsByERvm.js +0 -1157
- package/dist/vue-ui-rings-CR2UfgnV.js +0 -739
- package/dist/vue-ui-treemap-Cl9qo9O-.js +0 -1046
- package/dist/vue-ui-word-cloud-CZ_TRf4o.js +0 -765
- package/dist/vue-ui-xy-canvas-6VYNyX6a.js +0 -1243
|
@@ -0,0 +1,1092 @@
|
|
|
1
|
+
import { defineAsyncComponent as te, useSlots as Ut, onMounted as gt, computed as b, ref as m, shallowRef as U, toRefs as Ht, watch as ke, onBeforeUnmount as Wt, createElementBlock as y, openBlock as d, unref as c, normalizeStyle as M, normalizeClass as Re, createBlock as Z, createCommentVNode as _, createElementVNode as O, createVNode as we, createSlots as mt, withCtx as T, renderSlot as C, normalizeProps as le, guardReactiveProps as oe, Fragment as Ce, renderList as Le, withKeys as yt, withModifiers as Me, mergeProps as Be, createTextVNode as $e, toDisplayString as H, Teleport as Gt, resolveDynamicComponent as Xt, nextTick as qt } from "vue";
|
|
2
|
+
import { u as Yt, c as Te, t as jt, a as Zt, p as F, b as Kt, d as Jt, o as bt, f as Qt, e as de, k as xe, i as he, X as el, l as kt, F as wt, y as Ct, v as tl, w as ll, z as ol } from "./index-CDQbCd41.js";
|
|
3
|
+
import { t as al, u as nl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as sl, B as ul } from "./BaseScanner-BgWxam9d.js";
|
|
5
|
+
import { u as rl } from "./usePrinter-Bnl1YeUU.js";
|
|
6
|
+
import { u as $t } from "./useNestedProp-BPEHGiYX.js";
|
|
7
|
+
import { u as il } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as cl } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import vl from "./img-JOqdlnUs.js";
|
|
10
|
+
import dl from "./Title-Dq2_Z9kR.js";
|
|
11
|
+
import hl from "./Legend-2-dC7DVb.js";
|
|
12
|
+
import Tt from "./BaseIcon-DHtro8us.js";
|
|
13
|
+
import { _ as pl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
function xt(n, r) {
|
|
15
|
+
const s = n.length;
|
|
16
|
+
if (s === 0)
|
|
17
|
+
throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
|
|
18
|
+
{
|
|
19
|
+
let i = 1 / 0, u = -1 / 0, h = 0;
|
|
20
|
+
for (let g = 0; g < s; g += 1) {
|
|
21
|
+
const f = n[g].normalizedValue;
|
|
22
|
+
f < i && (i = f), f > u && (u = f), h += f;
|
|
23
|
+
}
|
|
24
|
+
return Math.max(
|
|
25
|
+
r ** 2 * u / h ** 2,
|
|
26
|
+
h ** 2 / (r ** 2 * i)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function _t(n) {
|
|
31
|
+
const { xOffset: r, yOffset: s, width: i, height: u } = n;
|
|
32
|
+
return {
|
|
33
|
+
x0: r,
|
|
34
|
+
y0: s,
|
|
35
|
+
x1: r + i,
|
|
36
|
+
y1: s + u
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function fl(n, r, s) {
|
|
40
|
+
if (n.length === 0)
|
|
41
|
+
return !0;
|
|
42
|
+
{
|
|
43
|
+
const i = n.concat(r), u = xt(
|
|
44
|
+
n,
|
|
45
|
+
s
|
|
46
|
+
), h = xt(i, s);
|
|
47
|
+
return u >= h;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function gl(n) {
|
|
51
|
+
const r = [], s = n.length;
|
|
52
|
+
for (let i = 0; i < s; i += 1) {
|
|
53
|
+
const u = n[i], h = u.length;
|
|
54
|
+
for (let v = 0; v < h; v += 1)
|
|
55
|
+
r.push(u[v]);
|
|
56
|
+
}
|
|
57
|
+
return r;
|
|
58
|
+
}
|
|
59
|
+
function ml(n, r) {
|
|
60
|
+
const s = {
|
|
61
|
+
...r,
|
|
62
|
+
children: n
|
|
63
|
+
};
|
|
64
|
+
return At(s);
|
|
65
|
+
}
|
|
66
|
+
function yl(n) {
|
|
67
|
+
return (n.x1 - n.x0) * (n.y1 - n.y0);
|
|
68
|
+
}
|
|
69
|
+
function Ot(n, r) {
|
|
70
|
+
const { width: s, height: i, xOffset: u, yOffset: h } = Ve(r), v = n.length, g = n.map((w) => w.normalizedValue || 0).reduce((w, N) => w + N, 0), f = g / i, W = g / s;
|
|
71
|
+
let D = u, k = h;
|
|
72
|
+
const $ = [];
|
|
73
|
+
if (s >= i) {
|
|
74
|
+
for (let w = 0; w < v; w += 1) {
|
|
75
|
+
const N = n[w], B = k + N.normalizedValue / f, A = {
|
|
76
|
+
x0: D,
|
|
77
|
+
y0: k,
|
|
78
|
+
x1: D + f,
|
|
79
|
+
y1: B
|
|
80
|
+
}, P = Object.assign({}, N, A);
|
|
81
|
+
k = B, $.push(P);
|
|
82
|
+
}
|
|
83
|
+
return $;
|
|
84
|
+
} else {
|
|
85
|
+
for (let w = 0; w < v; w += 1) {
|
|
86
|
+
const N = n[w], B = D + N.normalizedValue / W, A = {
|
|
87
|
+
x0: D,
|
|
88
|
+
y0: k,
|
|
89
|
+
x1: B,
|
|
90
|
+
y1: k + W
|
|
91
|
+
}, P = Object.assign({}, N, A);
|
|
92
|
+
D = B, $.push(P);
|
|
93
|
+
}
|
|
94
|
+
return $;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function bl(n) {
|
|
98
|
+
const r = Ve(n), s = r.width, i = r.height;
|
|
99
|
+
return Math.min(s, i);
|
|
100
|
+
}
|
|
101
|
+
function kl(n, r) {
|
|
102
|
+
const s = n.length, i = n.map((f) => f.value ?? 0).reduce((f, W) => f + W, 0), u = r / i, h = [];
|
|
103
|
+
let v, g;
|
|
104
|
+
for (let f = 0; f < s; f += 1)
|
|
105
|
+
g = n[f], v = Object.assign({}, g, {
|
|
106
|
+
normalizedValue: g.value * (u || 0)
|
|
107
|
+
}), h.push(v);
|
|
108
|
+
return h;
|
|
109
|
+
}
|
|
110
|
+
function Ve(n) {
|
|
111
|
+
const { x0: r, y0: s, x1: i, y1: u } = n;
|
|
112
|
+
return {
|
|
113
|
+
xOffset: r,
|
|
114
|
+
yOffset: s,
|
|
115
|
+
width: i - r,
|
|
116
|
+
height: u - s
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function wl(n, r, s, i) {
|
|
120
|
+
let u = n, h = r, v = s, g = i;
|
|
121
|
+
for (; ; ) {
|
|
122
|
+
const f = u.length;
|
|
123
|
+
if (f === 0) {
|
|
124
|
+
const $ = Ot(h, v);
|
|
125
|
+
return g.concat($);
|
|
126
|
+
}
|
|
127
|
+
const W = bl(v), D = u[0], k = u.slice(1, f);
|
|
128
|
+
if (fl(h, D, W)) {
|
|
129
|
+
const $ = h.concat(D);
|
|
130
|
+
u = k, h = $, v = v, g = g;
|
|
131
|
+
} else {
|
|
132
|
+
const $ = h.length;
|
|
133
|
+
let w = 0;
|
|
134
|
+
for (let P = 0; P < $; P += 1)
|
|
135
|
+
w += h[P].normalizedValue;
|
|
136
|
+
const N = Cl(v, w), B = Ot(h, v), A = g.concat(B);
|
|
137
|
+
u = u, h = [], v = N, g = A;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function At(n) {
|
|
142
|
+
if (typeof n.children > "u" || !n.children.length)
|
|
143
|
+
return [n];
|
|
144
|
+
{
|
|
145
|
+
const r = kl(
|
|
146
|
+
n.children,
|
|
147
|
+
yl(n)
|
|
148
|
+
), s = wl(r, [], n, []), i = s.length, u = [];
|
|
149
|
+
for (let v = 0; v < i; v += 1)
|
|
150
|
+
u.push(At(s[v]));
|
|
151
|
+
return gl(u);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function Cl(n, r) {
|
|
155
|
+
const { width: s, height: i, xOffset: u, yOffset: h } = Ve(n);
|
|
156
|
+
if (s >= i) {
|
|
157
|
+
const v = r / i, g = s - v, f = {
|
|
158
|
+
xOffset: u + v,
|
|
159
|
+
yOffset: h,
|
|
160
|
+
width: g,
|
|
161
|
+
height: i
|
|
162
|
+
};
|
|
163
|
+
return _t(f);
|
|
164
|
+
} else {
|
|
165
|
+
const v = r / s, g = i - v, f = {
|
|
166
|
+
xOffset: u,
|
|
167
|
+
yOffset: h + v,
|
|
168
|
+
width: s,
|
|
169
|
+
height: g
|
|
170
|
+
};
|
|
171
|
+
return _t(f);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const $l = ["id"], Tl = ["id"], xl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], _l = { class: "vue-ui-treemap-crumb-unit" }, Ol = { class: "vue-ui-treemap-crumb-unit-label" }, Al = {
|
|
175
|
+
key: 0,
|
|
176
|
+
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
177
|
+
}, Sl = {
|
|
178
|
+
key: 0,
|
|
179
|
+
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
180
|
+
}, Il = ["xmlns", "viewBox"], Fl = { key: 0 }, Nl = ["id"], Pl = ["stop-color"], zl = ["stop-color"], Dl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Rl = ["x", "y", "height", "width"], Ll = {
|
|
181
|
+
style: { width: "100%", height: "100%" },
|
|
182
|
+
class: "vue-ui-treemap-cell"
|
|
183
|
+
}, Ml = {
|
|
184
|
+
key: 5,
|
|
185
|
+
class: "vue-data-ui-watermark"
|
|
186
|
+
}, Bl = ["id"], Vl = ["onClick"], El = ["innerHTML"], Ul = {
|
|
187
|
+
__name: "vue-ui-treemap",
|
|
188
|
+
props: {
|
|
189
|
+
config: {
|
|
190
|
+
type: Object,
|
|
191
|
+
default() {
|
|
192
|
+
return {};
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
dataset: {
|
|
196
|
+
type: Array,
|
|
197
|
+
default() {
|
|
198
|
+
return [];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
203
|
+
setup(n, { expose: r, emit: s }) {
|
|
204
|
+
const i = te(() => import("./DataTable-DJjA2_wf.js")), u = te(() => import("./PenAndPaper-B7QEDgx4.js")), h = te(() => import("./vue-ui-accordion-Bf_LHFFX.js")), v = te(() => import("./Tooltip-Y219DXZO.js")), g = te(() => import("./UserOptions-BuGfCdAY.js")), f = te(() => import("./PackageVersion-DU12WH3O.js")), W = te(() => import("./BaseDraggableDialog-O7900pGp.js")), { vue_ui_treemap: D } = Yt(), k = n, $ = s, w = Ut();
|
|
205
|
+
gt(() => {
|
|
206
|
+
w["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
207
|
+
});
|
|
208
|
+
const N = b(() => !!k.dataset && k.dataset.length), B = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), A = m(Te()), P = m(!1), _e = m(""), K = m(!1), Ee = m(0), R = m([]), V = U(null), Ue = U(null), He = U(null), We = U(null), Ge = U(null), Xe = m(0), Oe = m(0), Ae = m(0), x = m([]), Se = m(null), qe = m(!1), ue = m(null), e = m(Ne()), { loading: re, FINAL_DATASET: Ie, manualLoading: St } = sl({
|
|
209
|
+
...Ht(k),
|
|
210
|
+
FINAL_CONFIG: e,
|
|
211
|
+
prepareConfig: Ne,
|
|
212
|
+
skeletonDataset: [
|
|
213
|
+
{
|
|
214
|
+
name: "_",
|
|
215
|
+
value: 53,
|
|
216
|
+
color: "#CACACA90",
|
|
217
|
+
children: [
|
|
218
|
+
{ name: "_", value: 21 },
|
|
219
|
+
{ name: "_", value: 13 },
|
|
220
|
+
{ name: "_", value: 8 },
|
|
221
|
+
{ name: "_", value: 5 },
|
|
222
|
+
{ name: "_", value: 3 },
|
|
223
|
+
{ name: "_", value: 2 },
|
|
224
|
+
{ name: "_", value: 1 }
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
skeletonConfig: jt({
|
|
229
|
+
defaultConfig: e.value,
|
|
230
|
+
userConfig: {
|
|
231
|
+
userOptions: { show: !1 },
|
|
232
|
+
style: {
|
|
233
|
+
chart: {
|
|
234
|
+
backgroundColor: "#999999",
|
|
235
|
+
layout: {
|
|
236
|
+
labels: {
|
|
237
|
+
showDefaultLabels: !1
|
|
238
|
+
},
|
|
239
|
+
rects: {
|
|
240
|
+
stroke: "#6A6A6A"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
legend: {
|
|
244
|
+
backgroundColor: "transparent"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
}), { userOptionsVisible: Fe, setUserOptionsVisibility: Ye, keepUserOptionState: je } = il({ config: e.value }), { svgRef: Ze } = cl({ config: e.value.style.chart.title });
|
|
251
|
+
function Ne() {
|
|
252
|
+
const t = $t({
|
|
253
|
+
userConfig: k.config,
|
|
254
|
+
defaultConfig: D
|
|
255
|
+
});
|
|
256
|
+
return t.theme ? {
|
|
257
|
+
...$t({
|
|
258
|
+
userConfig: Kt.vue_ui_treemap[t.theme] || k.config,
|
|
259
|
+
defaultConfig: t
|
|
260
|
+
}),
|
|
261
|
+
customPalette: Zt[t.theme] || F
|
|
262
|
+
} : t;
|
|
263
|
+
}
|
|
264
|
+
ke(() => k.config, (t) => {
|
|
265
|
+
re.value || (e.value = Ne()), Fe.value = !e.value.userOptions.showOnChartHover, Xe.value += 1, Oe.value += 1, Ae.value += 1, I.value.showTable = e.value.table.show, I.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
266
|
+
}, { deep: !0 });
|
|
267
|
+
const { isPrinting: Ke, isImaging: Je, generatePdf: Qe, generateImage: et } = rl({
|
|
268
|
+
elementId: `treemap_${A.value}`,
|
|
269
|
+
fileName: e.value.style.chart.title.text || "vue-ui-treemap",
|
|
270
|
+
options: e.value.userOptions.print
|
|
271
|
+
}), It = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), pe = b(() => Jt(e.value.customPalette)), I = m({
|
|
272
|
+
showTable: e.value.table.show,
|
|
273
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
274
|
+
});
|
|
275
|
+
ke(e, () => {
|
|
276
|
+
I.value = {
|
|
277
|
+
showTable: e.value.table.show,
|
|
278
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
279
|
+
};
|
|
280
|
+
}, { immediate: !0 });
|
|
281
|
+
const G = m({
|
|
282
|
+
height: e.value.style.chart.height,
|
|
283
|
+
width: e.value.style.chart.width
|
|
284
|
+
}), J = b(() => ({
|
|
285
|
+
bottom: G.value.height - e.value.style.chart.padding.bottom,
|
|
286
|
+
height: G.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
|
|
287
|
+
left: e.value.style.chart.padding.left,
|
|
288
|
+
right: G.value.width - e.value.style.chart.padding.right,
|
|
289
|
+
top: e.value.style.chart.padding.top,
|
|
290
|
+
vbHeight: G.value.height,
|
|
291
|
+
vbWidth: G.value.width,
|
|
292
|
+
width: G.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
|
|
293
|
+
})), z = m(Ie.value), X = m(z.value), tt = U(/* @__PURE__ */ new Map());
|
|
294
|
+
function lt(t) {
|
|
295
|
+
Array.isArray(t) && t.forEach((o, l) => {
|
|
296
|
+
o.id || (o.id = Te());
|
|
297
|
+
let a = de(o.color) || tt.value.get(o.id) || pe.value[l] || F[l] || F[l % F.length];
|
|
298
|
+
a = de(a), tt.value.set(o.id, a), o.color = a, ot(o, a);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function ot(t, o) {
|
|
302
|
+
Array.isArray(t.children) && t.children.forEach((l) => {
|
|
303
|
+
l.id || (l.id = Te()), l.parentId = t.id, l.color = o, ot(l, o);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function Ft() {
|
|
307
|
+
if (!x.value.length)
|
|
308
|
+
X.value = z.value.slice();
|
|
309
|
+
else {
|
|
310
|
+
const t = x.value[x.value.length - 1], o = Y(t);
|
|
311
|
+
X.value = o?.children?.slice() || [];
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
ke(
|
|
315
|
+
() => Ie.value,
|
|
316
|
+
() => {
|
|
317
|
+
z.value = Ie.value, lt(z.value), Ft(), Ae.value += 1, Oe.value += 1;
|
|
318
|
+
},
|
|
319
|
+
{ deep: !0, immediate: !0, flush: "post" }
|
|
320
|
+
);
|
|
321
|
+
const q = U(null), ae = U(null);
|
|
322
|
+
gt(() => {
|
|
323
|
+
qe.value = !0, Pt();
|
|
324
|
+
});
|
|
325
|
+
const Nt = b(() => e.value.debug);
|
|
326
|
+
function Pt() {
|
|
327
|
+
if (bt(k.dataset) && Qt({
|
|
328
|
+
componentName: "VueUiTreemap",
|
|
329
|
+
type: "dataset",
|
|
330
|
+
debug: Nt.value
|
|
331
|
+
}), lt(z.value), bt(k.dataset) || (St.value = e.value.loading), e.value.responsive) {
|
|
332
|
+
const t = al(() => {
|
|
333
|
+
const { width: o, height: l } = nl({
|
|
334
|
+
chart: V.value,
|
|
335
|
+
title: e.value.style.chart.title.text ? Ue.value : null,
|
|
336
|
+
legend: e.value.style.chart.legend.show ? He.value : null,
|
|
337
|
+
source: We.value,
|
|
338
|
+
noTitle: Ge.value
|
|
339
|
+
});
|
|
340
|
+
requestAnimationFrame(() => {
|
|
341
|
+
G.value.width = o, G.value.height = l - 12;
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
q.value && (ae.value && q.value.unobserve(ae.value), q.value.disconnect()), q.value = new ResizeObserver(t), ae.value = V.value.parentNode, q.value.observe(ae.value);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
Wt(() => {
|
|
348
|
+
q.value && (ae.value && q.value.unobserve(ae.value), q.value.disconnect());
|
|
349
|
+
});
|
|
350
|
+
const ie = b(() => X.value.map((t, o) => ({
|
|
351
|
+
...t,
|
|
352
|
+
color: de(t.color) || pe.value[o] || F[o] || F[o % F.length]
|
|
353
|
+
})).filter((t) => !R.value.includes(t.id))), ne = b(() => z.value.filter((t) => !R.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), at = b({
|
|
354
|
+
get() {
|
|
355
|
+
let t = [...ie.value];
|
|
356
|
+
return e.value.style.chart.layout.sorted && (t = [...ie.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
|
|
357
|
+
...o
|
|
358
|
+
}));
|
|
359
|
+
},
|
|
360
|
+
set(t) {
|
|
361
|
+
return t;
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
function nt(t, o) {
|
|
365
|
+
return t.value / o;
|
|
366
|
+
}
|
|
367
|
+
function zt(t, o, l) {
|
|
368
|
+
const a = e.value.style.chart.layout.rects.colorRatio - nt(o, l);
|
|
369
|
+
return kt(t, a < 0 ? 0 : a);
|
|
370
|
+
}
|
|
371
|
+
function st(t, o, l, a) {
|
|
372
|
+
return t.map((p, S) => {
|
|
373
|
+
const be = zt(de(o) || pe.value[S] || F[S] || F[S % F.length], p, a), Et = nt(p, a);
|
|
374
|
+
return {
|
|
375
|
+
...p,
|
|
376
|
+
color: be,
|
|
377
|
+
proportion: Et,
|
|
378
|
+
parentName: l,
|
|
379
|
+
children: p.children ? st(p.children, be, p.name, a) : void 0
|
|
380
|
+
};
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
const ce = b(() => ml(
|
|
384
|
+
at.value.map((t, o) => {
|
|
385
|
+
const l = t.children ? t.children.reduce((a, p) => a + p.value, 0) : t.value;
|
|
386
|
+
return {
|
|
387
|
+
value: t.value,
|
|
388
|
+
id: t.id || Te(),
|
|
389
|
+
children: t.children ? st(t.children.sort((a, p) => p.value - a.value), t.color, t.name, l) : void 0,
|
|
390
|
+
color: t.color,
|
|
391
|
+
name: t.name
|
|
392
|
+
};
|
|
393
|
+
}),
|
|
394
|
+
{ x0: J.value.left * 2, y0: J.value.top, x1: J.value.width, y1: J.value.height }
|
|
395
|
+
));
|
|
396
|
+
function ut({ y0: t, y1: o }) {
|
|
397
|
+
return o - t <= 0 ? 1e-4 : o - t;
|
|
398
|
+
}
|
|
399
|
+
function rt({ x0: t, x1: o }) {
|
|
400
|
+
return o - t <= 0 ? 1e-4 : o - t;
|
|
401
|
+
}
|
|
402
|
+
function Q(t) {
|
|
403
|
+
const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
|
|
404
|
+
return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
|
|
405
|
+
}
|
|
406
|
+
function it(t) {
|
|
407
|
+
K.value = t, Ee.value += 1;
|
|
408
|
+
}
|
|
409
|
+
const se = b(() => {
|
|
410
|
+
let t = 0;
|
|
411
|
+
return Se.value && (t = Se.value.getBoundingClientRect().height), {
|
|
412
|
+
startX: 0,
|
|
413
|
+
startY: 0,
|
|
414
|
+
width: J.value.vbWidth,
|
|
415
|
+
height: J.value.vbHeight - t
|
|
416
|
+
};
|
|
417
|
+
});
|
|
418
|
+
function Y(t, o = z.value) {
|
|
419
|
+
for (const l of o) {
|
|
420
|
+
if (l.id === t)
|
|
421
|
+
return l;
|
|
422
|
+
if (l.children) {
|
|
423
|
+
const a = Y(t, l.children);
|
|
424
|
+
if (a)
|
|
425
|
+
return a;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
const ee = b(() => x.value.length > 0);
|
|
431
|
+
function fe(t, o) {
|
|
432
|
+
if (!t) {
|
|
433
|
+
X.value = z.value.slice(), $("selectDatapoint", void 0), x.value = [];
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
|
|
437
|
+
const l = Y(t.id);
|
|
438
|
+
if (l && l.children?.length)
|
|
439
|
+
x.value.push(l.id), X.value = l.children.slice(), $("selectDatapoint", t);
|
|
440
|
+
else if (t.parentId) {
|
|
441
|
+
x.value.push(t.parentId);
|
|
442
|
+
const a = Y(t.parentId);
|
|
443
|
+
X.value = a.children.slice(), $("selectDatapoint", t);
|
|
444
|
+
} else if (x.value.length > 0) {
|
|
445
|
+
x.value.pop();
|
|
446
|
+
const a = x.value[x.value.length - 1];
|
|
447
|
+
if (a) {
|
|
448
|
+
const p = Y(a);
|
|
449
|
+
X.value = p.children.slice();
|
|
450
|
+
} else
|
|
451
|
+
X.value = z.value.slice(), x.value = [], $("selectDatapoint", void 0);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
function Dt(t) {
|
|
455
|
+
return !!(Y(t.id)?.children?.length || t.parentId);
|
|
456
|
+
}
|
|
457
|
+
const j = b(() => {
|
|
458
|
+
const t = [
|
|
459
|
+
{ id: null, label: "All" }
|
|
460
|
+
];
|
|
461
|
+
if (x.value.length > 0) {
|
|
462
|
+
let o = Y(x.value[x.value.length - 1]);
|
|
463
|
+
const l = [];
|
|
464
|
+
for (; o; )
|
|
465
|
+
l.unshift(o), o = o.parentId ? Y(o.parentId) : null;
|
|
466
|
+
for (const a of l)
|
|
467
|
+
t.push({
|
|
468
|
+
id: a.id,
|
|
469
|
+
label: a.name,
|
|
470
|
+
node: a
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
return t;
|
|
474
|
+
}), L = U(null), ct = b(() => z.value.map((t, o) => ({
|
|
475
|
+
...t,
|
|
476
|
+
color: de(t.color) || pe.value[o] || F[o] || F[o % F.length],
|
|
477
|
+
shape: "square"
|
|
478
|
+
})).sort((t, o) => o.value - t.value).map((t, o) => ({
|
|
479
|
+
...t,
|
|
480
|
+
proportion: t.value / z.value.map((l) => l.value).reduce((l, a) => l + a, 0),
|
|
481
|
+
opacity: R.value.includes(t.id) ? 0.5 : 1
|
|
482
|
+
}))), Rt = b(() => ({
|
|
483
|
+
cy: "treemap-div-legend",
|
|
484
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
485
|
+
color: e.value.style.chart.legend.color,
|
|
486
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
487
|
+
paddingBottom: 12,
|
|
488
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
489
|
+
}));
|
|
490
|
+
function vt(t) {
|
|
491
|
+
L.value = null, R.value.includes(t.id) ? R.value = R.value.filter((o) => o !== t.id) : R.value.length < k.dataset.length - 1 && R.value.push(t.id), $("selectLegend", at.value);
|
|
492
|
+
}
|
|
493
|
+
function Lt({ datapoint: t, seriesIndex: o }) {
|
|
494
|
+
L.value = null, P.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
|
|
495
|
+
}
|
|
496
|
+
const Pe = m(null);
|
|
497
|
+
function Mt({ datapoint: t, seriesIndex: o }) {
|
|
498
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o }), L.value = t, Pe.value = { datapoint: t, seriesIndex: o, config: e.value, series: ie.value };
|
|
499
|
+
const l = e.value.style.chart.tooltip.customFormat;
|
|
500
|
+
if (Ct(l) && ol(() => l({
|
|
501
|
+
seriesIndex: o,
|
|
502
|
+
datapoint: t,
|
|
503
|
+
series: ie.value,
|
|
504
|
+
config: e.value
|
|
505
|
+
})))
|
|
506
|
+
_e.value = l({
|
|
507
|
+
seriesIndex: o,
|
|
508
|
+
datapoint: t,
|
|
509
|
+
series: ie.value,
|
|
510
|
+
config: e.value
|
|
511
|
+
});
|
|
512
|
+
else {
|
|
513
|
+
let a = "";
|
|
514
|
+
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>${xe(
|
|
515
|
+
e.value.style.chart.layout.labels.formatter,
|
|
516
|
+
t.value,
|
|
517
|
+
he({
|
|
518
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
519
|
+
v: t.value,
|
|
520
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
521
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
522
|
+
}),
|
|
523
|
+
{ datapoint: t, seriesIndex: o }
|
|
524
|
+
)}</b>`, _e.value = `<div>${a}</div>`;
|
|
525
|
+
}
|
|
526
|
+
P.value = !0;
|
|
527
|
+
}
|
|
528
|
+
const E = b(() => {
|
|
529
|
+
const t = ce.value.map((l) => ({
|
|
530
|
+
name: l.name,
|
|
531
|
+
color: l.color
|
|
532
|
+
})), o = ce.value.map((l) => l.value);
|
|
533
|
+
return { head: t, body: o };
|
|
534
|
+
});
|
|
535
|
+
function ze(t = null) {
|
|
536
|
+
qt(() => {
|
|
537
|
+
const o = E.value.head.map((p, S) => [[
|
|
538
|
+
p.name
|
|
539
|
+
], [E.value.body[S]], [isNaN(E.value.body[S] / ne.value) ? "-" : E.value.body[S] / ne.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = tl(l);
|
|
540
|
+
t ? t(a) : ll({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
const ge = b(() => {
|
|
544
|
+
const t = [
|
|
545
|
+
e.value.table.columnNames.series,
|
|
546
|
+
e.value.table.columnNames.value,
|
|
547
|
+
e.value.table.columnNames.percentage
|
|
548
|
+
], o = E.value.head.map((p, S) => {
|
|
549
|
+
const be = xe(
|
|
550
|
+
e.value.style.chart.layout.labels.formatter,
|
|
551
|
+
E.value.body[S],
|
|
552
|
+
he({
|
|
553
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
554
|
+
v: E.value.body[S],
|
|
555
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
556
|
+
r: e.value.table.td.roundingValue
|
|
557
|
+
})
|
|
558
|
+
);
|
|
559
|
+
return [
|
|
560
|
+
{
|
|
561
|
+
color: p.color,
|
|
562
|
+
name: p.name,
|
|
563
|
+
shape: "square"
|
|
564
|
+
},
|
|
565
|
+
be,
|
|
566
|
+
isNaN(E.value.body[S] / ne.value) ? "-" : he({
|
|
567
|
+
v: E.value.body[S] / ne.value * 100,
|
|
568
|
+
s: "%",
|
|
569
|
+
r: e.value.table.td.roundingPercentage
|
|
570
|
+
})
|
|
571
|
+
];
|
|
572
|
+
}), l = {
|
|
573
|
+
th: {
|
|
574
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
575
|
+
color: e.value.table.th.color,
|
|
576
|
+
outline: e.value.table.th.outline
|
|
577
|
+
},
|
|
578
|
+
td: {
|
|
579
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
580
|
+
color: e.value.table.td.color,
|
|
581
|
+
outline: e.value.table.td.outline
|
|
582
|
+
},
|
|
583
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
584
|
+
};
|
|
585
|
+
return {
|
|
586
|
+
colNames: [
|
|
587
|
+
e.value.table.columnNames.series,
|
|
588
|
+
e.value.table.columnNames.value
|
|
589
|
+
],
|
|
590
|
+
head: t,
|
|
591
|
+
body: o,
|
|
592
|
+
config: l
|
|
593
|
+
};
|
|
594
|
+
});
|
|
595
|
+
function Bt() {
|
|
596
|
+
return ce.value;
|
|
597
|
+
}
|
|
598
|
+
function dt() {
|
|
599
|
+
I.value.showTable = !I.value.showTable;
|
|
600
|
+
}
|
|
601
|
+
function ht() {
|
|
602
|
+
I.value.showTooltip = !I.value.showTooltip;
|
|
603
|
+
}
|
|
604
|
+
const me = m(!1);
|
|
605
|
+
function De() {
|
|
606
|
+
me.value = !me.value;
|
|
607
|
+
}
|
|
608
|
+
const ye = m(null);
|
|
609
|
+
function pt(t) {
|
|
610
|
+
ye.value = t;
|
|
611
|
+
}
|
|
612
|
+
function ft() {
|
|
613
|
+
ye.value = null;
|
|
614
|
+
}
|
|
615
|
+
async function Vt({ scale: t = 2 } = {}) {
|
|
616
|
+
if (!V.value) return;
|
|
617
|
+
const { width: o, height: l } = V.value.getBoundingClientRect(), a = o / l, { imageUri: p, base64: S } = await vl({ domElement: V.value, base64: !0, img: !0, scale: t });
|
|
618
|
+
return {
|
|
619
|
+
imageUri: p,
|
|
620
|
+
base64: S,
|
|
621
|
+
title: e.value.style.chart.title.text,
|
|
622
|
+
width: o,
|
|
623
|
+
height: l,
|
|
624
|
+
aspectRatio: a
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
const ve = b(() => {
|
|
628
|
+
const t = e.value.table.useDialog && !e.value.table.show, o = I.value.showTable;
|
|
629
|
+
return {
|
|
630
|
+
component: t ? W : h,
|
|
631
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
632
|
+
props: t ? {
|
|
633
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
634
|
+
color: e.value.table.th.color,
|
|
635
|
+
headerColor: e.value.table.th.color,
|
|
636
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
637
|
+
isFullscreen: K.value,
|
|
638
|
+
fullscreenParent: V.value,
|
|
639
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
640
|
+
} : {
|
|
641
|
+
hideDetails: !0,
|
|
642
|
+
config: {
|
|
643
|
+
open: o,
|
|
644
|
+
maxHeight: 1e4,
|
|
645
|
+
body: {
|
|
646
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
647
|
+
color: e.value.style.chart.color
|
|
648
|
+
},
|
|
649
|
+
head: {
|
|
650
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
651
|
+
color: e.value.style.chart.color
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
});
|
|
657
|
+
return ke(() => I.value.showTable, (t) => {
|
|
658
|
+
e.value.table.show || (t && e.value.table.useDialog && ue.value ? ue.value.open() : "close" in ue.value && ue.value.close());
|
|
659
|
+
}), r({
|
|
660
|
+
getData: Bt,
|
|
661
|
+
getImage: Vt,
|
|
662
|
+
generateCsv: ze,
|
|
663
|
+
generateImage: et,
|
|
664
|
+
generatePdf: Qe,
|
|
665
|
+
toggleTable: dt,
|
|
666
|
+
toggleTooltip: ht,
|
|
667
|
+
toggleAnnotator: De,
|
|
668
|
+
toggleFullscreen: it
|
|
669
|
+
}), (t, o) => (d(), y("div", {
|
|
670
|
+
ref_key: "treemapChart",
|
|
671
|
+
ref: V,
|
|
672
|
+
class: Re(`vue-ui-treemap ${K.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
673
|
+
style: M(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
674
|
+
id: `treemap_${A.value}`,
|
|
675
|
+
onMouseenter: o[4] || (o[4] = () => c(Ye)(!0)),
|
|
676
|
+
onMouseleave: o[5] || (o[5] = () => c(Ye)(!1))
|
|
677
|
+
}, [
|
|
678
|
+
e.value.userOptions.buttons.annotator ? (d(), Z(c(u), {
|
|
679
|
+
key: 0,
|
|
680
|
+
svgRef: c(Ze),
|
|
681
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
682
|
+
color: e.value.style.chart.color,
|
|
683
|
+
active: me.value,
|
|
684
|
+
onClose: De
|
|
685
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
|
|
686
|
+
It.value ? (d(), y("div", {
|
|
687
|
+
key: 1,
|
|
688
|
+
ref_key: "noTitle",
|
|
689
|
+
ref: Ge,
|
|
690
|
+
class: "vue-data-ui-no-title-space",
|
|
691
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
692
|
+
}, null, 512)) : _("", !0),
|
|
693
|
+
e.value.style.chart.title.text ? (d(), y("div", {
|
|
694
|
+
key: 2,
|
|
695
|
+
ref_key: "chartTitle",
|
|
696
|
+
ref: Ue,
|
|
697
|
+
style: M(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
698
|
+
}, [
|
|
699
|
+
(d(), Z(dl, {
|
|
700
|
+
key: `title_${Xe.value}`,
|
|
701
|
+
config: {
|
|
702
|
+
title: {
|
|
703
|
+
cy: "treemap-div-title",
|
|
704
|
+
...e.value.style.chart.title
|
|
705
|
+
},
|
|
706
|
+
subtitle: {
|
|
707
|
+
cy: "treemap-div-subtitle",
|
|
708
|
+
...e.value.style.chart.title.subtitle
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}, null, 8, ["config"]))
|
|
712
|
+
], 4)) : _("", !0),
|
|
713
|
+
O("div", {
|
|
714
|
+
id: `legend-top-${A.value}`
|
|
715
|
+
}, null, 8, Tl),
|
|
716
|
+
e.value.userOptions.show && N.value && (c(je) || c(Fe)) ? (d(), Z(c(g), {
|
|
717
|
+
ref: "details",
|
|
718
|
+
key: `user_option_${Ee.value}`,
|
|
719
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
720
|
+
color: e.value.style.chart.color,
|
|
721
|
+
isPrinting: c(Ke),
|
|
722
|
+
isImaging: c(Je),
|
|
723
|
+
uid: A.value,
|
|
724
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
725
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
726
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
727
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
728
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
729
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
730
|
+
isFullscreen: K.value,
|
|
731
|
+
isTooltip: I.value.showTooltip,
|
|
732
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
733
|
+
chartElement: V.value,
|
|
734
|
+
position: e.value.userOptions.position,
|
|
735
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
736
|
+
isAnnotation: me.value,
|
|
737
|
+
callbacks: e.value.userOptions.callbacks,
|
|
738
|
+
printScale: e.value.userOptions.print.scale,
|
|
739
|
+
onToggleFullscreen: it,
|
|
740
|
+
onGeneratePdf: c(Qe),
|
|
741
|
+
onGenerateCsv: ze,
|
|
742
|
+
onGenerateImage: c(et),
|
|
743
|
+
onToggleTable: dt,
|
|
744
|
+
onToggleTooltip: ht,
|
|
745
|
+
onToggleAnnotator: De,
|
|
746
|
+
style: M({
|
|
747
|
+
visibility: c(je) ? c(Fe) ? "visible" : "hidden" : "visible"
|
|
748
|
+
})
|
|
749
|
+
}, mt({ _: 2 }, [
|
|
750
|
+
t.$slots.menuIcon ? {
|
|
751
|
+
name: "menuIcon",
|
|
752
|
+
fn: T(({ isOpen: l, color: a }) => [
|
|
753
|
+
C(t.$slots, "menuIcon", le(oe({ isOpen: l, color: a })), void 0, !0)
|
|
754
|
+
]),
|
|
755
|
+
key: "0"
|
|
756
|
+
} : void 0,
|
|
757
|
+
t.$slots.optionTooltip ? {
|
|
758
|
+
name: "optionTooltip",
|
|
759
|
+
fn: T(() => [
|
|
760
|
+
C(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
761
|
+
]),
|
|
762
|
+
key: "1"
|
|
763
|
+
} : void 0,
|
|
764
|
+
t.$slots.optionPdf ? {
|
|
765
|
+
name: "optionPdf",
|
|
766
|
+
fn: T(() => [
|
|
767
|
+
C(t.$slots, "optionPdf", {}, void 0, !0)
|
|
768
|
+
]),
|
|
769
|
+
key: "2"
|
|
770
|
+
} : void 0,
|
|
771
|
+
t.$slots.optionCsv ? {
|
|
772
|
+
name: "optionCsv",
|
|
773
|
+
fn: T(() => [
|
|
774
|
+
C(t.$slots, "optionCsv", {}, void 0, !0)
|
|
775
|
+
]),
|
|
776
|
+
key: "3"
|
|
777
|
+
} : void 0,
|
|
778
|
+
t.$slots.optionImg ? {
|
|
779
|
+
name: "optionImg",
|
|
780
|
+
fn: T(() => [
|
|
781
|
+
C(t.$slots, "optionImg", {}, void 0, !0)
|
|
782
|
+
]),
|
|
783
|
+
key: "4"
|
|
784
|
+
} : void 0,
|
|
785
|
+
t.$slots.optionTable ? {
|
|
786
|
+
name: "optionTable",
|
|
787
|
+
fn: T(() => [
|
|
788
|
+
C(t.$slots, "optionTable", {}, void 0, !0)
|
|
789
|
+
]),
|
|
790
|
+
key: "5"
|
|
791
|
+
} : void 0,
|
|
792
|
+
t.$slots.optionFullscreen ? {
|
|
793
|
+
name: "optionFullscreen",
|
|
794
|
+
fn: T(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
795
|
+
C(t.$slots, "optionFullscreen", le(oe({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
796
|
+
]),
|
|
797
|
+
key: "6"
|
|
798
|
+
} : void 0,
|
|
799
|
+
t.$slots.optionAnnotator ? {
|
|
800
|
+
name: "optionAnnotator",
|
|
801
|
+
fn: T(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
802
|
+
C(t.$slots, "optionAnnotator", le(oe({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
803
|
+
]),
|
|
804
|
+
key: "7"
|
|
805
|
+
} : void 0
|
|
806
|
+
]), 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),
|
|
807
|
+
j.value.length > 1 ? (d(), y("nav", {
|
|
808
|
+
key: 4,
|
|
809
|
+
class: "vue-ui-treemap-breadcrumbs",
|
|
810
|
+
"data-dom-to-png-ignore": "",
|
|
811
|
+
ref_key: "breadcrumbsNav",
|
|
812
|
+
ref: Se
|
|
813
|
+
}, [
|
|
814
|
+
(d(!0), y(Ce, null, Le(j.value, (l, a) => (d(), y("span", {
|
|
815
|
+
role: "button",
|
|
816
|
+
tabindex: a < j.value.length - 1 ? 0 : void 0,
|
|
817
|
+
key: l.id || "root",
|
|
818
|
+
onClick: (p) => a === j.value.length - 1 ? () => {
|
|
819
|
+
} : fe(l.node),
|
|
820
|
+
onKeydown: [
|
|
821
|
+
yt(Me((p) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["enter"]),
|
|
822
|
+
yt(Me((p) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["space"])
|
|
823
|
+
],
|
|
824
|
+
class: "vue-ui-treemap-crumb",
|
|
825
|
+
"data-last-crumb": a === j.value.length - 1,
|
|
826
|
+
style: M({
|
|
827
|
+
color: e.value.style.chart.color
|
|
828
|
+
}),
|
|
829
|
+
onMouseenter: (p) => pt(a),
|
|
830
|
+
onMouseleave: ft,
|
|
831
|
+
onFocus: (p) => pt(a),
|
|
832
|
+
onBlur: ft
|
|
833
|
+
}, [
|
|
834
|
+
O("span", _l, [
|
|
835
|
+
O("span", Ol, [
|
|
836
|
+
C(t.$slots, "breadcrumb-label", Be({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: ye.value === a }), () => [
|
|
837
|
+
a === 0 ? (d(), y("div", Al, [
|
|
838
|
+
we(Tt, {
|
|
839
|
+
name: ye.value === 0 ? "homeFilled" : "home",
|
|
840
|
+
stroke: e.value.style.chart.color
|
|
841
|
+
}, null, 8, ["name", "stroke"])
|
|
842
|
+
])) : (d(), y(Ce, { key: 1 }, [
|
|
843
|
+
$e(H(l.label), 1)
|
|
844
|
+
], 64))
|
|
845
|
+
], !0)
|
|
846
|
+
]),
|
|
847
|
+
a < j.value.length - 1 ? (d(), y("span", Sl, [
|
|
848
|
+
C(t.$slots, "breadcrumb-arrow", {}, () => [
|
|
849
|
+
o[6] || (o[6] = $e(" › ", -1))
|
|
850
|
+
], !0)
|
|
851
|
+
])) : _("", !0)
|
|
852
|
+
])
|
|
853
|
+
], 44, xl))), 128))
|
|
854
|
+
], 512)) : _("", !0),
|
|
855
|
+
(d(), y("svg", {
|
|
856
|
+
ref_key: "svgRef",
|
|
857
|
+
ref: Ze,
|
|
858
|
+
xmlns: c(el),
|
|
859
|
+
class: Re({ "vue-data-ui-fullscreen--on": K.value, "vue-data-ui-fulscreen--off": !K.value, "vue-data-ui-zoom-plus": !ee.value, "vue-data-ui-zoom-minus": ee.value, loading: c(re) }),
|
|
860
|
+
viewBox: `${se.value.startX} ${se.value.startY} ${se.value.width <= 0 ? 10 : se.value.width} ${se.value.height <= 0 ? 10 : se.value.height}`,
|
|
861
|
+
style: M(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
|
|
862
|
+
}, [
|
|
863
|
+
we(c(f)),
|
|
864
|
+
(d(!0), y(Ce, null, Le(ce.value, (l, a) => (d(), y("g", {
|
|
865
|
+
key: `tgrad_${l.id}`
|
|
866
|
+
}, [
|
|
867
|
+
e.value.style.chart.layout.rects.gradient.show ? (d(), y("defs", Fl, [
|
|
868
|
+
O("radialGradient", {
|
|
869
|
+
id: `tgrad_${l.id}`,
|
|
870
|
+
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
871
|
+
}, [
|
|
872
|
+
O("stop", {
|
|
873
|
+
offset: "18%",
|
|
874
|
+
"stop-color": l.color
|
|
875
|
+
}, null, 8, Pl),
|
|
876
|
+
O("stop", {
|
|
877
|
+
offset: "100%",
|
|
878
|
+
"stop-color": c(kt)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
879
|
+
}, null, 8, zl)
|
|
880
|
+
], 8, Nl)
|
|
881
|
+
])) : _("", !0)
|
|
882
|
+
]))), 128)),
|
|
883
|
+
(d(!0), y(Ce, null, Le(ce.value, (l, a) => (d(), y("g", {
|
|
884
|
+
key: `k_${l.id}`
|
|
885
|
+
}, [
|
|
886
|
+
O("rect", {
|
|
887
|
+
x: l.x0,
|
|
888
|
+
y: l.y0,
|
|
889
|
+
height: ut(l),
|
|
890
|
+
width: rt(l),
|
|
891
|
+
fill: B.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
|
|
892
|
+
rx: e.value.style.chart.layout.rects.borderRadius,
|
|
893
|
+
stroke: L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
|
|
894
|
+
"stroke-width": L.value && L.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
|
|
895
|
+
onClick: Me((p) => fe(l, a), ["stop"]),
|
|
896
|
+
onMouseenter: () => Mt({
|
|
897
|
+
datapoint: l,
|
|
898
|
+
seriesIndex: a
|
|
899
|
+
}),
|
|
900
|
+
onMouseleave: (p) => Lt({ datapoint: l, seriesIndex: a }),
|
|
901
|
+
style: M(`opacity:${L.value ? L.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
902
|
+
class: Re([
|
|
903
|
+
"vue-ui-treemap-rect",
|
|
904
|
+
Dt(l) ? "vue-data-ui-zoom-plus" : ee.value ? "vue-data-ui-zoom-minus" : ""
|
|
905
|
+
])
|
|
906
|
+
}, null, 46, Dl),
|
|
907
|
+
(d(), y("foreignObject", {
|
|
908
|
+
x: l.x0,
|
|
909
|
+
y: l.y0,
|
|
910
|
+
height: ut(l),
|
|
911
|
+
width: rt(l),
|
|
912
|
+
class: "vue-ui-treemap-cell-foreignObject"
|
|
913
|
+
}, [
|
|
914
|
+
O("div", Ll, [
|
|
915
|
+
e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || ee.value) ? (d(), y("div", {
|
|
916
|
+
key: 0,
|
|
917
|
+
class: "vue-ui-treemap-cell-default",
|
|
918
|
+
style: M(`width:calc(100% - ${Q(l) / 1.5}px);text-align:left;line-height:${Q(l) < 14 ? 14 : Q(l)}px;padding:${Q(l) / 3}px; color:${c(wt)(l.color)}`)
|
|
919
|
+
}, [
|
|
920
|
+
O("span", {
|
|
921
|
+
style: M(`width:100%;font-size:${Q(l)}px;`)
|
|
922
|
+
}, H(l.name), 5),
|
|
923
|
+
o[7] || (o[7] = O("br", null, null, -1)),
|
|
924
|
+
O("span", {
|
|
925
|
+
style: M(`width:100%;font-size:${Q(l)}px;`)
|
|
926
|
+
}, H(c(xe)(
|
|
927
|
+
e.value.style.chart.layout.labels.formatter,
|
|
928
|
+
l.value,
|
|
929
|
+
c(he)({
|
|
930
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
931
|
+
v: l.value,
|
|
932
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
933
|
+
r: e.value.style.chart.layout.labels.rounding
|
|
934
|
+
}),
|
|
935
|
+
{ datapoint: l }
|
|
936
|
+
)), 5)
|
|
937
|
+
], 4)) : _("", !0),
|
|
938
|
+
c(re) ? _("", !0) : C(t.$slots, "rect", Be({
|
|
939
|
+
key: 1,
|
|
940
|
+
ref_for: !0
|
|
941
|
+
}, {
|
|
942
|
+
rect: l,
|
|
943
|
+
shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || ee.value,
|
|
944
|
+
fontSize: Q(l),
|
|
945
|
+
isZoom: ee.value,
|
|
946
|
+
textColor: c(wt)(l.color)
|
|
947
|
+
}), void 0, !0)
|
|
948
|
+
])
|
|
949
|
+
], 8, Rl))
|
|
950
|
+
]))), 128)),
|
|
951
|
+
C(t.$slots, "svg", le(oe({ svg: J.value, isZoom: ee.value, rect: L.value, config: e.value })), void 0, !0)
|
|
952
|
+
], 14, Il)),
|
|
953
|
+
t.$slots.watermark ? (d(), y("div", Ml, [
|
|
954
|
+
C(t.$slots, "watermark", le(oe({ isPrinting: c(Ke) || c(Je) })), void 0, !0)
|
|
955
|
+
])) : _("", !0),
|
|
956
|
+
O("div", {
|
|
957
|
+
id: `legend-bottom-${A.value}`
|
|
958
|
+
}, null, 8, Bl),
|
|
959
|
+
qe.value ? (d(), Z(Gt, {
|
|
960
|
+
key: 6,
|
|
961
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${A.value}` : `#legend-bottom-${A.value}`
|
|
962
|
+
}, [
|
|
963
|
+
O("div", {
|
|
964
|
+
ref_key: "chartLegend",
|
|
965
|
+
ref: He
|
|
966
|
+
}, [
|
|
967
|
+
e.value.style.chart.legend.show ? (d(), Z(hl, {
|
|
968
|
+
key: `legend_${Ae.value}`,
|
|
969
|
+
legendSet: ct.value,
|
|
970
|
+
config: Rt.value,
|
|
971
|
+
id: `treemap_legend_${A.value}`,
|
|
972
|
+
onClickMarker: o[0] || (o[0] = ({ legend: l }) => vt(l))
|
|
973
|
+
}, {
|
|
974
|
+
item: T(({ legend: l, index: a }) => [
|
|
975
|
+
c(re) ? _("", !0) : (d(), y("div", {
|
|
976
|
+
key: 0,
|
|
977
|
+
onClick: (p) => vt(l),
|
|
978
|
+
style: M(`opacity:${R.value.includes(l.id) ? 0.5 : 1}`)
|
|
979
|
+
}, H(l.name) + H(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + H(e.value.style.chart.legend.showValue ? c(xe)(
|
|
980
|
+
e.value.style.chart.layout.labels.formatter,
|
|
981
|
+
l.value,
|
|
982
|
+
c(he)({
|
|
983
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
984
|
+
v: l.value,
|
|
985
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
986
|
+
r: e.value.style.chart.legend.roundingValue
|
|
987
|
+
}),
|
|
988
|
+
{ datapoint: l }
|
|
989
|
+
) : "") + " " + H(e.value.style.chart.legend.showPercentage ? R.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, Vl))
|
|
990
|
+
]),
|
|
991
|
+
_: 1
|
|
992
|
+
}, 8, ["legendSet", "config", "id"])) : C(t.$slots, "legend", {
|
|
993
|
+
key: 1,
|
|
994
|
+
legend: ct.value
|
|
995
|
+
}, void 0, !0)
|
|
996
|
+
], 512)
|
|
997
|
+
], 8, ["to"])) : _("", !0),
|
|
998
|
+
t.$slots.source ? (d(), y("div", {
|
|
999
|
+
key: 7,
|
|
1000
|
+
ref_key: "source",
|
|
1001
|
+
ref: We,
|
|
1002
|
+
dir: "auto"
|
|
1003
|
+
}, [
|
|
1004
|
+
C(t.$slots, "source", {}, void 0, !0)
|
|
1005
|
+
], 512)) : _("", !0),
|
|
1006
|
+
we(c(v), {
|
|
1007
|
+
show: I.value.showTooltip && P.value,
|
|
1008
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1009
|
+
color: e.value.style.chart.tooltip.color,
|
|
1010
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1011
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1012
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1013
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1014
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1015
|
+
position: e.value.style.chart.tooltip.position,
|
|
1016
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1017
|
+
parent: V.value,
|
|
1018
|
+
content: _e.value,
|
|
1019
|
+
isFullscreen: K.value,
|
|
1020
|
+
isCustom: c(Ct)(e.value.style.chart.tooltip.customFormat),
|
|
1021
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1022
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter
|
|
1023
|
+
}, {
|
|
1024
|
+
"tooltip-before": T(() => [
|
|
1025
|
+
C(t.$slots, "tooltip-before", le(oe({ ...Pe.value })), void 0, !0)
|
|
1026
|
+
]),
|
|
1027
|
+
"tooltip-after": T(() => [
|
|
1028
|
+
C(t.$slots, "tooltip-after", le(oe({ ...Pe.value })), void 0, !0)
|
|
1029
|
+
]),
|
|
1030
|
+
_: 3
|
|
1031
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
1032
|
+
N.value ? (d(), Z(Xt(ve.value.component), Be({ key: 8 }, ve.value.props, {
|
|
1033
|
+
ref_key: "tableUnit",
|
|
1034
|
+
ref: ue,
|
|
1035
|
+
onClose: o[3] || (o[3] = (l) => I.value.showTable = !1)
|
|
1036
|
+
}), mt({
|
|
1037
|
+
content: T(() => [
|
|
1038
|
+
(d(), Z(c(i), {
|
|
1039
|
+
key: `table_${Oe.value}`,
|
|
1040
|
+
colNames: ge.value.colNames,
|
|
1041
|
+
head: ge.value.head,
|
|
1042
|
+
body: ge.value.body,
|
|
1043
|
+
config: ge.value.config,
|
|
1044
|
+
title: e.value.table.useDialog ? "" : ve.value.title,
|
|
1045
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1046
|
+
onClose: o[2] || (o[2] = (l) => I.value.showTable = !1)
|
|
1047
|
+
}, {
|
|
1048
|
+
th: T(({ th: l }) => [
|
|
1049
|
+
O("div", {
|
|
1050
|
+
innerHTML: l,
|
|
1051
|
+
style: { display: "flex", "align-items": "center" }
|
|
1052
|
+
}, null, 8, El)
|
|
1053
|
+
]),
|
|
1054
|
+
td: T(({ td: l }) => [
|
|
1055
|
+
$e(H(l.name || l), 1)
|
|
1056
|
+
]),
|
|
1057
|
+
_: 1
|
|
1058
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1059
|
+
]),
|
|
1060
|
+
_: 2
|
|
1061
|
+
}, [
|
|
1062
|
+
e.value.table.useDialog ? {
|
|
1063
|
+
name: "title",
|
|
1064
|
+
fn: T(() => [
|
|
1065
|
+
$e(H(ve.value.title), 1)
|
|
1066
|
+
]),
|
|
1067
|
+
key: "0"
|
|
1068
|
+
} : void 0,
|
|
1069
|
+
e.value.table.useDialog ? {
|
|
1070
|
+
name: "actions",
|
|
1071
|
+
fn: T(() => [
|
|
1072
|
+
O("button", {
|
|
1073
|
+
tabindex: "0",
|
|
1074
|
+
class: "vue-ui-user-options-button",
|
|
1075
|
+
onClick: o[1] || (o[1] = (l) => ze(e.value.userOptions.callbacks.csv))
|
|
1076
|
+
}, [
|
|
1077
|
+
we(Tt, {
|
|
1078
|
+
name: "excel",
|
|
1079
|
+
stroke: ve.value.props.color
|
|
1080
|
+
}, null, 8, ["stroke"])
|
|
1081
|
+
])
|
|
1082
|
+
]),
|
|
1083
|
+
key: "1"
|
|
1084
|
+
} : void 0
|
|
1085
|
+
]), 1040)) : _("", !0),
|
|
1086
|
+
c(re) ? (d(), Z(ul, { key: 9 })) : _("", !0)
|
|
1087
|
+
], 46, $l));
|
|
1088
|
+
}
|
|
1089
|
+
}, lo = /* @__PURE__ */ pl(Ul, [["__scopeId", "data-v-3a726c85"]]);
|
|
1090
|
+
export {
|
|
1091
|
+
lo as default
|
|
1092
|
+
};
|