vue-data-ui 3.15.12 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- 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-bump.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-dag.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-geo.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-stackline.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-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -1,1645 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as Ie, useSlots as $l, onMounted as Oo, computed as b, ref as $, shallowRef as ye, toRefs as Tl, watch as Le, onBeforeUnmount as Sl, openBlock as h, createElementBlock as M, unref as y, normalizeStyle as me, normalizeClass as jt, createBlock as be, withCtx as S, renderSlot as x, normalizeProps as X, guardReactiveProps as j, createCommentVNode as z, createElementVNode as q, createSlots as Po, Fragment as qe, renderList as ut, withKeys as _o, withModifiers as qt, mergeProps as it, createVNode as ct, createTextVNode as dt, toDisplayString as vt, Teleport as Al, resolveDynamicComponent as Ml, nextTick as Io } from "vue";
|
|
2
|
-
import { j as ht, t as Lo, m as Ol, p as G, n as Pl, o as Fo, q as _l, s as Ge, k as ft, l as Ke, X as Gt, x as pt, W as gt, T as Bo, a0 as Il, a1 as Ll, ay as yt, az as Kt, U as Fl } from "./lib-GwPnJSrY.js";
|
|
3
|
-
import { t as Bl, u as Rl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as zl } from "./useConfig-CIgyKZ6R.js";
|
|
5
|
-
import { u as Nl, B as Dl } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
-
import { u as Hl } from "./usePrinter-DiK5R6k-.js";
|
|
7
|
-
import { u as Zt } from "./useNestedProp-BBT0mbHh.js";
|
|
8
|
-
import { u as Vl } from "./useThemeCheck-D1ZYXUwG.js";
|
|
9
|
-
import { u as Wl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
|
-
import { u as El } from "./useChartAccessibility-9icAAmYg.js";
|
|
11
|
-
import Ul from "./img-BYYzY_QU.js";
|
|
12
|
-
import Yl from "./Title-BfyrP-jp.js";
|
|
13
|
-
import Xl from "./vue_ui_treemap-D9-AIkT-.js";
|
|
14
|
-
import jl from "./Legend-1LMMsPxL.js";
|
|
15
|
-
import Ro from "./BaseIcon-CNx8Tzl5.js";
|
|
16
|
-
import { u as ql } from "./useSvgExport-ByUukOZt.js";
|
|
17
|
-
import { B as Gl } from "./BaseLegendToggle-Y61xahI4.js";
|
|
18
|
-
import { _ as Kl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
19
|
-
function zo(r, p) {
|
|
20
|
-
const d = r.length;
|
|
21
|
-
if (d === 0)
|
|
22
|
-
throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);
|
|
23
|
-
{
|
|
24
|
-
let g = 1 / 0, f = -1 / 0, w = 0;
|
|
25
|
-
for (let O = 0; O < d; O += 1) {
|
|
26
|
-
const T = r[O].normalizedValue;
|
|
27
|
-
T < g && (g = T), T > f && (f = T), w += T;
|
|
28
|
-
}
|
|
29
|
-
return Math.max(
|
|
30
|
-
p ** 2 * f / w ** 2,
|
|
31
|
-
w ** 2 / (p ** 2 * g)
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function No(r) {
|
|
36
|
-
const { xOffset: p, yOffset: d, width: g, height: f } = r;
|
|
37
|
-
return {
|
|
38
|
-
x0: p,
|
|
39
|
-
y0: d,
|
|
40
|
-
x1: p + g,
|
|
41
|
-
y1: d + f
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function Zl(r, p, d) {
|
|
45
|
-
if (r.length === 0)
|
|
46
|
-
return !0;
|
|
47
|
-
{
|
|
48
|
-
const g = r.concat(p), f = zo(
|
|
49
|
-
r,
|
|
50
|
-
d
|
|
51
|
-
), w = zo(g, d);
|
|
52
|
-
return f >= w;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function Jl(r) {
|
|
56
|
-
const p = [], d = r.length;
|
|
57
|
-
for (let g = 0; g < d; g += 1) {
|
|
58
|
-
const f = r[g], w = f.length;
|
|
59
|
-
for (let m = 0; m < w; m += 1)
|
|
60
|
-
p.push(f[m]);
|
|
61
|
-
}
|
|
62
|
-
return p;
|
|
63
|
-
}
|
|
64
|
-
function Do(r, p) {
|
|
65
|
-
const d = {
|
|
66
|
-
...p,
|
|
67
|
-
children: r
|
|
68
|
-
};
|
|
69
|
-
return Vo(d);
|
|
70
|
-
}
|
|
71
|
-
function Ql(r) {
|
|
72
|
-
return (r.x1 - r.x0) * (r.y1 - r.y0);
|
|
73
|
-
}
|
|
74
|
-
function Ho(r, p) {
|
|
75
|
-
const { width: d, height: g, xOffset: f, yOffset: w } = Jt(p), m = r.length, O = r.map((k) => k.normalizedValue || 0).reduce((k, N) => k + N, 0), T = O / g, we = O / d;
|
|
76
|
-
let ne = f, ce = w;
|
|
77
|
-
const K = [];
|
|
78
|
-
if (d >= g) {
|
|
79
|
-
for (let k = 0; k < m; k += 1) {
|
|
80
|
-
const N = r[k], de = ce + N.normalizedValue / T, ke = {
|
|
81
|
-
x0: ne,
|
|
82
|
-
y0: ce,
|
|
83
|
-
x1: ne + T,
|
|
84
|
-
y1: de
|
|
85
|
-
}, ve = Object.assign({}, N, ke);
|
|
86
|
-
ce = de, K.push(ve);
|
|
87
|
-
}
|
|
88
|
-
return K;
|
|
89
|
-
} else {
|
|
90
|
-
for (let k = 0; k < m; k += 1) {
|
|
91
|
-
const N = r[k], de = ne + N.normalizedValue / we, ke = {
|
|
92
|
-
x0: ne,
|
|
93
|
-
y0: ce,
|
|
94
|
-
x1: de,
|
|
95
|
-
y1: ce + we
|
|
96
|
-
}, ve = Object.assign({}, N, ke);
|
|
97
|
-
ne = de, K.push(ve);
|
|
98
|
-
}
|
|
99
|
-
return K;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function ea(r) {
|
|
103
|
-
const p = Jt(r), d = p.width, g = p.height;
|
|
104
|
-
return Math.min(d, g);
|
|
105
|
-
}
|
|
106
|
-
function ta(r, p) {
|
|
107
|
-
const d = r.length, g = r.map((T) => T.value ?? 0).reduce((T, we) => T + we, 0), f = p / g, w = [];
|
|
108
|
-
let m, O;
|
|
109
|
-
for (let T = 0; T < d; T += 1)
|
|
110
|
-
O = r[T], m = Object.assign({}, O, {
|
|
111
|
-
normalizedValue: O.value * (f || 0)
|
|
112
|
-
}), w.push(m);
|
|
113
|
-
return w;
|
|
114
|
-
}
|
|
115
|
-
function Jt(r) {
|
|
116
|
-
const { x0: p, y0: d, x1: g, y1: f } = r;
|
|
117
|
-
return {
|
|
118
|
-
xOffset: p,
|
|
119
|
-
yOffset: d,
|
|
120
|
-
width: g - p,
|
|
121
|
-
height: f - d
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function oa(r, p, d, g) {
|
|
125
|
-
let f = r, w = p, m = d, O = g;
|
|
126
|
-
for (; ; ) {
|
|
127
|
-
const T = f.length;
|
|
128
|
-
if (T === 0) {
|
|
129
|
-
const K = Ho(w, m);
|
|
130
|
-
return O.concat(K);
|
|
131
|
-
}
|
|
132
|
-
const we = ea(m), ne = f[0], ce = f.slice(1, T);
|
|
133
|
-
if (Zl(w, ne, we)) {
|
|
134
|
-
const K = w.concat(ne);
|
|
135
|
-
f = ce, w = K, m = m, O = O;
|
|
136
|
-
} else {
|
|
137
|
-
const K = w.length;
|
|
138
|
-
let k = 0;
|
|
139
|
-
for (let ve = 0; ve < K; ve += 1)
|
|
140
|
-
k += w[ve].normalizedValue;
|
|
141
|
-
const N = la(m, k), de = Ho(w, m), ke = O.concat(de);
|
|
142
|
-
f = f, w = [], m = N, O = ke;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
function Vo(r) {
|
|
147
|
-
if (typeof r.children > "u" || !r.children.length)
|
|
148
|
-
return [r];
|
|
149
|
-
{
|
|
150
|
-
const p = ta(
|
|
151
|
-
r.children,
|
|
152
|
-
Ql(r)
|
|
153
|
-
), d = oa(p, [], r, []), g = d.length, f = [];
|
|
154
|
-
for (let m = 0; m < g; m += 1)
|
|
155
|
-
f.push(Vo(d[m]));
|
|
156
|
-
return Jl(f);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function la(r, p) {
|
|
160
|
-
const { width: d, height: g, xOffset: f, yOffset: w } = Jt(r);
|
|
161
|
-
if (d >= g) {
|
|
162
|
-
const m = p / g, O = d - m, T = {
|
|
163
|
-
xOffset: f + m,
|
|
164
|
-
yOffset: w,
|
|
165
|
-
width: O,
|
|
166
|
-
height: g
|
|
167
|
-
};
|
|
168
|
-
return No(T);
|
|
169
|
-
} else {
|
|
170
|
-
const m = p / d, O = g - m, T = {
|
|
171
|
-
xOffset: f,
|
|
172
|
-
yOffset: w + m,
|
|
173
|
-
width: d,
|
|
174
|
-
height: O
|
|
175
|
-
};
|
|
176
|
-
return No(T);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
const aa = ["id"], na = ["id"], sa = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], ra = { class: "vue-ui-treemap-crumb-unit" }, ua = { class: "vue-ui-treemap-crumb-unit-label" }, ia = {
|
|
180
|
-
key: 0,
|
|
181
|
-
style: { width: "24px", display: "flex", "align-items": "center" }
|
|
182
|
-
}, ca = {
|
|
183
|
-
key: 0,
|
|
184
|
-
class: "vue-ui-treemap-crumb-unit-arrow"
|
|
185
|
-
}, da = ["xmlns", "viewBox"], va = { key: 0 }, ha = ["id"], fa = ["stop-color"], pa = ["stop-color"], ga = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], ya = ["width", "height", "x", "y"], ma = ["innerHTML"], ba = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], wa = ["innerHTML"], ka = ["x", "y", "height", "width"], Ca = {
|
|
186
|
-
style: {
|
|
187
|
-
width: "100%",
|
|
188
|
-
height: "100%"
|
|
189
|
-
},
|
|
190
|
-
class: "vue-ui-treemap-cell"
|
|
191
|
-
}, xa = {
|
|
192
|
-
key: 5,
|
|
193
|
-
class: "vue-data-ui-watermark"
|
|
194
|
-
}, $a = ["id"], Ta = ["onClick"], Sa = ["innerHTML"], Aa = {
|
|
195
|
-
__name: "vue-ui-treemap",
|
|
196
|
-
props: {
|
|
197
|
-
config: {
|
|
198
|
-
type: Object,
|
|
199
|
-
default() {
|
|
200
|
-
return {};
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
dataset: {
|
|
204
|
-
type: Array,
|
|
205
|
-
default() {
|
|
206
|
-
return [];
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
emits: ["selectLegend", "selectDatapoint", "copyAlt"],
|
|
211
|
-
setup(r, { expose: p, emit: d }) {
|
|
212
|
-
const g = Ie(() => import("./DataTable-Bo1pmAqG.js")), f = Ie(() => import("./PenAndPaper-DWV1FMIi.js")), w = Ie(() => import("./vue-ui-accordion-BGHTqIBt.js")), m = Ie(() => import("./Tooltip-DL3QgjZf.js")), O = Ie(() => import("./UserOptions-CrLqEimB.js")), T = Ie(() => import("./PackageVersion-DN9d0ME5.js")), we = Ie(() => import("./BaseDraggableDialog-DSpKTn3R.js")), { vue_ui_treemap: ne } = zl(), { isThemeValid: ce, warnInvalidTheme: K } = Vl(), k = r, N = d, de = $l();
|
|
213
|
-
Oo(() => {
|
|
214
|
-
de["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
|
|
215
|
-
});
|
|
216
|
-
const ke = b(() => !!k.dataset && k.dataset.length), ve = b(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), Ce = $(ht()), mt = $(!1), bt = $(""), Oe = $(!1), Qt = $(0), F = $([]), se = ye(null), eo = ye(null), to = ye(null), oo = ye(null), lo = ye(null), ao = $(0), wt = $(0), kt = $(0), I = $([]), Ct = $(null), no = $(!1), He = $(null), xt = $(null), Ve = $(null), U = $(/* @__PURE__ */ new Map()), Ze = $(!1), Je = $(!1), t = $(At()), xe = b(() => t.value.userOptions.useCursorPointer), Wo = b(() => Lo({
|
|
217
|
-
defaultConfig: {
|
|
218
|
-
userOptions: { show: !1 },
|
|
219
|
-
style: {
|
|
220
|
-
chart: {
|
|
221
|
-
backgroundColor: "#999999",
|
|
222
|
-
layout: {
|
|
223
|
-
labels: {
|
|
224
|
-
showDefaultLabels: !1
|
|
225
|
-
},
|
|
226
|
-
rects: {
|
|
227
|
-
stroke: "#6A6A6A"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
legend: {
|
|
231
|
-
backgroundColor: "transparent"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
userConfig: t.value.skeletonConfig ?? {}
|
|
237
|
-
})), { loading: $e, FINAL_DATASET: $t, manualLoading: Eo } = Nl({
|
|
238
|
-
...Tl(k),
|
|
239
|
-
FINAL_CONFIG: t,
|
|
240
|
-
prepareConfig: At,
|
|
241
|
-
skeletonDataset: k.config?.skeletonDataset ?? [
|
|
242
|
-
{
|
|
243
|
-
name: "_",
|
|
244
|
-
value: 53,
|
|
245
|
-
color: "#CACACA90",
|
|
246
|
-
children: [
|
|
247
|
-
{ name: "_", value: 21 },
|
|
248
|
-
{ name: "_", value: 13 },
|
|
249
|
-
{ name: "_", value: 8 },
|
|
250
|
-
{ name: "_", value: 5 },
|
|
251
|
-
{ name: "_", value: 3 },
|
|
252
|
-
{ name: "_", value: 2 },
|
|
253
|
-
{ name: "_", value: 1 }
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
],
|
|
257
|
-
skeletonConfig: Lo({
|
|
258
|
-
defaultConfig: t.value,
|
|
259
|
-
userConfig: Wo.value
|
|
260
|
-
})
|
|
261
|
-
}), { userOptionsVisible: Tt, setUserOptionsVisibility: so, keepUserOptionState: ro } = Wl({ config: t.value }), { svgRef: St } = El({ config: t.value.style.chart.title });
|
|
262
|
-
function At() {
|
|
263
|
-
const e = Zt({
|
|
264
|
-
userConfig: k.config,
|
|
265
|
-
defaultConfig: ne
|
|
266
|
-
}), l = e.theme;
|
|
267
|
-
if (!l) return e;
|
|
268
|
-
if (!ce.value(e))
|
|
269
|
-
return K(e), e;
|
|
270
|
-
const o = Zt({
|
|
271
|
-
userConfig: Xl[l] || k.config,
|
|
272
|
-
defaultConfig: e
|
|
273
|
-
}), a = Zt({
|
|
274
|
-
userConfig: k.config,
|
|
275
|
-
defaultConfig: o
|
|
276
|
-
});
|
|
277
|
-
return {
|
|
278
|
-
...a,
|
|
279
|
-
customPalette: a.customPalette.length ? a.customPalette : Ol[l] || G
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
Le(() => k.config, (e) => {
|
|
283
|
-
$e.value || (t.value = At()), Tt.value = !t.value.userOptions.showOnChartHover, ao.value += 1, wt.value += 1, kt.value += 1, Z.value.showTable = t.value.table.show, Z.value.showTooltip = t.value.style.chart.tooltip.show;
|
|
284
|
-
}, { deep: !0 });
|
|
285
|
-
const { isPrinting: Mt, isImaging: Ot, generatePdf: uo, generateImage: io } = Hl({
|
|
286
|
-
elementId: `treemap_${Ce.value}`,
|
|
287
|
-
fileName: t.value.style.chart.title.text || "vue-ui-treemap",
|
|
288
|
-
options: t.value.userOptions.print
|
|
289
|
-
}), Uo = b(() => t.value.userOptions.show && !t.value.style.chart.title.text), Qe = b(() => Pl(t.value.customPalette)), Z = $({
|
|
290
|
-
showTable: t.value.table.show,
|
|
291
|
-
showTooltip: t.value.style.chart.tooltip.show
|
|
292
|
-
});
|
|
293
|
-
Le(t, () => {
|
|
294
|
-
Z.value = {
|
|
295
|
-
showTable: t.value.table.show,
|
|
296
|
-
showTooltip: t.value.style.chart.tooltip.show
|
|
297
|
-
};
|
|
298
|
-
}, { immediate: !0 });
|
|
299
|
-
const Pe = $({
|
|
300
|
-
height: t.value.style.chart.height,
|
|
301
|
-
width: t.value.style.chart.width
|
|
302
|
-
});
|
|
303
|
-
function Yo(e) {
|
|
304
|
-
const l = se.value, o = Pe.value.height;
|
|
305
|
-
if (!l || !o) return e;
|
|
306
|
-
const a = l.getBoundingClientRect();
|
|
307
|
-
return e * (o / a.height);
|
|
308
|
-
}
|
|
309
|
-
function Xo() {
|
|
310
|
-
if (!Ct.value || he.value.length <= 1) return 0;
|
|
311
|
-
const e = Ct.value, l = getComputedStyle(e), o = e.offsetHeight + parseFloat(l.marginTop || "0") + parseFloat(l.marginBottom || "0") + parseFloat(l.paddingTop || "0") + parseFloat(l.paddingBottom || "0");
|
|
312
|
-
return Yo(o);
|
|
313
|
-
}
|
|
314
|
-
const B = b(() => {
|
|
315
|
-
const e = t.value.style.chart.padding, l = Pe.value.width, o = Pe.value.height, a = Xo(), n = e.left, u = l - e.right, s = e.top, i = o - e.bottom - a;
|
|
316
|
-
return {
|
|
317
|
-
left: n,
|
|
318
|
-
top: s,
|
|
319
|
-
right: u,
|
|
320
|
-
bottom: i,
|
|
321
|
-
width: u - n,
|
|
322
|
-
height: Math.max(0, i - s),
|
|
323
|
-
vbWidth: l,
|
|
324
|
-
vbHeight: o - a,
|
|
325
|
-
offsetY: a
|
|
326
|
-
};
|
|
327
|
-
}), W = $($t.value), Te = $(W.value), co = ye(/* @__PURE__ */ new Map());
|
|
328
|
-
Le(
|
|
329
|
-
[W, () => t.value],
|
|
330
|
-
() => {
|
|
331
|
-
Ve.value = null, U.value = /* @__PURE__ */ new Map();
|
|
332
|
-
},
|
|
333
|
-
{ deep: !0 }
|
|
334
|
-
), Le(
|
|
335
|
-
() => F.value,
|
|
336
|
-
() => {
|
|
337
|
-
Ve.value = null, U.value = /* @__PURE__ */ new Map();
|
|
338
|
-
},
|
|
339
|
-
{ deep: !0 }
|
|
340
|
-
), Le(
|
|
341
|
-
[() => Pe.value.width, () => Pe.value.height],
|
|
342
|
-
() => {
|
|
343
|
-
U.value = /* @__PURE__ */ new Map();
|
|
344
|
-
}
|
|
345
|
-
);
|
|
346
|
-
function vo(e) {
|
|
347
|
-
Array.isArray(e) && e.forEach((l, o) => {
|
|
348
|
-
l.id || (l.id = ht());
|
|
349
|
-
let a = Ge(l.color) || co.value.get(l.id) || Qe.value[o] || G[o] || G[o % G.length];
|
|
350
|
-
a = Ge(a), co.value.set(l.id, a), l.color = a, ho(l, a);
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
function ho(e, l) {
|
|
354
|
-
Array.isArray(e.children) && e.children.forEach((o) => {
|
|
355
|
-
o.id || (o.id = ht()), o.parentId = e.id, o.color = l, ho(o, l);
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
function jo() {
|
|
359
|
-
if (!I.value.length)
|
|
360
|
-
Te.value = W.value.slice();
|
|
361
|
-
else {
|
|
362
|
-
const e = I.value[I.value.length - 1], l = J(e);
|
|
363
|
-
Te.value = l?.children?.slice() || [];
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
Le(
|
|
367
|
-
() => $t.value,
|
|
368
|
-
() => {
|
|
369
|
-
W.value = $t.value, vo(W.value), jo(), kt.value += 1, wt.value += 1;
|
|
370
|
-
},
|
|
371
|
-
{ deep: !0, immediate: !0, flush: "post" }
|
|
372
|
-
);
|
|
373
|
-
const Se = ye(null), Fe = ye(null);
|
|
374
|
-
Oo(() => {
|
|
375
|
-
no.value = !0, Go();
|
|
376
|
-
});
|
|
377
|
-
const qo = b(() => t.value.debug);
|
|
378
|
-
function Go() {
|
|
379
|
-
if (Fo(k.dataset) && _l({
|
|
380
|
-
componentName: "VueUiTreemap",
|
|
381
|
-
type: "dataset",
|
|
382
|
-
debug: qo.value
|
|
383
|
-
}), vo(W.value), Fo(k.dataset) || (Eo.value = t.value.loading), t.value.responsive) {
|
|
384
|
-
const e = Bl(() => {
|
|
385
|
-
const { width: l, height: o } = Rl({
|
|
386
|
-
chart: se.value,
|
|
387
|
-
title: t.value.style.chart.title.text ? eo.value : null,
|
|
388
|
-
legend: t.value.style.chart.legend.show ? to.value : null,
|
|
389
|
-
source: oo.value,
|
|
390
|
-
noTitle: lo.value
|
|
391
|
-
});
|
|
392
|
-
requestAnimationFrame(() => {
|
|
393
|
-
Pe.value.width = l, Pe.value.height = o - 12;
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
Se.value && (Fe.value && Se.value.unobserve(Fe.value), Se.value.disconnect()), Se.value = new ResizeObserver(e), Fe.value = se.value.parentNode, Se.value.observe(Fe.value);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
Sl(() => {
|
|
400
|
-
Se.value && (Fe.value && Se.value.unobserve(Fe.value), Se.value.disconnect());
|
|
401
|
-
});
|
|
402
|
-
const We = b(() => Te.value.map((e, l) => ({
|
|
403
|
-
...e,
|
|
404
|
-
color: Ge(e.color) || Qe.value[l] || G[l] || G[l % G.length]
|
|
405
|
-
})).filter((e) => !F.value.includes(e.id))), Be = b(() => W.value.filter((e) => !F.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), Pt = b({
|
|
406
|
-
get() {
|
|
407
|
-
let e = [...We.value];
|
|
408
|
-
return t.value.style.chart.layout.sorted && (e = [...We.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
|
|
409
|
-
...l
|
|
410
|
-
}));
|
|
411
|
-
},
|
|
412
|
-
set(e) {
|
|
413
|
-
return e;
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
function fo(e, l) {
|
|
417
|
-
return e.value / l;
|
|
418
|
-
}
|
|
419
|
-
function Ko(e, l, o) {
|
|
420
|
-
const a = t.value.style.chart.layout.rects.colorRatio - fo(l, o);
|
|
421
|
-
return pt(e, a < 0 ? 0 : a);
|
|
422
|
-
}
|
|
423
|
-
function po(e) {
|
|
424
|
-
return Array.isArray(e.children) && e.children.length > 0;
|
|
425
|
-
}
|
|
426
|
-
function Zo(e) {
|
|
427
|
-
return [...e].sort((l, o) => {
|
|
428
|
-
const a = po(l), n = po(o);
|
|
429
|
-
if (a !== n)
|
|
430
|
-
return a - n;
|
|
431
|
-
const u = Number(l.value) || 0;
|
|
432
|
-
return (Number(o.value) || 0) - u;
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
function go(e, l, o, a, n) {
|
|
436
|
-
return Zo(e).map((s, i) => {
|
|
437
|
-
const c = Ko(
|
|
438
|
-
Ge(l) || Qe.value[i] || G[i] || G[i % G.length],
|
|
439
|
-
s,
|
|
440
|
-
a
|
|
441
|
-
), v = fo(s, a), A = n ?? s.parentId ?? s.id;
|
|
442
|
-
return {
|
|
443
|
-
...s,
|
|
444
|
-
color: c,
|
|
445
|
-
proportion: v,
|
|
446
|
-
parentName: o,
|
|
447
|
-
rootId: A,
|
|
448
|
-
children: Array.isArray(s.children) && s.children.length ? go(
|
|
449
|
-
s.children,
|
|
450
|
-
c,
|
|
451
|
-
s.name,
|
|
452
|
-
a,
|
|
453
|
-
A
|
|
454
|
-
) : void 0
|
|
455
|
-
};
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
const yo = b(() => {
|
|
459
|
-
const e = Pt.value.map((n) => Number(n.value) || 0).reduce((n, u) => n + u, 0) || 1, l = Pt.value.map((n) => {
|
|
460
|
-
const u = n.children ? n.children.reduce((Y, Ae) => Y + (Number(Ae.value) || 0), 0) : n.value, { children: s, parentId: i, id: c, value: v, name: A, color: R, ...C } = n, D = n.id || ht();
|
|
461
|
-
return {
|
|
462
|
-
...C,
|
|
463
|
-
id: D,
|
|
464
|
-
name: n.name,
|
|
465
|
-
value: n.value,
|
|
466
|
-
color: n.color,
|
|
467
|
-
proportion: (Number(n.value) || 0) / e,
|
|
468
|
-
children: Array.isArray(n.children) && n.children.length ? go(
|
|
469
|
-
n.children,
|
|
470
|
-
n.color,
|
|
471
|
-
n.name,
|
|
472
|
-
u || 1
|
|
473
|
-
) : void 0
|
|
474
|
-
};
|
|
475
|
-
});
|
|
476
|
-
if (I.value.length === 0) {
|
|
477
|
-
if (!Ve.value) {
|
|
478
|
-
const i = { x0: 0, y0: 0, x1: 1, y1: 1 };
|
|
479
|
-
Ve.value = Do(l, i);
|
|
480
|
-
}
|
|
481
|
-
const n = {
|
|
482
|
-
x0: B.value.left,
|
|
483
|
-
y0: B.value.top,
|
|
484
|
-
x1: B.value.left + B.value.width,
|
|
485
|
-
y1: B.value.top + B.value.height
|
|
486
|
-
}, u = n.x1 - n.x0, s = n.y1 - n.y0;
|
|
487
|
-
return Ve.value.map((i) => ({
|
|
488
|
-
...i,
|
|
489
|
-
x0: n.x0 + i.x0 * u,
|
|
490
|
-
x1: n.x0 + i.x1 * u,
|
|
491
|
-
y0: n.y0 + i.y0 * s,
|
|
492
|
-
y1: n.y0 + i.y1 * s
|
|
493
|
-
}));
|
|
494
|
-
}
|
|
495
|
-
const a = {
|
|
496
|
-
x0: B.value.left,
|
|
497
|
-
y0: B.value.top,
|
|
498
|
-
x1: B.value.left + B.value.width,
|
|
499
|
-
y1: B.value.top + B.value.height
|
|
500
|
-
};
|
|
501
|
-
return Do(l, a);
|
|
502
|
-
});
|
|
503
|
-
function Jo(e) {
|
|
504
|
-
const l = I.value.length ? I.value[I.value.length - 1] : null, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
|
|
505
|
-
for (const i of e) {
|
|
506
|
-
let c = ol(i.id);
|
|
507
|
-
if (l) {
|
|
508
|
-
const v = c.indexOf(l);
|
|
509
|
-
if (v >= 0)
|
|
510
|
-
c = c.slice(v);
|
|
511
|
-
else
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
c = c.filter((v) => {
|
|
515
|
-
const A = J(v);
|
|
516
|
-
return A && Array.isArray(A.children) && A.children.length;
|
|
517
|
-
}), c.length && (c.forEach((v, A) => {
|
|
518
|
-
const R = J(v);
|
|
519
|
-
if (!R) return;
|
|
520
|
-
let C = o.get(v);
|
|
521
|
-
C ? (C.x0 = Math.min(C.x0, i.x0), C.y0 = Math.min(C.y0, i.y0), C.x1 = Math.max(C.x1, i.x1), C.y1 = Math.max(C.y1, i.y1), C.depth = Math.min(C.depth, A)) : (C = {
|
|
522
|
-
id: v,
|
|
523
|
-
name: R.name,
|
|
524
|
-
value: R.value,
|
|
525
|
-
color: R.color,
|
|
526
|
-
x0: i.x0,
|
|
527
|
-
y0: i.y0,
|
|
528
|
-
x1: i.x1,
|
|
529
|
-
y1: i.y1,
|
|
530
|
-
depth: A
|
|
531
|
-
// depth from visible root
|
|
532
|
-
}, o.set(v, C));
|
|
533
|
-
let D = n.get(v);
|
|
534
|
-
D || (D = /* @__PURE__ */ new Set(), n.set(v, D)), D.add(i.id);
|
|
535
|
-
const Y = u.get(v);
|
|
536
|
-
(Y == null || A < Y) && u.set(v, A);
|
|
537
|
-
}), a.set(i.id, c));
|
|
538
|
-
}
|
|
539
|
-
return {
|
|
540
|
-
wrappers: Array.from(o.values()).map((i) => ({
|
|
541
|
-
...i,
|
|
542
|
-
depth: u.get(i.id) ?? i.depth ?? 0,
|
|
543
|
-
childrenIds: Array.from(n.get(i.id) || [])
|
|
544
|
-
})),
|
|
545
|
-
ancestorsByLeaf: a
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
const _t = b(() => Jo(yo.value)), Qo = b(() => {
|
|
549
|
-
const e = _t.value.wrappers;
|
|
550
|
-
return e.length ? e.filter((l) => el(l)) : [];
|
|
551
|
-
});
|
|
552
|
-
function It(e) {
|
|
553
|
-
return Re(e) * 1.2;
|
|
554
|
-
}
|
|
555
|
-
function el(e) {
|
|
556
|
-
const l = It(e);
|
|
557
|
-
return ee(e) < l * 1.1 ? !1 : (e.labelY0 = e.y0, !0);
|
|
558
|
-
}
|
|
559
|
-
const _e = b(() => tl({
|
|
560
|
-
rects: yo.value,
|
|
561
|
-
wrappers: _t.value.wrappers,
|
|
562
|
-
ancestorsByLeaf: _t.value.ancestorsByLeaf
|
|
563
|
-
}));
|
|
564
|
-
function tl({ rects: e, wrappers: l, ancestorsByLeaf: o }) {
|
|
565
|
-
if (!l.length || !o) return e;
|
|
566
|
-
const a = new Map(l.map((n) => [n.id, n]));
|
|
567
|
-
return e.map((n) => {
|
|
568
|
-
const u = o.get(n.id);
|
|
569
|
-
if (!u || !u.length) return n;
|
|
570
|
-
let s = { ...n };
|
|
571
|
-
for (const i of u) {
|
|
572
|
-
const c = a.get(i);
|
|
573
|
-
if (!c) continue;
|
|
574
|
-
const v = ee(c), A = It(c);
|
|
575
|
-
if (v < A * 1.1) continue;
|
|
576
|
-
const R = Re(c), C = R * 1.2, D = R * 0.5, Y = R * 0.5, Ae = C * 0.5, Ye = te(c) / 3, Xe = Math.min(D, Ye), Me = v * 0.25, zt = Math.min(Y, Me), Dt = (typeof c.labelY0 == "number" ? c.labelY0 : c.y0) + A, re = Math.max(s.x0, c.x0 + Xe), pe = Math.min(s.x1, c.x1 - Xe), ge = Math.max(s.y0, Dt + Ae), Ht = Math.min(s.y1, c.y1 - zt);
|
|
577
|
-
if (pe <= re || Ht <= ge)
|
|
578
|
-
break;
|
|
579
|
-
s = {
|
|
580
|
-
...s,
|
|
581
|
-
x0: re,
|
|
582
|
-
y0: ge,
|
|
583
|
-
x1: pe,
|
|
584
|
-
y1: Ht
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
return s;
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
function ee({ y0: e, y1: l }) {
|
|
591
|
-
return l - e <= 0 ? 1e-4 : l - e;
|
|
592
|
-
}
|
|
593
|
-
function te({ x0: e, x1: l }) {
|
|
594
|
-
return l - e <= 0 ? 1e-4 : l - e;
|
|
595
|
-
}
|
|
596
|
-
function Re(e) {
|
|
597
|
-
const l = t.value.style.chart.layout.labels, o = l.fontSize, a = l.minFontSize, n = l.fontSize * 2, u = 0.5, s = 0.6, i = 1, c = 0.9;
|
|
598
|
-
let v = e.proportion;
|
|
599
|
-
if (!(typeof v == "number" && isFinite(v))) {
|
|
600
|
-
const Y = Math.max(1e-6, te(e) * ee(e)), Ae = Math.max(1e-6, B.value.width * B.value.height);
|
|
601
|
-
v = Y / Ae;
|
|
602
|
-
}
|
|
603
|
-
const A = Math.pow(Math.min(1, Math.max(0, v)), u), R = s + (i - s) * A;
|
|
604
|
-
let C = o * R;
|
|
605
|
-
const D = Math.max(1e-4, Math.min(te(e), ee(e)));
|
|
606
|
-
return C = Math.min(C, D * c), C = Math.max(a, Math.min(n, C)), C;
|
|
607
|
-
}
|
|
608
|
-
function mo(e) {
|
|
609
|
-
Oe.value = e, Qt.value += 1;
|
|
610
|
-
}
|
|
611
|
-
const ze = b(() => ({
|
|
612
|
-
startX: 0,
|
|
613
|
-
startY: 0,
|
|
614
|
-
width: B.value.vbWidth,
|
|
615
|
-
height: B.value.vbHeight
|
|
616
|
-
}));
|
|
617
|
-
function J(e, l = W.value) {
|
|
618
|
-
for (const o of l) {
|
|
619
|
-
if (o.id === e)
|
|
620
|
-
return o;
|
|
621
|
-
if (o.children) {
|
|
622
|
-
const a = J(e, o.children);
|
|
623
|
-
if (a)
|
|
624
|
-
return a;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
|
-
function ol(e) {
|
|
630
|
-
const l = [];
|
|
631
|
-
let o = J(e);
|
|
632
|
-
for (; o && o.parentId; ) {
|
|
633
|
-
const a = J(o.parentId);
|
|
634
|
-
if (!a) break;
|
|
635
|
-
l.unshift(a.id), o = a;
|
|
636
|
-
}
|
|
637
|
-
return l;
|
|
638
|
-
}
|
|
639
|
-
const Ne = b(() => I.value.length > 0);
|
|
640
|
-
function et(e, l) {
|
|
641
|
-
if (!e) {
|
|
642
|
-
Te.value = W.value.slice(), N("selectDatapoint", void 0), I.value = [];
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: l });
|
|
646
|
-
const o = J(e.id);
|
|
647
|
-
if (o && o.children?.length)
|
|
648
|
-
I.value.push(o.id), Te.value = o.children.slice(), N("selectDatapoint", e);
|
|
649
|
-
else if (e.parentId) {
|
|
650
|
-
I.value.push(e.parentId);
|
|
651
|
-
const a = J(e.parentId);
|
|
652
|
-
Te.value = a.children.slice(), N("selectDatapoint", e);
|
|
653
|
-
} else if (I.value.length > 0) {
|
|
654
|
-
I.value.pop();
|
|
655
|
-
const a = I.value[I.value.length - 1];
|
|
656
|
-
if (a) {
|
|
657
|
-
const n = J(a);
|
|
658
|
-
Te.value = n.children.slice();
|
|
659
|
-
} else
|
|
660
|
-
Te.value = W.value.slice(), I.value = [], N("selectDatapoint", void 0);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function ll(e) {
|
|
664
|
-
return !!(J(e.id)?.children?.length || e.parentId);
|
|
665
|
-
}
|
|
666
|
-
const he = b(() => {
|
|
667
|
-
const e = [
|
|
668
|
-
{ id: null, label: "All" }
|
|
669
|
-
];
|
|
670
|
-
if (I.value.length > 0) {
|
|
671
|
-
let l = J(I.value[I.value.length - 1]);
|
|
672
|
-
const o = [];
|
|
673
|
-
for (; l; )
|
|
674
|
-
o.unshift(l), l = l.parentId ? J(l.parentId) : null;
|
|
675
|
-
for (const a of o)
|
|
676
|
-
e.push({
|
|
677
|
-
id: a.id,
|
|
678
|
-
label: a.name,
|
|
679
|
-
node: a
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
return e;
|
|
683
|
-
}), E = ye(null), De = b(() => W.value.map((e, l) => ({
|
|
684
|
-
...e,
|
|
685
|
-
color: Ge(e.color) || Qe.value[l] || G[l] || G[l % G.length],
|
|
686
|
-
shape: "square"
|
|
687
|
-
})).sort((e, l) => l.value - e.value).map((e, l) => {
|
|
688
|
-
const o = e.value / W.value.map((a) => a.value).reduce((a, n) => a + n, 0);
|
|
689
|
-
return {
|
|
690
|
-
...e,
|
|
691
|
-
proportion: o,
|
|
692
|
-
opacity: F.value.includes(e.id) ? 0.5 : 1,
|
|
693
|
-
display: `${e.name}${t.value.style.chart.legend.showPercentage || t.value.style.chart.legend.showValue ? ": " : ""}${t.value.style.chart.legend.showValue ? ft(
|
|
694
|
-
t.value.style.chart.layout.labels.formatter,
|
|
695
|
-
e.value,
|
|
696
|
-
Ke({
|
|
697
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
698
|
-
v: e.value,
|
|
699
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
700
|
-
r: t.value.style.chart.legend.roundingValue
|
|
701
|
-
}),
|
|
702
|
-
{ datapoint: e }
|
|
703
|
-
) : ""}${t.value.style.chart.legend.showPercentage ? F.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 / Be.value) ? "-" : (e.value / Be.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)}%${t.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
704
|
-
};
|
|
705
|
-
})), al = b(() => ({
|
|
706
|
-
cy: "treemap-div-legend",
|
|
707
|
-
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
708
|
-
color: t.value.style.chart.legend.color,
|
|
709
|
-
fontSize: t.value.style.chart.legend.fontSize,
|
|
710
|
-
paddingBottom: 12,
|
|
711
|
-
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
712
|
-
})), Ee = b(() => F.value.length === De.value.length);
|
|
713
|
-
function nl() {
|
|
714
|
-
F.value.length ? F.value = [] : De.value.forEach((e) => {
|
|
715
|
-
F.value.push(e.id);
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
function tt(e) {
|
|
719
|
-
E.value = null, F.value.includes(e.id) ? F.value = F.value.filter((l) => l !== e.id) : F.value.length < k.dataset.length - 1 && F.value.push(e.id), N("selectLegend", Pt.value);
|
|
720
|
-
}
|
|
721
|
-
function bo(e) {
|
|
722
|
-
if (!W.value.length)
|
|
723
|
-
return t.value.debug && console.warn("VueUiTreemap - There are no series to show."), null;
|
|
724
|
-
const l = W.value.find((o) => o.name === e);
|
|
725
|
-
return l || (t.value.debug && console.warn(`VueUiTreemap - Series name not found "${e}"`), null);
|
|
726
|
-
}
|
|
727
|
-
function sl(e) {
|
|
728
|
-
const l = bo(e);
|
|
729
|
-
l !== null && F.value.includes(l.id) && tt({ id: l.id });
|
|
730
|
-
}
|
|
731
|
-
function rl(e) {
|
|
732
|
-
const l = bo(e);
|
|
733
|
-
l !== null && (F.value.includes(l.id) || tt({ id: l.id }));
|
|
734
|
-
}
|
|
735
|
-
function ul({ datapoint: e, seriesIndex: l }) {
|
|
736
|
-
E.value = null, mt.value = !1, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: l });
|
|
737
|
-
}
|
|
738
|
-
const Lt = $(null);
|
|
739
|
-
function il({ datapoint: e, seriesIndex: l }) {
|
|
740
|
-
if (Ee.value) return;
|
|
741
|
-
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: l }), E.value = e, Lt.value = { datapoint: e, seriesIndex: l, config: t.value, series: We.value };
|
|
742
|
-
const o = t.value.style.chart.tooltip.customFormat;
|
|
743
|
-
if (Bo(o) && Fl(() => o({
|
|
744
|
-
seriesIndex: l,
|
|
745
|
-
datapoint: e,
|
|
746
|
-
series: We.value,
|
|
747
|
-
config: t.value
|
|
748
|
-
})))
|
|
749
|
-
bt.value = o({
|
|
750
|
-
seriesIndex: l,
|
|
751
|
-
datapoint: e,
|
|
752
|
-
series: We.value,
|
|
753
|
-
config: t.value
|
|
754
|
-
});
|
|
755
|
-
else {
|
|
756
|
-
let a = "";
|
|
757
|
-
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>${ft(
|
|
758
|
-
t.value.style.chart.layout.labels.formatter,
|
|
759
|
-
e.value,
|
|
760
|
-
Ke({
|
|
761
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
762
|
-
v: e.value,
|
|
763
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
764
|
-
r: t.value.style.chart.tooltip.roundingValue
|
|
765
|
-
}),
|
|
766
|
-
{ datapoint: e, seriesIndex: l }
|
|
767
|
-
)}</b>`, bt.value = `<div>${a}</div>`;
|
|
768
|
-
}
|
|
769
|
-
mt.value = !0;
|
|
770
|
-
}
|
|
771
|
-
const fe = b(() => {
|
|
772
|
-
const e = _e.value.map((o) => ({
|
|
773
|
-
name: o.name,
|
|
774
|
-
color: o.color
|
|
775
|
-
})), l = _e.value.map((o) => o.value);
|
|
776
|
-
return { head: e, body: l };
|
|
777
|
-
});
|
|
778
|
-
function Ft(e = null) {
|
|
779
|
-
Io(() => {
|
|
780
|
-
const l = fe.value.head.map((n, u) => [[
|
|
781
|
-
n.name
|
|
782
|
-
], [fe.value.body[u]], [isNaN(fe.value.body[u] / Be.value) ? "-" : fe.value.body[u] / Be.value * 100]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), a = Il(o);
|
|
783
|
-
e ? e(a) : Ll({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
const ot = b(() => {
|
|
787
|
-
const e = [
|
|
788
|
-
t.value.table.columnNames.series,
|
|
789
|
-
t.value.table.columnNames.value,
|
|
790
|
-
t.value.table.columnNames.percentage
|
|
791
|
-
], l = fe.value.head.map((n, u) => {
|
|
792
|
-
const s = ft(
|
|
793
|
-
t.value.style.chart.layout.labels.formatter,
|
|
794
|
-
fe.value.body[u],
|
|
795
|
-
Ke({
|
|
796
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
797
|
-
v: fe.value.body[u],
|
|
798
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
799
|
-
r: t.value.table.td.roundingValue
|
|
800
|
-
})
|
|
801
|
-
);
|
|
802
|
-
return [
|
|
803
|
-
{
|
|
804
|
-
color: n.color,
|
|
805
|
-
name: n.name,
|
|
806
|
-
shape: "square"
|
|
807
|
-
},
|
|
808
|
-
s,
|
|
809
|
-
isNaN(fe.value.body[u] / Be.value) ? "-" : Ke({
|
|
810
|
-
v: fe.value.body[u] / Be.value * 100,
|
|
811
|
-
s: "%",
|
|
812
|
-
r: t.value.table.td.roundingPercentage
|
|
813
|
-
})
|
|
814
|
-
];
|
|
815
|
-
}), o = {
|
|
816
|
-
th: {
|
|
817
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
818
|
-
color: t.value.table.th.color,
|
|
819
|
-
outline: t.value.table.th.outline
|
|
820
|
-
},
|
|
821
|
-
td: {
|
|
822
|
-
backgroundColor: t.value.table.td.backgroundColor,
|
|
823
|
-
color: t.value.table.td.color,
|
|
824
|
-
outline: t.value.table.td.outline
|
|
825
|
-
},
|
|
826
|
-
breakpoint: t.value.table.responsiveBreakpoint
|
|
827
|
-
};
|
|
828
|
-
return {
|
|
829
|
-
colNames: [
|
|
830
|
-
t.value.table.columnNames.series,
|
|
831
|
-
t.value.table.columnNames.value
|
|
832
|
-
],
|
|
833
|
-
head: e,
|
|
834
|
-
body: l,
|
|
835
|
-
config: o
|
|
836
|
-
};
|
|
837
|
-
});
|
|
838
|
-
function cl() {
|
|
839
|
-
return _e.value;
|
|
840
|
-
}
|
|
841
|
-
function wo() {
|
|
842
|
-
Z.value.showTable = !Z.value.showTable;
|
|
843
|
-
}
|
|
844
|
-
function ko() {
|
|
845
|
-
Z.value.showTooltip = !Z.value.showTooltip;
|
|
846
|
-
}
|
|
847
|
-
const lt = $(!1);
|
|
848
|
-
function Bt() {
|
|
849
|
-
lt.value = !lt.value;
|
|
850
|
-
}
|
|
851
|
-
const at = $(null);
|
|
852
|
-
function Co(e) {
|
|
853
|
-
at.value = e;
|
|
854
|
-
}
|
|
855
|
-
function xo() {
|
|
856
|
-
at.value = null;
|
|
857
|
-
}
|
|
858
|
-
async function dl({ scale: e = 2 } = {}) {
|
|
859
|
-
if (!se.value) return;
|
|
860
|
-
const { width: l, height: o } = se.value.getBoundingClientRect(), a = l / o, { imageUri: n, base64: u } = await Ul({ domElement: se.value, base64: !0, img: !0, scale: e });
|
|
861
|
-
return {
|
|
862
|
-
imageUri: n,
|
|
863
|
-
base64: u,
|
|
864
|
-
title: t.value.style.chart.title.text,
|
|
865
|
-
width: l,
|
|
866
|
-
height: o,
|
|
867
|
-
aspectRatio: a
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
const Ue = b(() => {
|
|
871
|
-
const e = t.value.table.useDialog && !t.value.table.show, l = Z.value.showTable;
|
|
872
|
-
return {
|
|
873
|
-
component: e ? we : w,
|
|
874
|
-
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
875
|
-
props: e ? {
|
|
876
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
877
|
-
color: t.value.table.th.color,
|
|
878
|
-
headerColor: t.value.table.th.color,
|
|
879
|
-
headerBg: t.value.table.th.backgroundColor,
|
|
880
|
-
isFullscreen: Oe.value,
|
|
881
|
-
fullscreenParent: se.value,
|
|
882
|
-
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
883
|
-
isCursorPointer: xe.value
|
|
884
|
-
} : {
|
|
885
|
-
hideDetails: !0,
|
|
886
|
-
config: {
|
|
887
|
-
open: l,
|
|
888
|
-
maxHeight: 1e4,
|
|
889
|
-
body: {
|
|
890
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
891
|
-
color: t.value.style.chart.color
|
|
892
|
-
},
|
|
893
|
-
head: {
|
|
894
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
895
|
-
color: t.value.style.chart.color
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
});
|
|
901
|
-
Le(() => Z.value.showTable, (e) => {
|
|
902
|
-
t.value.table.show || (e && t.value.table.useDialog && He.value ? He.value.open() : "close" in He.value && He.value.close());
|
|
903
|
-
});
|
|
904
|
-
function $o() {
|
|
905
|
-
Z.value.showTable = !1, xt.value && xt.value.setTableIconState(!1);
|
|
906
|
-
}
|
|
907
|
-
const vl = b(() => De.value.map((e) => ({
|
|
908
|
-
...e,
|
|
909
|
-
name: e.display
|
|
910
|
-
}))), hl = b(() => t.value.style.chart.backgroundColor), fl = b(() => t.value.style.chart.legend), pl = b(() => t.value.style.chart.title), { exportSvg: gl, getSvg: yl } = ql({
|
|
911
|
-
svg: St,
|
|
912
|
-
title: pl,
|
|
913
|
-
legend: fl,
|
|
914
|
-
legendItems: vl,
|
|
915
|
-
backgroundColor: hl
|
|
916
|
-
});
|
|
917
|
-
async function To({ isCb: e }) {
|
|
918
|
-
Je.value = !0, await Io();
|
|
919
|
-
try {
|
|
920
|
-
if (e) {
|
|
921
|
-
const { blob: l, url: o, text: a, dataUrl: n } = await yl();
|
|
922
|
-
await Promise.resolve(t.value.userOptions.callbacks.svg({ blob: l, url: o, text: a, dataUrl: n }));
|
|
923
|
-
} else
|
|
924
|
-
await Promise.resolve(gl());
|
|
925
|
-
} finally {
|
|
926
|
-
Je.value = !1;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
function ml(e) {
|
|
930
|
-
if (e?.stage === "start") {
|
|
931
|
-
Ze.value = !0;
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
if (e?.stage === "end") {
|
|
935
|
-
Ze.value = !1;
|
|
936
|
-
return;
|
|
937
|
-
}
|
|
938
|
-
io();
|
|
939
|
-
}
|
|
940
|
-
function bl(e) {
|
|
941
|
-
const o = Re(e) * 0.6;
|
|
942
|
-
return Math.max(0, te(e) - 2 * o);
|
|
943
|
-
}
|
|
944
|
-
function So({ rect: e, seriesIndex: l, isTitle: o = !1 }) {
|
|
945
|
-
const a = t.value.style.chart.layout.labels.name.show, n = t.value.style.chart.layout.labels.value.show;
|
|
946
|
-
if (!a && !n) return "";
|
|
947
|
-
const u = I.value.length === 0, s = u ? `${e.id}:${o ? "title" : "rect"}` : null;
|
|
948
|
-
if (u && U.value.has(s))
|
|
949
|
-
return U.value.get(s);
|
|
950
|
-
const i = Math.max(2, Re(e) / 3), c = Math.max(8, Re(e)), v = c * 1.2, A = Math.max(0, te(e) - i * 2), R = Math.max(0, ee(e) - i * 2);
|
|
951
|
-
if (A <= 2 || R <= c * 0.8)
|
|
952
|
-
return u && s && U.value.set(s, ""), "";
|
|
953
|
-
const C = t.value.style.fontFamily, D = t.value.style.chart.layout.labels.name.bold ? "600" : "400", Y = t.value.style.chart.layout.labels.value.bold ? "600" : "400", Ae = o ? t.value.style.chart.layout.rects.group.label.adaptColorToBackground ? t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? gt(pt(e.color, 0.4)) : gt(t.value.style.chart.backgroundColor) : t.value.style.chart.layout.rects.group.label.color : gt(e.color), Rt = a ? String(e.name ?? "") : "", Ye = n ? ft(
|
|
954
|
-
t.value.style.chart.layout.labels.formatter,
|
|
955
|
-
e.value ?? 0,
|
|
956
|
-
Ke({
|
|
957
|
-
p: t.value.style.chart.layout.labels.prefix,
|
|
958
|
-
v: e.value ?? 0,
|
|
959
|
-
s: t.value.style.chart.layout.labels.suffix,
|
|
960
|
-
r: t.value.style.chart.layout.labels.rounding
|
|
961
|
-
}),
|
|
962
|
-
{ datapoint: e, seriesIndex: l }
|
|
963
|
-
) : "", Xe = o ? bl(e) : A;
|
|
964
|
-
function Me(L, oe = c, je = "400") {
|
|
965
|
-
const Q = document.createElementNS(Gt, "svg");
|
|
966
|
-
Q.setAttribute("width", "0"), Q.setAttribute("height", "0"), Q.style.position = "absolute", Q.style.visibility = "hidden", Q.style.pointerEvents = "none";
|
|
967
|
-
const le = document.createElementNS(Gt, "text");
|
|
968
|
-
le.setAttribute("font-size", String(oe)), le.setAttribute("font-family", C), le.setAttribute("font-weight", String(je)), le.textContent = L || "", Q.appendChild(le), document.body.appendChild(Q);
|
|
969
|
-
const nt = le.getComputedTextLength();
|
|
970
|
-
return document.body.removeChild(Q), nt;
|
|
971
|
-
}
|
|
972
|
-
if (o) {
|
|
973
|
-
let L = "";
|
|
974
|
-
if (a && (L = Rt), n && (L = L ? `${L} (${Ye})` : Ye), !L)
|
|
975
|
-
return u && s && U.value.set(s, ""), "";
|
|
976
|
-
let oe = L;
|
|
977
|
-
if (Me(oe, c, D) > Xe) {
|
|
978
|
-
let V = oe;
|
|
979
|
-
for (; V.length && Me(V + "…", c, D) > Xe; )
|
|
980
|
-
V = V.slice(0, -1);
|
|
981
|
-
oe = V ? V + "…" : "";
|
|
982
|
-
}
|
|
983
|
-
if (!oe)
|
|
984
|
-
return u && s && U.value.set(s, ""), "";
|
|
985
|
-
const je = It(e), Q = typeof e.depth == "number" ? e.depth : 0, le = je * 1.4, nt = typeof e.labelY0 == "number" ? e.labelY0 : e.y0 + Q * le, Et = e.x0 + i + c / 2, H = nt + i + c, ae = `<text
|
|
986
|
-
x="${Et}"
|
|
987
|
-
y="${H}"
|
|
988
|
-
font-size="${c}"
|
|
989
|
-
font-family="${yt(C)}"
|
|
990
|
-
font-weight="${D}"
|
|
991
|
-
fill="${yt(Ae)}"
|
|
992
|
-
paint-order="stroke"
|
|
993
|
-
stroke="transparent"
|
|
994
|
-
stroke-width="0"
|
|
995
|
-
style="transition: all 0.2s ease-in-out;"
|
|
996
|
-
>
|
|
997
|
-
${Kt(oe)}
|
|
998
|
-
</text>`;
|
|
999
|
-
return u && s && U.value.set(s, ae), ae;
|
|
1000
|
-
}
|
|
1001
|
-
const zt = n ? 1 : 0, Nt = Math.max(0, Math.floor(R / v) - zt);
|
|
1002
|
-
if (Nt <= 0 && !n)
|
|
1003
|
-
return u && s && U.value.set(s, ""), "";
|
|
1004
|
-
function Dt(L, oe, je, Q, le, nt) {
|
|
1005
|
-
const Et = String(L).split(/\s+/).filter(Boolean), H = [];
|
|
1006
|
-
let ae = "";
|
|
1007
|
-
function V(_) {
|
|
1008
|
-
return Me(_, je, Q) <= oe;
|
|
1009
|
-
}
|
|
1010
|
-
function Cl(_) {
|
|
1011
|
-
if (V(_)) return [_];
|
|
1012
|
-
const ue = [];
|
|
1013
|
-
let P = 0;
|
|
1014
|
-
for (; P < _.length; ) {
|
|
1015
|
-
let ie = 1, Yt = _.length - P, Xt = 1;
|
|
1016
|
-
for (; ie <= Yt; ) {
|
|
1017
|
-
const rt = ie + Yt >> 1, xl = _.slice(P, P + rt);
|
|
1018
|
-
V(xl) ? (Xt = rt, ie = rt + 1) : Yt = rt - 1;
|
|
1019
|
-
}
|
|
1020
|
-
ue.push(_.slice(P, P + Xt)), P += Xt;
|
|
1021
|
-
}
|
|
1022
|
-
return ue;
|
|
1023
|
-
}
|
|
1024
|
-
const st = Et.flatMap((_) => Cl(_));
|
|
1025
|
-
let Ut = !1;
|
|
1026
|
-
for (let _ = 0; _ < st.length; _ += 1) {
|
|
1027
|
-
const ue = st[_], P = ae ? ae + " " + ue : ue;
|
|
1028
|
-
if (V(P))
|
|
1029
|
-
ae = P;
|
|
1030
|
-
else {
|
|
1031
|
-
if (ae)
|
|
1032
|
-
H.push(ae);
|
|
1033
|
-
else {
|
|
1034
|
-
let ie = ue;
|
|
1035
|
-
for (; ie.length && !V(ie); ) ie = ie.slice(0, -1);
|
|
1036
|
-
ie && H.push(ie);
|
|
1037
|
-
}
|
|
1038
|
-
if (ae = "", H.length === le) {
|
|
1039
|
-
Ut = !0;
|
|
1040
|
-
break;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
_ === st.length - 1 && ae && H.length < le && H.push(ae);
|
|
1044
|
-
}
|
|
1045
|
-
if (H.length && H.join(" ") !== st.join(" ") && (Ut = !0), Ut && H.length > 0) {
|
|
1046
|
-
let _ = H[H.length - 1];
|
|
1047
|
-
if (!V(_)) {
|
|
1048
|
-
let P = _;
|
|
1049
|
-
for (; P.length && !V(P); ) P = P.slice(0, -1);
|
|
1050
|
-
_ = P;
|
|
1051
|
-
}
|
|
1052
|
-
let ue = _ + "…";
|
|
1053
|
-
if (!V(ue)) {
|
|
1054
|
-
let P = _;
|
|
1055
|
-
for (; P.length && !V(P + "…"); )
|
|
1056
|
-
P = P.slice(0, -1);
|
|
1057
|
-
ue = P + "…";
|
|
1058
|
-
}
|
|
1059
|
-
H[H.length - 1] = ue;
|
|
1060
|
-
}
|
|
1061
|
-
return H;
|
|
1062
|
-
}
|
|
1063
|
-
const re = a ? Dt(
|
|
1064
|
-
Rt,
|
|
1065
|
-
A,
|
|
1066
|
-
c,
|
|
1067
|
-
D,
|
|
1068
|
-
Nt
|
|
1069
|
-
) : [];
|
|
1070
|
-
let pe = c, ge = String(Ye);
|
|
1071
|
-
if (n) {
|
|
1072
|
-
for (; Me(ge, pe, Y) > A && pe > Math.max(8, c * 0.75); )
|
|
1073
|
-
pe -= 1;
|
|
1074
|
-
if (Me(ge, pe, Y) > A) {
|
|
1075
|
-
let L = ge;
|
|
1076
|
-
for (; L.length && Me(L + "…", pe, Y) > A; )
|
|
1077
|
-
L = L.slice(0, -1);
|
|
1078
|
-
if (ge = L ? L + "…" : "", !ge.length)
|
|
1079
|
-
return u && s && U.value.set(s, ""), "";
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
if (re.length * v + (n ? v : 0) > R) {
|
|
1083
|
-
for (; re.length && re.length * v + (n ? v : 0) > R; )
|
|
1084
|
-
re.pop();
|
|
1085
|
-
if (!re.length && (!n || v > R))
|
|
1086
|
-
return u && s && U.value.set(s, ""), "";
|
|
1087
|
-
}
|
|
1088
|
-
const Vt = e.x0 + i, kl = e.y0 + i + c, Wt = [];
|
|
1089
|
-
a && re.forEach((L, oe) => {
|
|
1090
|
-
Wt.push(`
|
|
1091
|
-
<tspan
|
|
1092
|
-
x="${Vt}"
|
|
1093
|
-
dy="${oe === 0 ? 0 : v}"
|
|
1094
|
-
font-weight="${D}"
|
|
1095
|
-
>
|
|
1096
|
-
${Kt(L)}
|
|
1097
|
-
</tspan>`);
|
|
1098
|
-
}), n && Wt.push(`
|
|
1099
|
-
<tspan
|
|
1100
|
-
x="${Vt}"
|
|
1101
|
-
dy="${re.length ? v : 0}"
|
|
1102
|
-
font-weight="${Y}"
|
|
1103
|
-
font-size="${pe}"
|
|
1104
|
-
>
|
|
1105
|
-
${Kt(ge)}
|
|
1106
|
-
</tspan>`);
|
|
1107
|
-
const Mo = `<text
|
|
1108
|
-
x="${Vt}"
|
|
1109
|
-
y="${kl}"
|
|
1110
|
-
font-size="${c}"
|
|
1111
|
-
font-family="${yt(C)}"
|
|
1112
|
-
fill="${yt(Ae)}"
|
|
1113
|
-
paint-order="stroke"
|
|
1114
|
-
stroke="transparent"
|
|
1115
|
-
stroke-width="0"
|
|
1116
|
-
style="transition: all 0.2s ease-in-out;"
|
|
1117
|
-
>
|
|
1118
|
-
${Wt.join("")}
|
|
1119
|
-
</text>`;
|
|
1120
|
-
return u && s && U.value.set(s, Mo), Mo;
|
|
1121
|
-
}
|
|
1122
|
-
function wl(e) {
|
|
1123
|
-
const l = t.value.style.chart.layout.rects.borderRadius, o = te(e), a = ee(e);
|
|
1124
|
-
return Math.min(l, Math.min(o, a) / 6);
|
|
1125
|
-
}
|
|
1126
|
-
async function Ao() {
|
|
1127
|
-
if (N("copyAlt", {
|
|
1128
|
-
config: t.value,
|
|
1129
|
-
dataset: _e.value
|
|
1130
|
-
}), !t.value.userOptions.callbacks.altCopy) {
|
|
1131
|
-
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
await Promise.resolve(t.value.userOptions.callbacks.altCopy({
|
|
1135
|
-
config: t.value,
|
|
1136
|
-
dataset: _e.value
|
|
1137
|
-
}));
|
|
1138
|
-
}
|
|
1139
|
-
return p({
|
|
1140
|
-
getData: cl,
|
|
1141
|
-
getImage: dl,
|
|
1142
|
-
generateCsv: Ft,
|
|
1143
|
-
generateImage: io,
|
|
1144
|
-
generateSvg: To,
|
|
1145
|
-
generatePdf: uo,
|
|
1146
|
-
hideSeries: rl,
|
|
1147
|
-
showSeries: sl,
|
|
1148
|
-
toggleTable: wo,
|
|
1149
|
-
toggleTooltip: ko,
|
|
1150
|
-
toggleAnnotator: Bt,
|
|
1151
|
-
toggleFullscreen: mo,
|
|
1152
|
-
copyAlt: Ao
|
|
1153
|
-
}), (e, l) => (h(), M("div", {
|
|
1154
|
-
ref_key: "treemapChart",
|
|
1155
|
-
ref: se,
|
|
1156
|
-
class: jt(`vue-data-ui-component vue-ui-treemap ${Oe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1157
|
-
style: me(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
1158
|
-
id: `treemap_${Ce.value}`,
|
|
1159
|
-
onMouseenter: l[2] || (l[2] = () => y(so)(!0)),
|
|
1160
|
-
onMouseleave: l[3] || (l[3] = () => y(so)(!1))
|
|
1161
|
-
}, [
|
|
1162
|
-
t.value.userOptions.buttons.annotator ? (h(), be(y(f), {
|
|
1163
|
-
key: 0,
|
|
1164
|
-
svgRef: y(St),
|
|
1165
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1166
|
-
color: t.value.style.chart.color,
|
|
1167
|
-
active: lt.value,
|
|
1168
|
-
isCursorPointer: xe.value,
|
|
1169
|
-
onClose: Bt
|
|
1170
|
-
}, {
|
|
1171
|
-
"annotator-action-close": S(() => [
|
|
1172
|
-
x(e.$slots, "annotator-action-close", {}, void 0, !0)
|
|
1173
|
-
]),
|
|
1174
|
-
"annotator-action-color": S(({ color: o }) => [
|
|
1175
|
-
x(e.$slots, "annotator-action-color", X(j({ color: o })), void 0, !0)
|
|
1176
|
-
]),
|
|
1177
|
-
"annotator-action-draw": S(({ mode: o }) => [
|
|
1178
|
-
x(e.$slots, "annotator-action-draw", X(j({ mode: o })), void 0, !0)
|
|
1179
|
-
]),
|
|
1180
|
-
"annotator-action-undo": S(({ disabled: o }) => [
|
|
1181
|
-
x(e.$slots, "annotator-action-undo", X(j({ disabled: o })), void 0, !0)
|
|
1182
|
-
]),
|
|
1183
|
-
"annotator-action-redo": S(({ disabled: o }) => [
|
|
1184
|
-
x(e.$slots, "annotator-action-redo", X(j({ disabled: o })), void 0, !0)
|
|
1185
|
-
]),
|
|
1186
|
-
"annotator-action-delete": S(({ disabled: o }) => [
|
|
1187
|
-
x(e.$slots, "annotator-action-delete", X(j({ disabled: o })), void 0, !0)
|
|
1188
|
-
]),
|
|
1189
|
-
_: 3
|
|
1190
|
-
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : z("", !0),
|
|
1191
|
-
Uo.value ? (h(), M("div", {
|
|
1192
|
-
key: 1,
|
|
1193
|
-
ref_key: "noTitle",
|
|
1194
|
-
ref: lo,
|
|
1195
|
-
class: "vue-data-ui-no-title-space",
|
|
1196
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
1197
|
-
}, null, 512)) : z("", !0),
|
|
1198
|
-
t.value.style.chart.title.text ? (h(), M("div", {
|
|
1199
|
-
key: 2,
|
|
1200
|
-
ref_key: "chartTitle",
|
|
1201
|
-
ref: eo,
|
|
1202
|
-
style: me(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
1203
|
-
}, [
|
|
1204
|
-
(h(), be(Yl, {
|
|
1205
|
-
key: `title_${ao.value}`,
|
|
1206
|
-
config: {
|
|
1207
|
-
title: {
|
|
1208
|
-
cy: "treemap-div-title",
|
|
1209
|
-
...t.value.style.chart.title
|
|
1210
|
-
},
|
|
1211
|
-
subtitle: {
|
|
1212
|
-
cy: "treemap-div-subtitle",
|
|
1213
|
-
...t.value.style.chart.title.subtitle
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
}, null, 8, ["config"]))
|
|
1217
|
-
], 4)) : z("", !0),
|
|
1218
|
-
q("div", {
|
|
1219
|
-
id: `legend-top-${Ce.value}`
|
|
1220
|
-
}, null, 8, na),
|
|
1221
|
-
t.value.userOptions.show && ke.value && (y(ro) || y(Tt)) ? (h(), be(y(O), {
|
|
1222
|
-
ref_key: "userOptionsRef",
|
|
1223
|
-
ref: xt,
|
|
1224
|
-
key: `user_option_${Qt.value}`,
|
|
1225
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1226
|
-
color: t.value.style.chart.color,
|
|
1227
|
-
isPrinting: y(Mt),
|
|
1228
|
-
isImaging: y(Ot),
|
|
1229
|
-
uid: Ce.value,
|
|
1230
|
-
hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
|
|
1231
|
-
hasPdf: t.value.userOptions.buttons.pdf,
|
|
1232
|
-
hasXls: t.value.userOptions.buttons.csv,
|
|
1233
|
-
hasImg: t.value.userOptions.buttons.img,
|
|
1234
|
-
hasSvg: t.value.userOptions.buttons.svg,
|
|
1235
|
-
hasTable: t.value.userOptions.buttons.table,
|
|
1236
|
-
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
1237
|
-
hasAltCopy: t.value.userOptions.buttons.altCopy,
|
|
1238
|
-
isFullscreen: Oe.value,
|
|
1239
|
-
isTooltip: Z.value.showTooltip,
|
|
1240
|
-
titles: { ...t.value.userOptions.buttonTitles },
|
|
1241
|
-
chartElement: se.value,
|
|
1242
|
-
position: t.value.userOptions.position,
|
|
1243
|
-
hasAnnotator: t.value.userOptions.buttons.annotator,
|
|
1244
|
-
isAnnotation: lt.value,
|
|
1245
|
-
callbacks: t.value.userOptions.callbacks,
|
|
1246
|
-
printScale: t.value.userOptions.print.scale,
|
|
1247
|
-
tableDialog: t.value.table.useDialog,
|
|
1248
|
-
isCursorPointer: xe.value,
|
|
1249
|
-
onToggleFullscreen: mo,
|
|
1250
|
-
onGeneratePdf: y(uo),
|
|
1251
|
-
onGenerateCsv: Ft,
|
|
1252
|
-
onGenerateImage: ml,
|
|
1253
|
-
onGenerateSvg: To,
|
|
1254
|
-
onToggleTable: wo,
|
|
1255
|
-
onToggleTooltip: ko,
|
|
1256
|
-
onToggleAnnotator: Bt,
|
|
1257
|
-
onCopyAlt: Ao,
|
|
1258
|
-
style: me({
|
|
1259
|
-
visibility: y(ro) ? y(Tt) ? "visible" : "hidden" : "visible"
|
|
1260
|
-
})
|
|
1261
|
-
}, Po({ _: 2 }, [
|
|
1262
|
-
e.$slots.menuIcon ? {
|
|
1263
|
-
name: "menuIcon",
|
|
1264
|
-
fn: S(({ isOpen: o, color: a }) => [
|
|
1265
|
-
x(e.$slots, "menuIcon", X(j({ isOpen: o, color: a })), void 0, !0)
|
|
1266
|
-
]),
|
|
1267
|
-
key: "0"
|
|
1268
|
-
} : void 0,
|
|
1269
|
-
e.$slots.optionTooltip ? {
|
|
1270
|
-
name: "optionTooltip",
|
|
1271
|
-
fn: S(() => [
|
|
1272
|
-
x(e.$slots, "optionTooltip", {}, void 0, !0)
|
|
1273
|
-
]),
|
|
1274
|
-
key: "1"
|
|
1275
|
-
} : void 0,
|
|
1276
|
-
e.$slots.optionPdf ? {
|
|
1277
|
-
name: "optionPdf",
|
|
1278
|
-
fn: S(() => [
|
|
1279
|
-
x(e.$slots, "optionPdf", {}, void 0, !0)
|
|
1280
|
-
]),
|
|
1281
|
-
key: "2"
|
|
1282
|
-
} : void 0,
|
|
1283
|
-
e.$slots.optionCsv ? {
|
|
1284
|
-
name: "optionCsv",
|
|
1285
|
-
fn: S(() => [
|
|
1286
|
-
x(e.$slots, "optionCsv", {}, void 0, !0)
|
|
1287
|
-
]),
|
|
1288
|
-
key: "3"
|
|
1289
|
-
} : void 0,
|
|
1290
|
-
e.$slots.optionImg ? {
|
|
1291
|
-
name: "optionImg",
|
|
1292
|
-
fn: S(() => [
|
|
1293
|
-
x(e.$slots, "optionImg", {}, void 0, !0)
|
|
1294
|
-
]),
|
|
1295
|
-
key: "4"
|
|
1296
|
-
} : void 0,
|
|
1297
|
-
e.$slots.optionSvg ? {
|
|
1298
|
-
name: "optionSvg",
|
|
1299
|
-
fn: S(() => [
|
|
1300
|
-
x(e.$slots, "optionSvg", {}, void 0, !0)
|
|
1301
|
-
]),
|
|
1302
|
-
key: "5"
|
|
1303
|
-
} : void 0,
|
|
1304
|
-
e.$slots.optionTable ? {
|
|
1305
|
-
name: "optionTable",
|
|
1306
|
-
fn: S(() => [
|
|
1307
|
-
x(e.$slots, "optionTable", {}, void 0, !0)
|
|
1308
|
-
]),
|
|
1309
|
-
key: "6"
|
|
1310
|
-
} : void 0,
|
|
1311
|
-
e.$slots.optionFullscreen ? {
|
|
1312
|
-
name: "optionFullscreen",
|
|
1313
|
-
fn: S(({ toggleFullscreen: o, isFullscreen: a }) => [
|
|
1314
|
-
x(e.$slots, "optionFullscreen", X(j({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
|
|
1315
|
-
]),
|
|
1316
|
-
key: "7"
|
|
1317
|
-
} : void 0,
|
|
1318
|
-
e.$slots.optionAnnotator ? {
|
|
1319
|
-
name: "optionAnnotator",
|
|
1320
|
-
fn: S(({ toggleAnnotator: o, isAnnotator: a }) => [
|
|
1321
|
-
x(e.$slots, "optionAnnotator", X(j({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
|
|
1322
|
-
]),
|
|
1323
|
-
key: "8"
|
|
1324
|
-
} : void 0,
|
|
1325
|
-
e.$slots.optionAltCopy ? {
|
|
1326
|
-
name: "optionAltCopy",
|
|
1327
|
-
fn: S(({ altCopy: o }) => [
|
|
1328
|
-
x(e.$slots, "optionAltCopy", X(j({ altCopy: o })), void 0, !0)
|
|
1329
|
-
]),
|
|
1330
|
-
key: "9"
|
|
1331
|
-
} : void 0
|
|
1332
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : z("", !0),
|
|
1333
|
-
he.value.length > 1 ? (h(), M("nav", {
|
|
1334
|
-
key: 4,
|
|
1335
|
-
class: "vue-ui-treemap-breadcrumbs",
|
|
1336
|
-
"data-dom-to-png-ignore": "",
|
|
1337
|
-
ref_key: "breadcrumbsNav",
|
|
1338
|
-
ref: Ct
|
|
1339
|
-
}, [
|
|
1340
|
-
(h(!0), M(qe, null, ut(he.value, (o, a) => (h(), M("span", {
|
|
1341
|
-
role: "button",
|
|
1342
|
-
tabindex: a < he.value.length - 1 ? 0 : void 0,
|
|
1343
|
-
key: o.id || "root",
|
|
1344
|
-
onClick: (n) => a === he.value.length - 1 ? () => {
|
|
1345
|
-
} : et(o.node),
|
|
1346
|
-
onKeydown: [
|
|
1347
|
-
_o(qt((n) => a === he.value.length - 1 ? void 0 : et(o.node), ["prevent"]), ["enter"]),
|
|
1348
|
-
_o(qt((n) => a === he.value.length - 1 ? void 0 : et(o.node), ["prevent"]), ["space"])
|
|
1349
|
-
],
|
|
1350
|
-
class: "vue-ui-treemap-crumb",
|
|
1351
|
-
"data-last-crumb": a === he.value.length - 1,
|
|
1352
|
-
style: me({
|
|
1353
|
-
color: t.value.style.chart.color,
|
|
1354
|
-
cursor: xe.value ? "pointer" : "default"
|
|
1355
|
-
}),
|
|
1356
|
-
onMouseenter: (n) => Co(a),
|
|
1357
|
-
onMouseleave: xo,
|
|
1358
|
-
onFocus: (n) => Co(a),
|
|
1359
|
-
onBlur: xo
|
|
1360
|
-
}, [
|
|
1361
|
-
q("span", ra, [
|
|
1362
|
-
q("span", ua, [
|
|
1363
|
-
x(e.$slots, "breadcrumb-label", it({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: at.value === a }), () => [
|
|
1364
|
-
a === 0 ? (h(), M("div", ia, [
|
|
1365
|
-
ct(Ro, {
|
|
1366
|
-
name: at.value === 0 ? "homeFilled" : "home",
|
|
1367
|
-
stroke: t.value.style.chart.color
|
|
1368
|
-
}, null, 8, ["name", "stroke"])
|
|
1369
|
-
])) : (h(), M(qe, { key: 1 }, [
|
|
1370
|
-
dt(vt(o.label), 1)
|
|
1371
|
-
], 64))
|
|
1372
|
-
], !0)
|
|
1373
|
-
]),
|
|
1374
|
-
a < he.value.length - 1 ? (h(), M("span", ca, [
|
|
1375
|
-
x(e.$slots, "breadcrumb-arrow", {}, () => [
|
|
1376
|
-
l[4] || (l[4] = dt(" › ", -1))
|
|
1377
|
-
], !0)
|
|
1378
|
-
])) : z("", !0)
|
|
1379
|
-
])
|
|
1380
|
-
], 44, sa))), 128))
|
|
1381
|
-
], 512)) : z("", !0),
|
|
1382
|
-
(h(), M("svg", {
|
|
1383
|
-
ref_key: "svgRef",
|
|
1384
|
-
ref: St,
|
|
1385
|
-
xmlns: y(Gt),
|
|
1386
|
-
class: jt({ "vue-data-ui-fullscreen--on": Oe.value, "vue-data-ui-fulscreen--off": !Oe.value, "vue-data-ui-zoom-plus": !Ne.value, "vue-data-ui-zoom-minus": Ne.value, loading: y($e) }),
|
|
1387
|
-
viewBox: `${ze.value.startX} ${ze.value.startY} ${ze.value.width <= 0 ? 10 : ze.value.width} ${ze.value.height <= 0 ? 10 : ze.value.height}`,
|
|
1388
|
-
style: me(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
|
|
1389
|
-
}, [
|
|
1390
|
-
ct(y(T)),
|
|
1391
|
-
(h(!0), M(qe, null, ut(_e.value, (o, a) => (h(), M("g", {
|
|
1392
|
-
key: `tgrad_${o.id}`
|
|
1393
|
-
}, [
|
|
1394
|
-
t.value.style.chart.layout.rects.gradient.show ? (h(), M("defs", va, [
|
|
1395
|
-
q("radialGradient", {
|
|
1396
|
-
id: `tgrad_${o.id}`,
|
|
1397
|
-
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
1398
|
-
}, [
|
|
1399
|
-
q("stop", {
|
|
1400
|
-
offset: "18%",
|
|
1401
|
-
"stop-color": o.color
|
|
1402
|
-
}, null, 8, fa),
|
|
1403
|
-
q("stop", {
|
|
1404
|
-
offset: "100%",
|
|
1405
|
-
"stop-color": y(pt)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
1406
|
-
}, null, 8, pa)
|
|
1407
|
-
], 8, ha)
|
|
1408
|
-
])) : z("", !0)
|
|
1409
|
-
]))), 128)),
|
|
1410
|
-
(h(!0), M(qe, null, ut(Qo.value, (o, a) => (h(), M("g", {
|
|
1411
|
-
key: `parent_${o.id}`,
|
|
1412
|
-
class: "vue-ui-treemap-parent-wrapper"
|
|
1413
|
-
}, [
|
|
1414
|
-
q("rect", {
|
|
1415
|
-
x: o.x0,
|
|
1416
|
-
y: o.y0,
|
|
1417
|
-
height: ee(o),
|
|
1418
|
-
width: te(o),
|
|
1419
|
-
fill: t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? y(pt)(o.color ?? t.value.style.chart.backgroundColor, t.value.style.chart.layout.rects.group.backgroundLighterRatio) : t.value.style.chart.backgroundColor,
|
|
1420
|
-
rx: 0,
|
|
1421
|
-
stroke: t.value.style.chart.layout.rects.group.stroke,
|
|
1422
|
-
"stroke-width": t.value.style.chart.layout.rects.group.strokeWidth,
|
|
1423
|
-
class: "vue-data-ui-cursor-default vue-ui-treemap-rect"
|
|
1424
|
-
}, null, 8, ga),
|
|
1425
|
-
e.$slots["group-label"] && !Ee.value ? (h(), M("foreignObject", {
|
|
1426
|
-
key: 0,
|
|
1427
|
-
width: te(o),
|
|
1428
|
-
height: ee(o),
|
|
1429
|
-
x: o.x0,
|
|
1430
|
-
y: o.y0
|
|
1431
|
-
}, [
|
|
1432
|
-
x(e.$slots, "group-label", it({ ref_for: !0 }, { group: o }), void 0, !0)
|
|
1433
|
-
], 8, ya)) : !y($e) && t.value.style.chart.layout.labels.showDefaultLabels && !Ee.value ? (h(), M("g", {
|
|
1434
|
-
key: 1,
|
|
1435
|
-
style: { "pointer-events": "none" },
|
|
1436
|
-
innerHTML: So({ rect: o, seriesIndex: 0, isTitle: !0 }),
|
|
1437
|
-
class: "vue-data-ui-cursor-default"
|
|
1438
|
-
}, null, 8, ma)) : z("", !0)
|
|
1439
|
-
]))), 128)),
|
|
1440
|
-
(h(!0), M(qe, null, ut(_e.value, (o, a) => (h(), M("g", {
|
|
1441
|
-
key: `k_${o.id}`
|
|
1442
|
-
}, [
|
|
1443
|
-
q("rect", {
|
|
1444
|
-
x: o.x0,
|
|
1445
|
-
y: o.y0,
|
|
1446
|
-
height: ee(o),
|
|
1447
|
-
width: te(o),
|
|
1448
|
-
fill: ve.value ? o.color ?? t.value.style.chart.backgroundColor : t.value.style.chart.layout.rects.gradient.show ? Ee.value ? t.value.style.chart.backgroundColor : `url(#tgrad_${o.id})` : o.color ?? t.value.style.chart.backgroundColor,
|
|
1449
|
-
rx: wl(o),
|
|
1450
|
-
stroke: E.value && E.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
|
|
1451
|
-
"stroke-width": E.value && E.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
|
|
1452
|
-
onClick: qt((n) => et(o, a), ["stop"]),
|
|
1453
|
-
onMouseenter: () => il({
|
|
1454
|
-
datapoint: o,
|
|
1455
|
-
seriesIndex: a
|
|
1456
|
-
}),
|
|
1457
|
-
onMouseleave: (n) => ul({ datapoint: o, seriesIndex: a }),
|
|
1458
|
-
style: me(`opacity:${E.value ? E.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
1459
|
-
class: jt([
|
|
1460
|
-
"vue-ui-treemap-rect",
|
|
1461
|
-
ll(o) ? "vue-data-ui-zoom-plus" : Ne.value ? "vue-data-ui-zoom-minus" : ""
|
|
1462
|
-
])
|
|
1463
|
-
}, null, 46, ba),
|
|
1464
|
-
!e.$slots.rect && !y($e) && t.value.style.chart.layout.labels.showDefaultLabels && !Ee.value ? (h(), M("g", {
|
|
1465
|
-
key: 0,
|
|
1466
|
-
style: me(`pointer-events:none; opacity:${E.value ? E.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
1467
|
-
innerHTML: So({ rect: o, seriesIndex: a })
|
|
1468
|
-
}, null, 12, wa)) : z("", !0),
|
|
1469
|
-
(h(), M("foreignObject", {
|
|
1470
|
-
x: o.x0,
|
|
1471
|
-
y: o.y0,
|
|
1472
|
-
height: ee(o),
|
|
1473
|
-
width: te(o),
|
|
1474
|
-
class: "vue-ui-treemap-cell-foreignObject"
|
|
1475
|
-
}, [
|
|
1476
|
-
q("div", Ca, [
|
|
1477
|
-
y($e) ? z("", !0) : x(e.$slots, "rect", it({
|
|
1478
|
-
key: 0,
|
|
1479
|
-
ref_for: !0
|
|
1480
|
-
}, {
|
|
1481
|
-
rect: {
|
|
1482
|
-
...o,
|
|
1483
|
-
height: ee(o),
|
|
1484
|
-
width: te(o),
|
|
1485
|
-
isSelected: E.value ? E.value.id === o.id : !0
|
|
1486
|
-
},
|
|
1487
|
-
shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Ne.value,
|
|
1488
|
-
fontSize: Re(o),
|
|
1489
|
-
isZoom: Ne.value,
|
|
1490
|
-
textColor: y(gt)(o.color)
|
|
1491
|
-
}), void 0, !0)
|
|
1492
|
-
])
|
|
1493
|
-
], 8, ka))
|
|
1494
|
-
]))), 128)),
|
|
1495
|
-
x(e.$slots, "svg", X(j({ svg: B.value, isZoom: Ne.value, rect: E.value, config: t.value, isPrintingImg: y(Mt) | y(Ot) | Ze.value, isPrintingSvg: Je.value })), void 0, !0)
|
|
1496
|
-
], 14, da)),
|
|
1497
|
-
e.$slots.watermark ? (h(), M("div", xa, [
|
|
1498
|
-
x(e.$slots, "watermark", X(j({ isPrinting: y(Mt) || y(Ot) || Ze.value || Je.value })), void 0, !0)
|
|
1499
|
-
])) : z("", !0),
|
|
1500
|
-
q("div", {
|
|
1501
|
-
id: `legend-bottom-${Ce.value}`
|
|
1502
|
-
}, null, 8, $a),
|
|
1503
|
-
no.value ? (h(), be(Al, {
|
|
1504
|
-
key: 6,
|
|
1505
|
-
to: t.value.style.chart.legend.position === "top" ? `#legend-top-${Ce.value}` : `#legend-bottom-${Ce.value}`
|
|
1506
|
-
}, [
|
|
1507
|
-
q("div", {
|
|
1508
|
-
ref_key: "chartLegend",
|
|
1509
|
-
ref: to
|
|
1510
|
-
}, [
|
|
1511
|
-
t.value.style.chart.legend.show ? (h(), be(jl, {
|
|
1512
|
-
key: `legend_${kt.value}`,
|
|
1513
|
-
legendSet: De.value,
|
|
1514
|
-
config: al.value,
|
|
1515
|
-
id: `treemap_legend_${Ce.value}`,
|
|
1516
|
-
isCursorPointer: xe.value,
|
|
1517
|
-
onClickMarker: l[0] || (l[0] = ({ legend: o }) => tt(o))
|
|
1518
|
-
}, {
|
|
1519
|
-
item: S(({ legend: o, index: a }) => [
|
|
1520
|
-
y($e) ? z("", !0) : (h(), M("div", {
|
|
1521
|
-
key: 0,
|
|
1522
|
-
onClick: (n) => tt(o),
|
|
1523
|
-
style: me(`opacity:${F.value.includes(o.id) ? 0.5 : 1}`)
|
|
1524
|
-
}, vt(o.display), 13, Ta))
|
|
1525
|
-
]),
|
|
1526
|
-
legendToggle: S(() => [
|
|
1527
|
-
De.value.length > 2 && t.value.style.chart.legend.selectAllToggle.show && !y($e) ? (h(), be(Gl, {
|
|
1528
|
-
key: 0,
|
|
1529
|
-
backgroundColor: t.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1530
|
-
color: t.value.style.chart.legend.selectAllToggle.color,
|
|
1531
|
-
fontSize: t.value.style.chart.legend.fontSize,
|
|
1532
|
-
checked: F.value.length > 0,
|
|
1533
|
-
isCursorPointer: xe.value,
|
|
1534
|
-
onToggle: nl
|
|
1535
|
-
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : z("", !0)
|
|
1536
|
-
]),
|
|
1537
|
-
_: 1
|
|
1538
|
-
}, 8, ["legendSet", "config", "id", "isCursorPointer"])) : x(e.$slots, "legend", {
|
|
1539
|
-
key: 1,
|
|
1540
|
-
legend: De.value
|
|
1541
|
-
}, void 0, !0)
|
|
1542
|
-
], 512)
|
|
1543
|
-
], 8, ["to"])) : z("", !0),
|
|
1544
|
-
e.$slots.source ? (h(), M("div", {
|
|
1545
|
-
key: 7,
|
|
1546
|
-
ref_key: "source",
|
|
1547
|
-
ref: oo,
|
|
1548
|
-
dir: "auto"
|
|
1549
|
-
}, [
|
|
1550
|
-
x(e.$slots, "source", {}, void 0, !0)
|
|
1551
|
-
], 512)) : z("", !0),
|
|
1552
|
-
ct(y(m), {
|
|
1553
|
-
teleportTo: t.value.style.chart.tooltip.teleportTo,
|
|
1554
|
-
show: Z.value.showTooltip && mt.value,
|
|
1555
|
-
backgroundColor: t.value.style.chart.tooltip.backgroundColor,
|
|
1556
|
-
color: t.value.style.chart.tooltip.color,
|
|
1557
|
-
fontSize: t.value.style.chart.tooltip.fontSize,
|
|
1558
|
-
borderRadius: t.value.style.chart.tooltip.borderRadius,
|
|
1559
|
-
borderColor: t.value.style.chart.tooltip.borderColor,
|
|
1560
|
-
borderWidth: t.value.style.chart.tooltip.borderWidth,
|
|
1561
|
-
backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
|
|
1562
|
-
position: t.value.style.chart.tooltip.position,
|
|
1563
|
-
offsetY: t.value.style.chart.tooltip.offsetY,
|
|
1564
|
-
parent: se.value,
|
|
1565
|
-
content: bt.value,
|
|
1566
|
-
isFullscreen: Oe.value,
|
|
1567
|
-
isCustom: y(Bo)(t.value.style.chart.tooltip.customFormat),
|
|
1568
|
-
smooth: t.value.style.chart.tooltip.smooth,
|
|
1569
|
-
backdropFilter: t.value.style.chart.tooltip.backdropFilter,
|
|
1570
|
-
smoothForce: t.value.style.chart.tooltip.smoothForce,
|
|
1571
|
-
smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold
|
|
1572
|
-
}, {
|
|
1573
|
-
"tooltip-before": S(() => [
|
|
1574
|
-
x(e.$slots, "tooltip-before", X(j({ ...Lt.value })), void 0, !0)
|
|
1575
|
-
]),
|
|
1576
|
-
"tooltip-after": S(() => [
|
|
1577
|
-
x(e.$slots, "tooltip-after", X(j({ ...Lt.value })), void 0, !0)
|
|
1578
|
-
]),
|
|
1579
|
-
_: 3
|
|
1580
|
-
}, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1581
|
-
ke.value && t.value.userOptions.buttons.table ? (h(), be(Ml(Ue.value.component), it({ key: 8 }, Ue.value.props, {
|
|
1582
|
-
ref_key: "tableUnit",
|
|
1583
|
-
ref: He,
|
|
1584
|
-
onClose: $o
|
|
1585
|
-
}), Po({
|
|
1586
|
-
content: S(() => [
|
|
1587
|
-
(h(), be(y(g), {
|
|
1588
|
-
key: `table_${wt.value}`,
|
|
1589
|
-
colNames: ot.value.colNames,
|
|
1590
|
-
head: ot.value.head,
|
|
1591
|
-
body: ot.value.body,
|
|
1592
|
-
config: ot.value.config,
|
|
1593
|
-
title: t.value.table.useDialog ? "" : Ue.value.title,
|
|
1594
|
-
withCloseButton: !t.value.table.useDialog,
|
|
1595
|
-
isCursorPointer: xe.value,
|
|
1596
|
-
onClose: $o
|
|
1597
|
-
}, {
|
|
1598
|
-
th: S(({ th: o }) => [
|
|
1599
|
-
q("div", {
|
|
1600
|
-
innerHTML: o,
|
|
1601
|
-
style: { display: "flex", "align-items": "center" }
|
|
1602
|
-
}, null, 8, Sa)
|
|
1603
|
-
]),
|
|
1604
|
-
td: S(({ td: o }) => [
|
|
1605
|
-
dt(vt(o.name || o), 1)
|
|
1606
|
-
]),
|
|
1607
|
-
_: 1
|
|
1608
|
-
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1609
|
-
]),
|
|
1610
|
-
_: 2
|
|
1611
|
-
}, [
|
|
1612
|
-
t.value.table.useDialog ? {
|
|
1613
|
-
name: "title",
|
|
1614
|
-
fn: S(() => [
|
|
1615
|
-
dt(vt(Ue.value.title), 1)
|
|
1616
|
-
]),
|
|
1617
|
-
key: "0"
|
|
1618
|
-
} : void 0,
|
|
1619
|
-
t.value.table.useDialog ? {
|
|
1620
|
-
name: "actions",
|
|
1621
|
-
fn: S(() => [
|
|
1622
|
-
q("button", {
|
|
1623
|
-
tabindex: "0",
|
|
1624
|
-
class: "vue-ui-user-options-button",
|
|
1625
|
-
onClick: l[1] || (l[1] = (o) => Ft(t.value.userOptions.callbacks.csv)),
|
|
1626
|
-
style: me({ cursor: xe.value ? "pointer" : "default" })
|
|
1627
|
-
}, [
|
|
1628
|
-
ct(Ro, {
|
|
1629
|
-
name: "fileCsv",
|
|
1630
|
-
stroke: Ue.value.props.color
|
|
1631
|
-
}, null, 8, ["stroke"])
|
|
1632
|
-
], 4)
|
|
1633
|
-
]),
|
|
1634
|
-
key: "1"
|
|
1635
|
-
} : void 0
|
|
1636
|
-
]), 1040)) : z("", !0),
|
|
1637
|
-
x(e.$slots, "skeleton", {}, () => [
|
|
1638
|
-
y($e) ? (h(), be(Dl, { key: 0 })) : z("", !0)
|
|
1639
|
-
], !0)
|
|
1640
|
-
], 46, aa));
|
|
1641
|
-
}
|
|
1642
|
-
}, Xa = /* @__PURE__ */ Kl(Aa, [["__scopeId", "data-v-c5ea578e"]]);
|
|
1643
|
-
export {
|
|
1644
|
-
Xa as default
|
|
1645
|
-
};
|