vue-data-ui 2.4.1 → 2.4.3
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 +44 -44
- package/dist/{Arrow-BIs_9yK8.js → Arrow-C7lNL7sY.js} +1 -1
- package/dist/{Arrow-DpMf3yPs.cjs → Arrow-Dz6AomGr.cjs} +1 -1
- package/dist/{BaseIcon-CXDdkPfN.js → BaseIcon-BbvG1AlW.js} +7 -4
- package/dist/BaseIcon-uALK38Ov.cjs +1 -0
- package/dist/{DataTable-BTgMVOwp.cjs → DataTable-DTzynbND.cjs} +1 -1
- package/dist/{DataTable-DL2agEJ3.js → DataTable-DYqC2pqu.js} +2 -2
- package/dist/{Legend-Dj9KiaLv.cjs → Legend-Cgw4lO2O.cjs} +1 -1
- package/dist/{Legend-DXLiSLHd.js → Legend-DNgTCgEK.js} +1 -1
- package/dist/{PackageVersion-D4D0WicU.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
- package/dist/{PackageVersion-DtnhR89q.js → PackageVersion-VkaUzgmt.js} +1 -1
- package/dist/PenAndPaper-CDFVOo7X.cjs +1 -0
- package/dist/PenAndPaper-DAZYA8Ew.js +269 -0
- package/dist/{Shape-CO_Ak9Zm.js → Shape-Bwon0l0g.js} +1 -1
- package/dist/{Shape-7EC2UKDK.cjs → Shape-D2Dpshg1.cjs} +1 -1
- package/dist/{Slicer-BZfUZr1J.js → Slicer-TfpN2Cr4.js} +3 -3
- package/dist/{Slicer-CLAVjSQP.cjs → Slicer-uSjfNJjG.cjs} +1 -1
- package/dist/{Title-C-lm3Mkl.cjs → Title-0Tp4hZ4u.cjs} +1 -1
- package/dist/{Title-DYNLqCCT.js → Title-C5pIfQAz.js} +1 -1
- package/dist/{Tooltip-t-3mVhcz.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
- package/dist/{Tooltip-CICAYyQj.js → Tooltip-Cz24YLfw.js} +1 -1
- package/dist/{index-DDXisDKy.js → index-Bya_q1J-.js} +883 -842
- package/dist/index-eFox7weK.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +22 -17
- package/dist/types/vue-data-ui.d.ts +22 -17
- package/dist/{useNestedProp-S1UXxUgm.js → useNestedProp-B33hazbH.js} +1 -1
- package/dist/{useNestedProp-CC9zGr7C.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
- package/dist/usePrinter-CSRFnDBU.cjs +1 -0
- package/dist/{usePrinter-8ofTb2MJ.js → usePrinter-CiHd1FwD.js} +230 -185
- package/dist/useResponsive-BY8tgM1n.js +188 -0
- package/dist/useResponsive-CodiGUOE.cjs +1 -0
- package/dist/vue-data-ui-BTtxyUc3.cjs +9 -0
- package/dist/vue-data-ui-Bduq4f2p.js +261 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-B-P7PMHs.cjs +19 -0
- package/dist/{vue-ui-3d-bar-DcF1nyGW.js → vue-ui-3d-bar-BUEq_VdY.js} +421 -390
- package/dist/{vue-ui-accordion-D_1fE5EF.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
- package/dist/{vue-ui-accordion-Cc9958th.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Oe_yHDL0.js → vue-ui-age-pyramid-CH72tAMb.js} +255 -222
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
- package/dist/{vue-ui-annotator-Dix6_Gm6.js → vue-ui-annotator-DPeJ2its.js} +1 -1
- package/dist/{vue-ui-annotator-Dbp6cWMr.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
- package/dist/vue-ui-bullet-CtP3MlUT.js +464 -0
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
- package/dist/{vue-ui-candlestick-CRwzWF6j.js → vue-ui-candlestick-DDil13a0.js} +278 -245
- package/dist/{vue-ui-carousel-table-BHeEbRKY.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
- package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
- package/dist/{vue-ui-chestnut-CRk0RCB9.js → vue-ui-chestnut-BczSJF6S.js} +322 -291
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
- package/dist/{vue-ui-cursor-lU1rts1B.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
- package/dist/{vue-ui-cursor-y0kdr0uA.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
- package/dist/{vue-ui-dashboard-OyihaKdu.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
- package/dist/{vue-ui-dashboard-BfC0jS-X.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
- package/dist/{vue-ui-digits-IKt4qT2-.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
- package/dist/{vue-ui-digits-BJfcAiq_.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
- package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
- package/dist/{vue-ui-donut-DFaGk4fI.js → vue-ui-donut-DUcp-fat.js} +376 -343
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Dd4o37RP.js → vue-ui-donut-evolution-C_YMbTwq.js} +375 -344
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
- package/dist/{vue-ui-dumbbell-B7j1_JoQ.js → vue-ui-dumbbell-Buwngz_V.js} +294 -261
- package/dist/vue-ui-flow-Bz3c0K5P.js +515 -0
- package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
- package/dist/{vue-ui-galaxy-CH1BDtWl.js → vue-ui-galaxy-Cjh0XGTX.js} +212 -181
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
- package/dist/vue-ui-gauge-B1UvGkQa.js +527 -0
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
- package/dist/{vue-ui-gizmo-DVwQaEH1.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CKQcbe_7.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
- package/dist/{vue-ui-heatmap-B-zWMk0Y.js → vue-ui-heatmap-C-poazUw.js} +308 -277
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
- package/dist/{vue-ui-kpi-CghbfSdM.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
- package/dist/{vue-ui-kpi-CuY3xlVq.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C7roqZ4p.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
- package/dist/{vue-ui-mini-loader-CH_PfeDc.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
- package/dist/vue-ui-molecule-BaJpDZND.js +805 -0
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DSznHxLS.js → vue-ui-mood-radar-BUNDwsEI.js} +259 -228
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-CiE4DdEQ.js → vue-ui-nested-donuts-mDy2hXa6.js} +371 -338
- package/dist/vue-ui-onion-DwFG3HAI.js +650 -0
- package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
- package/dist/vue-ui-parallel-coordinate-plot-ImET_zeo.js +719 -0
- package/dist/{vue-ui-quadrant-Cs3A77us.js → vue-ui-quadrant-BeveRihK.js} +359 -326
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CiiSUexi.js → vue-ui-quick-chart-DAhllTfa.js} +585 -552
- package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +15 -0
- package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
- package/dist/{vue-ui-radar-CNSpiNrM.js → vue-ui-radar-BllatzRa.js} +279 -246
- package/dist/{vue-ui-rating-GoUNDOdZ.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
- package/dist/{vue-ui-rating-b_iYZWF8.js → vue-ui-rating-D1ykV4xO.js} +2 -2
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
- package/dist/vue-ui-relation-circle-xv2l5Be9.js +358 -0
- package/dist/vue-ui-rings-B-ZcX6y1.js +602 -0
- package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
- package/dist/{vue-ui-scatter-CVuoW-cD.js → vue-ui-scatter-DG43ck1g.js} +440 -407
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
- package/dist/{vue-ui-screenshot-Co2o48d6.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Csc0dQL9.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
- package/dist/{vue-ui-skeleton-B2sRnIXX.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
- package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
- package/dist/{vue-ui-smiley-Ci3uMgVh.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
- package/dist/{vue-ui-smiley-D4s-AdIE.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
- package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CHKQGMLs.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
- package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
- package/dist/{vue-ui-sparkbar-Bb1fq2GR.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
- package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-DWuaAQbo.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
- package/dist/{vue-ui-sparkhistogram-CjeJ3ch1.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
- package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
- package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
- package/dist/{vue-ui-sparkline-DGJDBArr.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
- package/dist/{vue-ui-sparkstackbar-B3ul3qUZ.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
- package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
- package/dist/vue-ui-stackbar-ByOuJSdM.js +947 -0
- package/dist/vue-ui-stackbar-wun4S3C0.cjs +6 -0
- package/dist/{vue-ui-strip-plot-CIb2LSV8.js → vue-ui-strip-plot-CMD0MSqY.js} +297 -264
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
- package/dist/{vue-ui-table-CmVi0nv2.js → vue-ui-table-B75DJ39t.js} +1 -1
- package/dist/{vue-ui-table-B_sFrAO9.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CgFr38QT.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
- package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-eg2Qd8ws.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
- package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
- package/dist/vue-ui-thermometer-Pq4PvSIP.js +447 -0
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
- package/dist/{vue-ui-timer-DM1IStj1.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
- package/dist/{vue-ui-timer-COSI3Q5T.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
- package/dist/vue-ui-tiremarks-CU9HJIqf.js +310 -0
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
- package/dist/vue-ui-treemap-DY-lRAhC.js +825 -0
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
- package/dist/vue-ui-vertical-bar-CtnIKsM1.js +861 -0
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
- package/dist/vue-ui-waffle-reOsx-gJ.js +791 -0
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
- package/dist/vue-ui-wheel-kYxny3vn.js +291 -0
- package/dist/vue-ui-word-cloud-DbMqrHAf.js +607 -0
- package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
- package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-BYdTxzi6.js → vue-ui-xy-canvas-B0HTR7OV.js} +441 -408
- package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
- package/dist/{vue-ui-xy-x8KEsGV-.js → vue-ui-xy-rbACig0h.js} +824 -791
- package/package.json +1 -1
- package/dist/BaseIcon-E7FmzMcY.cjs +0 -1
- package/dist/index-C7_6YjWN.cjs +0 -9
- package/dist/usePrinter-8EP4iaGm.cjs +0 -1
- package/dist/useResponsive-B3TrDDIG.cjs +0 -1
- package/dist/useResponsive-NZB-WLRF.js +0 -187
- package/dist/vue-data-ui-4Yd255Ia.cjs +0 -9
- package/dist/vue-data-ui-Cp7bO_tj.js +0 -258
- package/dist/vue-ui-3d-bar-BeR2aBgQ.cjs +0 -19
- package/dist/vue-ui-age-pyramid-R-C4P4mI.cjs +0 -1
- package/dist/vue-ui-bullet-CQKaC4wG.js +0 -409
- package/dist/vue-ui-bullet-DSZox236.cjs +0 -23
- package/dist/vue-ui-candlestick-Dilozp3V.cjs +0 -2
- package/dist/vue-ui-carousel-table-C0GDDSW9.cjs +0 -1
- package/dist/vue-ui-chestnut-DdEcEI04.cjs +0 -6
- package/dist/vue-ui-donut-DTSVlGMg.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BuUafabD.cjs +0 -1
- package/dist/vue-ui-dumbbell-CVfgnyKi.cjs +0 -9
- package/dist/vue-ui-flow-C45dODaB.cjs +0 -1
- package/dist/vue-ui-flow-DkPTzNv9.js +0 -484
- package/dist/vue-ui-galaxy-DlPavMK0.cjs +0 -1
- package/dist/vue-ui-gauge-BXiy515T.js +0 -494
- package/dist/vue-ui-gauge-vMFUYHYH.cjs +0 -1
- package/dist/vue-ui-heatmap-CMQqQnxc.cjs +0 -1
- package/dist/vue-ui-molecule-BwmkMEVN.js +0 -774
- package/dist/vue-ui-molecule-nOuD0hR5.cjs +0 -1
- package/dist/vue-ui-mood-radar-Bof_C9Ae.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DIb6YyWv.cjs +0 -17
- package/dist/vue-ui-onion-D9o6Rcgu.js +0 -617
- package/dist/vue-ui-onion-N3tRNc4u.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BcYrYXhG.js +0 -686
- package/dist/vue-ui-parallel-coordinate-plot-qKGk2bX6.cjs +0 -8
- package/dist/vue-ui-quadrant-Do48rGrX.cjs +0 -1
- package/dist/vue-ui-quick-chart-BxU4d-sJ.cjs +0 -15
- package/dist/vue-ui-radar-CooAvwPA.cjs +0 -1
- package/dist/vue-ui-relation-circle-nRf1pvD0.js +0 -325
- package/dist/vue-ui-relation-circle-uNgJni4x.cjs +0 -1
- package/dist/vue-ui-rings-BgRc1o4_.js +0 -569
- package/dist/vue-ui-rings-iIgQI9Ws.cjs +0 -2
- package/dist/vue-ui-scatter-CkrpmLxP.cjs +0 -1
- package/dist/vue-ui-skeleton-CGV1dEUD.cjs +0 -41
- package/dist/vue-ui-spark-trend-BfoEoJEy.cjs +0 -1
- package/dist/vue-ui-sparkbar-DB2DeXti.cjs +0 -1
- package/dist/vue-ui-sparkgauge-CJepIY2u.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B7B36LLT.cjs +0 -1
- package/dist/vue-ui-sparkline-BcqmwDAb.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-DT3aKNeV.cjs +0 -1
- package/dist/vue-ui-stackbar-CRcUugkl.cjs +0 -6
- package/dist/vue-ui-stackbar-DNROvZII.js +0 -915
- package/dist/vue-ui-strip-plot-Ck9Fmt_b.cjs +0 -1
- package/dist/vue-ui-table-heatmap-Chvdf2Gi.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DUUYQ5dH.cjs +0 -1
- package/dist/vue-ui-thermometer-BFfN4aat.cjs +0 -1
- package/dist/vue-ui-thermometer-BePmFiwy.js +0 -416
- package/dist/vue-ui-tiremarks-BkYXzU3R.cjs +0 -1
- package/dist/vue-ui-tiremarks-d6TmSHY7.js +0 -279
- package/dist/vue-ui-treemap-BgeZnbl3.cjs +0 -1
- package/dist/vue-ui-treemap-Qg0858o6.js +0 -792
- package/dist/vue-ui-vertical-bar-CieqHVD5.js +0 -828
- package/dist/vue-ui-vertical-bar-D3atbdvl.cjs +0 -4
- package/dist/vue-ui-waffle-CD7C9Lu4.cjs +0 -1
- package/dist/vue-ui-waffle-CjNhM-mV.js +0 -758
- package/dist/vue-ui-wheel-B8mbO6ht.js +0 -258
- package/dist/vue-ui-wheel-CYmM7J61.cjs +0 -1
- package/dist/vue-ui-word-cloud-DMXrUmX5.js +0 -574
- package/dist/vue-ui-word-cloud-Dm9yZ1zQ.cjs +0 -1
- package/dist/vue-ui-xy-DoWnidom.cjs +0 -3
- package/dist/vue-ui-xy-canvas-DHs5sb3t.cjs +0 -9
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
import { computed as k, ref as p, watch as Je, onMounted as Ke, onBeforeUnmount as Qe, openBlock as y, createElementBlock as C, normalizeClass as Ne, normalizeStyle as B, createBlock as U, createCommentVNode as F, unref as b, createSlots as et, withCtx as x, renderSlot as $, normalizeProps as G, guardReactiveProps as X, createVNode as ze, Fragment as Pe, renderList as Ae, createElementVNode as O, toDisplayString as Y, createTextVNode as Ie, nextTick as tt, pushScopeId as ot, popScopeId as lt } from "vue";
|
|
2
|
+
import { u as at, c as Fe, t as nt, a as st, p as T, b as rt, o as ut, e as it, d as ae, i as ne, f as K, X as ct, l as Le, F as Re, x as De, y as dt, q as vt, r as ht } from "./index-Bya_q1J-.js";
|
|
3
|
+
import { _ as ft } from "./Title-C5pIfQAz.js";
|
|
4
|
+
import { u as pt, U as gt } from "./usePrinter-CiHd1FwD.js";
|
|
5
|
+
import { _ as yt } from "./Tooltip-Cz24YLfw.js";
|
|
6
|
+
import { L as mt } from "./Legend-DNgTCgEK.js";
|
|
7
|
+
import bt from "./vue-ui-skeleton-BYssP0K4.js";
|
|
8
|
+
import { D as wt } from "./DataTable-DYqC2pqu.js";
|
|
9
|
+
import kt from "./vue-ui-accordion-DfUfL2dI.js";
|
|
10
|
+
import { t as Ct, u as $t } from "./useResponsive-BY8tgM1n.js";
|
|
11
|
+
import { u as Me } from "./useNestedProp-B33hazbH.js";
|
|
12
|
+
import { _ as xt } from "./PackageVersion-VkaUzgmt.js";
|
|
13
|
+
import { P as Tt } from "./PenAndPaper-DAZYA8Ew.js";
|
|
14
|
+
import { _ as _t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
function Ve(a, i) {
|
|
16
|
+
const s = a.length;
|
|
17
|
+
if (s === 0)
|
|
18
|
+
throw new Error(`Max aspect ratio cannot be computed: ${a} is an empty array`);
|
|
19
|
+
{
|
|
20
|
+
let n = 1 / 0, u = -1 / 0, c = 0;
|
|
21
|
+
for (let h = 0; h < s; h += 1) {
|
|
22
|
+
const v = a[h].normalizedValue;
|
|
23
|
+
v < n && (n = v), v > u && (u = v), c += v;
|
|
24
|
+
}
|
|
25
|
+
return Math.max(
|
|
26
|
+
i ** 2 * u / c ** 2,
|
|
27
|
+
c ** 2 / (i ** 2 * n)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function Be(a) {
|
|
32
|
+
const { xOffset: i, yOffset: s, width: n, height: u } = a;
|
|
33
|
+
return {
|
|
34
|
+
x0: i,
|
|
35
|
+
y0: s,
|
|
36
|
+
x1: i + n,
|
|
37
|
+
y1: s + u
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function Ot(a, i, s) {
|
|
41
|
+
if (a.length === 0)
|
|
42
|
+
return !0;
|
|
43
|
+
{
|
|
44
|
+
const n = a.concat(i), u = Ve(
|
|
45
|
+
a,
|
|
46
|
+
s
|
|
47
|
+
), c = Ve(n, s);
|
|
48
|
+
return u >= c;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function St(a) {
|
|
52
|
+
const i = [], s = a.length;
|
|
53
|
+
for (let n = 0; n < s; n += 1) {
|
|
54
|
+
const u = a[n], c = u.length;
|
|
55
|
+
for (let d = 0; d < c; d += 1)
|
|
56
|
+
i.push(u[d]);
|
|
57
|
+
}
|
|
58
|
+
return i;
|
|
59
|
+
}
|
|
60
|
+
function Nt(a, i) {
|
|
61
|
+
const s = {
|
|
62
|
+
...i,
|
|
63
|
+
children: a
|
|
64
|
+
};
|
|
65
|
+
return He(s);
|
|
66
|
+
}
|
|
67
|
+
function zt(a) {
|
|
68
|
+
return (a.x1 - a.x0) * (a.y1 - a.y0);
|
|
69
|
+
}
|
|
70
|
+
function We(a, i) {
|
|
71
|
+
const { width: s, height: n, xOffset: u, yOffset: c } = ce(i), d = a.length, h = a.map((f) => f.normalizedValue || 0).reduce((f, _) => f + _, 0), v = h / n, S = h / s;
|
|
72
|
+
let w = u, N = c;
|
|
73
|
+
const g = [];
|
|
74
|
+
if (s >= n) {
|
|
75
|
+
for (let f = 0; f < d; f += 1) {
|
|
76
|
+
const _ = a[f], z = N + _.normalizedValue / v, R = {
|
|
77
|
+
x0: w,
|
|
78
|
+
y0: N,
|
|
79
|
+
x1: w + v,
|
|
80
|
+
y1: z
|
|
81
|
+
}, P = Object.assign({}, _, R);
|
|
82
|
+
N = z, g.push(P);
|
|
83
|
+
}
|
|
84
|
+
return g;
|
|
85
|
+
} else {
|
|
86
|
+
for (let f = 0; f < d; f += 1) {
|
|
87
|
+
const _ = a[f], z = w + _.normalizedValue / S, R = {
|
|
88
|
+
x0: w,
|
|
89
|
+
y0: N,
|
|
90
|
+
x1: z,
|
|
91
|
+
y1: N + S
|
|
92
|
+
}, P = Object.assign({}, _, R);
|
|
93
|
+
w = z, g.push(P);
|
|
94
|
+
}
|
|
95
|
+
return g;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function Pt(a) {
|
|
99
|
+
const i = ce(a), s = i.width, n = i.height;
|
|
100
|
+
return Math.min(s, n);
|
|
101
|
+
}
|
|
102
|
+
function At(a, i) {
|
|
103
|
+
const s = a.length, n = a.map((v) => v.value ?? 0).reduce((v, S) => v + S, 0), u = i / n, c = [];
|
|
104
|
+
let d, h;
|
|
105
|
+
for (let v = 0; v < s; v += 1)
|
|
106
|
+
h = a[v], d = Object.assign({}, h, {
|
|
107
|
+
normalizedValue: h.value * (u || 0)
|
|
108
|
+
}), c.push(d);
|
|
109
|
+
return c;
|
|
110
|
+
}
|
|
111
|
+
function ce(a) {
|
|
112
|
+
const { x0: i, y0: s, x1: n, y1: u } = a;
|
|
113
|
+
return {
|
|
114
|
+
xOffset: i,
|
|
115
|
+
yOffset: s,
|
|
116
|
+
width: n - i,
|
|
117
|
+
height: u - s
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function It(a, i, s, n) {
|
|
121
|
+
let u = a, c = i, d = s, h = n;
|
|
122
|
+
for (; ; ) {
|
|
123
|
+
const v = u.length;
|
|
124
|
+
if (v === 0) {
|
|
125
|
+
const g = We(c, d);
|
|
126
|
+
return h.concat(g);
|
|
127
|
+
}
|
|
128
|
+
const S = Pt(d), w = u[0], N = u.slice(1, v);
|
|
129
|
+
if (Ot(c, w, S)) {
|
|
130
|
+
const g = c.concat(w);
|
|
131
|
+
u = N, c = g, d = d, h = h;
|
|
132
|
+
} else {
|
|
133
|
+
const g = c.length;
|
|
134
|
+
let f = 0;
|
|
135
|
+
for (let P = 0; P < g; P += 1)
|
|
136
|
+
f += c[P].normalizedValue;
|
|
137
|
+
const _ = Ft(d, f), z = We(c, d), R = h.concat(z);
|
|
138
|
+
u = u, c = [], d = _, h = R;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function He(a) {
|
|
143
|
+
if (typeof a.children > "u" || !a.children.length)
|
|
144
|
+
return [a];
|
|
145
|
+
{
|
|
146
|
+
const i = At(
|
|
147
|
+
a.children,
|
|
148
|
+
zt(a)
|
|
149
|
+
), s = It(i, [], a, []), n = s.length, u = [];
|
|
150
|
+
for (let d = 0; d < n; d += 1)
|
|
151
|
+
u.push(He(s[d]));
|
|
152
|
+
return St(u);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function Ft(a, i) {
|
|
156
|
+
const { width: s, height: n, xOffset: u, yOffset: c } = ce(a);
|
|
157
|
+
if (s >= n) {
|
|
158
|
+
const d = i / n, h = s - d, v = {
|
|
159
|
+
xOffset: u + d,
|
|
160
|
+
yOffset: c,
|
|
161
|
+
width: h,
|
|
162
|
+
height: n
|
|
163
|
+
};
|
|
164
|
+
return Be(v);
|
|
165
|
+
} else {
|
|
166
|
+
const d = i / s, h = n - d, v = {
|
|
167
|
+
xOffset: u,
|
|
168
|
+
yOffset: c + d,
|
|
169
|
+
width: s,
|
|
170
|
+
height: h
|
|
171
|
+
};
|
|
172
|
+
return Be(v);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const Lt = (a) => (ot("data-v-b9bc8597"), a = a(), lt(), a), Rt = ["id"], Dt = ["xmlns", "viewBox"], Mt = { key: 0 }, Vt = ["id"], Bt = ["stop-color"], Wt = ["stop-color"], Ht = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter"], Et = ["x", "y", "height", "width"], Ut = {
|
|
176
|
+
style: { width: "100%", height: "100%" },
|
|
177
|
+
class: "vue-ui-treemap-cell"
|
|
178
|
+
}, Gt = /* @__PURE__ */ Lt(() => /* @__PURE__ */ O("br", null, null, -1)), Xt = {
|
|
179
|
+
key: 4,
|
|
180
|
+
class: "vue-data-ui-watermark"
|
|
181
|
+
}, qt = ["onClick"], jt = { key: 0 }, Yt = { key: 1 }, Zt = ["innerHTML"], Jt = {
|
|
182
|
+
__name: "vue-ui-treemap",
|
|
183
|
+
props: {
|
|
184
|
+
config: {
|
|
185
|
+
type: Object,
|
|
186
|
+
default() {
|
|
187
|
+
return {};
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
dataset: {
|
|
191
|
+
type: Array,
|
|
192
|
+
default() {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
198
|
+
setup(a, { expose: i, emit: s }) {
|
|
199
|
+
const n = a, { vue_ui_treemap: u } = at(), c = k(() => !!n.dataset && n.dataset.length), d = k(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), h = p(Fe()), v = p(!1), S = p(""), w = p(!1), N = p(0), g = p([]), f = p(null), _ = p(null), z = p(null), R = p(null), P = p(0), de = p(0), ve = p(0), e = k({
|
|
200
|
+
get: () => he(),
|
|
201
|
+
set: (t) => t
|
|
202
|
+
});
|
|
203
|
+
function he() {
|
|
204
|
+
const t = Me({
|
|
205
|
+
userConfig: n.config,
|
|
206
|
+
defaultConfig: u
|
|
207
|
+
});
|
|
208
|
+
return t.theme ? {
|
|
209
|
+
...Me({
|
|
210
|
+
userConfig: nt.vue_ui_treemap[t.theme] || n.config,
|
|
211
|
+
defaultConfig: t
|
|
212
|
+
}),
|
|
213
|
+
customPalette: st[t.theme] || T
|
|
214
|
+
} : t;
|
|
215
|
+
}
|
|
216
|
+
Je(() => n.config, (t) => {
|
|
217
|
+
e.value = he(), P.value += 1, de.value += 1, ve.value += 1;
|
|
218
|
+
}, { deep: !0 });
|
|
219
|
+
const { isPrinting: fe, isImaging: pe, generatePdf: ge, generateImage: ye } = pt({
|
|
220
|
+
elementId: `treemap_${h.value}`,
|
|
221
|
+
fileName: e.value.style.chart.title.text || "vue-ui-treemap"
|
|
222
|
+
}), Q = k(() => rt(e.value.customPalette)), D = p({
|
|
223
|
+
showTable: e.value.table.show,
|
|
224
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
225
|
+
}), M = p({
|
|
226
|
+
height: e.value.style.chart.height,
|
|
227
|
+
width: e.value.style.chart.width
|
|
228
|
+
}), W = k(() => ({
|
|
229
|
+
bottom: M.value.height - e.value.style.chart.padding.bottom,
|
|
230
|
+
height: M.value.height - e.value.style.chart.padding.top - e.value.style.chart.padding.bottom,
|
|
231
|
+
left: e.value.style.chart.padding.left,
|
|
232
|
+
right: M.value.width - e.value.style.chart.padding.right,
|
|
233
|
+
top: e.value.style.chart.padding.top,
|
|
234
|
+
vbHeight: M.value.height,
|
|
235
|
+
vbWidth: M.value.width,
|
|
236
|
+
width: M.value.width - e.value.style.chart.padding.left - e.value.style.chart.padding.right
|
|
237
|
+
}));
|
|
238
|
+
function me(t) {
|
|
239
|
+
t.forEach((l, o) => {
|
|
240
|
+
l.id = Fe(), l.color = ae(l.color) || Q.value[o] || T[o] || T[o % T.length], l.children && (l.children.forEach((r) => {
|
|
241
|
+
r.parentId = l.id, r.color = l.color;
|
|
242
|
+
}), me(l.children));
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
const H = p(n.dataset), ee = p(null);
|
|
246
|
+
Ke(() => {
|
|
247
|
+
Ee();
|
|
248
|
+
});
|
|
249
|
+
function Ee() {
|
|
250
|
+
if (ut(n.dataset) && it({
|
|
251
|
+
componentName: "VueUiTreemap",
|
|
252
|
+
type: "dataset"
|
|
253
|
+
}), me(H.value), e.value.responsive) {
|
|
254
|
+
const t = Ct(() => {
|
|
255
|
+
const { width: l, height: o } = $t({
|
|
256
|
+
chart: f.value,
|
|
257
|
+
title: e.value.style.chart.title.text ? _.value : null,
|
|
258
|
+
legend: e.value.style.chart.legend.show ? z.value : null,
|
|
259
|
+
source: R.value
|
|
260
|
+
});
|
|
261
|
+
M.value.width = l, M.value.height = o;
|
|
262
|
+
});
|
|
263
|
+
ee.value = new ResizeObserver(t), ee.value.observe(f.value.parentNode);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
Qe(() => {
|
|
267
|
+
ee.value && ee.value.disconnect();
|
|
268
|
+
});
|
|
269
|
+
const se = p(H.value), Z = k(() => se.value.map((t, l) => ({
|
|
270
|
+
...t,
|
|
271
|
+
color: ae(t.color) || Q.value[l] || T[l] || T[l % T.length]
|
|
272
|
+
})).filter((t) => !g.value.includes(t.id))), q = k(() => H.value.filter((t) => !g.value.includes(t.id)).map((t) => t.value || 0).reduce((t, l) => t + l, 0)), be = k({
|
|
273
|
+
get() {
|
|
274
|
+
let t = [...Z.value];
|
|
275
|
+
return e.value.style.chart.layout.sorted && (t = [...Z.value].sort((l, o) => o.value - l.value)), t.map((l) => ({
|
|
276
|
+
...l
|
|
277
|
+
}));
|
|
278
|
+
},
|
|
279
|
+
set(t) {
|
|
280
|
+
return t;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
function we(t, l) {
|
|
284
|
+
return t.value / l;
|
|
285
|
+
}
|
|
286
|
+
function Ue(t, l, o) {
|
|
287
|
+
const r = e.value.style.chart.layout.rects.colorRatio - we(l, o);
|
|
288
|
+
return Le(t, r < 0 ? 0 : r);
|
|
289
|
+
}
|
|
290
|
+
function ke(t, l, o, r) {
|
|
291
|
+
return t.map((m, V) => {
|
|
292
|
+
const le = Ue(ae(l) || Q.value[V] || T[V] || T[V % T.length], m, r), Ze = we(m, r);
|
|
293
|
+
return {
|
|
294
|
+
...m,
|
|
295
|
+
color: le,
|
|
296
|
+
proportion: Ze,
|
|
297
|
+
parentName: o,
|
|
298
|
+
children: m.children ? ke(m.children, le, m.name, r) : void 0
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
const J = k(() => Nt(
|
|
303
|
+
be.value.map((t, l) => {
|
|
304
|
+
const o = t.children ? t.children.reduce((r, m) => r + m.value, 0) : t.value;
|
|
305
|
+
return {
|
|
306
|
+
value: t.value,
|
|
307
|
+
id: t.id,
|
|
308
|
+
children: t.children ? ke(t.children.sort((r, m) => m.value - r.value), t.color, t.name, o) : void 0,
|
|
309
|
+
color: t.color,
|
|
310
|
+
name: t.name
|
|
311
|
+
};
|
|
312
|
+
}),
|
|
313
|
+
{ x0: W.value.left * 2, y0: W.value.top, x1: W.value.width, y1: W.value.height }
|
|
314
|
+
));
|
|
315
|
+
function Ce({ y0: t, y1: l }) {
|
|
316
|
+
return l - t <= 0 ? 1e-4 : l - t;
|
|
317
|
+
}
|
|
318
|
+
function $e({ x0: t, x1: l }) {
|
|
319
|
+
return l - t <= 0 ? 1e-4 : l - t;
|
|
320
|
+
}
|
|
321
|
+
function E(t) {
|
|
322
|
+
const l = e.value.style.chart.layout.labels.fontSize * (t.proportion * 2 > 1 ? 1 : t.proportion * 2);
|
|
323
|
+
return l < e.value.style.chart.layout.labels.minFontSize ? e.value.style.chart.layout.labels.minFontSize : l;
|
|
324
|
+
}
|
|
325
|
+
function Ge(t) {
|
|
326
|
+
w.value = t, N.value += 1;
|
|
327
|
+
}
|
|
328
|
+
const j = k(() => ({
|
|
329
|
+
startX: 0,
|
|
330
|
+
startY: 0,
|
|
331
|
+
width: W.value.vbWidth,
|
|
332
|
+
height: W.value.vbHeight
|
|
333
|
+
})), A = p(!1);
|
|
334
|
+
function re(t, l = H.value) {
|
|
335
|
+
for (const o of l) {
|
|
336
|
+
if (o.id === t)
|
|
337
|
+
return o;
|
|
338
|
+
if (o.children) {
|
|
339
|
+
const r = re(t, o.children);
|
|
340
|
+
if (r)
|
|
341
|
+
return r;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
function Xe(t) {
|
|
347
|
+
if (A.value)
|
|
348
|
+
s("selectDatapoint", void 0), se.value = H.value;
|
|
349
|
+
else {
|
|
350
|
+
if (s("selectDatapoint", t), !re(t.parentId))
|
|
351
|
+
return;
|
|
352
|
+
se.value = [re(t.parentId)];
|
|
353
|
+
}
|
|
354
|
+
A.value = !A.value;
|
|
355
|
+
}
|
|
356
|
+
const I = p(null), xe = k(() => H.value.map((t, l) => ({
|
|
357
|
+
...t,
|
|
358
|
+
color: ae(t.color) || Q.value[l] || T[l] || T[l % T.length],
|
|
359
|
+
shape: "square"
|
|
360
|
+
})).sort((t, l) => l.value - t.value).map((t, l) => ({
|
|
361
|
+
...t,
|
|
362
|
+
proportion: t.value / H.value.map((o) => o.value).reduce((o, r) => o + r, 0),
|
|
363
|
+
opacity: g.value.includes(t.id) ? 0.5 : 1
|
|
364
|
+
}))), qe = k(() => ({
|
|
365
|
+
cy: "treemap-div-legend",
|
|
366
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
367
|
+
color: e.value.style.chart.legend.color,
|
|
368
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
369
|
+
paddingBottom: 12,
|
|
370
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
371
|
+
}));
|
|
372
|
+
function Te(t) {
|
|
373
|
+
A.value = !1, I.value = null, g.value.includes(t.id) ? g.value = g.value.filter((l) => l !== t.id) : g.value.length < n.dataset.length - 1 && g.value.push(t.id), s("selectLegend", be.value);
|
|
374
|
+
}
|
|
375
|
+
const ue = p(null);
|
|
376
|
+
function je({ datapoint: t, seriesIndex: l }) {
|
|
377
|
+
I.value = t, ue.value = { datapoint: t, seriesIndex: l, config: e.value, series: Z.value };
|
|
378
|
+
const o = e.value.style.chart.tooltip.customFormat;
|
|
379
|
+
if (De(o) && dt(() => o({
|
|
380
|
+
seriesIndex: l,
|
|
381
|
+
datapoint: t,
|
|
382
|
+
series: Z.value,
|
|
383
|
+
config: e.value
|
|
384
|
+
})))
|
|
385
|
+
S.value = o({
|
|
386
|
+
seriesIndex: l,
|
|
387
|
+
datapoint: t,
|
|
388
|
+
series: Z.value,
|
|
389
|
+
config: e.value
|
|
390
|
+
});
|
|
391
|
+
else {
|
|
392
|
+
let r = "";
|
|
393
|
+
r += `<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>`, r += `<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>`, r += `<b>${ne(
|
|
394
|
+
e.value.style.chart.layout.labels.formatter,
|
|
395
|
+
t.value,
|
|
396
|
+
K({
|
|
397
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
398
|
+
v: t.value,
|
|
399
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
400
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
401
|
+
}),
|
|
402
|
+
{ datapoint: t, seriesIndex: l }
|
|
403
|
+
)}</b>`, S.value = `<div>${r}</div>`;
|
|
404
|
+
}
|
|
405
|
+
v.value = !0;
|
|
406
|
+
}
|
|
407
|
+
const L = k(() => {
|
|
408
|
+
const t = J.value.map((o) => ({
|
|
409
|
+
name: o.name,
|
|
410
|
+
color: o.color
|
|
411
|
+
})), l = J.value.map((o) => o.value);
|
|
412
|
+
return { head: t, body: l };
|
|
413
|
+
});
|
|
414
|
+
function _e() {
|
|
415
|
+
tt(() => {
|
|
416
|
+
const t = L.value.head.map((r, m) => [[
|
|
417
|
+
r.name
|
|
418
|
+
], [L.value.body[m]], [isNaN(L.value.body[m] / q.value) ? "-" : L.value.body[m] / q.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), o = vt(l);
|
|
419
|
+
ht({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-treemap" });
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
const te = k(() => {
|
|
423
|
+
const t = [
|
|
424
|
+
e.value.table.columnNames.series,
|
|
425
|
+
e.value.table.columnNames.value,
|
|
426
|
+
e.value.table.columnNames.percentage
|
|
427
|
+
], l = L.value.head.map((m, V) => {
|
|
428
|
+
const le = ne(
|
|
429
|
+
e.value.style.chart.layout.labels.formatter,
|
|
430
|
+
L.value.body[V],
|
|
431
|
+
K({
|
|
432
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
433
|
+
v: L.value.body[V],
|
|
434
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
435
|
+
r: e.value.table.td.roundingValue
|
|
436
|
+
})
|
|
437
|
+
);
|
|
438
|
+
return [
|
|
439
|
+
{
|
|
440
|
+
color: m.color,
|
|
441
|
+
name: m.name,
|
|
442
|
+
shape: "square"
|
|
443
|
+
},
|
|
444
|
+
le,
|
|
445
|
+
isNaN(L.value.body[V] / q.value) ? "-" : K({
|
|
446
|
+
v: L.value.body[V] / q.value * 100,
|
|
447
|
+
s: "%",
|
|
448
|
+
r: e.value.table.td.roundingPercentage
|
|
449
|
+
})
|
|
450
|
+
];
|
|
451
|
+
}), o = {
|
|
452
|
+
th: {
|
|
453
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
454
|
+
color: e.value.table.th.color,
|
|
455
|
+
outline: e.value.table.th.outline
|
|
456
|
+
},
|
|
457
|
+
td: {
|
|
458
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
459
|
+
color: e.value.table.td.color,
|
|
460
|
+
outline: e.value.table.td.outline
|
|
461
|
+
},
|
|
462
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
463
|
+
};
|
|
464
|
+
return {
|
|
465
|
+
colNames: [
|
|
466
|
+
e.value.table.columnNames.series,
|
|
467
|
+
e.value.table.columnNames.value
|
|
468
|
+
],
|
|
469
|
+
head: t,
|
|
470
|
+
body: l,
|
|
471
|
+
config: o
|
|
472
|
+
};
|
|
473
|
+
});
|
|
474
|
+
function Ye() {
|
|
475
|
+
return J.value;
|
|
476
|
+
}
|
|
477
|
+
function Oe() {
|
|
478
|
+
D.value.showTable = !D.value.showTable;
|
|
479
|
+
}
|
|
480
|
+
function Se() {
|
|
481
|
+
D.value.showTooltip = !D.value.showTooltip;
|
|
482
|
+
}
|
|
483
|
+
const oe = p(!1);
|
|
484
|
+
function ie() {
|
|
485
|
+
oe.value = !oe.value;
|
|
486
|
+
}
|
|
487
|
+
return i({
|
|
488
|
+
getData: Ye,
|
|
489
|
+
generateCsv: _e,
|
|
490
|
+
generateImage: ye,
|
|
491
|
+
generatePdf: ge,
|
|
492
|
+
toggleTable: Oe,
|
|
493
|
+
toggleTooltip: Se,
|
|
494
|
+
toggleAnnotator: ie
|
|
495
|
+
}), (t, l) => (y(), C("div", {
|
|
496
|
+
ref_key: "treemapChart",
|
|
497
|
+
ref: f,
|
|
498
|
+
class: Ne(`vue-ui-treemap ${w.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
499
|
+
style: B(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
500
|
+
id: `treemap_${h.value}`
|
|
501
|
+
}, [
|
|
502
|
+
e.value.userOptions.buttons.annotator ? (y(), U(Tt, {
|
|
503
|
+
key: 0,
|
|
504
|
+
parent: f.value,
|
|
505
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
506
|
+
color: e.value.style.chart.color,
|
|
507
|
+
active: oe.value,
|
|
508
|
+
onClose: ie
|
|
509
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : F("", !0),
|
|
510
|
+
e.value.style.chart.title.text ? (y(), C("div", {
|
|
511
|
+
key: 1,
|
|
512
|
+
ref_key: "chartTitle",
|
|
513
|
+
ref: _,
|
|
514
|
+
style: B(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:6px`)
|
|
515
|
+
}, [
|
|
516
|
+
(y(), U(ft, {
|
|
517
|
+
key: `title_${P.value}`,
|
|
518
|
+
config: {
|
|
519
|
+
title: {
|
|
520
|
+
cy: "treemap-div-title",
|
|
521
|
+
...e.value.style.chart.title
|
|
522
|
+
},
|
|
523
|
+
subtitle: {
|
|
524
|
+
cy: "treemap-div-subtitle",
|
|
525
|
+
...e.value.style.chart.title.subtitle
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}, null, 8, ["config"]))
|
|
529
|
+
], 4)) : F("", !0),
|
|
530
|
+
e.value.userOptions.show && c.value ? (y(), U(gt, {
|
|
531
|
+
ref: "details",
|
|
532
|
+
key: `user_option_${N.value}`,
|
|
533
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
534
|
+
color: e.value.style.chart.color,
|
|
535
|
+
isPrinting: b(fe),
|
|
536
|
+
isImaging: b(pe),
|
|
537
|
+
uid: h.value,
|
|
538
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
539
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
540
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
541
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
542
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
543
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
544
|
+
isFullscreen: w.value,
|
|
545
|
+
isTooltip: D.value.showTooltip,
|
|
546
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
547
|
+
chartElement: f.value,
|
|
548
|
+
position: e.value.userOptions.position,
|
|
549
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
550
|
+
isAnnotation: oe.value,
|
|
551
|
+
onToggleFullscreen: Ge,
|
|
552
|
+
onGeneratePdf: b(ge),
|
|
553
|
+
onGenerateCsv: _e,
|
|
554
|
+
onGenerateImage: b(ye),
|
|
555
|
+
onToggleTable: Oe,
|
|
556
|
+
onToggleTooltip: Se,
|
|
557
|
+
onToggleAnnotator: ie
|
|
558
|
+
}, et({ _: 2 }, [
|
|
559
|
+
t.$slots.optionTooltip ? {
|
|
560
|
+
name: "optionTooltip",
|
|
561
|
+
fn: x(() => [
|
|
562
|
+
$(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
563
|
+
]),
|
|
564
|
+
key: "0"
|
|
565
|
+
} : void 0,
|
|
566
|
+
t.$slots.optionPdf ? {
|
|
567
|
+
name: "optionPdf",
|
|
568
|
+
fn: x(() => [
|
|
569
|
+
$(t.$slots, "optionPdf", {}, void 0, !0)
|
|
570
|
+
]),
|
|
571
|
+
key: "1"
|
|
572
|
+
} : void 0,
|
|
573
|
+
t.$slots.optionCsv ? {
|
|
574
|
+
name: "optionCsv",
|
|
575
|
+
fn: x(() => [
|
|
576
|
+
$(t.$slots, "optionCsv", {}, void 0, !0)
|
|
577
|
+
]),
|
|
578
|
+
key: "2"
|
|
579
|
+
} : void 0,
|
|
580
|
+
t.$slots.optionImg ? {
|
|
581
|
+
name: "optionImg",
|
|
582
|
+
fn: x(() => [
|
|
583
|
+
$(t.$slots, "optionImg", {}, void 0, !0)
|
|
584
|
+
]),
|
|
585
|
+
key: "3"
|
|
586
|
+
} : void 0,
|
|
587
|
+
t.$slots.optionTable ? {
|
|
588
|
+
name: "optionTable",
|
|
589
|
+
fn: x(() => [
|
|
590
|
+
$(t.$slots, "optionTable", {}, void 0, !0)
|
|
591
|
+
]),
|
|
592
|
+
key: "4"
|
|
593
|
+
} : void 0,
|
|
594
|
+
t.$slots.optionFullscreen ? {
|
|
595
|
+
name: "optionFullscreen",
|
|
596
|
+
fn: x(({ toggleFullscreen: o, isFullscreen: r }) => [
|
|
597
|
+
$(t.$slots, "optionFullscreen", G(X({ toggleFullscreen: o, isFullscreen: r })), void 0, !0)
|
|
598
|
+
]),
|
|
599
|
+
key: "5"
|
|
600
|
+
} : void 0,
|
|
601
|
+
t.$slots.optionAnnotator ? {
|
|
602
|
+
name: "optionAnnotator",
|
|
603
|
+
fn: x(({ toggleAnnotator: o, isAnnotator: r }) => [
|
|
604
|
+
$(t.$slots, "optionAnnotator", G(X({ toggleAnnotator: o, isAnnotator: r })), void 0, !0)
|
|
605
|
+
]),
|
|
606
|
+
key: "6"
|
|
607
|
+
} : void 0
|
|
608
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : F("", !0),
|
|
609
|
+
c.value ? (y(), C("svg", {
|
|
610
|
+
key: 3,
|
|
611
|
+
xmlns: b(ct),
|
|
612
|
+
class: Ne({ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value, "vue-data-ui-zoom-plus": !A.value, "vue-data-ui-zoom-minus": A.value }),
|
|
613
|
+
viewBox: `${j.value.startX} ${j.value.startY} ${j.value.width <= 0 ? 10 : j.value.width} ${j.value.height <= 0 ? 10 : j.value.height}`,
|
|
614
|
+
style: B(`max-width:100%; overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
|
|
615
|
+
}, [
|
|
616
|
+
ze(xt),
|
|
617
|
+
(y(!0), C(Pe, null, Ae(J.value, (o, r) => (y(), C("g", null, [
|
|
618
|
+
e.value.style.chart.layout.rects.gradient.show ? (y(), C("defs", Mt, [
|
|
619
|
+
O("radialGradient", {
|
|
620
|
+
id: `tgrad_${o.id}`,
|
|
621
|
+
gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
|
|
622
|
+
}, [
|
|
623
|
+
O("stop", {
|
|
624
|
+
offset: "18%",
|
|
625
|
+
"stop-color": o.color
|
|
626
|
+
}, null, 8, Bt),
|
|
627
|
+
O("stop", {
|
|
628
|
+
offset: "100%",
|
|
629
|
+
"stop-color": b(Le)(o.color, e.value.style.chart.layout.rects.gradient.intensity / 100)
|
|
630
|
+
}, null, 8, Wt)
|
|
631
|
+
], 8, Vt)
|
|
632
|
+
])) : F("", !0)
|
|
633
|
+
]))), 256)),
|
|
634
|
+
(y(!0), C(Pe, null, Ae(J.value, (o, r) => (y(), C("g", null, [
|
|
635
|
+
O("rect", {
|
|
636
|
+
x: o.x0,
|
|
637
|
+
y: o.y0,
|
|
638
|
+
height: Ce(o),
|
|
639
|
+
width: $e(o),
|
|
640
|
+
fill: d.value ? o.color : e.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
|
|
641
|
+
rx: e.value.style.chart.layout.rects.borderRadius,
|
|
642
|
+
stroke: I.value && I.value.id === o.id ? e.value.style.chart.layout.rects.selected.stroke : e.value.style.chart.layout.rects.stroke,
|
|
643
|
+
"stroke-width": I.value && I.value.id === o.id ? e.value.style.chart.layout.rects.selected.strokeWidth : e.value.style.chart.layout.rects.strokeWidth,
|
|
644
|
+
onClick: (m) => Xe(o),
|
|
645
|
+
onMouseenter: () => je({
|
|
646
|
+
datapoint: o,
|
|
647
|
+
seriesIndex: r
|
|
648
|
+
}),
|
|
649
|
+
onMouseleave: l[0] || (l[0] = (m) => {
|
|
650
|
+
I.value = null, v.value = !1;
|
|
651
|
+
}),
|
|
652
|
+
style: B(`opacity:${I.value ? I.value.id === o.id ? 1 : e.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
|
|
653
|
+
class: "vue-ui-treemap-rect"
|
|
654
|
+
}, null, 44, Ht),
|
|
655
|
+
(y(), C("foreignObject", {
|
|
656
|
+
x: o.x0,
|
|
657
|
+
y: o.y0,
|
|
658
|
+
height: Ce(o),
|
|
659
|
+
width: $e(o),
|
|
660
|
+
class: "vue-ui-treemap-cell-foreignObject"
|
|
661
|
+
}, [
|
|
662
|
+
O("div", Ut, [
|
|
663
|
+
e.value.style.chart.layout.labels.showDefaultLabels && (o.proportion > e.value.style.chart.layout.labels.hideUnderProportion || A.value) ? (y(), C("div", {
|
|
664
|
+
key: 0,
|
|
665
|
+
class: "vue-ui-treemap-cell-default",
|
|
666
|
+
style: B(`width:calc(100% - ${E(o) / 1.5}px);text-align:left;line-height:${E(o) < 14 ? 14 : E(o)}px;padding:${E(o) / 3}px; color:${b(Re)(o.color)}`)
|
|
667
|
+
}, [
|
|
668
|
+
O("span", {
|
|
669
|
+
style: B(`width:100%;font-size:${E(o)}px;`)
|
|
670
|
+
}, Y(o.name), 5),
|
|
671
|
+
Gt,
|
|
672
|
+
O("span", {
|
|
673
|
+
style: B(`width:100%;font-size:${E(o)}px;`)
|
|
674
|
+
}, Y(b(ne)(
|
|
675
|
+
e.value.style.chart.layout.labels.formatter,
|
|
676
|
+
o.value,
|
|
677
|
+
b(K)({
|
|
678
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
679
|
+
v: o.value,
|
|
680
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
681
|
+
r: e.value.style.chart.layout.labels.rounding
|
|
682
|
+
}),
|
|
683
|
+
{ datapoint: o }
|
|
684
|
+
)), 5)
|
|
685
|
+
], 4)) : F("", !0),
|
|
686
|
+
$(t.$slots, "rect", G(X({
|
|
687
|
+
rect: o,
|
|
688
|
+
shouldShow: o.proportion > e.value.style.chart.layout.labels.hideUnderProportion || A.value,
|
|
689
|
+
fontSize: E(o),
|
|
690
|
+
isZoom: A.value,
|
|
691
|
+
textColor: b(Re)(o.color)
|
|
692
|
+
})), void 0, !0)
|
|
693
|
+
])
|
|
694
|
+
], 8, Et))
|
|
695
|
+
]))), 256)),
|
|
696
|
+
$(t.$slots, "svg", G(X({ svg: W.value, isZoom: A.value, rect: I.value, config: e.value })), void 0, !0)
|
|
697
|
+
], 14, Dt)) : F("", !0),
|
|
698
|
+
t.$slots.watermark ? (y(), C("div", Xt, [
|
|
699
|
+
$(t.$slots, "watermark", G(X({ isPrinting: b(fe) || b(pe) })), void 0, !0)
|
|
700
|
+
])) : F("", !0),
|
|
701
|
+
c.value ? F("", !0) : (y(), U(bt, {
|
|
702
|
+
key: 5,
|
|
703
|
+
config: {
|
|
704
|
+
type: "treemap",
|
|
705
|
+
style: {
|
|
706
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
707
|
+
treemap: {
|
|
708
|
+
color: "#CCCCCC"
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}, null, 8, ["config"])),
|
|
713
|
+
O("div", {
|
|
714
|
+
ref_key: "chartLegend",
|
|
715
|
+
ref: z
|
|
716
|
+
}, [
|
|
717
|
+
e.value.style.chart.legend.show ? (y(), U(mt, {
|
|
718
|
+
key: `legend_${ve.value}`,
|
|
719
|
+
legendSet: xe.value,
|
|
720
|
+
config: qe.value,
|
|
721
|
+
id: `treemap_legend_${h.value}`,
|
|
722
|
+
onClickMarker: l[1] || (l[1] = ({ legend: o }) => Te(o))
|
|
723
|
+
}, {
|
|
724
|
+
item: x(({ legend: o, index: r }) => [
|
|
725
|
+
O("div", {
|
|
726
|
+
onClick: (m) => Te(o),
|
|
727
|
+
style: B(`opacity:${g.value.includes(o.id) ? 0.5 : 1}`)
|
|
728
|
+
}, [
|
|
729
|
+
Ie(Y(o.name) + ": " + Y(b(ne)(
|
|
730
|
+
e.value.style.chart.layout.labels.formatter,
|
|
731
|
+
o.value,
|
|
732
|
+
b(K)({
|
|
733
|
+
p: e.value.style.chart.layout.labels.prefix,
|
|
734
|
+
v: o.value,
|
|
735
|
+
s: e.value.style.chart.layout.labels.suffix,
|
|
736
|
+
r: e.value.style.chart.legend.roundingValue
|
|
737
|
+
}),
|
|
738
|
+
{ datapoint: o }
|
|
739
|
+
)) + " ", 1),
|
|
740
|
+
g.value.includes(o.id) ? (y(), C("span", Yt, " ( - % ) ")) : (y(), C("span", jt, " (" + Y(isNaN(o.value / q.value) ? "-" : (o.value / q.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
741
|
+
], 12, qt)
|
|
742
|
+
]),
|
|
743
|
+
_: 1
|
|
744
|
+
}, 8, ["legendSet", "config", "id"])) : $(t.$slots, "legend", {
|
|
745
|
+
key: 1,
|
|
746
|
+
legend: xe.value
|
|
747
|
+
}, void 0, !0)
|
|
748
|
+
], 512),
|
|
749
|
+
t.$slots.source ? (y(), C("div", {
|
|
750
|
+
key: 6,
|
|
751
|
+
ref_key: "source",
|
|
752
|
+
ref: R,
|
|
753
|
+
dir: "auto"
|
|
754
|
+
}, [
|
|
755
|
+
$(t.$slots, "source", {}, void 0, !0)
|
|
756
|
+
], 512)) : F("", !0),
|
|
757
|
+
ze(yt, {
|
|
758
|
+
show: D.value.showTooltip && v.value,
|
|
759
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
760
|
+
color: e.value.style.chart.tooltip.color,
|
|
761
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
762
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
763
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
764
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
765
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
766
|
+
position: e.value.style.chart.tooltip.position,
|
|
767
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
768
|
+
parent: f.value,
|
|
769
|
+
content: S.value,
|
|
770
|
+
isCustom: b(De)(e.value.style.chart.tooltip.customFormat)
|
|
771
|
+
}, {
|
|
772
|
+
"tooltip-before": x(() => [
|
|
773
|
+
$(t.$slots, "tooltip-before", G(X({ ...ue.value })), void 0, !0)
|
|
774
|
+
]),
|
|
775
|
+
"tooltip-after": x(() => [
|
|
776
|
+
$(t.$slots, "tooltip-after", G(X({ ...ue.value })), void 0, !0)
|
|
777
|
+
]),
|
|
778
|
+
_: 3
|
|
779
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
780
|
+
c.value ? (y(), U(kt, {
|
|
781
|
+
key: 7,
|
|
782
|
+
hideDetails: "",
|
|
783
|
+
config: {
|
|
784
|
+
open: D.value.showTable,
|
|
785
|
+
maxHeight: 1e4,
|
|
786
|
+
body: {
|
|
787
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
788
|
+
color: e.value.style.chart.color
|
|
789
|
+
},
|
|
790
|
+
head: {
|
|
791
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
792
|
+
color: e.value.style.chart.color
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}, {
|
|
796
|
+
content: x(() => [
|
|
797
|
+
(y(), U(wt, {
|
|
798
|
+
key: `table_${de.value}`,
|
|
799
|
+
colNames: te.value.colNames,
|
|
800
|
+
head: te.value.head,
|
|
801
|
+
body: te.value.body,
|
|
802
|
+
config: te.value.config,
|
|
803
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
804
|
+
onClose: l[2] || (l[2] = (o) => D.value.showTable = !1)
|
|
805
|
+
}, {
|
|
806
|
+
th: x(({ th: o }) => [
|
|
807
|
+
O("div", {
|
|
808
|
+
innerHTML: o,
|
|
809
|
+
style: { display: "flex", "align-items": "center" }
|
|
810
|
+
}, null, 8, Zt)
|
|
811
|
+
]),
|
|
812
|
+
td: x(({ td: o }) => [
|
|
813
|
+
Ie(Y(o.name || o), 1)
|
|
814
|
+
]),
|
|
815
|
+
_: 1
|
|
816
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
817
|
+
]),
|
|
818
|
+
_: 1
|
|
819
|
+
}, 8, ["config"])) : F("", !0)
|
|
820
|
+
], 14, Rt));
|
|
821
|
+
}
|
|
822
|
+
}, ho = /* @__PURE__ */ _t(Jt, [["__scopeId", "data-v-b9bc8597"]]);
|
|
823
|
+
export {
|
|
824
|
+
ho as default
|
|
825
|
+
};
|