vue-data-ui 3.4.3 → 3.4.4
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-CRe_nKB4.js → Arrow-BGVin3AS.js} +1 -1
- package/dist/{BaseDraggableDialog-CbuLbfrc.js → BaseDraggableDialog-ymf2sfB8.js} +2 -2
- package/dist/{BaseIcon-B5KaGWWC.js → BaseIcon-BmMbm4d0.js} +1 -1
- package/dist/{ColorPicker-BMztHpBp.js → ColorPicker-J5wOPCeB.js} +2 -2
- package/dist/{DataTable-DOx3zgih.js → DataTable-BT7VF2ua.js} +2 -2
- package/dist/{Legend-C8u37J42.js → Legend-G6GMcdAc.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BcxfJ-r2.js → NonSvgPenAndPaper-C7TRn0_3.js} +3 -3
- package/dist/{PackageVersion-Df-8U2yE.js → PackageVersion-TgflyMpU.js} +1 -1
- package/dist/{PenAndPaper-Dj2diYr0.js → PenAndPaper-DSvu9dwa.js} +3 -3
- package/dist/{Shape-BhNvlGIN.js → Shape-CNXKB8O0.js} +1 -1
- package/dist/{Slicer-BHgEsIBU.js → Slicer-D2wm0coO.js} +2 -2
- package/dist/{SlicerPreview-Cobmb_1S.js → SlicerPreview-ij72TAs6.js} +2 -2
- package/dist/{SparkTooltip-CL3cNRQ_.js → SparkTooltip-BEewz-_Q.js} +1 -1
- package/dist/{Title-D7_5ICX_.js → Title-BWp-37K_.js} +1 -1
- package/dist/{Tooltip-Cs4v8OnI.js → Tooltip-68Yi_FFl.js} +1 -1
- package/dist/{UserOptions-C0YT60JN.js → UserOptions-1OZ3jcm6.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- 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 +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-xQ7LXrxp.js → dom-to-png--BNgrTZV.js} +1 -1
- package/dist/{img-CFY3JivG.js → img-BecE5qXd.js} +1 -1
- package/dist/{lib-BcBZIm6u.js → lib-C_mNZmhD.js} +311 -303
- package/dist/{pdf-O34i6EQX.js → pdf-DuG5j3Wv.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +8 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BHq4FD8x.js → useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js} +1 -1
- package/dist/{useNestedProp-CtheCta-.js → useNestedProp-dJX_8vvZ.js} +10 -2
- package/dist/{usePrinter-C1GiglOH.js → usePrinter-DTzqpYKF.js} +2 -2
- package/dist/{vue-data-ui-OfJx8jSP.js → vue-data-ui-Cx68QDfQ.js} +64 -64
- package/dist/vue-data-ui.js +72 -72
- package/dist/{vue-ui-3d-bar-Bp-sqsyU.js → vue-ui-3d-bar-C777yFCa.js} +6 -6
- package/dist/{vue-ui-accordion-DXdd_qAk.js → vue-ui-accordion-UpZ765hd.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CUVtajBe.js → vue-ui-age-pyramid-Dob7mIkZ.js} +6 -6
- package/dist/{vue-ui-annotator-D5GKadj6.js → vue-ui-annotator--8upDtTs.js} +7 -7
- package/dist/{vue-ui-bullet-rQoLiK2b.js → vue-ui-bullet-K2J31pN0.js} +7 -7
- package/dist/{vue-ui-candlestick-D7eCxbQ8.js → vue-ui-candlestick-BYAtu5ns.js} +7 -7
- package/dist/{vue-ui-carousel-table-Bu8HSJRc.js → vue-ui-carousel-table-D4mU7lyU.js} +4 -4
- package/dist/{vue-ui-chestnut-BqyduBAg.js → vue-ui-chestnut-DCxYsgRF.js} +5 -5
- package/dist/{vue-ui-chord-VTRyVBx4.js → vue-ui-chord-jzC9Ioet.js} +8 -8
- package/dist/{vue-ui-circle-pack-DIXUixuK.js → vue-ui-circle-pack-y8KHilxj.js} +6 -6
- package/dist/{vue-ui-cursor-TFVxgVEa.js → vue-ui-cursor-BqWDtj2I.js} +2 -2
- package/dist/{vue-ui-dashboard-DeFPygcZ.js → vue-ui-dashboard-BbXfbRd0.js} +67 -67
- package/dist/{vue-ui-digits-B6cIiy1Z.js → vue-ui-digits-Cdn6EcYe.js} +2 -2
- package/dist/{vue-ui-donut-B3kaTm1I.js → vue-ui-donut-DCMaXKHe.js} +8 -8
- package/dist/{vue-ui-donut-evolution-CGxyHap0.js → vue-ui-donut-evolution-BUu-RAkz.js} +8 -8
- package/dist/{vue-ui-dumbbell-BpHU2gPm.js → vue-ui-dumbbell-BeH9PPMc.js} +7 -7
- package/dist/{vue-ui-flow-B1jwV-to.js → vue-ui-flow-ITp7cFEx.js} +7 -7
- package/dist/{vue-ui-funnel-C07ghZCo.js → vue-ui-funnel-DMyu3e5n.js} +6 -6
- package/dist/{vue-ui-galaxy-C2aCa9u0.js → vue-ui-galaxy-BGMtscCZ.js} +7 -7
- package/dist/{vue-ui-gauge-BymG1mO4.js → vue-ui-gauge-DmRrw6oc.js} +7 -7
- package/dist/{vue-ui-gizmo-BjPbDZKf.js → vue-ui-gizmo-BhyYpiEW.js} +3 -3
- package/dist/{vue-ui-heatmap-D2udHyOO.js → vue-ui-heatmap-DBDUKIjw.js} +7 -7
- package/dist/{vue-ui-history-plot-C1v5py9J.js → vue-ui-history-plot-CBhE_gIp.js} +7 -7
- package/dist/{vue-ui-kpi-4fToBGEE.js → vue-ui-kpi-CVpJH51G.js} +3 -3
- package/dist/{vue-ui-mini-loader-o6xsgflK.js → vue-ui-mini-loader-b4D0tPsD.js} +2 -2
- package/dist/{vue-ui-molecule-QJY9Jg--.js → vue-ui-molecule-D1TlMhn-.js} +5 -5
- package/dist/{vue-ui-mood-radar-CYz7t7cO.js → vue-ui-mood-radar-CUYY-Szv.js} +7 -7
- package/dist/{vue-ui-nested-donuts-Cs_KVggH.js → vue-ui-nested-donuts-D2Po_PPW.js} +7 -7
- package/dist/{vue-ui-onion-DI__t0Yo.js → vue-ui-onion-CfzTGHTz.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-BUFBIY0H.js → vue-ui-parallel-coordinate-plot-Ci8_8l5O.js} +8 -8
- package/dist/{vue-ui-quadrant-q27Crjhv.js → vue-ui-quadrant-BO_6zkWH.js} +8 -8
- package/dist/{vue-ui-quick-chart-vA-5-zU_.js → vue-ui-quick-chart-BGsUTlN6.js} +6 -6
- package/dist/{vue-ui-radar-v6sFZlta.js → vue-ui-radar-Cb4NhTp9.js} +8 -8
- package/dist/{vue-ui-rating-B1TGv80Y.js → vue-ui-rating-CvJlfRvs.js} +2 -2
- package/dist/{vue-ui-relation-circle-C_7j_HC1.js → vue-ui-relation-circle-gKV4FDiD.js} +7 -7
- package/dist/{vue-ui-ridgeline-BaDr8YsQ.js → vue-ui-ridgeline-B5Z_H1U_.js} +8 -8
- package/dist/{vue-ui-rings-BcsyGpD-.js → vue-ui-rings-DXYT08cN.js} +8 -8
- package/dist/{vue-ui-scatter-DsvtDcRf.js → vue-ui-scatter-B_e_aVVt.js} +8 -8
- package/dist/{vue-ui-skeleton-DJka_Bjy.js → vue-ui-skeleton-oFjhyDNo.js} +3 -3
- package/dist/{vue-ui-smiley-D-W7GeoN.js → vue-ui-smiley-D3k4b6h1.js} +2 -2
- package/dist/{vue-ui-spark-trend-ufRxrEgv.js → vue-ui-spark-trend-CAMWrCuF.js} +3 -3
- package/dist/{vue-ui-sparkbar-C0hU8raA.js → vue-ui-sparkbar-VN-3rFCT.js} +3 -3
- package/dist/{vue-ui-sparkgauge-1bi-EEqb.js → vue-ui-sparkgauge-B1QNNxyJ.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-H1BSDVyx.js → vue-ui-sparkhistogram-Cb7ACr7x.js} +4 -4
- package/dist/{vue-ui-sparkline-DElVjWGk.js → vue-ui-sparkline-DA40psbw.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DE3D2xTJ.js → vue-ui-sparkstackbar-CJ_L5xwe.js} +3 -3
- package/dist/{vue-ui-stackbar-DVTV6JcM.js → vue-ui-stackbar-CJgS4kt9.js} +9 -9
- package/dist/{vue-ui-strip-plot-0RudVLPB.js → vue-ui-strip-plot-DQ8uM3vL.js} +7 -7
- package/dist/{vue-ui-table-jbkT9pG2.js → vue-ui-table-DXJzV47E.js} +5 -5
- package/dist/{vue-ui-table-heatmap-BQgeM3lZ.js → vue-ui-table-heatmap-zbRs5HKh.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Elk05A1j.js → vue-ui-table-sparkline-DCll7_tQ.js} +4 -4
- package/dist/{vue-ui-thermometer-6QNHvlxi.js → vue-ui-thermometer-BamrnCX9.js} +7 -7
- package/dist/{vue-ui-timer-BvHuXOu1.js → vue-ui-timer-ClzIo0W7.js} +5 -5
- package/dist/{vue-ui-tiremarks-CCfLSw7X.js → vue-ui-tiremarks-zcoGGB82.js} +6 -6
- package/dist/vue-ui-treemap-B-Jt_hzH.js +1289 -0
- package/dist/{vue-ui-vertical-bar-C8UcI92_.js → vue-ui-vertical-bar-B5lTNJP2.js} +9 -9
- package/dist/{vue-ui-waffle-CMO0x41z.js → vue-ui-waffle-CLN7Vhv2.js} +8 -8
- package/dist/{vue-ui-wheel-CB2KRY13.js → vue-ui-wheel-Cc7zjB8c.js} +6 -6
- package/dist/{vue-ui-word-cloud-BDP2WP1p.js → vue-ui-word-cloud-BW8UT3gD.js} +6 -6
- package/dist/{vue-ui-world-CobFs5Vm.js → vue-ui-world-BKaac8Ew.js} +6 -6
- package/dist/{vue-ui-xy-DmWHarZg.js → vue-ui-xy-DXMbNkHe.js} +9 -9
- package/dist/{vue-ui-xy-canvas-BwhZD5_d.js → vue-ui-xy-canvas-Dm-LZ-LP.js} +10 -10
- package/package.json +1 -1
- package/dist/vue-ui-treemap-DNimXWh4.js +0 -1131
|
@@ -1,1131 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as ee, useSlots as Kt, onMounted as bt, computed as m, ref as y, shallowRef as H, toRefs as Jt, watch as ke, onBeforeUnmount as Qt, createElementBlock as b, openBlock as h, unref as d, normalizeStyle as R, normalizeClass as Me, createBlock as Z, createCommentVNode as O, createElementVNode as _, createVNode as we, createSlots as kt, withCtx as T, renderSlot as C, normalizeProps as te, guardReactiveProps as le, Fragment as Ce, renderList as Ve, withKeys as wt, withModifiers as Ee, mergeProps as He, createTextVNode as $e, toDisplayString as se, Teleport as el, resolveDynamicComponent as tl, nextTick as ll } from "vue";
|
|
2
|
-
import { c as Te, t as ol, b as al, p as I, e as nl, o as Ct, f as sl, h as de, a as xe, d as he, X as ul, S as $t, J as Tt, G as xt, P as rl, Q as il, H as cl } from "./lib-BcBZIm6u.js";
|
|
3
|
-
import { t as vl, u as dl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as hl, a as Ot } from "./useNestedProp-CtheCta-.js";
|
|
5
|
-
import { u as pl, B as fl } from "./BaseScanner-BgWxam9d.js";
|
|
6
|
-
import { u as gl } from "./usePrinter-C1GiglOH.js";
|
|
7
|
-
import { u as ml } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
-
import { u as yl } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
-
import bl from "./img-CFY3JivG.js";
|
|
10
|
-
import kl from "./Title-D7_5ICX_.js";
|
|
11
|
-
import { t as wl } from "./themes-AUNCOb2G.js";
|
|
12
|
-
import Cl from "./Legend-C8u37J42.js";
|
|
13
|
-
import _t from "./BaseIcon-B5KaGWWC.js";
|
|
14
|
-
import { u as $l } from "./useSvgExport-DrjCWun4.js";
|
|
15
|
-
import { _ as Tl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
-
function St(n, r) {
|
|
17
|
-
const s = n.length;
|
|
18
|
-
if (s === 0)
|
|
19
|
-
throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);
|
|
20
|
-
{
|
|
21
|
-
let i = 1 / 0, u = -1 / 0, p = 0;
|
|
22
|
-
for (let g = 0; g < s; g += 1) {
|
|
23
|
-
const f = n[g].normalizedValue;
|
|
24
|
-
f < i && (i = f), f > u && (u = f), p += f;
|
|
25
|
-
}
|
|
26
|
-
return Math.max(
|
|
27
|
-
r ** 2 * u / p ** 2,
|
|
28
|
-
p ** 2 / (r ** 2 * i)
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function At(n) {
|
|
33
|
-
const { xOffset: r, yOffset: s, width: i, height: u } = n;
|
|
34
|
-
return {
|
|
35
|
-
x0: r,
|
|
36
|
-
y0: s,
|
|
37
|
-
x1: r + i,
|
|
38
|
-
y1: s + u
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function xl(n, r, s) {
|
|
42
|
-
if (n.length === 0)
|
|
43
|
-
return !0;
|
|
44
|
-
{
|
|
45
|
-
const i = n.concat(r), u = St(
|
|
46
|
-
n,
|
|
47
|
-
s
|
|
48
|
-
), p = St(i, s);
|
|
49
|
-
return u >= p;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function Ol(n) {
|
|
53
|
-
const r = [], s = n.length;
|
|
54
|
-
for (let i = 0; i < s; i += 1) {
|
|
55
|
-
const u = n[i], p = u.length;
|
|
56
|
-
for (let v = 0; v < p; v += 1)
|
|
57
|
-
r.push(u[v]);
|
|
58
|
-
}
|
|
59
|
-
return r;
|
|
60
|
-
}
|
|
61
|
-
function _l(n, r) {
|
|
62
|
-
const s = {
|
|
63
|
-
...r,
|
|
64
|
-
children: n
|
|
65
|
-
};
|
|
66
|
-
return Ft(s);
|
|
67
|
-
}
|
|
68
|
-
function Sl(n) {
|
|
69
|
-
return (n.x1 - n.x0) * (n.y1 - n.y0);
|
|
70
|
-
}
|
|
71
|
-
function It(n, r) {
|
|
72
|
-
const { width: s, height: i, xOffset: u, yOffset: p } = Ue(r), v = n.length, g = n.map((w) => w.normalizedValue || 0).reduce((w, F) => w + F, 0), f = g / i, U = g / s;
|
|
73
|
-
let L = u, k = p;
|
|
74
|
-
const $ = [];
|
|
75
|
-
if (s >= i) {
|
|
76
|
-
for (let w = 0; w < v; w += 1) {
|
|
77
|
-
const F = n[w], M = k + F.normalizedValue / f, S = {
|
|
78
|
-
x0: L,
|
|
79
|
-
y0: k,
|
|
80
|
-
x1: L + f,
|
|
81
|
-
y1: M
|
|
82
|
-
}, N = Object.assign({}, F, S);
|
|
83
|
-
k = M, $.push(N);
|
|
84
|
-
}
|
|
85
|
-
return $;
|
|
86
|
-
} else {
|
|
87
|
-
for (let w = 0; w < v; w += 1) {
|
|
88
|
-
const F = n[w], M = L + F.normalizedValue / U, S = {
|
|
89
|
-
x0: L,
|
|
90
|
-
y0: k,
|
|
91
|
-
x1: M,
|
|
92
|
-
y1: k + U
|
|
93
|
-
}, N = Object.assign({}, F, S);
|
|
94
|
-
L = M, $.push(N);
|
|
95
|
-
}
|
|
96
|
-
return $;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function Al(n) {
|
|
100
|
-
const r = Ue(n), s = r.width, i = r.height;
|
|
101
|
-
return Math.min(s, i);
|
|
102
|
-
}
|
|
103
|
-
function Il(n, r) {
|
|
104
|
-
const s = n.length, i = n.map((f) => f.value ?? 0).reduce((f, U) => f + U, 0), u = r / i, p = [];
|
|
105
|
-
let v, g;
|
|
106
|
-
for (let f = 0; f < s; f += 1)
|
|
107
|
-
g = n[f], v = Object.assign({}, g, {
|
|
108
|
-
normalizedValue: g.value * (u || 0)
|
|
109
|
-
}), p.push(v);
|
|
110
|
-
return p;
|
|
111
|
-
}
|
|
112
|
-
function Ue(n) {
|
|
113
|
-
const { x0: r, y0: s, x1: i, y1: u } = n;
|
|
114
|
-
return {
|
|
115
|
-
xOffset: r,
|
|
116
|
-
yOffset: s,
|
|
117
|
-
width: i - r,
|
|
118
|
-
height: u - s
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function Fl(n, r, s, i) {
|
|
122
|
-
let u = n, p = r, v = s, g = i;
|
|
123
|
-
for (; ; ) {
|
|
124
|
-
const f = u.length;
|
|
125
|
-
if (f === 0) {
|
|
126
|
-
const $ = It(p, v);
|
|
127
|
-
return g.concat($);
|
|
128
|
-
}
|
|
129
|
-
const U = Al(v), L = u[0], k = u.slice(1, f);
|
|
130
|
-
if (xl(p, L, U)) {
|
|
131
|
-
const $ = p.concat(L);
|
|
132
|
-
u = k, p = $, v = v, g = g;
|
|
133
|
-
} else {
|
|
134
|
-
const $ = p.length;
|
|
135
|
-
let w = 0;
|
|
136
|
-
for (let N = 0; N < $; N += 1)
|
|
137
|
-
w += p[N].normalizedValue;
|
|
138
|
-
const F = Dl(v, w), M = It(p, v), S = g.concat(M);
|
|
139
|
-
u = u, p = [], v = F, g = S;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
function Ft(n) {
|
|
144
|
-
if (typeof n.children > "u" || !n.children.length)
|
|
145
|
-
return [n];
|
|
146
|
-
{
|
|
147
|
-
const r = Il(
|
|
148
|
-
n.children,
|
|
149
|
-
Sl(n)
|
|
150
|
-
), s = Fl(r, [], n, []), i = s.length, u = [];
|
|
151
|
-
for (let v = 0; v < i; v += 1)
|
|
152
|
-
u.push(Ft(s[v]));
|
|
153
|
-
return Ol(u);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function Dl(n, r) {
|
|
157
|
-
const { width: s, height: i, xOffset: u, yOffset: p } = Ue(n);
|
|
158
|
-
if (s >= i) {
|
|
159
|
-
const v = r / i, g = s - v, f = {
|
|
160
|
-
xOffset: u + v,
|
|
161
|
-
yOffset: p,
|
|
162
|
-
width: g,
|
|
163
|
-
height: i
|
|
164
|
-
};
|
|
165
|
-
return At(f);
|
|
166
|
-
} else {
|
|
167
|
-
const v = r / s, g = i - v, f = {
|
|
168
|
-
xOffset: u,
|
|
169
|
-
yOffset: p + v,
|
|
170
|
-
width: s,
|
|
171
|
-
height: g
|
|
172
|
-
};
|
|
173
|
-
return At(f);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
const Nl = ["id"], Pl = ["id"], Rl = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], Ll = { class: "vue-ui-treemap-crumb-unit" }, zl = { class: "vue-ui-treemap-crumb-unit-label" }, Bl = {
|
|
177
|
-
key: 0,
|
|
178
|
-
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
179
|
-
}, Ml = {
|
|
180
|
-
key: 0,
|
|
181
|
-
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
182
|
-
}, Vl = ["xmlns", "viewBox"], El = { key: 0 }, Hl = ["id"], Ul = ["stop-color"], Wl = ["stop-color"], Gl = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], Xl = ["x", "y", "height", "width"], ql = {
|
|
183
|
-
key: 5,
|
|
184
|
-
class: "vue-data-ui-watermark"
|
|
185
|
-
}, Yl = ["id"], jl = ["onClick"], Zl = ["innerHTML"], Kl = {
|
|
186
|
-
__name: "vue-ui-treemap",
|
|
187
|
-
props: {
|
|
188
|
-
config: {
|
|
189
|
-
type: Object,
|
|
190
|
-
default() {
|
|
191
|
-
return {};
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
dataset: {
|
|
195
|
-
type: Array,
|
|
196
|
-
default() {
|
|
197
|
-
return [];
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
emits: ["selectLegend", "selectDatapoint"],
|
|
202
|
-
setup(n, { expose: r, emit: s }) {
|
|
203
|
-
const i = ee(() => import("./DataTable-DOx3zgih.js")), u = ee(() => import("./PenAndPaper-Dj2diYr0.js")), p = ee(() => import("./vue-ui-accordion-DXdd_qAk.js")), v = ee(() => import("./Tooltip-Cs4v8OnI.js")), g = ee(() => import("./UserOptions-C0YT60JN.js")), f = ee(() => import("./PackageVersion-Df-8U2yE.js")), U = ee(() => import("./BaseDraggableDialog-CbuLbfrc.js")), { vue_ui_treemap: L } = hl(), k = n, $ = s, w = Kt();
|
|
204
|
-
bt(() => {
|
|
205
|
-
w["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
206
|
-
});
|
|
207
|
-
const F = m(() => !!k.dataset && k.dataset.length), M = m(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), S = y(Te()), N = y(!1), Oe = y(""), K = y(!1), We = y(0), z = y([]), V = H(null), Ge = H(null), Xe = H(null), qe = H(null), Ye = H(null), je = y(0), _e = y(0), Se = y(0), x = y([]), Ae = y(null), Ze = y(!1), ue = y(null), Ie = y(null), e = y(Pe()), { loading: re, FINAL_DATASET: Fe, manualLoading: Dt } = pl({
|
|
208
|
-
...Jt(k),
|
|
209
|
-
FINAL_CONFIG: e,
|
|
210
|
-
prepareConfig: Pe,
|
|
211
|
-
skeletonDataset: [
|
|
212
|
-
{
|
|
213
|
-
name: "_",
|
|
214
|
-
value: 53,
|
|
215
|
-
color: "#CACACA90",
|
|
216
|
-
children: [
|
|
217
|
-
{ name: "_", value: 21 },
|
|
218
|
-
{ name: "_", value: 13 },
|
|
219
|
-
{ name: "_", value: 8 },
|
|
220
|
-
{ name: "_", value: 5 },
|
|
221
|
-
{ name: "_", value: 3 },
|
|
222
|
-
{ name: "_", value: 2 },
|
|
223
|
-
{ name: "_", value: 1 }
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
skeletonConfig: ol({
|
|
228
|
-
defaultConfig: e.value,
|
|
229
|
-
userConfig: {
|
|
230
|
-
userOptions: { show: !1 },
|
|
231
|
-
style: {
|
|
232
|
-
chart: {
|
|
233
|
-
backgroundColor: "#999999",
|
|
234
|
-
layout: {
|
|
235
|
-
labels: {
|
|
236
|
-
showDefaultLabels: !1
|
|
237
|
-
},
|
|
238
|
-
rects: {
|
|
239
|
-
stroke: "#6A6A6A"
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
legend: {
|
|
243
|
-
backgroundColor: "transparent"
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
})
|
|
249
|
-
}), { userOptionsVisible: De, setUserOptionsVisibility: Ke, keepUserOptionState: Je } = ml({ config: e.value }), { svgRef: Ne } = yl({ config: e.value.style.chart.title });
|
|
250
|
-
function Pe() {
|
|
251
|
-
const t = Ot({
|
|
252
|
-
userConfig: k.config,
|
|
253
|
-
defaultConfig: L
|
|
254
|
-
});
|
|
255
|
-
return t.theme ? {
|
|
256
|
-
...Ot({
|
|
257
|
-
userConfig: wl.vue_ui_treemap[t.theme] || k.config,
|
|
258
|
-
defaultConfig: t
|
|
259
|
-
}),
|
|
260
|
-
customPalette: al[t.theme] || I
|
|
261
|
-
} : t;
|
|
262
|
-
}
|
|
263
|
-
ke(() => k.config, (t) => {
|
|
264
|
-
re.value || (e.value = Pe()), De.value = !e.value.userOptions.showOnChartHover, je.value += 1, _e.value += 1, Se.value += 1, D.value.showTable = e.value.table.show, D.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
265
|
-
}, { deep: !0 });
|
|
266
|
-
const { isPrinting: Qe, isImaging: et, generatePdf: tt, generateImage: lt } = gl({
|
|
267
|
-
elementId: `treemap_${S.value}`,
|
|
268
|
-
fileName: e.value.style.chart.title.text || "vue-ui-treemap",
|
|
269
|
-
options: e.value.userOptions.print
|
|
270
|
-
}), Nt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), pe = m(() => nl(e.value.customPalette)), D = y({
|
|
271
|
-
showTable: e.value.table.show,
|
|
272
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
273
|
-
});
|
|
274
|
-
ke(e, () => {
|
|
275
|
-
D.value = {
|
|
276
|
-
showTable: e.value.table.show,
|
|
277
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
278
|
-
};
|
|
279
|
-
}, { immediate: !0 });
|
|
280
|
-
const W = y({
|
|
281
|
-
height: e.value.style.chart.height,
|
|
282
|
-
width: e.value.style.chart.width
|
|
283
|
-
}), J = m(() => ({
|
|
284
|
-
bottom: W.value.height - e.value.style.chart.padding.bottom,
|
|
285
|
-
height: W.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
|
|
286
|
-
left: e.value.style.chart.padding.left,
|
|
287
|
-
right: W.value.width - e.value.style.chart.padding.right,
|
|
288
|
-
top: e.value.style.chart.padding.top,
|
|
289
|
-
vbHeight: W.value.height,
|
|
290
|
-
vbWidth: W.value.width,
|
|
291
|
-
width: W.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
|
|
292
|
-
})), P = y(Fe.value), G = y(P.value), ot = H(/* @__PURE__ */ new Map());
|
|
293
|
-
function at(t) {
|
|
294
|
-
Array.isArray(t) && t.forEach((o, l) => {
|
|
295
|
-
o.id || (o.id = Te());
|
|
296
|
-
let a = de(o.color) || ot.value.get(o.id) || pe.value[l] || I[l] || I[l % I.length];
|
|
297
|
-
a = de(a), ot.value.set(o.id, a), o.color = a, nt(o, a);
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
function nt(t, o) {
|
|
301
|
-
Array.isArray(t.children) && t.children.forEach((l) => {
|
|
302
|
-
l.id || (l.id = Te()), l.parentId = t.id, l.color = o, nt(l, o);
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
function Pt() {
|
|
306
|
-
if (!x.value.length)
|
|
307
|
-
G.value = P.value.slice();
|
|
308
|
-
else {
|
|
309
|
-
const t = x.value[x.value.length - 1], o = Y(t);
|
|
310
|
-
G.value = o?.children?.slice() || [];
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
ke(
|
|
314
|
-
() => Fe.value,
|
|
315
|
-
() => {
|
|
316
|
-
P.value = Fe.value, at(P.value), Pt(), Se.value += 1, _e.value += 1;
|
|
317
|
-
},
|
|
318
|
-
{ deep: !0, immediate: !0, flush: "post" }
|
|
319
|
-
);
|
|
320
|
-
const X = H(null), oe = H(null);
|
|
321
|
-
bt(() => {
|
|
322
|
-
Ze.value = !0, Lt();
|
|
323
|
-
});
|
|
324
|
-
const Rt = m(() => e.value.debug);
|
|
325
|
-
function Lt() {
|
|
326
|
-
if (Ct(k.dataset) && sl({
|
|
327
|
-
componentName: "VueUiTreemap",
|
|
328
|
-
type: "dataset",
|
|
329
|
-
debug: Rt.value
|
|
330
|
-
}), at(P.value), Ct(k.dataset) || (Dt.value = e.value.loading), e.value.responsive) {
|
|
331
|
-
const t = vl(() => {
|
|
332
|
-
const { width: o, height: l } = dl({
|
|
333
|
-
chart: V.value,
|
|
334
|
-
title: e.value.style.chart.title.text ? Ge.value : null,
|
|
335
|
-
legend: e.value.style.chart.legend.show ? Xe.value : null,
|
|
336
|
-
source: qe.value,
|
|
337
|
-
noTitle: Ye.value
|
|
338
|
-
});
|
|
339
|
-
requestAnimationFrame(() => {
|
|
340
|
-
W.value.width = o, W.value.height = l - 12;
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
X.value && (oe.value && X.value.unobserve(oe.value), X.value.disconnect()), X.value = new ResizeObserver(t), oe.value = V.value.parentNode, X.value.observe(oe.value);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
Qt(() => {
|
|
347
|
-
X.value && (oe.value && X.value.unobserve(oe.value), X.value.disconnect());
|
|
348
|
-
});
|
|
349
|
-
const ie = m(() => G.value.map((t, o) => ({
|
|
350
|
-
...t,
|
|
351
|
-
color: de(t.color) || pe.value[o] || I[o] || I[o % I.length]
|
|
352
|
-
})).filter((t) => !z.value.includes(t.id))), ae = m(() => P.value.filter((t) => !z.value.includes(t.id)).map((t) => t.value || 0).reduce((t, o) => t + o, 0)), st = m({
|
|
353
|
-
get() {
|
|
354
|
-
let t = [...ie.value];
|
|
355
|
-
return e.value.style.chart.layout.sorted && (t = [...ie.value].sort((o, l) => l.value - o.value)), t.map((o) => ({
|
|
356
|
-
...o
|
|
357
|
-
}));
|
|
358
|
-
},
|
|
359
|
-
set(t) {
|
|
360
|
-
return t;
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
function ut(t, o) {
|
|
364
|
-
return t.value / o;
|
|
365
|
-
}
|
|
366
|
-
function zt(t, o, l) {
|
|
367
|
-
const a = e.value.style.chart.layout.rects.colorRatio - ut(o, l);
|
|
368
|
-
return $t(t, a < 0 ? 0 : a);
|
|
369
|
-
}
|
|
370
|
-
function rt(t, o, l, a) {
|
|
371
|
-
return t.map((c, A) => {
|
|
372
|
-
const be = zt(de(o) || pe.value[A] || I[A] || I[A % I.length], c, a), Zt = ut(c, a);
|
|
373
|
-
return {
|
|
374
|
-
...c,
|
|
375
|
-
color: be,
|
|
376
|
-
proportion: Zt,
|
|
377
|
-
parentName: l,
|
|
378
|
-
children: c.children ? rt(c.children, be, c.name, a) : void 0
|
|
379
|
-
};
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
const ce = m(() => _l(
|
|
383
|
-
st.value.map((t, o) => {
|
|
384
|
-
const l = t.children ? t.children.reduce((a, c) => a + c.value, 0) : t.value;
|
|
385
|
-
return {
|
|
386
|
-
value: t.value,
|
|
387
|
-
id: t.id || Te(),
|
|
388
|
-
children: t.children ? rt(t.children.sort((a, c) => c.value - a.value), t.color, t.name, l) : void 0,
|
|
389
|
-
color: t.color,
|
|
390
|
-
name: t.name
|
|
391
|
-
};
|
|
392
|
-
}),
|
|
393
|
-
{ x0: J.value.left * 2, y0: J.value.top, x1: J.value.width, y1: J.value.height }
|
|
394
|
-
));
|
|
395
|
-
function it({ y0: t, y1: o }) {
|
|
396
|
-
return o - t <= 0 ? 1e-4 : o - t;
|
|
397
|
-
}
|
|
398
|
-
function ct({ x0: t, x1: o }) {
|
|
399
|
-
return o - t <= 0 ? 1e-4 : o - t;
|
|
400
|
-
}
|
|
401
|
-
function q(t) {
|
|
402
|
-
const o = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
|
|
403
|
-
return o < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : o;
|
|
404
|
-
}
|
|
405
|
-
function vt(t) {
|
|
406
|
-
K.value = t, We.value += 1;
|
|
407
|
-
}
|
|
408
|
-
const ne = m(() => {
|
|
409
|
-
let t = 0;
|
|
410
|
-
return Ae.value && (t = Ae.value.getBoundingClientRect().height), {
|
|
411
|
-
startX: 0,
|
|
412
|
-
startY: 0,
|
|
413
|
-
width: J.value.vbWidth,
|
|
414
|
-
height: J.value.vbHeight - t
|
|
415
|
-
};
|
|
416
|
-
});
|
|
417
|
-
function Y(t, o = P.value) {
|
|
418
|
-
for (const l of o) {
|
|
419
|
-
if (l.id === t)
|
|
420
|
-
return l;
|
|
421
|
-
if (l.children) {
|
|
422
|
-
const a = Y(t, l.children);
|
|
423
|
-
if (a)
|
|
424
|
-
return a;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
return null;
|
|
428
|
-
}
|
|
429
|
-
const Q = m(() => x.value.length > 0);
|
|
430
|
-
function fe(t, o) {
|
|
431
|
-
if (!t) {
|
|
432
|
-
G.value = P.value.slice(), $("selectDatapoint", void 0), x.value = [];
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: o });
|
|
436
|
-
const l = Y(t.id);
|
|
437
|
-
if (l && l.children?.length)
|
|
438
|
-
x.value.push(l.id), G.value = l.children.slice(), $("selectDatapoint", t);
|
|
439
|
-
else if (t.parentId) {
|
|
440
|
-
x.value.push(t.parentId);
|
|
441
|
-
const a = Y(t.parentId);
|
|
442
|
-
G.value = a.children.slice(), $("selectDatapoint", t);
|
|
443
|
-
} else if (x.value.length > 0) {
|
|
444
|
-
x.value.pop();
|
|
445
|
-
const a = x.value[x.value.length - 1];
|
|
446
|
-
if (a) {
|
|
447
|
-
const c = Y(a);
|
|
448
|
-
G.value = c.children.slice();
|
|
449
|
-
} else
|
|
450
|
-
G.value = P.value.slice(), x.value = [], $("selectDatapoint", void 0);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
function Bt(t) {
|
|
454
|
-
return !!(Y(t.id)?.children?.length || t.parentId);
|
|
455
|
-
}
|
|
456
|
-
const j = m(() => {
|
|
457
|
-
const t = [
|
|
458
|
-
{ id: null, label: "All" }
|
|
459
|
-
];
|
|
460
|
-
if (x.value.length > 0) {
|
|
461
|
-
let o = Y(x.value[x.value.length - 1]);
|
|
462
|
-
const l = [];
|
|
463
|
-
for (; o; )
|
|
464
|
-
l.unshift(o), o = o.parentId ? Y(o.parentId) : null;
|
|
465
|
-
for (const a of l)
|
|
466
|
-
t.push({
|
|
467
|
-
id: a.id,
|
|
468
|
-
label: a.name,
|
|
469
|
-
node: a
|
|
470
|
-
});
|
|
471
|
-
}
|
|
472
|
-
return t;
|
|
473
|
-
}), B = H(null), Re = m(() => P.value.map((t, o) => ({
|
|
474
|
-
...t,
|
|
475
|
-
color: de(t.color) || pe.value[o] || I[o] || I[o % I.length],
|
|
476
|
-
shape: "square"
|
|
477
|
-
})).sort((t, o) => o.value - t.value).map((t, o) => {
|
|
478
|
-
const l = t.value / P.value.map((a) => a.value).reduce((a, c) => a + c, 0);
|
|
479
|
-
return {
|
|
480
|
-
...t,
|
|
481
|
-
proportion: l,
|
|
482
|
-
opacity: z.value.includes(t.id) ? 0.5 : 1,
|
|
483
|
-
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? xe(
|
|
484
|
-
e.value.style.chart.layout.labels.formatter,
|
|
485
|
-
t.value,
|
|
486
|
-
he({
|
|
487
|
-
p: e.value.style.chart.layout.labels.prefix,
|
|
488
|
-
v: t.value,
|
|
489
|
-
s: e.value.style.chart.layout.labels.suffix,
|
|
490
|
-
r: e.value.style.chart.legend.roundingValue
|
|
491
|
-
}),
|
|
492
|
-
{ datapoint: t }
|
|
493
|
-
) : ""}${e.value.style.chart.legend.showPercentage ? z.value.includes(t.id) ? `${e.value.style.chart.legend.showValue ? " (" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(t.value / ae.value) ? "-" : (t.value / ae.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
494
|
-
};
|
|
495
|
-
})), Mt = m(() => ({
|
|
496
|
-
cy: "treemap-div-legend",
|
|
497
|
-
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
498
|
-
color: e.value.style.chart.legend.color,
|
|
499
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
500
|
-
paddingBottom: 12,
|
|
501
|
-
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
502
|
-
}));
|
|
503
|
-
function dt(t) {
|
|
504
|
-
B.value = null, z.value.includes(t.id) ? z.value = z.value.filter((o) => o !== t.id) : z.value.length < k.dataset.length - 1 && z.value.push(t.id), $("selectLegend", st.value);
|
|
505
|
-
}
|
|
506
|
-
function Vt({ datapoint: t, seriesIndex: o }) {
|
|
507
|
-
B.value = null, N.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o });
|
|
508
|
-
}
|
|
509
|
-
const Le = y(null);
|
|
510
|
-
function Et({ datapoint: t, seriesIndex: o }) {
|
|
511
|
-
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: o }), B.value = t, Le.value = { datapoint: t, seriesIndex: o, config: e.value, series: ie.value };
|
|
512
|
-
const l = e.value.style.chart.tooltip.customFormat;
|
|
513
|
-
if (xt(l) && cl(() => l({
|
|
514
|
-
seriesIndex: o,
|
|
515
|
-
datapoint: t,
|
|
516
|
-
series: ie.value,
|
|
517
|
-
config: e.value
|
|
518
|
-
})))
|
|
519
|
-
Oe.value = l({
|
|
520
|
-
seriesIndex: o,
|
|
521
|
-
datapoint: t,
|
|
522
|
-
series: ie.value,
|
|
523
|
-
config: e.value
|
|
524
|
-
});
|
|
525
|
-
else {
|
|
526
|
-
let a = "";
|
|
527
|
-
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(
|
|
528
|
-
e.value.style.chart.layout.labels.formatter,
|
|
529
|
-
t.value,
|
|
530
|
-
he({
|
|
531
|
-
p: e.value.style.chart.layout.labels.prefix,
|
|
532
|
-
v: t.value,
|
|
533
|
-
s: e.value.style.chart.layout.labels.suffix,
|
|
534
|
-
r: e.value.style.chart.tooltip.roundingValue
|
|
535
|
-
}),
|
|
536
|
-
{ datapoint: t, seriesIndex: o }
|
|
537
|
-
)}</b>`, Oe.value = `<div>${a}</div>`;
|
|
538
|
-
}
|
|
539
|
-
N.value = !0;
|
|
540
|
-
}
|
|
541
|
-
const E = m(() => {
|
|
542
|
-
const t = ce.value.map((l) => ({
|
|
543
|
-
name: l.name,
|
|
544
|
-
color: l.color
|
|
545
|
-
})), o = ce.value.map((l) => l.value);
|
|
546
|
-
return { head: t, body: o };
|
|
547
|
-
});
|
|
548
|
-
function ze(t = null) {
|
|
549
|
-
ll(() => {
|
|
550
|
-
const o = E.value.head.map((c, A) => [[
|
|
551
|
-
c.name
|
|
552
|
-
], [E.value.body[A]], [isNaN(E.value.body[A] / ae.value) ? "-" : E.value.body[A] / ae.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = rl(l);
|
|
553
|
-
t ? t(a) : il({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-treemap" });
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
const ge = m(() => {
|
|
557
|
-
const t = [
|
|
558
|
-
e.value.table.columnNames.series,
|
|
559
|
-
e.value.table.columnNames.value,
|
|
560
|
-
e.value.table.columnNames.percentage
|
|
561
|
-
], o = E.value.head.map((c, A) => {
|
|
562
|
-
const be = xe(
|
|
563
|
-
e.value.style.chart.layout.labels.formatter,
|
|
564
|
-
E.value.body[A],
|
|
565
|
-
he({
|
|
566
|
-
p: e.value.style.chart.layout.labels.prefix,
|
|
567
|
-
v: E.value.body[A],
|
|
568
|
-
s: e.value.style.chart.layout.labels.suffix,
|
|
569
|
-
r: e.value.table.td.roundingValue
|
|
570
|
-
})
|
|
571
|
-
);
|
|
572
|
-
return [
|
|
573
|
-
{
|
|
574
|
-
color: c.color,
|
|
575
|
-
name: c.name,
|
|
576
|
-
shape: "square"
|
|
577
|
-
},
|
|
578
|
-
be,
|
|
579
|
-
isNaN(E.value.body[A] / ae.value) ? "-" : he({
|
|
580
|
-
v: E.value.body[A] / ae.value * 100,
|
|
581
|
-
s: "%",
|
|
582
|
-
r: e.value.table.td.roundingPercentage
|
|
583
|
-
})
|
|
584
|
-
];
|
|
585
|
-
}), l = {
|
|
586
|
-
th: {
|
|
587
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
588
|
-
color: e.value.table.th.color,
|
|
589
|
-
outline: e.value.table.th.outline
|
|
590
|
-
},
|
|
591
|
-
td: {
|
|
592
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
593
|
-
color: e.value.table.td.color,
|
|
594
|
-
outline: e.value.table.td.outline
|
|
595
|
-
},
|
|
596
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
597
|
-
};
|
|
598
|
-
return {
|
|
599
|
-
colNames: [
|
|
600
|
-
e.value.table.columnNames.series,
|
|
601
|
-
e.value.table.columnNames.value
|
|
602
|
-
],
|
|
603
|
-
head: t,
|
|
604
|
-
body: o,
|
|
605
|
-
config: l
|
|
606
|
-
};
|
|
607
|
-
});
|
|
608
|
-
function Ht() {
|
|
609
|
-
return ce.value;
|
|
610
|
-
}
|
|
611
|
-
function ht() {
|
|
612
|
-
D.value.showTable = !D.value.showTable;
|
|
613
|
-
}
|
|
614
|
-
function pt() {
|
|
615
|
-
D.value.showTooltip = !D.value.showTooltip;
|
|
616
|
-
}
|
|
617
|
-
const me = y(!1);
|
|
618
|
-
function Be() {
|
|
619
|
-
me.value = !me.value;
|
|
620
|
-
}
|
|
621
|
-
const ye = y(null);
|
|
622
|
-
function ft(t) {
|
|
623
|
-
ye.value = t;
|
|
624
|
-
}
|
|
625
|
-
function gt() {
|
|
626
|
-
ye.value = null;
|
|
627
|
-
}
|
|
628
|
-
async function Ut({ scale: t = 2 } = {}) {
|
|
629
|
-
if (!V.value) return;
|
|
630
|
-
const { width: o, height: l } = V.value.getBoundingClientRect(), a = o / l, { imageUri: c, base64: A } = await bl({ domElement: V.value, base64: !0, img: !0, scale: t });
|
|
631
|
-
return {
|
|
632
|
-
imageUri: c,
|
|
633
|
-
base64: A,
|
|
634
|
-
title: e.value.style.chart.title.text,
|
|
635
|
-
width: o,
|
|
636
|
-
height: l,
|
|
637
|
-
aspectRatio: a
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
const ve = m(() => {
|
|
641
|
-
const t = e.value.table.useDialog && !e.value.table.show, o = D.value.showTable;
|
|
642
|
-
return {
|
|
643
|
-
component: t ? U : p,
|
|
644
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
645
|
-
props: t ? {
|
|
646
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
647
|
-
color: e.value.table.th.color,
|
|
648
|
-
headerColor: e.value.table.th.color,
|
|
649
|
-
headerBg: e.value.table.th.backgroundColor,
|
|
650
|
-
isFullscreen: K.value,
|
|
651
|
-
fullscreenParent: V.value,
|
|
652
|
-
forcedWidth: Math.min(800, window.innerWidth * 0.8)
|
|
653
|
-
} : {
|
|
654
|
-
hideDetails: !0,
|
|
655
|
-
config: {
|
|
656
|
-
open: o,
|
|
657
|
-
maxHeight: 1e4,
|
|
658
|
-
body: {
|
|
659
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
660
|
-
color: e.value.style.chart.color
|
|
661
|
-
},
|
|
662
|
-
head: {
|
|
663
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
664
|
-
color: e.value.style.chart.color
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
};
|
|
669
|
-
});
|
|
670
|
-
ke(() => D.value.showTable, (t) => {
|
|
671
|
-
e.value.table.show || (t && e.value.table.useDialog && ue.value ? ue.value.open() : "close" in ue.value && ue.value.close());
|
|
672
|
-
});
|
|
673
|
-
function mt() {
|
|
674
|
-
D.value.showTable = !1, Ie.value && Ie.value.setTableIconState(!1);
|
|
675
|
-
}
|
|
676
|
-
const Wt = m(() => Re.value.map((t) => ({
|
|
677
|
-
...t,
|
|
678
|
-
name: t.display
|
|
679
|
-
}))), Gt = m(() => e.value.style.chart.backgroundColor), Xt = m(() => e.value.style.chart.legend), qt = m(() => e.value.style.chart.title), { exportSvg: Yt, getSvg: jt } = $l({
|
|
680
|
-
svg: Ne,
|
|
681
|
-
title: qt,
|
|
682
|
-
legend: Xt,
|
|
683
|
-
legendItems: Wt,
|
|
684
|
-
backgroundColor: Gt
|
|
685
|
-
});
|
|
686
|
-
async function yt({ isCb: t }) {
|
|
687
|
-
if (t) {
|
|
688
|
-
const { blob: o, url: l, text: a, dataUrl: c } = await jt();
|
|
689
|
-
e.value.userOptions.callbacks.svg({ blob: o, url: l, text: a, dataUrl: c });
|
|
690
|
-
} else
|
|
691
|
-
Yt();
|
|
692
|
-
}
|
|
693
|
-
return r({
|
|
694
|
-
getData: Ht,
|
|
695
|
-
getImage: Ut,
|
|
696
|
-
generateCsv: ze,
|
|
697
|
-
generateImage: lt,
|
|
698
|
-
generateSvg: yt,
|
|
699
|
-
generatePdf: tt,
|
|
700
|
-
toggleTable: ht,
|
|
701
|
-
toggleTooltip: pt,
|
|
702
|
-
toggleAnnotator: Be,
|
|
703
|
-
toggleFullscreen: vt
|
|
704
|
-
}), (t, o) => (h(), b("div", {
|
|
705
|
-
ref_key: "treemapChart",
|
|
706
|
-
ref: V,
|
|
707
|
-
class: Me(`vue-data-ui-component vue-ui-treemap ${K.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
708
|
-
style: R(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
709
|
-
id: `treemap_${S.value}`,
|
|
710
|
-
onMouseenter: o[2] || (o[2] = () => d(Ke)(!0)),
|
|
711
|
-
onMouseleave: o[3] || (o[3] = () => d(Ke)(!1))
|
|
712
|
-
}, [
|
|
713
|
-
e.value.userOptions.buttons.annotator ? (h(), Z(d(u), {
|
|
714
|
-
key: 0,
|
|
715
|
-
svgRef: d(Ne),
|
|
716
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
717
|
-
color: e.value.style.chart.color,
|
|
718
|
-
active: me.value,
|
|
719
|
-
onClose: Be
|
|
720
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : O("", !0),
|
|
721
|
-
Nt.value ? (h(), b("div", {
|
|
722
|
-
key: 1,
|
|
723
|
-
ref_key: "noTitle",
|
|
724
|
-
ref: Ye,
|
|
725
|
-
class: "vue-data-ui-no-title-space",
|
|
726
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
727
|
-
}, null, 512)) : O("", !0),
|
|
728
|
-
e.value.style.chart.title.text ? (h(), b("div", {
|
|
729
|
-
key: 2,
|
|
730
|
-
ref_key: "chartTitle",
|
|
731
|
-
ref: Ge,
|
|
732
|
-
style: R(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
733
|
-
}, [
|
|
734
|
-
(h(), Z(kl, {
|
|
735
|
-
key: `title_${je.value}`,
|
|
736
|
-
config: {
|
|
737
|
-
title: {
|
|
738
|
-
cy: "treemap-div-title",
|
|
739
|
-
...e.value.style.chart.title
|
|
740
|
-
},
|
|
741
|
-
subtitle: {
|
|
742
|
-
cy: "treemap-div-subtitle",
|
|
743
|
-
...e.value.style.chart.title.subtitle
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}, null, 8, ["config"]))
|
|
747
|
-
], 4)) : O("", !0),
|
|
748
|
-
_("div", {
|
|
749
|
-
id: `legend-top-${S.value}`
|
|
750
|
-
}, null, 8, Pl),
|
|
751
|
-
e.value.userOptions.show && F.value && (d(Je) || d(De)) ? (h(), Z(d(g), {
|
|
752
|
-
ref_key: "userOptionsRef",
|
|
753
|
-
ref: Ie,
|
|
754
|
-
key: `user_option_${We.value}`,
|
|
755
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
756
|
-
color: e.value.style.chart.color,
|
|
757
|
-
isPrinting: d(Qe),
|
|
758
|
-
isImaging: d(et),
|
|
759
|
-
uid: S.value,
|
|
760
|
-
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
761
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
762
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
763
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
764
|
-
hasSvg: e.value.userOptions.buttons.svg,
|
|
765
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
766
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
767
|
-
isFullscreen: K.value,
|
|
768
|
-
isTooltip: D.value.showTooltip,
|
|
769
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
770
|
-
chartElement: V.value,
|
|
771
|
-
position: e.value.userOptions.position,
|
|
772
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
773
|
-
isAnnotation: me.value,
|
|
774
|
-
callbacks: e.value.userOptions.callbacks,
|
|
775
|
-
printScale: e.value.userOptions.print.scale,
|
|
776
|
-
tableDialog: e.value.table.useDialog,
|
|
777
|
-
onToggleFullscreen: vt,
|
|
778
|
-
onGeneratePdf: d(tt),
|
|
779
|
-
onGenerateCsv: ze,
|
|
780
|
-
onGenerateImage: d(lt),
|
|
781
|
-
onGenerateSvg: yt,
|
|
782
|
-
onToggleTable: ht,
|
|
783
|
-
onToggleTooltip: pt,
|
|
784
|
-
onToggleAnnotator: Be,
|
|
785
|
-
style: R({
|
|
786
|
-
visibility: d(Je) ? d(De) ? "visible" : "hidden" : "visible"
|
|
787
|
-
})
|
|
788
|
-
}, kt({ _: 2 }, [
|
|
789
|
-
t.$slots.menuIcon ? {
|
|
790
|
-
name: "menuIcon",
|
|
791
|
-
fn: T(({ isOpen: l, color: a }) => [
|
|
792
|
-
C(t.$slots, "menuIcon", te(le({ isOpen: l, color: a })), void 0, !0)
|
|
793
|
-
]),
|
|
794
|
-
key: "0"
|
|
795
|
-
} : void 0,
|
|
796
|
-
t.$slots.optionTooltip ? {
|
|
797
|
-
name: "optionTooltip",
|
|
798
|
-
fn: T(() => [
|
|
799
|
-
C(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
800
|
-
]),
|
|
801
|
-
key: "1"
|
|
802
|
-
} : void 0,
|
|
803
|
-
t.$slots.optionPdf ? {
|
|
804
|
-
name: "optionPdf",
|
|
805
|
-
fn: T(() => [
|
|
806
|
-
C(t.$slots, "optionPdf", {}, void 0, !0)
|
|
807
|
-
]),
|
|
808
|
-
key: "2"
|
|
809
|
-
} : void 0,
|
|
810
|
-
t.$slots.optionCsv ? {
|
|
811
|
-
name: "optionCsv",
|
|
812
|
-
fn: T(() => [
|
|
813
|
-
C(t.$slots, "optionCsv", {}, void 0, !0)
|
|
814
|
-
]),
|
|
815
|
-
key: "3"
|
|
816
|
-
} : void 0,
|
|
817
|
-
t.$slots.optionImg ? {
|
|
818
|
-
name: "optionImg",
|
|
819
|
-
fn: T(() => [
|
|
820
|
-
C(t.$slots, "optionImg", {}, void 0, !0)
|
|
821
|
-
]),
|
|
822
|
-
key: "4"
|
|
823
|
-
} : void 0,
|
|
824
|
-
t.$slots.optionTable ? {
|
|
825
|
-
name: "optionTable",
|
|
826
|
-
fn: T(() => [
|
|
827
|
-
C(t.$slots, "optionTable", {}, void 0, !0)
|
|
828
|
-
]),
|
|
829
|
-
key: "5"
|
|
830
|
-
} : void 0,
|
|
831
|
-
t.$slots.optionFullscreen ? {
|
|
832
|
-
name: "optionFullscreen",
|
|
833
|
-
fn: T(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
834
|
-
C(t.$slots, "optionFullscreen", te(le({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
835
|
-
]),
|
|
836
|
-
key: "6"
|
|
837
|
-
} : void 0,
|
|
838
|
-
t.$slots.optionAnnotator ? {
|
|
839
|
-
name: "optionAnnotator",
|
|
840
|
-
fn: T(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
841
|
-
C(t.$slots, "optionAnnotator", te(le({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
842
|
-
]),
|
|
843
|
-
key: "7"
|
|
844
|
-
} : void 0
|
|
845
|
-
]), 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"])) : O("", !0),
|
|
846
|
-
j.value.length > 1 ? (h(), b("nav", {
|
|
847
|
-
key: 4,
|
|
848
|
-
class: "vue-ui-treemap-breadcrumbs",
|
|
849
|
-
"data-dom-to-png-ignore": "",
|
|
850
|
-
ref_key: "breadcrumbsNav",
|
|
851
|
-
ref: Ae
|
|
852
|
-
}, [
|
|
853
|
-
(h(!0), b(Ce, null, Ve(j.value, (l, a) => (h(), b("span", {
|
|
854
|
-
role: "button",
|
|
855
|
-
tabindex: a < j.value.length - 1 ? 0 : void 0,
|
|
856
|
-
key: l.id || "root",
|
|
857
|
-
onClick: (c) => a === j.value.length - 1 ? () => {
|
|
858
|
-
} : fe(l.node),
|
|
859
|
-
onKeydown: [
|
|
860
|
-
wt(Ee((c) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["enter"]),
|
|
861
|
-
wt(Ee((c) => a === j.value.length - 1 ? void 0 : fe(l.node), ["prevent"]), ["space"])
|
|
862
|
-
],
|
|
863
|
-
class: "vue-ui-treemap-crumb",
|
|
864
|
-
"data-last-crumb": a === j.value.length - 1,
|
|
865
|
-
style: R({
|
|
866
|
-
color: e.value.style.chart.color
|
|
867
|
-
}),
|
|
868
|
-
onMouseenter: (c) => ft(a),
|
|
869
|
-
onMouseleave: gt,
|
|
870
|
-
onFocus: (c) => ft(a),
|
|
871
|
-
onBlur: gt
|
|
872
|
-
}, [
|
|
873
|
-
_("span", Ll, [
|
|
874
|
-
_("span", zl, [
|
|
875
|
-
C(t.$slots, "breadcrumb-label", He({ ref_for: !0 }, { crumb: l, isRoot: a === 0, isFocus: ye.value === a }), () => [
|
|
876
|
-
a === 0 ? (h(), b("div", Bl, [
|
|
877
|
-
we(_t, {
|
|
878
|
-
name: ye.value === 0 ? "homeFilled" : "home",
|
|
879
|
-
stroke: e.value.style.chart.color
|
|
880
|
-
}, null, 8, ["name", "stroke"])
|
|
881
|
-
])) : (h(), b(Ce, { key: 1 }, [
|
|
882
|
-
$e(se(l.label), 1)
|
|
883
|
-
], 64))
|
|
884
|
-
], !0)
|
|
885
|
-
]),
|
|
886
|
-
a < j.value.length - 1 ? (h(), b("span", Ml, [
|
|
887
|
-
C(t.$slots, "breadcrumb-arrow", {}, () => [
|
|
888
|
-
o[4] || (o[4] = $e(" › ", -1))
|
|
889
|
-
], !0)
|
|
890
|
-
])) : O("", !0)
|
|
891
|
-
])
|
|
892
|
-
], 44, Rl))), 128))
|
|
893
|
-
], 512)) : O("", !0),
|
|
894
|
-
(h(), b("svg", {
|
|
895
|
-
ref_key: "svgRef",
|
|
896
|
-
ref: Ne,
|
|
897
|
-
xmlns: d(ul),
|
|
898
|
-
class: Me({ "vue-data-ui-fullscreen--on": K.value, "vue-data-ui-fulscreen--off": !K.value, "vue-data-ui-zoom-plus": !Q.value, "vue-data-ui-zoom-minus": Q.value, loading: d(re) }),
|
|
899
|
-
viewBox: `${ne.value.startX} ${ne.value.startY} ${ne.value.width <= 0 ? 10 : ne.value.width} ${ne.value.height <= 0 ? 10 : ne.value.height}`,
|
|
900
|
-
style: R(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
|
|
901
|
-
}, [
|
|
902
|
-
we(d(f)),
|
|
903
|
-
(h(!0), b(Ce, null, Ve(ce.value, (l, a) => (h(), b("g", {
|
|
904
|
-
key: `tgrad_${l.id}`
|
|
905
|
-
}, [
|
|
906
|
-
e.value.style.chart.layout.rects.gradient.show ? (h(), b("defs", El, [
|
|
907
|
-
_("radialGradient", {
|
|
908
|
-
id: `tgrad_${l.id}`,
|
|
909
|
-
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
910
|
-
}, [
|
|
911
|
-
_("stop", {
|
|
912
|
-
offset: "18%",
|
|
913
|
-
"stop-color": l.color
|
|
914
|
-
}, null, 8, Ul),
|
|
915
|
-
_("stop", {
|
|
916
|
-
offset: "100%",
|
|
917
|
-
"stop-color": d($t)(l.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
918
|
-
}, null, 8, Wl)
|
|
919
|
-
], 8, Hl)
|
|
920
|
-
])) : O("", !0)
|
|
921
|
-
]))), 128)),
|
|
922
|
-
(h(!0), b(Ce, null, Ve(ce.value, (l, a) => (h(), b("g", {
|
|
923
|
-
key: `k_${l.id}`
|
|
924
|
-
}, [
|
|
925
|
-
_("rect", {
|
|
926
|
-
x: l.x0,
|
|
927
|
-
y: l.y0,
|
|
928
|
-
height: it(l),
|
|
929
|
-
width: ct(l),
|
|
930
|
-
fill: M.value ? l.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${l.id})` : l.color,
|
|
931
|
-
rx: e.value.style.chart.layout.rects.borderRadius,
|
|
932
|
-
stroke: B.value && B.value.id === l.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
|
|
933
|
-
"stroke-width": B.value && B.value.id === l.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
|
|
934
|
-
onClick: Ee((c) => fe(l, a), ["stop"]),
|
|
935
|
-
onMouseenter: () => Et({
|
|
936
|
-
datapoint: l,
|
|
937
|
-
seriesIndex: a
|
|
938
|
-
}),
|
|
939
|
-
onMouseleave: (c) => Vt({ datapoint: l, seriesIndex: a }),
|
|
940
|
-
style: R(`opacity:${B.value ? B.value.id === l.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
941
|
-
class: Me([
|
|
942
|
-
"vue-ui-treemap-rect",
|
|
943
|
-
Bt(l) ? "vue-data-ui-zoom-plus" : Q.value ? "vue-data-ui-zoom-minus" : ""
|
|
944
|
-
])
|
|
945
|
-
}, null, 46, Gl),
|
|
946
|
-
(h(), b("foreignObject", {
|
|
947
|
-
x: l.x0,
|
|
948
|
-
y: l.y0,
|
|
949
|
-
height: it(l),
|
|
950
|
-
width: ct(l),
|
|
951
|
-
class: "vue-ui-treemap-cell-foreignObject"
|
|
952
|
-
}, [
|
|
953
|
-
_("div", {
|
|
954
|
-
style: R({
|
|
955
|
-
width: `calc(100% - ${q(l) / 1.5}px)`,
|
|
956
|
-
height: `calc(100% - ${q(l) / 1.5}px)`,
|
|
957
|
-
padding: `${q(l) / 3}px`,
|
|
958
|
-
lineHeight: `${q(l)}px`
|
|
959
|
-
}),
|
|
960
|
-
class: "vue-ui-treemap-cell"
|
|
961
|
-
}, [
|
|
962
|
-
e.value.style.chart.layout.labels.showDefaultLabels && (l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Q.value) ? (h(), b("div", {
|
|
963
|
-
key: 0,
|
|
964
|
-
class: "vue-ui-treemap-cell-default",
|
|
965
|
-
style: R(`width:calc(100% - ${q(l) / 1.5}px);text-align:left; color:${d(Tt)(l.color)}`)
|
|
966
|
-
}, [
|
|
967
|
-
_("span", {
|
|
968
|
-
style: R(`width:100%;font-size:${q(l)}px;`)
|
|
969
|
-
}, se(l.name), 5),
|
|
970
|
-
o[5] || (o[5] = _("br", null, null, -1)),
|
|
971
|
-
_("span", {
|
|
972
|
-
style: R(`width:100%;font-size:${q(l)}px;`)
|
|
973
|
-
}, se(d(xe)(
|
|
974
|
-
e.value.style.chart.layout.labels.formatter,
|
|
975
|
-
l.value,
|
|
976
|
-
d(he)({
|
|
977
|
-
p: e.value.style.chart.layout.labels.prefix,
|
|
978
|
-
v: l.value,
|
|
979
|
-
s: e.value.style.chart.layout.labels.suffix,
|
|
980
|
-
r: e.value.style.chart.layout.labels.rounding
|
|
981
|
-
}),
|
|
982
|
-
{ datapoint: l }
|
|
983
|
-
)), 5)
|
|
984
|
-
], 4)) : O("", !0),
|
|
985
|
-
d(re) ? O("", !0) : C(t.$slots, "rect", He({
|
|
986
|
-
key: 1,
|
|
987
|
-
ref_for: !0
|
|
988
|
-
}, {
|
|
989
|
-
rect: l,
|
|
990
|
-
shouldShow: l.proportion > e.value.style.chart.layout.labels.hideUnderProportion || Q.value,
|
|
991
|
-
fontSize: q(l),
|
|
992
|
-
isZoom: Q.value,
|
|
993
|
-
textColor: d(Tt)(l.color)
|
|
994
|
-
}), void 0, !0)
|
|
995
|
-
], 4)
|
|
996
|
-
], 8, Xl))
|
|
997
|
-
]))), 128)),
|
|
998
|
-
C(t.$slots, "svg", te(le({ svg: J.value, isZoom: Q.value, rect: B.value, config: e.value })), void 0, !0)
|
|
999
|
-
], 14, Vl)),
|
|
1000
|
-
t.$slots.watermark ? (h(), b("div", ql, [
|
|
1001
|
-
C(t.$slots, "watermark", te(le({ isPrinting: d(Qe) || d(et) })), void 0, !0)
|
|
1002
|
-
])) : O("", !0),
|
|
1003
|
-
_("div", {
|
|
1004
|
-
id: `legend-bottom-${S.value}`
|
|
1005
|
-
}, null, 8, Yl),
|
|
1006
|
-
Ze.value ? (h(), Z(el, {
|
|
1007
|
-
key: 6,
|
|
1008
|
-
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${S.value}` : `#legend-bottom-${S.value}`
|
|
1009
|
-
}, [
|
|
1010
|
-
_("div", {
|
|
1011
|
-
ref_key: "chartLegend",
|
|
1012
|
-
ref: Xe
|
|
1013
|
-
}, [
|
|
1014
|
-
e.value.style.chart.legend.show ? (h(), Z(Cl, {
|
|
1015
|
-
key: `legend_${Se.value}`,
|
|
1016
|
-
legendSet: Re.value,
|
|
1017
|
-
config: Mt.value,
|
|
1018
|
-
id: `treemap_legend_${S.value}`,
|
|
1019
|
-
onClickMarker: o[0] || (o[0] = ({ legend: l }) => dt(l))
|
|
1020
|
-
}, {
|
|
1021
|
-
item: T(({ legend: l, index: a }) => [
|
|
1022
|
-
d(re) ? O("", !0) : (h(), b("div", {
|
|
1023
|
-
key: 0,
|
|
1024
|
-
onClick: (c) => dt(l),
|
|
1025
|
-
style: R(`opacity:${z.value.includes(l.id) ? 0.5 : 1}`)
|
|
1026
|
-
}, se(l.display), 13, jl))
|
|
1027
|
-
]),
|
|
1028
|
-
_: 1
|
|
1029
|
-
}, 8, ["legendSet", "config", "id"])) : C(t.$slots, "legend", {
|
|
1030
|
-
key: 1,
|
|
1031
|
-
legend: Re.value
|
|
1032
|
-
}, void 0, !0)
|
|
1033
|
-
], 512)
|
|
1034
|
-
], 8, ["to"])) : O("", !0),
|
|
1035
|
-
t.$slots.source ? (h(), b("div", {
|
|
1036
|
-
key: 7,
|
|
1037
|
-
ref_key: "source",
|
|
1038
|
-
ref: qe,
|
|
1039
|
-
dir: "auto"
|
|
1040
|
-
}, [
|
|
1041
|
-
C(t.$slots, "source", {}, void 0, !0)
|
|
1042
|
-
], 512)) : O("", !0),
|
|
1043
|
-
we(d(v), {
|
|
1044
|
-
show: D.value.showTooltip && N.value,
|
|
1045
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1046
|
-
color: e.value.style.chart.tooltip.color,
|
|
1047
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1048
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1049
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1050
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1051
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1052
|
-
position: e.value.style.chart.tooltip.position,
|
|
1053
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1054
|
-
parent: V.value,
|
|
1055
|
-
content: Oe.value,
|
|
1056
|
-
isFullscreen: K.value,
|
|
1057
|
-
isCustom: d(xt)(e.value.style.chart.tooltip.customFormat),
|
|
1058
|
-
smooth: e.value.style.chart.tooltip.smooth,
|
|
1059
|
-
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1060
|
-
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1061
|
-
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
|
|
1062
|
-
}, {
|
|
1063
|
-
"tooltip-before": T(() => [
|
|
1064
|
-
C(t.$slots, "tooltip-before", te(le({ ...Le.value })), void 0, !0)
|
|
1065
|
-
]),
|
|
1066
|
-
"tooltip-after": T(() => [
|
|
1067
|
-
C(t.$slots, "tooltip-after", te(le({ ...Le.value })), void 0, !0)
|
|
1068
|
-
]),
|
|
1069
|
-
_: 3
|
|
1070
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1071
|
-
F.value && e.value.userOptions.buttons.table ? (h(), Z(tl(ve.value.component), He({ key: 8 }, ve.value.props, {
|
|
1072
|
-
ref_key: "tableUnit",
|
|
1073
|
-
ref: ue,
|
|
1074
|
-
onClose: mt
|
|
1075
|
-
}), kt({
|
|
1076
|
-
content: T(() => [
|
|
1077
|
-
(h(), Z(d(i), {
|
|
1078
|
-
key: `table_${_e.value}`,
|
|
1079
|
-
colNames: ge.value.colNames,
|
|
1080
|
-
head: ge.value.head,
|
|
1081
|
-
body: ge.value.body,
|
|
1082
|
-
config: ge.value.config,
|
|
1083
|
-
title: e.value.table.useDialog ? "" : ve.value.title,
|
|
1084
|
-
withCloseButton: !e.value.table.useDialog,
|
|
1085
|
-
onClose: mt
|
|
1086
|
-
}, {
|
|
1087
|
-
th: T(({ th: l }) => [
|
|
1088
|
-
_("div", {
|
|
1089
|
-
innerHTML: l,
|
|
1090
|
-
style: { display: "flex", "align-items": "center" }
|
|
1091
|
-
}, null, 8, Zl)
|
|
1092
|
-
]),
|
|
1093
|
-
td: T(({ td: l }) => [
|
|
1094
|
-
$e(se(l.name || l), 1)
|
|
1095
|
-
]),
|
|
1096
|
-
_: 1
|
|
1097
|
-
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1098
|
-
]),
|
|
1099
|
-
_: 2
|
|
1100
|
-
}, [
|
|
1101
|
-
e.value.table.useDialog ? {
|
|
1102
|
-
name: "title",
|
|
1103
|
-
fn: T(() => [
|
|
1104
|
-
$e(se(ve.value.title), 1)
|
|
1105
|
-
]),
|
|
1106
|
-
key: "0"
|
|
1107
|
-
} : void 0,
|
|
1108
|
-
e.value.table.useDialog ? {
|
|
1109
|
-
name: "actions",
|
|
1110
|
-
fn: T(() => [
|
|
1111
|
-
_("button", {
|
|
1112
|
-
tabindex: "0",
|
|
1113
|
-
class: "vue-ui-user-options-button",
|
|
1114
|
-
onClick: o[1] || (o[1] = (l) => ze(e.value.userOptions.callbacks.csv))
|
|
1115
|
-
}, [
|
|
1116
|
-
we(_t, {
|
|
1117
|
-
name: "excel",
|
|
1118
|
-
stroke: ve.value.props.color
|
|
1119
|
-
}, null, 8, ["stroke"])
|
|
1120
|
-
])
|
|
1121
|
-
]),
|
|
1122
|
-
key: "1"
|
|
1123
|
-
} : void 0
|
|
1124
|
-
]), 1040)) : O("", !0),
|
|
1125
|
-
d(re) ? (h(), Z(fl, { key: 9 })) : O("", !0)
|
|
1126
|
-
], 46, Nl));
|
|
1127
|
-
}
|
|
1128
|
-
}, po = /* @__PURE__ */ Tl(Kl, [["__scopeId", "data-v-a92570b3"]]);
|
|
1129
|
-
export {
|
|
1130
|
-
po as default
|
|
1131
|
-
};
|