vue-data-ui 3.5.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -27
- package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
- package/dist/{BaseDraggableDialog-ymf2sfB8.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
- package/dist/{BaseIcon-BmMbm4d0.js → BaseIcon-CofSxalQ.js} +6 -5
- package/dist/{ColorPicker-ChuwChMo.js → ColorPicker-e1-OSGlQ.js} +10 -10
- package/dist/{DataTable-BT7VF2ua.js → DataTable-CHaOCmsE.js} +2 -2
- package/dist/{Legend-G6GMcdAc.js → Legend-Web3GjlR.js} +10 -10
- package/dist/{NonSvgPenAndPaper-DVgKKLIf.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
- package/dist/{PackageVersion-Y7t79Jtq.js → PackageVersion-Bq_mtsqr.js} +1 -1
- package/dist/{PenAndPaper-SZQIAgkg.js → PenAndPaper-HCZQTkqi.js} +20 -20
- package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
- package/dist/{Slicer-D2wm0coO.js → Slicer-BFBBG6xv.js} +23 -23
- package/dist/{SlicerPreview-ij72TAs6.js → SlicerPreview-D76aSViW.js} +2 -2
- package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
- package/dist/{Title-BzH_LEA3.js → Title-DfFUb9hd.js} +1 -1
- package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
- package/dist/{UserOptions-CGnQt6Fd.js → UserOptions-B3I-s3Lw.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +3 -3
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +3 -3
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +3 -3
- package/dist/components/vue-ui-candlestick.js +3 -3
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +3 -3
- package/dist/components/vue-ui-chord.js +3 -3
- package/dist/components/vue-ui-circle-pack.js +3 -3
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +2 -2
- package/dist/components/vue-ui-donut.js +3 -3
- package/dist/components/vue-ui-dumbbell.js +3 -3
- package/dist/components/vue-ui-flow.js +3 -3
- package/dist/components/vue-ui-funnel.js +2 -2
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +3 -3
- package/dist/components/vue-ui-horizontal-bar.js +3 -3
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +3 -3
- package/dist/components/vue-ui-mood-radar.js +3 -3
- package/dist/components/vue-ui-nested-donuts.js +2 -2
- package/dist/components/vue-ui-onion.js +3 -3
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +3 -3
- package/dist/components/vue-ui-quick-chart.js +3 -3
- package/dist/components/vue-ui-radar.js +3 -3
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +3 -3
- package/dist/components/vue-ui-ridgeline.js +3 -3
- package/dist/components/vue-ui-rings.js +3 -3
- package/dist/components/vue-ui-scatter.js +3 -3
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +2 -2
- package/dist/components/vue-ui-sparkgauge.js +3 -3
- package/dist/components/vue-ui-sparkhistogram.js +3 -3
- package/dist/components/vue-ui-sparkline.js +3 -3
- package/dist/components/vue-ui-sparkstackbar.js +2 -2
- package/dist/components/vue-ui-stackbar.js +3 -3
- package/dist/components/vue-ui-stackline.js +5 -0
- package/dist/components/vue-ui-strip-plot.js +3 -3
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +2 -2
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +3 -3
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +2 -2
- package/dist/components/vue-ui-treemap.js +3 -3
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +2 -2
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +3 -3
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +3 -3
- package/dist/components/vue-ui-xy.js +3 -3
- package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
- package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
- package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
- package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +303 -9
- package/dist/types/vue-ui-stackline.d.ts +18 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
- package/dist/{useNestedProp-CReNavA0.js → useNestedProp-CWo6bftQ.js} +535 -329
- package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
- package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
- package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
- package/dist/{vue-data-ui-BRaq4hRp.js → vue-data-ui-ByLTJx5V.js} +79 -77
- package/dist/vue-data-ui.js +226 -204
- package/dist/{vue-ui-3d-bar-BB4ii8Nt.js → vue-ui-3d-bar-Dkds4k5N.js} +546 -517
- package/dist/{vue-ui-accordion-BmFTVF1a.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
- package/dist/vue-ui-age-pyramid-C-fwZRYE.js +960 -0
- package/dist/{vue-ui-annotator-CcpaXBNK.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
- package/dist/vue-ui-bullet-BKVJRjGh.js +657 -0
- package/dist/{vue-ui-candlestick-CMP7UL6z.js → vue-ui-candlestick-BKFWHU4O.js} +596 -561
- package/dist/{vue-ui-carousel-table-CzOcKsDj.js → vue-ui-carousel-table-VmPH6y2g.js} +48 -48
- package/dist/{vue-ui-chestnut-S787oASt.js → vue-ui-chestnut-DpMHe-OI.js} +534 -505
- package/dist/vue-ui-chord-Djdr0PY_.js +1182 -0
- package/dist/vue-ui-circle-pack-CyUqNJQt.js +832 -0
- package/dist/{vue-ui-cursor-C3yD_TUr.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
- package/dist/{vue-ui-dashboard-BfEcVRxQ.js → vue-ui-dashboard-eBXj-KCw.js} +140 -140
- package/dist/{vue-ui-digits-pRh179Gg.js → vue-ui-digits-D382I0-w.js} +2 -2
- package/dist/{vue-ui-donut-B_tEm4dT.js → vue-ui-donut-BLb0kj_P.js} +634 -602
- package/dist/vue-ui-donut-evolution-BqrldXpI.js +1243 -0
- package/dist/vue-ui-dumbbell-BuZT5a-d.js +1258 -0
- package/dist/vue-ui-flow-LLp6ntEP.js +1026 -0
- package/dist/vue-ui-funnel-pILUR-OG.js +743 -0
- package/dist/vue-ui-galaxy-X6yiw8kx.js +837 -0
- package/dist/vue-ui-gauge-DBh-vFb9.js +864 -0
- package/dist/{vue-ui-gizmo-BQzQlUJ8.js → vue-ui-gizmo-DtyEukIP.js} +3 -3
- package/dist/{vue-ui-heatmap-C9MhHWpp.js → vue-ui-heatmap-mkD6QkXo.js} +501 -466
- package/dist/vue-ui-history-plot-CyTaBaxA.js +1239 -0
- package/dist/{vue-ui-kpi-jcrPjW4C.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
- package/dist/{vue-ui-mini-loader-DTM98mRN.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
- package/dist/vue-ui-molecule-UzQ3o5HW.js +782 -0
- package/dist/vue-ui-mood-radar-C2zkRLGy.js +930 -0
- package/dist/vue-ui-nested-donuts-B5OpvmJ9.js +1454 -0
- package/dist/vue-ui-onion-DbhIOGtF.js +944 -0
- package/dist/vue-ui-parallel-coordinate-plot-Dv_T4mWW.js +1080 -0
- package/dist/{vue-ui-quadrant-CeM23s0z.js → vue-ui-quadrant-CG6_CWsQ.js} +510 -481
- package/dist/{vue-ui-quick-chart-C0RMQzjC.js → vue-ui-quick-chart-DOeRhk7r.js} +795 -758
- package/dist/vue-ui-radar-DdHa9Hsh.js +1013 -0
- package/dist/{vue-ui-rating-tj97undO.js → vue-ui-rating-DtzmtJwF.js} +26 -26
- package/dist/vue-ui-relation-circle-B5lL4l9w.js +670 -0
- package/dist/vue-ui-ridgeline-3pk4Mlft.js +1302 -0
- package/dist/vue-ui-rings-DhyrjrZi.js +884 -0
- package/dist/vue-ui-scatter-DKCD70mi.js +1619 -0
- package/dist/{vue-ui-skeleton-87TORm6s.js → vue-ui-skeleton-CzzdmraB.js} +3 -3
- package/dist/{vue-ui-smiley-B74geHT3.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
- package/dist/vue-ui-spark-trend-BMTcxeCT.js +364 -0
- package/dist/vue-ui-sparkbar-DVk1JiPL.js +381 -0
- package/dist/vue-ui-sparkgauge-Cq9Nw_xu.js +260 -0
- package/dist/vue-ui-sparkhistogram-PFHlCE_k.js +411 -0
- package/dist/vue-ui-sparkline-BHHwO_cV.js +549 -0
- package/dist/vue-ui-sparkstackbar-BosVkkiC.js +470 -0
- package/dist/vue-ui-stackbar-Djk5CPUy.js +1867 -0
- package/dist/vue-ui-stackline-mU4CSol9.js +1963 -0
- package/dist/{vue-ui-strip-plot-C1N2n39d.js → vue-ui-strip-plot-CZQSL0GK.js} +343 -314
- package/dist/{vue-ui-table-CcuoPHgI.js → vue-ui-table-DMM090pe.js} +5 -5
- package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
- package/dist/{vue-ui-table-sparkline-BAxmZRff.js → vue-ui-table-sparkline-CQJc0mJY.js} +292 -263
- package/dist/vue-ui-thermometer-D1uxoVeZ.js +613 -0
- package/dist/{vue-ui-timer-BVsUQJz_.js → vue-ui-timer-jTnS3ES5.js} +25 -25
- package/dist/vue-ui-tiremarks-Bv-oIFVV.js +477 -0
- package/dist/vue-ui-treemap-B9MVtunp.js +1359 -0
- package/dist/{vue-ui-vertical-bar-B3gfBqD_.js → vue-ui-vertical-bar-BSbDj5qZ.js} +520 -485
- package/dist/{vue-ui-waffle-Bhlqo4xM.js → vue-ui-waffle-DIALVfvc.js} +376 -347
- package/dist/vue-ui-wheel-aUhrFpGk.js +690 -0
- package/dist/vue-ui-word-cloud-DZmMWsUu.js +904 -0
- package/dist/{vue-ui-world-C8KVyDim.js → vue-ui-world-CVLlgp2f.js} +57 -57
- package/dist/vue-ui-xy-Cy7mOurZ.js +3455 -0
- package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
- package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
- package/package.json +5 -5
- package/dist/themes-AUNCOb2G.js +0 -53
- package/dist/vue-ui-age-pyramid-8bUepd28.js +0 -933
- package/dist/vue-ui-bullet-BvT4scFv.js +0 -630
- package/dist/vue-ui-chord-Dl9Y4mcz.js +0 -1153
- package/dist/vue-ui-circle-pack-CU09BzOV.js +0 -803
- package/dist/vue-ui-donut-evolution-DiGhMwMO.js +0 -1208
- package/dist/vue-ui-dumbbell-BlF3CLbN.js +0 -1231
- package/dist/vue-ui-flow-BQi5L8mJ.js +0 -991
- package/dist/vue-ui-funnel-CM_6Sare.js +0 -716
- package/dist/vue-ui-galaxy-BnZA62Li.js +0 -808
- package/dist/vue-ui-gauge-DAk72bez.js +0 -835
- package/dist/vue-ui-history-plot-BYQh3E8U.js +0 -1204
- package/dist/vue-ui-molecule-Bd1OXvl3.js +0 -753
- package/dist/vue-ui-mood-radar-DuoiTsYn.js +0 -903
- package/dist/vue-ui-nested-donuts-BTswQFjz.js +0 -1419
- package/dist/vue-ui-onion-D-1U2Qgl.js +0 -915
- package/dist/vue-ui-parallel-coordinate-plot-D-7VFHas.js +0 -1051
- package/dist/vue-ui-radar-BSfxyur3.js +0 -984
- package/dist/vue-ui-relation-circle-C7uV2mIj.js +0 -641
- package/dist/vue-ui-ridgeline-CYMfTlwI.js +0 -1273
- package/dist/vue-ui-rings-C96aj57d.js +0 -855
- package/dist/vue-ui-scatter-CtvOXUnx.js +0 -1590
- package/dist/vue-ui-spark-trend-6_Ibziyv.js +0 -337
- package/dist/vue-ui-sparkbar-BDCocMLI.js +0 -352
- package/dist/vue-ui-sparkgauge-CQ4Zk9-f.js +0 -233
- package/dist/vue-ui-sparkhistogram-BlTV9wfn.js +0 -384
- package/dist/vue-ui-sparkline-DWESyiqL.js +0 -514
- package/dist/vue-ui-sparkstackbar-DK_7X8mL.js +0 -441
- package/dist/vue-ui-stackbar-BWuw8ff4.js +0 -1827
- package/dist/vue-ui-table-heatmap-C9EMEM3Z.js +0 -282
- package/dist/vue-ui-thermometer-CDrM-WFq.js +0 -584
- package/dist/vue-ui-tiremarks-BQH2pNkG.js +0 -450
- package/dist/vue-ui-treemap-6WLoCHsH.js +0 -1330
- package/dist/vue-ui-wheel-CqHw1WuW.js +0 -663
- package/dist/vue-ui-word-cloud-CKuWZGLv.js +0 -875
- package/dist/vue-ui-xy-Cz2qIEfi.js +0 -3424
- package/dist/vue-ui-xy-canvas-y4h7gEFp.js +0 -1564
|
@@ -0,0 +1,1359 @@
|
|
|
1
|
+
import { defineAsyncComponent as ye, useSlots as el, onMounted as lo, computed as k, ref as w, shallowRef as Q, toRefs as tl, watch as Xe, onBeforeUnmount as ol, createElementBlock as A, openBlock as h, unref as g, normalizeStyle as ce, normalizeClass as kt, createBlock as de, createCommentVNode as _, createElementVNode as z, createVNode as Ge, withCtx as y, renderSlot as b, normalizeProps as L, guardReactiveProps as R, createSlots as ao, Fragment as qe, renderList as wt, withKeys as no, withModifiers as At, mergeProps as $t, createTextVNode as Ye, toDisplayString as Ze, Teleport as ll, resolveDynamicComponent as al, nextTick as nl } from "vue";
|
|
2
|
+
import { c as Ke, t as sl, i as rl, p as M, j as ul, o as so, g as il, l as Ie, a as Je, d as Ne, X as Tt, n as ro, w as uo, x as io, u as cl, q as dl, R as vl, au as xt, av as Qe } from "./lib-C5BH09_g.js";
|
|
3
|
+
import { t as hl, u as fl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as gl, a as Ft } from "./useNestedProp-CWo6bftQ.js";
|
|
5
|
+
import { u as pl, B as ml } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
+
import { u as bl } from "./usePrinter-DCJzEiS8.js";
|
|
7
|
+
import { u as yl } from "./useThemeCheck-DGJ31Vi5.js";
|
|
8
|
+
import { u as Cl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as kl } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import wl from "./img-DUzJeMlr.js";
|
|
11
|
+
import Al from "./Title-DfFUb9hd.js";
|
|
12
|
+
import $l from "./Legend-Web3GjlR.js";
|
|
13
|
+
import co from "./BaseIcon-CofSxalQ.js";
|
|
14
|
+
import { u as Tl } from "./useSvgExport-DrjCWun4.js";
|
|
15
|
+
import { _ as xl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
function vo(n, i) {
|
|
17
|
+
const r = n.length;
|
|
18
|
+
if (r === 0)
|
|
19
|
+
throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
|
|
20
|
+
{
|
|
21
|
+
let c = 1 / 0, u = -1 / 0, f = 0;
|
|
22
|
+
for (let C = 0; C < r; C += 1) {
|
|
23
|
+
const m = n[C].normalizedValue;
|
|
24
|
+
m < c && (c = m), m > u && (u = m), f += m;
|
|
25
|
+
}
|
|
26
|
+
return Math.max(
|
|
27
|
+
i ** 2 * u / f ** 2,
|
|
28
|
+
f ** 2 / (i ** 2 * c)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function ho(n) {
|
|
33
|
+
const { xOffset: i, yOffset: r, width: c, height: u } = n;
|
|
34
|
+
return {
|
|
35
|
+
x0: i,
|
|
36
|
+
y0: r,
|
|
37
|
+
x1: i + c,
|
|
38
|
+
y1: r + u
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function Fl(n, i, r) {
|
|
42
|
+
if (n.length === 0)
|
|
43
|
+
return !0;
|
|
44
|
+
{
|
|
45
|
+
const c = n.concat(i), u = vo(
|
|
46
|
+
n,
|
|
47
|
+
r
|
|
48
|
+
), f = vo(c, r);
|
|
49
|
+
return u >= f;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function Sl(n) {
|
|
53
|
+
const i = [], r = n.length;
|
|
54
|
+
for (let c = 0; c < r; c += 1) {
|
|
55
|
+
const u = n[c], f = u.length;
|
|
56
|
+
for (let v = 0; v < f; v += 1)
|
|
57
|
+
i.push(u[v]);
|
|
58
|
+
}
|
|
59
|
+
return i;
|
|
60
|
+
}
|
|
61
|
+
function Ol(n, i) {
|
|
62
|
+
const r = {
|
|
63
|
+
...i,
|
|
64
|
+
children: n
|
|
65
|
+
};
|
|
66
|
+
return go(r);
|
|
67
|
+
}
|
|
68
|
+
function _l(n) {
|
|
69
|
+
return (n.x1 - n.x0) * (n.y1 - n.y0);
|
|
70
|
+
}
|
|
71
|
+
function fo(n, i) {
|
|
72
|
+
const { width: r, height: c, xOffset: u, yOffset: f } = St(i), v = n.length, C = n.map((p) => p.normalizedValue || 0).reduce((p, S) => p + S, 0), m = C / c, ee = C / r;
|
|
73
|
+
let H = u, X = f;
|
|
74
|
+
const B = [];
|
|
75
|
+
if (r >= c) {
|
|
76
|
+
for (let p = 0; p < v; p += 1) {
|
|
77
|
+
const S = n[p], G = X + S.normalizedValue / m, te = {
|
|
78
|
+
x0: H,
|
|
79
|
+
y0: X,
|
|
80
|
+
x1: H + m,
|
|
81
|
+
y1: G
|
|
82
|
+
}, q = Object.assign({}, S, te);
|
|
83
|
+
X = G, B.push(q);
|
|
84
|
+
}
|
|
85
|
+
return B;
|
|
86
|
+
} else {
|
|
87
|
+
for (let p = 0; p < v; p += 1) {
|
|
88
|
+
const S = n[p], G = H + S.normalizedValue / ee, te = {
|
|
89
|
+
x0: H,
|
|
90
|
+
y0: X,
|
|
91
|
+
x1: G,
|
|
92
|
+
y1: X + ee
|
|
93
|
+
}, q = Object.assign({}, S, te);
|
|
94
|
+
H = G, B.push(q);
|
|
95
|
+
}
|
|
96
|
+
return B;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function El(n) {
|
|
100
|
+
const i = St(n), r = i.width, c = i.height;
|
|
101
|
+
return Math.min(r, c);
|
|
102
|
+
}
|
|
103
|
+
function Dl(n, i) {
|
|
104
|
+
const r = n.length, c = n.map((m) => m.value ?? 0).reduce((m, ee) => m + ee, 0), u = i / c, f = [];
|
|
105
|
+
let v, C;
|
|
106
|
+
for (let m = 0; m < r; m += 1)
|
|
107
|
+
C = n[m], v = Object.assign({}, C, {
|
|
108
|
+
normalizedValue: C.value * (u || 0)
|
|
109
|
+
}), f.push(v);
|
|
110
|
+
return f;
|
|
111
|
+
}
|
|
112
|
+
function St(n) {
|
|
113
|
+
const { x0: i, y0: r, x1: c, y1: u } = n;
|
|
114
|
+
return {
|
|
115
|
+
xOffset: i,
|
|
116
|
+
yOffset: r,
|
|
117
|
+
width: c - i,
|
|
118
|
+
height: u - r
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function Ml(n, i, r, c) {
|
|
122
|
+
let u = n, f = i, v = r, C = c;
|
|
123
|
+
for (; ; ) {
|
|
124
|
+
const m = u.length;
|
|
125
|
+
if (m === 0) {
|
|
126
|
+
const B = fo(f, v);
|
|
127
|
+
return C.concat(B);
|
|
128
|
+
}
|
|
129
|
+
const ee = El(v), H = u[0], X = u.slice(1, m);
|
|
130
|
+
if (Fl(f, H, ee)) {
|
|
131
|
+
const B = f.concat(H);
|
|
132
|
+
u = X, f = B, v = v, C = C;
|
|
133
|
+
} else {
|
|
134
|
+
const B = f.length;
|
|
135
|
+
let p = 0;
|
|
136
|
+
for (let q = 0; q < B; q += 1)
|
|
137
|
+
p += f[q].normalizedValue;
|
|
138
|
+
const S = Bl(v, p), G = fo(f, v), te = C.concat(G);
|
|
139
|
+
u = u, f = [], v = S, C = te;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function go(n) {
|
|
144
|
+
if (typeof n.children > "u" || !n.children.length)
|
|
145
|
+
return [n];
|
|
146
|
+
{
|
|
147
|
+
const i = Dl(
|
|
148
|
+
n.children,
|
|
149
|
+
_l(n)
|
|
150
|
+
), r = Ml(i, [], n, []), c = r.length, u = [];
|
|
151
|
+
for (let v = 0; v < c; v += 1)
|
|
152
|
+
u.push(go(r[v]));
|
|
153
|
+
return Sl(u);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function Bl(n, i) {
|
|
157
|
+
const { width: r, height: c, xOffset: u, yOffset: f } = St(n);
|
|
158
|
+
if (r >= c) {
|
|
159
|
+
const v = i / c, C = r - v, m = {
|
|
160
|
+
xOffset: u + v,
|
|
161
|
+
yOffset: f,
|
|
162
|
+
width: C,
|
|
163
|
+
height: c
|
|
164
|
+
};
|
|
165
|
+
return ho(m);
|
|
166
|
+
} else {
|
|
167
|
+
const v = i / r, C = c - v, m = {
|
|
168
|
+
xOffset: u,
|
|
169
|
+
yOffset: f + v,
|
|
170
|
+
width: r,
|
|
171
|
+
height: C
|
|
172
|
+
};
|
|
173
|
+
return ho(m);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const po = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#5A5A5A" } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, mo = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { rects: { stroke: "#FFF8E1", selected: { stroke: "#FFF8E1" } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, bo = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { rects: { stroke: "#1E1E1E", selected: { stroke: "#1E1E1E" } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, yo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#1A1A1A" } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, Co = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { rects: { stroke: "#fbfafa", strokeWidth: 2, borderRadius: 12, selected: { stroke: "#fbfafa" } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, ko = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#1A1A1A" } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, wo = {
|
|
177
|
+
default: {},
|
|
178
|
+
dark: po,
|
|
179
|
+
celebration: mo,
|
|
180
|
+
celebrationNight: bo,
|
|
181
|
+
hack: yo,
|
|
182
|
+
zen: Co,
|
|
183
|
+
concrete: ko
|
|
184
|
+
}, ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
185
|
+
__proto__: null,
|
|
186
|
+
celebration: mo,
|
|
187
|
+
celebrationNight: bo,
|
|
188
|
+
concrete: ko,
|
|
189
|
+
dark: po,
|
|
190
|
+
default: wo,
|
|
191
|
+
hack: yo,
|
|
192
|
+
zen: Co
|
|
193
|
+
}, Symbol.toStringTag, { value: "Module" })), Il = ["id"], Nl = ["id"], zl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], Ll = { class: "vue-ui-treemap-crumb-unit" }, Rl = { class: "vue-ui-treemap-crumb-unit-label" }, Pl = {
|
|
194
|
+
key: 0,
|
|
195
|
+
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
196
|
+
}, Vl = {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
199
|
+
}, Hl = ["xmlns", "viewBox"], Wl = { key: 0 }, Ul = ["id"], jl = ["stop-color"], Xl = ["stop-color"], Gl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], ql = ["innerHTML"], Yl = ["x", "y", "height", "width"], Zl = {
|
|
200
|
+
key: 5,
|
|
201
|
+
class: "vue-data-ui-watermark"
|
|
202
|
+
}, Kl = ["id"], Jl = ["onClick"], Ql = ["innerHTML"], ea = {
|
|
203
|
+
__name: "vue-ui-treemap",
|
|
204
|
+
props: {
|
|
205
|
+
config: {
|
|
206
|
+
type: Object,
|
|
207
|
+
default() {
|
|
208
|
+
return {};
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
dataset: {
|
|
212
|
+
type: Array,
|
|
213
|
+
default() {
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
219
|
+
setup(n, { expose: i, emit: r }) {
|
|
220
|
+
const c = ye(() => import("./DataTable-CHaOCmsE.js")), u = ye(() => import("./PenAndPaper-HCZQTkqi.js")), f = ye(() => import("./vue-ui-accordion-DSdZUn2C.js")), v = ye(() => import("./Tooltip-WD0Ros6G.js")), C = ye(() => import("./UserOptions-B3I-s3Lw.js")), m = ye(() => import("./PackageVersion-Bq_mtsqr.js")), ee = ye(() => import("./BaseDraggableDialog-CRF94NJQ.js")), { vue_ui_treemap: H } = gl(), { isThemeValid: X, warnInvalidTheme: B } = yl(), p = n, S = r, G = el();
|
|
221
|
+
lo(() => {
|
|
222
|
+
G["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
223
|
+
});
|
|
224
|
+
const te = k(() => !!p.dataset && p.dataset.length), q = k(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), oe = w(Ke()), et = w(!1), tt = w(""), ve = w(!1), Ot = w(0), I = w([]), W = Q(null), _t = Q(null), Et = Q(null), Dt = Q(null), Mt = Q(null), Bt = w(0), ot = w(0), lt = w(0), O = w([]), at = w(null), It = w(!1), _e = w(null), nt = w(null), t = w(it()), { loading: Ce, FINAL_DATASET: st, manualLoading: Ao } = pl({
|
|
225
|
+
...tl(p),
|
|
226
|
+
FINAL_CONFIG: t,
|
|
227
|
+
prepareConfig: it,
|
|
228
|
+
skeletonDataset: [
|
|
229
|
+
{
|
|
230
|
+
name: "_",
|
|
231
|
+
value: 53,
|
|
232
|
+
color: "#CACACA90",
|
|
233
|
+
children: [
|
|
234
|
+
{ name: "_", value: 21 },
|
|
235
|
+
{ name: "_", value: 13 },
|
|
236
|
+
{ name: "_", value: 8 },
|
|
237
|
+
{ name: "_", value: 5 },
|
|
238
|
+
{ name: "_", value: 3 },
|
|
239
|
+
{ name: "_", value: 2 },
|
|
240
|
+
{ name: "_", value: 1 }
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
skeletonConfig: sl({
|
|
245
|
+
defaultConfig: t.value,
|
|
246
|
+
userConfig: {
|
|
247
|
+
userOptions: { show: !1 },
|
|
248
|
+
style: {
|
|
249
|
+
chart: {
|
|
250
|
+
backgroundColor: "#999999",
|
|
251
|
+
layout: {
|
|
252
|
+
labels: {
|
|
253
|
+
showDefaultLabels: !1
|
|
254
|
+
},
|
|
255
|
+
rects: {
|
|
256
|
+
stroke: "#6A6A6A"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
legend: {
|
|
260
|
+
backgroundColor: "transparent"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
}), { userOptionsVisible: rt, setUserOptionsVisibility: Nt, keepUserOptionState: zt } = Cl({ config: t.value }), { svgRef: ut } = kl({ config: t.value.style.chart.title });
|
|
267
|
+
function it() {
|
|
268
|
+
const e = Ft({
|
|
269
|
+
userConfig: p.config,
|
|
270
|
+
defaultConfig: H
|
|
271
|
+
}), l = e.theme;
|
|
272
|
+
if (!l) return e;
|
|
273
|
+
if (!X.value(e))
|
|
274
|
+
return B(e), e;
|
|
275
|
+
const o = Ft({
|
|
276
|
+
userConfig: wo[l] || p.config,
|
|
277
|
+
defaultConfig: e
|
|
278
|
+
}), a = Ft({
|
|
279
|
+
userConfig: p.config,
|
|
280
|
+
defaultConfig: o
|
|
281
|
+
});
|
|
282
|
+
return {
|
|
283
|
+
...a,
|
|
284
|
+
customPalette: a.customPalette.length ? a.customPalette : rl[l] || M
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
Xe(() => p.config, (e) => {
|
|
288
|
+
Ce.value || (t.value = it()), rt.value = !t.value.userOptions.showOnChartHover, Bt.value += 1, ot.value += 1, lt.value += 1, N.value.showTable = t.value.table.show, N.value.showTooltip = t.value.style.chart.tooltip.show;
|
|
289
|
+
}, { deep: !0 });
|
|
290
|
+
const { isPrinting: Lt, isImaging: Rt, generatePdf: Pt, generateImage: Vt } = bl({
|
|
291
|
+
elementId: `treemap_${oe.value}`,
|
|
292
|
+
fileName: t.value.style.chart.title.text || "vue-ui-treemap",
|
|
293
|
+
options: t.value.userOptions.print
|
|
294
|
+
}), $o = k(() => t.value.userOptions.show && !t.value.style.chart.title.text), ze = k(() => ul(t.value.customPalette)), N = w({
|
|
295
|
+
showTable: t.value.table.show,
|
|
296
|
+
showTooltip: t.value.style.chart.tooltip.show
|
|
297
|
+
});
|
|
298
|
+
Xe(t, () => {
|
|
299
|
+
N.value = {
|
|
300
|
+
showTable: t.value.table.show,
|
|
301
|
+
showTooltip: t.value.style.chart.tooltip.show
|
|
302
|
+
};
|
|
303
|
+
}, { immediate: !0 });
|
|
304
|
+
const Ee = w({
|
|
305
|
+
height: t.value.style.chart.height,
|
|
306
|
+
width: t.value.style.chart.width
|
|
307
|
+
});
|
|
308
|
+
function To(e) {
|
|
309
|
+
const l = W.value, o = Ee.value.height;
|
|
310
|
+
if (!l || !o) return e;
|
|
311
|
+
const a = l.getBoundingClientRect();
|
|
312
|
+
return e * (o / a.height);
|
|
313
|
+
}
|
|
314
|
+
function xo() {
|
|
315
|
+
if (!at.value || Y.value.length <= 1) return 0;
|
|
316
|
+
const e = at.value, l = getComputedStyle(e), o = e.offsetHeight + parseFloat(l.marginTop || "0") + parseFloat(l.marginBottom || "0") + parseFloat(l.paddingTop || "0") + parseFloat(l.paddingBottom || "0");
|
|
317
|
+
return To(o);
|
|
318
|
+
}
|
|
319
|
+
const P = k(() => {
|
|
320
|
+
const e = t.value.style.chart.padding, l = Ee.value.width, o = Ee.value.height, a = xo(), s = e.left, d = l - e.right, $ = e.top, D = o - e.bottom - a;
|
|
321
|
+
return {
|
|
322
|
+
left: s,
|
|
323
|
+
top: $,
|
|
324
|
+
right: d,
|
|
325
|
+
bottom: D,
|
|
326
|
+
width: d - s,
|
|
327
|
+
height: Math.max(0, D - $),
|
|
328
|
+
vbWidth: l,
|
|
329
|
+
vbHeight: o - a,
|
|
330
|
+
offsetY: a
|
|
331
|
+
};
|
|
332
|
+
}), E = w(st.value), le = w(E.value), Ht = Q(/* @__PURE__ */ new Map());
|
|
333
|
+
function Wt(e) {
|
|
334
|
+
Array.isArray(e) && e.forEach((l, o) => {
|
|
335
|
+
l.id || (l.id = Ke());
|
|
336
|
+
let a = Ie(l.color) || Ht.value.get(l.id) || ze.value[o] || M[o] || M[o % M.length];
|
|
337
|
+
a = Ie(a), Ht.value.set(l.id, a), l.color = a, Ut(l, a);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function Ut(e, l) {
|
|
341
|
+
Array.isArray(e.children) && e.children.forEach((o) => {
|
|
342
|
+
o.id || (o.id = Ke()), o.parentId = e.id, o.color = l, Ut(o, l);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function Fo() {
|
|
346
|
+
if (!O.value.length)
|
|
347
|
+
le.value = E.value.slice();
|
|
348
|
+
else {
|
|
349
|
+
const e = O.value[O.value.length - 1], l = ne(e);
|
|
350
|
+
le.value = l?.children?.slice() || [];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
Xe(
|
|
354
|
+
() => st.value,
|
|
355
|
+
() => {
|
|
356
|
+
E.value = st.value, Wt(E.value), Fo(), lt.value += 1, ot.value += 1;
|
|
357
|
+
},
|
|
358
|
+
{ deep: !0, immediate: !0, flush: "post" }
|
|
359
|
+
);
|
|
360
|
+
const ae = Q(null), ke = Q(null);
|
|
361
|
+
lo(() => {
|
|
362
|
+
It.value = !0, Oo();
|
|
363
|
+
});
|
|
364
|
+
const So = k(() => t.value.debug);
|
|
365
|
+
function Oo() {
|
|
366
|
+
if (so(p.dataset) && il({
|
|
367
|
+
componentName: "VueUiTreemap",
|
|
368
|
+
type: "dataset",
|
|
369
|
+
debug: So.value
|
|
370
|
+
}), Wt(E.value), so(p.dataset) || (Ao.value = t.value.loading), t.value.responsive) {
|
|
371
|
+
const e = hl(() => {
|
|
372
|
+
const { width: l, height: o } = fl({
|
|
373
|
+
chart: W.value,
|
|
374
|
+
title: t.value.style.chart.title.text ? _t.value : null,
|
|
375
|
+
legend: t.value.style.chart.legend.show ? Et.value : null,
|
|
376
|
+
source: Dt.value,
|
|
377
|
+
noTitle: Mt.value
|
|
378
|
+
});
|
|
379
|
+
requestAnimationFrame(() => {
|
|
380
|
+
Ee.value.width = l, Ee.value.height = o - 12;
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
ae.value && (ke.value && ae.value.unobserve(ke.value), ae.value.disconnect()), ae.value = new ResizeObserver(e), ke.value = W.value.parentNode, ae.value.observe(ke.value);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
ol(() => {
|
|
387
|
+
ae.value && (ke.value && ae.value.unobserve(ke.value), ae.value.disconnect());
|
|
388
|
+
});
|
|
389
|
+
const De = k(() => le.value.map((e, l) => ({
|
|
390
|
+
...e,
|
|
391
|
+
color: Ie(e.color) || ze.value[l] || M[l] || M[l % M.length]
|
|
392
|
+
})).filter((e) => !I.value.includes(e.id))), we = k(() => E.value.filter((e) => !I.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), ct = k({
|
|
393
|
+
get() {
|
|
394
|
+
let e = [...De.value];
|
|
395
|
+
return t.value.style.chart.layout.sorted && (e = [...De.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
|
|
396
|
+
...l
|
|
397
|
+
}));
|
|
398
|
+
},
|
|
399
|
+
set(e) {
|
|
400
|
+
return e;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
function jt(e, l) {
|
|
404
|
+
return e.value / l;
|
|
405
|
+
}
|
|
406
|
+
function _o(e, l, o) {
|
|
407
|
+
const a = t.value.style.chart.layout.rects.colorRatio - jt(l, o);
|
|
408
|
+
return ro(e, a < 0 ? 0 : a);
|
|
409
|
+
}
|
|
410
|
+
function Xt(e, l, o, a) {
|
|
411
|
+
return e.map((s, d) => {
|
|
412
|
+
const $ = _o(Ie(l) || ze.value[d] || M[d] || M[d % M.length], s, a), D = jt(s, a);
|
|
413
|
+
return {
|
|
414
|
+
...s,
|
|
415
|
+
color: $,
|
|
416
|
+
proportion: D,
|
|
417
|
+
parentName: o,
|
|
418
|
+
children: s.children ? Xt(s.children, $, s.name, a) : void 0
|
|
419
|
+
};
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
const Me = k(() => {
|
|
423
|
+
const e = ct.value.map((l) => Number(l.value) || 0).reduce((l, o) => l + o, 0) || 1;
|
|
424
|
+
return Ol(
|
|
425
|
+
ct.value.map((l) => {
|
|
426
|
+
const o = l.children ? l.children.reduce((a, s) => a + (Number(s.value) || 0), 0) : l.value;
|
|
427
|
+
return {
|
|
428
|
+
value: l.value,
|
|
429
|
+
id: l.id || Ke(),
|
|
430
|
+
proportion: (Number(l.value) || 0) / e,
|
|
431
|
+
children: l.children ? Xt(
|
|
432
|
+
l.children.sort((a, s) => (s.value || 0) - (a.value || 0)),
|
|
433
|
+
l.color,
|
|
434
|
+
l.name,
|
|
435
|
+
o || 1
|
|
436
|
+
) : void 0,
|
|
437
|
+
color: l.color,
|
|
438
|
+
name: l.name
|
|
439
|
+
};
|
|
440
|
+
}),
|
|
441
|
+
{
|
|
442
|
+
x0: P.value.left,
|
|
443
|
+
y0: P.value.top,
|
|
444
|
+
x1: P.value.left + P.value.width,
|
|
445
|
+
y1: P.value.top + P.value.height
|
|
446
|
+
}
|
|
447
|
+
);
|
|
448
|
+
});
|
|
449
|
+
function Ae({ y0: e, y1: l }) {
|
|
450
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
451
|
+
}
|
|
452
|
+
function $e({ x0: e, x1: l }) {
|
|
453
|
+
return l - e <= 0 ? 1e-4 : l - e;
|
|
454
|
+
}
|
|
455
|
+
function Te(e) {
|
|
456
|
+
const l = t.value.style.chart.layout.labels, o = l.fontSize, a = l.minFontSize, s = l.fontSize * 2, d = 0.5, $ = 0.6, D = 1, he = 0.9;
|
|
457
|
+
let se = e.proportion;
|
|
458
|
+
if (!(typeof se == "number" && isFinite(se))) {
|
|
459
|
+
const Ue = Math.max(1e-6, $e(e) * Ae(e)), fe = Math.max(1e-6, P.value.width * P.value.height);
|
|
460
|
+
se = Ue / fe;
|
|
461
|
+
}
|
|
462
|
+
const We = Math.pow(Math.min(1, Math.max(0, se)), d), re = $ + (D - $) * We;
|
|
463
|
+
let ue = o * re;
|
|
464
|
+
const gt = Math.max(1e-4, Math.min($e(e), Ae(e)));
|
|
465
|
+
return ue = Math.min(ue, gt * he), ue = Math.max(a, Math.min(s, ue)), ue;
|
|
466
|
+
}
|
|
467
|
+
function Gt(e) {
|
|
468
|
+
ve.value = e, Ot.value += 1;
|
|
469
|
+
}
|
|
470
|
+
const xe = k(() => ({
|
|
471
|
+
startX: 0,
|
|
472
|
+
startY: 0,
|
|
473
|
+
width: P.value.vbWidth,
|
|
474
|
+
height: P.value.vbHeight
|
|
475
|
+
}));
|
|
476
|
+
function ne(e, l = E.value) {
|
|
477
|
+
for (const o of l) {
|
|
478
|
+
if (o.id === e)
|
|
479
|
+
return o;
|
|
480
|
+
if (o.children) {
|
|
481
|
+
const a = ne(e, o.children);
|
|
482
|
+
if (a)
|
|
483
|
+
return a;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
const Fe = k(() => O.value.length > 0);
|
|
489
|
+
function Le(e, l) {
|
|
490
|
+
if (!e) {
|
|
491
|
+
le.value = E.value.slice(), S("selectDatapoint", void 0), O.value = [];
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: l });
|
|
495
|
+
const o = ne(e.id);
|
|
496
|
+
if (o && o.children?.length)
|
|
497
|
+
O.value.push(o.id), le.value = o.children.slice(), S("selectDatapoint", e);
|
|
498
|
+
else if (e.parentId) {
|
|
499
|
+
O.value.push(e.parentId);
|
|
500
|
+
const a = ne(e.parentId);
|
|
501
|
+
le.value = a.children.slice(), S("selectDatapoint", e);
|
|
502
|
+
} else if (O.value.length > 0) {
|
|
503
|
+
O.value.pop();
|
|
504
|
+
const a = O.value[O.value.length - 1];
|
|
505
|
+
if (a) {
|
|
506
|
+
const s = ne(a);
|
|
507
|
+
le.value = s.children.slice();
|
|
508
|
+
} else
|
|
509
|
+
le.value = E.value.slice(), O.value = [], S("selectDatapoint", void 0);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function Eo(e) {
|
|
513
|
+
return !!(ne(e.id)?.children?.length || e.parentId);
|
|
514
|
+
}
|
|
515
|
+
const Y = k(() => {
|
|
516
|
+
const e = [
|
|
517
|
+
{ id: null, label: "All" }
|
|
518
|
+
];
|
|
519
|
+
if (O.value.length > 0) {
|
|
520
|
+
let l = ne(O.value[O.value.length - 1]);
|
|
521
|
+
const o = [];
|
|
522
|
+
for (; l; )
|
|
523
|
+
o.unshift(l), l = l.parentId ? ne(l.parentId) : null;
|
|
524
|
+
for (const a of o)
|
|
525
|
+
e.push({
|
|
526
|
+
id: a.id,
|
|
527
|
+
label: a.name,
|
|
528
|
+
node: a
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
return e;
|
|
532
|
+
}), U = Q(null), dt = k(() => E.value.map((e, l) => ({
|
|
533
|
+
...e,
|
|
534
|
+
color: Ie(e.color) || ze.value[l] || M[l] || M[l % M.length],
|
|
535
|
+
shape: "square"
|
|
536
|
+
})).sort((e, l) => l.value - e.value).map((e, l) => {
|
|
537
|
+
const o = e.value / E.value.map((a) => a.value).reduce((a, s) => a + s, 0);
|
|
538
|
+
return {
|
|
539
|
+
...e,
|
|
540
|
+
proportion: o,
|
|
541
|
+
opacity: I.value.includes(e.id) ? 0.5 : 1,
|
|
542
|
+
display: `${e.name}${t.value.style.chart.legend.showPercentage || t.value.style.chart.legend.showValue ? ": " : ""}${t.value.style.chart.legend.showValue ? Je(
|
|
543
|
+
t.value.style.chart.layout.labels.formatter,
|
|
544
|
+
e.value,
|
|
545
|
+
Ne({
|
|
546
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
547
|
+
v: e.value,
|
|
548
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
549
|
+
r: t.value.style.chart.legend.roundingValue
|
|
550
|
+
}),
|
|
551
|
+
{ datapoint: e }
|
|
552
|
+
) : ""}${t.value.style.chart.legend.showPercentage ? I.value.includes(e.id) ? `${t.value.style.chart.legend.showValue ? " (" : ""}- %${t.value.style.chart.legend.showValue ? ")" : ""}` : `${t.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / we.value) ? "-" : (e.value / we.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)}%${t.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
553
|
+
};
|
|
554
|
+
})), Do = k(() => ({
|
|
555
|
+
cy: "treemap-div-legend",
|
|
556
|
+
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
557
|
+
color: t.value.style.chart.legend.color,
|
|
558
|
+
fontSize: t.value.style.chart.legend.fontSize,
|
|
559
|
+
paddingBottom: 12,
|
|
560
|
+
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
561
|
+
}));
|
|
562
|
+
function Re(e) {
|
|
563
|
+
U.value = null, I.value.includes(e.id) ? I.value = I.value.filter((l) => l !== e.id) : I.value.length < p.dataset.length - 1 && I.value.push(e.id), S("selectLegend", ct.value);
|
|
564
|
+
}
|
|
565
|
+
function qt(e) {
|
|
566
|
+
if (!E.value.length)
|
|
567
|
+
return t.value.debug && console.warn("VueUiTreemap - There are no series to show."), null;
|
|
568
|
+
const l = E.value.find((o) => o.name === e);
|
|
569
|
+
return l || (t.value.debug && console.warn(`VueUiTreemap - Series name not found "${e}"`), null);
|
|
570
|
+
}
|
|
571
|
+
function Mo(e) {
|
|
572
|
+
const l = qt(e);
|
|
573
|
+
l !== null && I.value.includes(l.id) && Re({ id: l.id });
|
|
574
|
+
}
|
|
575
|
+
function Bo(e) {
|
|
576
|
+
const l = qt(e);
|
|
577
|
+
l !== null && (I.value.includes(l.id) || Re({ id: l.id }));
|
|
578
|
+
}
|
|
579
|
+
function Io({ datapoint: e, seriesIndex: l }) {
|
|
580
|
+
U.value = null, et.value = !1, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: l });
|
|
581
|
+
}
|
|
582
|
+
const vt = w(null);
|
|
583
|
+
function No({ datapoint: e, seriesIndex: l }) {
|
|
584
|
+
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: l }), U.value = e, vt.value = { datapoint: e, seriesIndex: l, config: t.value, series: De.value };
|
|
585
|
+
const o = t.value.style.chart.tooltip.customFormat;
|
|
586
|
+
if (io(o) && vl(() => o({
|
|
587
|
+
seriesIndex: l,
|
|
588
|
+
datapoint: e,
|
|
589
|
+
series: De.value,
|
|
590
|
+
config: t.value
|
|
591
|
+
})))
|
|
592
|
+
tt.value = o({
|
|
593
|
+
seriesIndex: l,
|
|
594
|
+
datapoint: e,
|
|
595
|
+
series: De.value,
|
|
596
|
+
config: t.value
|
|
597
|
+
});
|
|
598
|
+
else {
|
|
599
|
+
let a = "";
|
|
600
|
+
a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${e.color}"/></svg>`, a += `<b>${Je(
|
|
601
|
+
t.value.style.chart.layout.labels.formatter,
|
|
602
|
+
e.value,
|
|
603
|
+
Ne({
|
|
604
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
605
|
+
v: e.value,
|
|
606
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
607
|
+
r: t.value.style.chart.tooltip.roundingValue
|
|
608
|
+
}),
|
|
609
|
+
{ datapoint: e, seriesIndex: l }
|
|
610
|
+
)}</b>`, tt.value = `<div>${a}</div>`;
|
|
611
|
+
}
|
|
612
|
+
et.value = !0;
|
|
613
|
+
}
|
|
614
|
+
const Z = k(() => {
|
|
615
|
+
const e = Me.value.map((o) => ({
|
|
616
|
+
name: o.name,
|
|
617
|
+
color: o.color
|
|
618
|
+
})), l = Me.value.map((o) => o.value);
|
|
619
|
+
return { head: e, body: l };
|
|
620
|
+
});
|
|
621
|
+
function ht(e = null) {
|
|
622
|
+
nl(() => {
|
|
623
|
+
const l = Z.value.head.map((s, d) => [[
|
|
624
|
+
s.name
|
|
625
|
+
], [Z.value.body[d]], [isNaN(Z.value.body[d] / we.value) ? "-" : Z.value.body[d] / we.value * 100]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), a = cl(o);
|
|
626
|
+
e ? e(a) : dl({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
const Pe = k(() => {
|
|
630
|
+
const e = [
|
|
631
|
+
t.value.table.columnNames.series,
|
|
632
|
+
t.value.table.columnNames.value,
|
|
633
|
+
t.value.table.columnNames.percentage
|
|
634
|
+
], l = Z.value.head.map((s, d) => {
|
|
635
|
+
const $ = Je(
|
|
636
|
+
t.value.style.chart.layout.labels.formatter,
|
|
637
|
+
Z.value.body[d],
|
|
638
|
+
Ne({
|
|
639
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
640
|
+
v: Z.value.body[d],
|
|
641
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
642
|
+
r: t.value.table.td.roundingValue
|
|
643
|
+
})
|
|
644
|
+
);
|
|
645
|
+
return [
|
|
646
|
+
{
|
|
647
|
+
color: s.color,
|
|
648
|
+
name: s.name,
|
|
649
|
+
shape: "square"
|
|
650
|
+
},
|
|
651
|
+
$,
|
|
652
|
+
isNaN(Z.value.body[d] / we.value) ? "-" : Ne({
|
|
653
|
+
v: Z.value.body[d] / we.value * 100,
|
|
654
|
+
s: "%",
|
|
655
|
+
r: t.value.table.td.roundingPercentage
|
|
656
|
+
})
|
|
657
|
+
];
|
|
658
|
+
}), o = {
|
|
659
|
+
th: {
|
|
660
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
661
|
+
color: t.value.table.th.color,
|
|
662
|
+
outline: t.value.table.th.outline
|
|
663
|
+
},
|
|
664
|
+
td: {
|
|
665
|
+
backgroundColor: t.value.table.td.backgroundColor,
|
|
666
|
+
color: t.value.table.td.color,
|
|
667
|
+
outline: t.value.table.td.outline
|
|
668
|
+
},
|
|
669
|
+
breakpoint: t.value.table.responsiveBreakpoint
|
|
670
|
+
};
|
|
671
|
+
return {
|
|
672
|
+
colNames: [
|
|
673
|
+
t.value.table.columnNames.series,
|
|
674
|
+
t.value.table.columnNames.value
|
|
675
|
+
],
|
|
676
|
+
head: e,
|
|
677
|
+
body: l,
|
|
678
|
+
config: o
|
|
679
|
+
};
|
|
680
|
+
});
|
|
681
|
+
function zo() {
|
|
682
|
+
return Me.value;
|
|
683
|
+
}
|
|
684
|
+
function Yt() {
|
|
685
|
+
N.value.showTable = !N.value.showTable;
|
|
686
|
+
}
|
|
687
|
+
function Zt() {
|
|
688
|
+
N.value.showTooltip = !N.value.showTooltip;
|
|
689
|
+
}
|
|
690
|
+
const Ve = w(!1);
|
|
691
|
+
function ft() {
|
|
692
|
+
Ve.value = !Ve.value;
|
|
693
|
+
}
|
|
694
|
+
const He = w(null);
|
|
695
|
+
function Kt(e) {
|
|
696
|
+
He.value = e;
|
|
697
|
+
}
|
|
698
|
+
function Jt() {
|
|
699
|
+
He.value = null;
|
|
700
|
+
}
|
|
701
|
+
async function Lo({ scale: e = 2 } = {}) {
|
|
702
|
+
if (!W.value) return;
|
|
703
|
+
const { width: l, height: o } = W.value.getBoundingClientRect(), a = l / o, { imageUri: s, base64: d } = await wl({ domElement: W.value, base64: !0, img: !0, scale: e });
|
|
704
|
+
return {
|
|
705
|
+
imageUri: s,
|
|
706
|
+
base64: d,
|
|
707
|
+
title: t.value.style.chart.title.text,
|
|
708
|
+
width: l,
|
|
709
|
+
height: o,
|
|
710
|
+
aspectRatio: a
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
const Be = k(() => {
|
|
714
|
+
const e = t.value.table.useDialog && !t.value.table.show, l = N.value.showTable;
|
|
715
|
+
return {
|
|
716
|
+
component: e ? ee : f,
|
|
717
|
+
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
718
|
+
props: e ? {
|
|
719
|
+
backgroundColor: t.value.table.th.backgroundColor,
|
|
720
|
+
color: t.value.table.th.color,
|
|
721
|
+
headerColor: t.value.table.th.color,
|
|
722
|
+
headerBg: t.value.table.th.backgroundColor,
|
|
723
|
+
isFullscreen: ve.value,
|
|
724
|
+
fullscreenParent: W.value,
|
|
725
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
726
|
+
} : {
|
|
727
|
+
hideDetails: !0,
|
|
728
|
+
config: {
|
|
729
|
+
open: l,
|
|
730
|
+
maxHeight: 1e4,
|
|
731
|
+
body: {
|
|
732
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
733
|
+
color: t.value.style.chart.color
|
|
734
|
+
},
|
|
735
|
+
head: {
|
|
736
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
737
|
+
color: t.value.style.chart.color
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
});
|
|
743
|
+
Xe(() => N.value.showTable, (e) => {
|
|
744
|
+
t.value.table.show || (e && t.value.table.useDialog && _e.value ? _e.value.open() : "close" in _e.value && _e.value.close());
|
|
745
|
+
});
|
|
746
|
+
function Qt() {
|
|
747
|
+
N.value.showTable = !1, nt.value && nt.value.setTableIconState(!1);
|
|
748
|
+
}
|
|
749
|
+
const Ro = k(() => dt.value.map((e) => ({
|
|
750
|
+
...e,
|
|
751
|
+
name: e.display
|
|
752
|
+
}))), Po = k(() => t.value.style.chart.backgroundColor), Vo = k(() => t.value.style.chart.legend), Ho = k(() => t.value.style.chart.title), { exportSvg: Wo, getSvg: Uo } = Tl({
|
|
753
|
+
svg: ut,
|
|
754
|
+
title: Ho,
|
|
755
|
+
legend: Vo,
|
|
756
|
+
legendItems: Ro,
|
|
757
|
+
backgroundColor: Po
|
|
758
|
+
});
|
|
759
|
+
async function eo({ isCb: e }) {
|
|
760
|
+
if (e) {
|
|
761
|
+
const { blob: l, url: o, text: a, dataUrl: s } = await Uo();
|
|
762
|
+
t.value.userOptions.callbacks.svg({ blob: l, url: o, text: a, dataUrl: s });
|
|
763
|
+
} else
|
|
764
|
+
Wo();
|
|
765
|
+
}
|
|
766
|
+
function jo({ rect: e, seriesIndex: l }) {
|
|
767
|
+
const o = t.value.style.chart.layout.labels.name.show, a = t.value.style.chart.layout.labels.value.show;
|
|
768
|
+
if (!o && !a) return "";
|
|
769
|
+
const s = Math.max(2, Te(e) / 3), d = Math.max(8, Te(e)), $ = d * 1.2, D = Math.max(0, $e(e) - s * 2), he = Math.max(0, Ae(e) - s * 2);
|
|
770
|
+
if (D <= 2 || he <= d * 0.8) return "";
|
|
771
|
+
const se = t.value.style.fontFamily, We = t.value.style.chart.layout.labels.name.bold ? "600" : "400", re = t.value.style.chart.layout.labels.value.bold ? "600" : "400", ue = uo(e.color), gt = o ? String(e.name ?? "") : "", Ue = a ? Je(
|
|
772
|
+
t.value.style.chart.layout.labels.formatter,
|
|
773
|
+
e.value,
|
|
774
|
+
Ne({
|
|
775
|
+
p: t.value.style.chart.layout.labels.prefix,
|
|
776
|
+
v: e.value,
|
|
777
|
+
s: t.value.style.chart.layout.labels.suffix,
|
|
778
|
+
r: t.value.style.chart.layout.labels.rounding
|
|
779
|
+
}),
|
|
780
|
+
{ datapoint: e, seriesIndex: l }
|
|
781
|
+
) : "";
|
|
782
|
+
function fe(pe, me = d, Oe = "400") {
|
|
783
|
+
const V = document.createElementNS(Tt, "svg");
|
|
784
|
+
V.setAttribute("width", "0"), V.setAttribute("height", "0"), V.style.position = "absolute", V.style.visibility = "hidden", V.style.pointerEvents = "none";
|
|
785
|
+
const j = document.createElementNS(Tt, "text");
|
|
786
|
+
j.setAttribute("font-size", String(me)), j.setAttribute("font-family", se), j.setAttribute("font-weight", String(Oe)), j.textContent = pe || "", V.appendChild(j), document.body.appendChild(V);
|
|
787
|
+
const oo = j.getComputedTextLength();
|
|
788
|
+
return document.body.removeChild(V), oo;
|
|
789
|
+
}
|
|
790
|
+
function Go(pe, me, Oe, V, j, oo) {
|
|
791
|
+
const Zo = String(pe).split(/\s+/).filter(Boolean), F = [];
|
|
792
|
+
let ie = "";
|
|
793
|
+
function be(x) {
|
|
794
|
+
return fe(x, Oe, V) <= me;
|
|
795
|
+
}
|
|
796
|
+
function Ko(x) {
|
|
797
|
+
if (be(x)) return [x];
|
|
798
|
+
const J = [];
|
|
799
|
+
let T = 0;
|
|
800
|
+
for (; T < x.length; ) {
|
|
801
|
+
let bt = 1, yt = x.length - T, Ct = 1;
|
|
802
|
+
for (; bt <= yt; ) {
|
|
803
|
+
const je = bt + yt >> 1, Qo = x.slice(T, T + je);
|
|
804
|
+
be(Qo) ? (Ct = je, bt = je + 1) : yt = je - 1;
|
|
805
|
+
}
|
|
806
|
+
J.push(x.slice(T, T + Ct)), T += Ct;
|
|
807
|
+
}
|
|
808
|
+
return J;
|
|
809
|
+
}
|
|
810
|
+
const Jo = Zo.flatMap((x) => Ko(x));
|
|
811
|
+
for (const x of Jo) {
|
|
812
|
+
const J = ie ? ie + " " + x : x;
|
|
813
|
+
if (be(J))
|
|
814
|
+
ie = J;
|
|
815
|
+
else if (ie && F.push(ie), ie = x, F.length === j - 1) break;
|
|
816
|
+
}
|
|
817
|
+
if (ie && F.length < j && F.push(ie), F.length === j) {
|
|
818
|
+
const x = F[F.length - 1];
|
|
819
|
+
if (!be(x)) {
|
|
820
|
+
let T = x;
|
|
821
|
+
for (; T.length && !be(T); ) T = T.slice(0, -1);
|
|
822
|
+
F[F.length - 1] = T;
|
|
823
|
+
}
|
|
824
|
+
let J = F[F.length - 1] + "…";
|
|
825
|
+
if (!be(J)) {
|
|
826
|
+
let T = F[F.length - 1];
|
|
827
|
+
for (; T.length && !be(T + "…"); ) T = T.slice(0, -1);
|
|
828
|
+
J = T + "…";
|
|
829
|
+
}
|
|
830
|
+
F[F.length - 1] = J;
|
|
831
|
+
}
|
|
832
|
+
return F;
|
|
833
|
+
}
|
|
834
|
+
const qo = a ? 1 : 0, to = Math.max(0, Math.floor(he / $) - qo);
|
|
835
|
+
if (to <= 0) {
|
|
836
|
+
if (!a) return "";
|
|
837
|
+
const pe = e.x0 + s, me = e.y0 + s + d, Oe = xt(Ue);
|
|
838
|
+
return fe(Oe, d, re) <= D ? `
|
|
839
|
+
<text
|
|
840
|
+
x="${pe}"
|
|
841
|
+
y="${me}"
|
|
842
|
+
font-size="${d}"
|
|
843
|
+
font-family="${Qe(se)}"
|
|
844
|
+
font-weight="${re}"
|
|
845
|
+
fill="${Qe(ue)}"
|
|
846
|
+
>
|
|
847
|
+
${Oe}
|
|
848
|
+
</text>` : "";
|
|
849
|
+
}
|
|
850
|
+
const ge = o ? Go(gt, D, d, We, to) : [];
|
|
851
|
+
let Se = d, K = String(Ue);
|
|
852
|
+
if (a) {
|
|
853
|
+
for (; fe(K, Se, re) > D && Se > Math.max(8, d * 0.75); )
|
|
854
|
+
Se -= 1;
|
|
855
|
+
if (fe(K, Se, re) > D) {
|
|
856
|
+
for (; K.length && fe(K + "…", Se, re) > D; )
|
|
857
|
+
K = K.slice(0, -1);
|
|
858
|
+
if (K += "…", !K.length) return "";
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
if (ge.length * $ + (a ? $ : 0) > he) {
|
|
862
|
+
for (; ge.length && ge.length * $ + (a ? $ : 0) > he; )
|
|
863
|
+
ge.pop();
|
|
864
|
+
if (!ge.length && (!a || $ > he)) return "";
|
|
865
|
+
}
|
|
866
|
+
const pt = e.x0 + s, Yo = e.y0 + s + d, mt = [];
|
|
867
|
+
return o && ge.forEach((pe, me) => {
|
|
868
|
+
mt.push(
|
|
869
|
+
`
|
|
870
|
+
<tspan
|
|
871
|
+
x="${pt}"
|
|
872
|
+
dy="${me === 0 ? 0 : $}"
|
|
873
|
+
font-weight="${We}"
|
|
874
|
+
>
|
|
875
|
+
${xt(pe)}
|
|
876
|
+
</tspan>`
|
|
877
|
+
);
|
|
878
|
+
}), a && mt.push(
|
|
879
|
+
`
|
|
880
|
+
<tspan
|
|
881
|
+
x="${pt}"
|
|
882
|
+
dy="${ge.length ? $ : 0}"
|
|
883
|
+
font-weight="${re}"
|
|
884
|
+
font-size="${Se}"
|
|
885
|
+
>
|
|
886
|
+
${xt(K)}
|
|
887
|
+
</tspan>`
|
|
888
|
+
), `<text
|
|
889
|
+
x="${pt}"
|
|
890
|
+
y="${Yo}"
|
|
891
|
+
font-size="${d}"
|
|
892
|
+
font-family="${Qe(se)}"
|
|
893
|
+
fill="${Qe(ue)}"
|
|
894
|
+
paint-order="stroke"
|
|
895
|
+
stroke="transparent"
|
|
896
|
+
stroke-width="0"
|
|
897
|
+
style="transition: all 0.2s ease-in-out;"
|
|
898
|
+
>
|
|
899
|
+
${mt.join("")}
|
|
900
|
+
</text>`;
|
|
901
|
+
}
|
|
902
|
+
function Xo(e) {
|
|
903
|
+
const l = t.value.style.chart.layout.rects.borderRadius, o = $e(e), a = Ae(e);
|
|
904
|
+
return Math.min(l, Math.min(o, a) / 6);
|
|
905
|
+
}
|
|
906
|
+
return i({
|
|
907
|
+
getData: zo,
|
|
908
|
+
getImage: Lo,
|
|
909
|
+
generateCsv: ht,
|
|
910
|
+
generateImage: Vt,
|
|
911
|
+
generateSvg: eo,
|
|
912
|
+
generatePdf: Pt,
|
|
913
|
+
hideSeries: Bo,
|
|
914
|
+
showSeries: Mo,
|
|
915
|
+
toggleTable: Yt,
|
|
916
|
+
toggleTooltip: Zt,
|
|
917
|
+
toggleAnnotator: ft,
|
|
918
|
+
toggleFullscreen: Gt
|
|
919
|
+
}), (e, l) => (h(), A("div", {
|
|
920
|
+
ref_key: "treemapChart",
|
|
921
|
+
ref: W,
|
|
922
|
+
class: kt(`vue-data-ui-component vue-ui-treemap ${ve.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
923
|
+
style: ce(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
924
|
+
id: `treemap_${oe.value}`,
|
|
925
|
+
onMouseenter: l[2] || (l[2] = () => g(Nt)(!0)),
|
|
926
|
+
onMouseleave: l[3] || (l[3] = () => g(Nt)(!1))
|
|
927
|
+
}, [
|
|
928
|
+
t.value.userOptions.buttons.annotator ? (h(), de(g(u), {
|
|
929
|
+
key: 0,
|
|
930
|
+
svgRef: g(ut),
|
|
931
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
932
|
+
color: t.value.style.chart.color,
|
|
933
|
+
active: Ve.value,
|
|
934
|
+
onClose: ft
|
|
935
|
+
}, {
|
|
936
|
+
"annotator-action-close": y(() => [
|
|
937
|
+
b(e.$slots, "annotator-action-close", {}, void 0, !0)
|
|
938
|
+
]),
|
|
939
|
+
"annotator-action-color": y(({ color: o }) => [
|
|
940
|
+
b(e.$slots, "annotator-action-color", L(R({ color: o })), void 0, !0)
|
|
941
|
+
]),
|
|
942
|
+
"annotator-action-draw": y(({ mode: o }) => [
|
|
943
|
+
b(e.$slots, "annotator-action-draw", L(R({ mode: o })), void 0, !0)
|
|
944
|
+
]),
|
|
945
|
+
"annotator-action-undo": y(({ disabled: o }) => [
|
|
946
|
+
b(e.$slots, "annotator-action-undo", L(R({ disabled: o })), void 0, !0)
|
|
947
|
+
]),
|
|
948
|
+
"annotator-action-redo": y(({ disabled: o }) => [
|
|
949
|
+
b(e.$slots, "annotator-action-redo", L(R({ disabled: o })), void 0, !0)
|
|
950
|
+
]),
|
|
951
|
+
"annotator-action-delete": y(({ disabled: o }) => [
|
|
952
|
+
b(e.$slots, "annotator-action-delete", L(R({ disabled: o })), void 0, !0)
|
|
953
|
+
]),
|
|
954
|
+
_: 3
|
|
955
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : _("", !0),
|
|
956
|
+
$o.value ? (h(), A("div", {
|
|
957
|
+
key: 1,
|
|
958
|
+
ref_key: "noTitle",
|
|
959
|
+
ref: Mt,
|
|
960
|
+
class: "vue-data-ui-no-title-space",
|
|
961
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
962
|
+
}, null, 512)) : _("", !0),
|
|
963
|
+
t.value.style.chart.title.text ? (h(), A("div", {
|
|
964
|
+
key: 2,
|
|
965
|
+
ref_key: "chartTitle",
|
|
966
|
+
ref: _t,
|
|
967
|
+
style: ce(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
968
|
+
}, [
|
|
969
|
+
(h(), de(Al, {
|
|
970
|
+
key: `title_${Bt.value}`,
|
|
971
|
+
config: {
|
|
972
|
+
title: {
|
|
973
|
+
cy: "treemap-div-title",
|
|
974
|
+
...t.value.style.chart.title
|
|
975
|
+
},
|
|
976
|
+
subtitle: {
|
|
977
|
+
cy: "treemap-div-subtitle",
|
|
978
|
+
...t.value.style.chart.title.subtitle
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}, null, 8, ["config"]))
|
|
982
|
+
], 4)) : _("", !0),
|
|
983
|
+
z("div", {
|
|
984
|
+
id: `legend-top-${oe.value}`
|
|
985
|
+
}, null, 8, Nl),
|
|
986
|
+
t.value.userOptions.show && te.value && (g(zt) || g(rt)) ? (h(), de(g(C), {
|
|
987
|
+
ref_key: "userOptionsRef",
|
|
988
|
+
ref: nt,
|
|
989
|
+
key: `user_option_${Ot.value}`,
|
|
990
|
+
backgroundColor: t.value.style.chart.backgroundColor,
|
|
991
|
+
color: t.value.style.chart.color,
|
|
992
|
+
isPrinting: g(Lt),
|
|
993
|
+
isImaging: g(Rt),
|
|
994
|
+
uid: oe.value,
|
|
995
|
+
hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
|
|
996
|
+
hasPdf: t.value.userOptions.buttons.pdf,
|
|
997
|
+
hasXls: t.value.userOptions.buttons.csv,
|
|
998
|
+
hasImg: t.value.userOptions.buttons.img,
|
|
999
|
+
hasSvg: t.value.userOptions.buttons.svg,
|
|
1000
|
+
hasTable: t.value.userOptions.buttons.table,
|
|
1001
|
+
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
1002
|
+
isFullscreen: ve.value,
|
|
1003
|
+
isTooltip: N.value.showTooltip,
|
|
1004
|
+
titles: { ...t.value.userOptions.buttonTitles },
|
|
1005
|
+
chartElement: W.value,
|
|
1006
|
+
position: t.value.userOptions.position,
|
|
1007
|
+
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
1008
|
+
isAnnotation: Ve.value,
|
|
1009
|
+
callbacks: t.value.userOptions.callbacks,
|
|
1010
|
+
printScale: t.value.userOptions.print.scale,
|
|
1011
|
+
tableDialog: t.value.table.useDialog,
|
|
1012
|
+
onToggleFullscreen: Gt,
|
|
1013
|
+
onGeneratePdf: g(Pt),
|
|
1014
|
+
onGenerateCsv: ht,
|
|
1015
|
+
onGenerateImage: g(Vt),
|
|
1016
|
+
onGenerateSvg: eo,
|
|
1017
|
+
onToggleTable: Yt,
|
|
1018
|
+
onToggleTooltip: Zt,
|
|
1019
|
+
onToggleAnnotator: ft,
|
|
1020
|
+
style: ce({
|
|
1021
|
+
visibility: g(zt) ? g(rt) ? "visible" : "hidden" : "visible"
|
|
1022
|
+
})
|
|
1023
|
+
}, ao({ _: 2 }, [
|
|
1024
|
+
e.$slots.menuIcon ? {
|
|
1025
|
+
name: "menuIcon",
|
|
1026
|
+
fn: y(({ isOpen: o, color: a }) => [
|
|
1027
|
+
b(e.$slots, "menuIcon", L(R({ isOpen: o, color: a })), void 0, !0)
|
|
1028
|
+
]),
|
|
1029
|
+
key: "0"
|
|
1030
|
+
} : void 0,
|
|
1031
|
+
e.$slots.optionTooltip ? {
|
|
1032
|
+
name: "optionTooltip",
|
|
1033
|
+
fn: y(() => [
|
|
1034
|
+
b(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
1035
|
+
]),
|
|
1036
|
+
key: "1"
|
|
1037
|
+
} : void 0,
|
|
1038
|
+
e.$slots.optionPdf ? {
|
|
1039
|
+
name: "optionPdf",
|
|
1040
|
+
fn: y(() => [
|
|
1041
|
+
b(e.$slots, "optionPdf", {}, void 0, !0)
|
|
1042
|
+
]),
|
|
1043
|
+
key: "2"
|
|
1044
|
+
} : void 0,
|
|
1045
|
+
e.$slots.optionCsv ? {
|
|
1046
|
+
name: "optionCsv",
|
|
1047
|
+
fn: y(() => [
|
|
1048
|
+
b(e.$slots, "optionCsv", {}, void 0, !0)
|
|
1049
|
+
]),
|
|
1050
|
+
key: "3"
|
|
1051
|
+
} : void 0,
|
|
1052
|
+
e.$slots.optionImg ? {
|
|
1053
|
+
name: "optionImg",
|
|
1054
|
+
fn: y(() => [
|
|
1055
|
+
b(e.$slots, "optionImg", {}, void 0, !0)
|
|
1056
|
+
]),
|
|
1057
|
+
key: "4"
|
|
1058
|
+
} : void 0,
|
|
1059
|
+
e.$slots.optionSvg ? {
|
|
1060
|
+
name: "optionSvg",
|
|
1061
|
+
fn: y(() => [
|
|
1062
|
+
b(e.$slots, "optionSvg", {}, void 0, !0)
|
|
1063
|
+
]),
|
|
1064
|
+
key: "5"
|
|
1065
|
+
} : void 0,
|
|
1066
|
+
e.$slots.optionTable ? {
|
|
1067
|
+
name: "optionTable",
|
|
1068
|
+
fn: y(() => [
|
|
1069
|
+
b(e.$slots, "optionTable", {}, void 0, !0)
|
|
1070
|
+
]),
|
|
1071
|
+
key: "6"
|
|
1072
|
+
} : void 0,
|
|
1073
|
+
e.$slots.optionFullscreen ? {
|
|
1074
|
+
name: "optionFullscreen",
|
|
1075
|
+
fn: y(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
1076
|
+
b(e.$slots, "optionFullscreen", L(R({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
1077
|
+
]),
|
|
1078
|
+
key: "7"
|
|
1079
|
+
} : void 0,
|
|
1080
|
+
e.$slots.optionAnnotator ? {
|
|
1081
|
+
name: "optionAnnotator",
|
|
1082
|
+
fn: y(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
1083
|
+
b(e.$slots, "optionAnnotator", L(R({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
1084
|
+
]),
|
|
1085
|
+
key: "8"
|
|
1086
|
+
} : void 0
|
|
1087
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : _("", !0),
|
|
1088
|
+
Y.value.length > 1 ? (h(), A("nav", {
|
|
1089
|
+
key: 4,
|
|
1090
|
+
class: "vue-ui-treemap-breadcrumbs",
|
|
1091
|
+
"data-dom-to-png-ignore": "",
|
|
1092
|
+
ref_key: "breadcrumbsNav",
|
|
1093
|
+
ref: at
|
|
1094
|
+
}, [
|
|
1095
|
+
(h(!0), A(qe, null, wt(Y.value, (o, a) => (h(), A("span", {
|
|
1096
|
+
role: "button",
|
|
1097
|
+
tabindex: a < Y.value.length - 1 ? 0 : void 0,
|
|
1098
|
+
key: o.id || "root",
|
|
1099
|
+
onClick: (s) => a === Y.value.length - 1 ? () => {
|
|
1100
|
+
} : Le(o.node),
|
|
1101
|
+
onKeydown: [
|
|
1102
|
+
no(At((s) => a === Y.value.length - 1 ? void 0 : Le(o.node), ["prevent"]), ["enter"]),
|
|
1103
|
+
no(At((s) => a === Y.value.length - 1 ? void 0 : Le(o.node), ["prevent"]), ["space"])
|
|
1104
|
+
],
|
|
1105
|
+
class: "vue-ui-treemap-crumb",
|
|
1106
|
+
"data-last-crumb": a === Y.value.length - 1,
|
|
1107
|
+
style: ce({
|
|
1108
|
+
color: t.value.style.chart.color
|
|
1109
|
+
}),
|
|
1110
|
+
onMouseenter: (s) => Kt(a),
|
|
1111
|
+
onMouseleave: Jt,
|
|
1112
|
+
onFocus: (s) => Kt(a),
|
|
1113
|
+
onBlur: Jt
|
|
1114
|
+
}, [
|
|
1115
|
+
z("span", Ll, [
|
|
1116
|
+
z("span", Rl, [
|
|
1117
|
+
b(e.$slots, "breadcrumb-label", $t({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: He.value === a }), () => [
|
|
1118
|
+
a === 0 ? (h(), A("div", Pl, [
|
|
1119
|
+
Ge(co, {
|
|
1120
|
+
name: He.value === 0 ? "homeFilled" : "home",
|
|
1121
|
+
stroke: t.value.style.chart.color
|
|
1122
|
+
}, null, 8, ["name", "stroke"])
|
|
1123
|
+
])) : (h(), A(qe, { key: 1 }, [
|
|
1124
|
+
Ye(Ze(o.label), 1)
|
|
1125
|
+
], 64))
|
|
1126
|
+
], !0)
|
|
1127
|
+
]),
|
|
1128
|
+
a < Y.value.length - 1 ? (h(), A("span", Vl, [
|
|
1129
|
+
b(e.$slots, "breadcrumb-arrow", {}, () => [
|
|
1130
|
+
l[4] || (l[4] = Ye(" › ", -1))
|
|
1131
|
+
], !0)
|
|
1132
|
+
])) : _("", !0)
|
|
1133
|
+
])
|
|
1134
|
+
], 44, zl))), 128))
|
|
1135
|
+
], 512)) : _("", !0),
|
|
1136
|
+
(h(), A("svg", {
|
|
1137
|
+
ref_key: "svgRef",
|
|
1138
|
+
ref: ut,
|
|
1139
|
+
xmlns: g(Tt),
|
|
1140
|
+
class: kt({ "vue-data-ui-fullscreen--on": ve.value, "vue-data-ui-fulscreen--off": !ve.value, "vue-data-ui-zoom-plus": !Fe.value, "vue-data-ui-zoom-minus": Fe.value, loading: g(Ce) }),
|
|
1141
|
+
viewBox: `${xe.value.startX} ${xe.value.startY} ${xe.value.width <= 0 ? 10 : xe.value.width} ${xe.value.height <= 0 ? 10 : xe.value.height}`,
|
|
1142
|
+
style: ce(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
|
|
1143
|
+
}, [
|
|
1144
|
+
Ge(g(m)),
|
|
1145
|
+
(h(!0), A(qe, null, wt(Me.value, (o, a) => (h(), A("g", {
|
|
1146
|
+
key: `tgrad_${o.id}`
|
|
1147
|
+
}, [
|
|
1148
|
+
t.value.style.chart.layout.rects.gradient.show ? (h(), A("defs", Wl, [
|
|
1149
|
+
z("radialGradient", {
|
|
1150
|
+
id: `tgrad_${o.id}`,
|
|
1151
|
+
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
1152
|
+
}, [
|
|
1153
|
+
z("stop", {
|
|
1154
|
+
offset: "18%",
|
|
1155
|
+
"stop-color": o.color
|
|
1156
|
+
}, null, 8, jl),
|
|
1157
|
+
z("stop", {
|
|
1158
|
+
offset: "100%",
|
|
1159
|
+
"stop-color": g(ro)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
1160
|
+
}, null, 8, Xl)
|
|
1161
|
+
], 8, Ul)
|
|
1162
|
+
])) : _("", !0)
|
|
1163
|
+
]))), 128)),
|
|
1164
|
+
(h(!0), A(qe, null, wt(Me.value, (o, a) => (h(), A("g", {
|
|
1165
|
+
key: `k_${o.id}`
|
|
1166
|
+
}, [
|
|
1167
|
+
z("rect", {
|
|
1168
|
+
x: o.x0,
|
|
1169
|
+
y: o.y0,
|
|
1170
|
+
height: Ae(o),
|
|
1171
|
+
width: $e(o),
|
|
1172
|
+
fill: q.value ? o.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
|
|
1173
|
+
rx: Xo(o),
|
|
1174
|
+
stroke: U.value && U.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
|
|
1175
|
+
"stroke-width": U.value && U.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
|
|
1176
|
+
onClick: At((s) => Le(o, a), ["stop"]),
|
|
1177
|
+
onMouseenter: () => No({
|
|
1178
|
+
datapoint: o,
|
|
1179
|
+
seriesIndex: a
|
|
1180
|
+
}),
|
|
1181
|
+
onMouseleave: (s) => Io({ datapoint: o, seriesIndex: a }),
|
|
1182
|
+
style: ce(`opacity:${U.value ? U.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
1183
|
+
class: kt([
|
|
1184
|
+
"vue-ui-treemap-rect",
|
|
1185
|
+
Eo(o) ? "vue-data-ui-zoom-plus" : Fe.value ? "vue-data-ui-zoom-minus" : ""
|
|
1186
|
+
])
|
|
1187
|
+
}, null, 46, Gl),
|
|
1188
|
+
!e.$slots.rect && !g(Ce) && t.value.style.chart.layout.labels.showDefaultLabels ? (h(), A("g", {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
style: { "pointer-events": "none" },
|
|
1191
|
+
innerHTML: jo({ rect: o, seriesIndex: a })
|
|
1192
|
+
}, null, 8, ql)) : _("", !0),
|
|
1193
|
+
(h(), A("foreignObject", {
|
|
1194
|
+
x: o.x0,
|
|
1195
|
+
y: o.y0,
|
|
1196
|
+
height: Ae(o),
|
|
1197
|
+
width: $e(o),
|
|
1198
|
+
class: "vue-ui-treemap-cell-foreignObject"
|
|
1199
|
+
}, [
|
|
1200
|
+
z("div", {
|
|
1201
|
+
style: ce({
|
|
1202
|
+
width: `calc(100% - ${Te(o) / 1.5}px)`,
|
|
1203
|
+
height: `calc(100% - ${Te(o) / 1.5}px)`,
|
|
1204
|
+
padding: `${Te(o) / 3}px`
|
|
1205
|
+
}),
|
|
1206
|
+
class: "vue-ui-treemap-cell"
|
|
1207
|
+
}, [
|
|
1208
|
+
g(Ce) ? _("", !0) : b(e.$slots, "rect", $t({
|
|
1209
|
+
key: 0,
|
|
1210
|
+
ref_for: !0
|
|
1211
|
+
}, {
|
|
1212
|
+
rect: o,
|
|
1213
|
+
shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Fe.value,
|
|
1214
|
+
fontSize: Te(o),
|
|
1215
|
+
isZoom: Fe.value,
|
|
1216
|
+
textColor: g(uo)(o.color)
|
|
1217
|
+
}), void 0, !0)
|
|
1218
|
+
], 4)
|
|
1219
|
+
], 8, Yl))
|
|
1220
|
+
]))), 128)),
|
|
1221
|
+
b(e.$slots, "svg", L(R({ svg: P.value, isZoom: Fe.value, rect: U.value, config: t.value })), void 0, !0)
|
|
1222
|
+
], 14, Hl)),
|
|
1223
|
+
e.$slots.watermark ? (h(), A("div", Zl, [
|
|
1224
|
+
b(e.$slots, "watermark", L(R({ isPrinting: g(Lt) || g(Rt) })), void 0, !0)
|
|
1225
|
+
])) : _("", !0),
|
|
1226
|
+
z("div", {
|
|
1227
|
+
id: `legend-bottom-${oe.value}`
|
|
1228
|
+
}, null, 8, Kl),
|
|
1229
|
+
It.value ? (h(), de(ll, {
|
|
1230
|
+
key: 6,
|
|
1231
|
+
to: t.value.style.chart.legend.position === "top" ? `#legend-top-${oe.value}` : `#legend-bottom-${oe.value}`
|
|
1232
|
+
}, [
|
|
1233
|
+
z("div", {
|
|
1234
|
+
ref_key: "chartLegend",
|
|
1235
|
+
ref: Et
|
|
1236
|
+
}, [
|
|
1237
|
+
t.value.style.chart.legend.show ? (h(), de($l, {
|
|
1238
|
+
key: `legend_${lt.value}`,
|
|
1239
|
+
legendSet: dt.value,
|
|
1240
|
+
config: Do.value,
|
|
1241
|
+
id: `treemap_legend_${oe.value}`,
|
|
1242
|
+
onClickMarker: l[0] || (l[0] = ({ legend: o }) => Re(o))
|
|
1243
|
+
}, {
|
|
1244
|
+
item: y(({ legend: o, index: a }) => [
|
|
1245
|
+
g(Ce) ? _("", !0) : (h(), A("div", {
|
|
1246
|
+
key: 0,
|
|
1247
|
+
onClick: (s) => Re(o),
|
|
1248
|
+
style: ce(`opacity:${I.value.includes(o.id) ? 0.5 : 1}`)
|
|
1249
|
+
}, Ze(o.display), 13, Jl))
|
|
1250
|
+
]),
|
|
1251
|
+
_: 1
|
|
1252
|
+
}, 8, ["legendSet", "config", "id"])) : b(e.$slots, "legend", {
|
|
1253
|
+
key: 1,
|
|
1254
|
+
legend: dt.value
|
|
1255
|
+
}, void 0, !0)
|
|
1256
|
+
], 512)
|
|
1257
|
+
], 8, ["to"])) : _("", !0),
|
|
1258
|
+
e.$slots.source ? (h(), A("div", {
|
|
1259
|
+
key: 7,
|
|
1260
|
+
ref_key: "source",
|
|
1261
|
+
ref: Dt,
|
|
1262
|
+
dir: "auto"
|
|
1263
|
+
}, [
|
|
1264
|
+
b(e.$slots, "source", {}, void 0, !0)
|
|
1265
|
+
], 512)) : _("", !0),
|
|
1266
|
+
Ge(g(v), {
|
|
1267
|
+
show: N.value.showTooltip && et.value,
|
|
1268
|
+
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
1269
|
+
color: t.value.style.chart.tooltip.color,
|
|
1270
|
+
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
1271
|
+
borderRadius: t.value.style.chart.tooltip.borderRadius,
|
|
1272
|
+
borderColor: t.value.style.chart.tooltip.borderColor,
|
|
1273
|
+
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
1274
|
+
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
1275
|
+
position: t.value.style.chart.tooltip.position,
|
|
1276
|
+
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
1277
|
+
parent: W.value,
|
|
1278
|
+
content: tt.value,
|
|
1279
|
+
isFullscreen: ve.value,
|
|
1280
|
+
isCustom: g(io)(t.value.style.chart.tooltip.customFormat),
|
|
1281
|
+
smooth: t.value.style.chart.tooltip.smooth,
|
|
1282
|
+
backdropFilter: t.value.style.chart.tooltip.backdropFilter,
|
|
1283
|
+
smoothForce: t.value.style.chart.tooltip.smoothForce,
|
|
1284
|
+
smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold
|
|
1285
|
+
}, {
|
|
1286
|
+
"tooltip-before": y(() => [
|
|
1287
|
+
b(e.$slots, "tooltip-before", L(R({ ...vt.value })), void 0, !0)
|
|
1288
|
+
]),
|
|
1289
|
+
"tooltip-after": y(() => [
|
|
1290
|
+
b(e.$slots, "tooltip-after", L(R({ ...vt.value })), void 0, !0)
|
|
1291
|
+
]),
|
|
1292
|
+
_: 3
|
|
1293
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1294
|
+
te.value && t.value.userOptions.buttons.table ? (h(), de(al(Be.value.component), $t({ key: 8 }, Be.value.props, {
|
|
1295
|
+
ref_key: "tableUnit",
|
|
1296
|
+
ref: _e,
|
|
1297
|
+
onClose: Qt
|
|
1298
|
+
}), ao({
|
|
1299
|
+
content: y(() => [
|
|
1300
|
+
(h(), de(g(c), {
|
|
1301
|
+
key: `table_${ot.value}`,
|
|
1302
|
+
colNames: Pe.value.colNames,
|
|
1303
|
+
head: Pe.value.head,
|
|
1304
|
+
body: Pe.value.body,
|
|
1305
|
+
config: Pe.value.config,
|
|
1306
|
+
title: t.value.table.useDialog ? "" : Be.value.title,
|
|
1307
|
+
withCloseButton: !t.value.table.useDialog,
|
|
1308
|
+
onClose: Qt
|
|
1309
|
+
}, {
|
|
1310
|
+
th: y(({ th: o }) => [
|
|
1311
|
+
z("div", {
|
|
1312
|
+
innerHTML: o,
|
|
1313
|
+
style: { display: "flex", "align-items": "center" }
|
|
1314
|
+
}, null, 8, Ql)
|
|
1315
|
+
]),
|
|
1316
|
+
td: y(({ td: o }) => [
|
|
1317
|
+
Ye(Ze(o.name || o), 1)
|
|
1318
|
+
]),
|
|
1319
|
+
_: 1
|
|
1320
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1321
|
+
]),
|
|
1322
|
+
_: 2
|
|
1323
|
+
}, [
|
|
1324
|
+
t.value.table.useDialog ? {
|
|
1325
|
+
name: "title",
|
|
1326
|
+
fn: y(() => [
|
|
1327
|
+
Ye(Ze(Be.value.title), 1)
|
|
1328
|
+
]),
|
|
1329
|
+
key: "0"
|
|
1330
|
+
} : void 0,
|
|
1331
|
+
t.value.table.useDialog ? {
|
|
1332
|
+
name: "actions",
|
|
1333
|
+
fn: y(() => [
|
|
1334
|
+
z("button", {
|
|
1335
|
+
tabindex: "0",
|
|
1336
|
+
class: "vue-ui-user-options-button",
|
|
1337
|
+
onClick: l[1] || (l[1] = (o) => ht(t.value.userOptions.callbacks.csv))
|
|
1338
|
+
}, [
|
|
1339
|
+
Ge(co, {
|
|
1340
|
+
name: "excel",
|
|
1341
|
+
stroke: Be.value.props.color
|
|
1342
|
+
}, null, 8, ["stroke"])
|
|
1343
|
+
])
|
|
1344
|
+
]),
|
|
1345
|
+
key: "1"
|
|
1346
|
+
} : void 0
|
|
1347
|
+
]), 1040)) : _("", !0),
|
|
1348
|
+
g(Ce) ? (h(), de(ml, { key: 9 })) : _("", !0)
|
|
1349
|
+
], 46, Il));
|
|
1350
|
+
}
|
|
1351
|
+
}, ta = /* @__PURE__ */ xl(ea, [["__scopeId", "data-v-7a01823f"]]), ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1352
|
+
__proto__: null,
|
|
1353
|
+
default: ta
|
|
1354
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1355
|
+
export {
|
|
1356
|
+
ba as a,
|
|
1357
|
+
ya as b,
|
|
1358
|
+
ta as v
|
|
1359
|
+
};
|