vue-data-ui 2.7.2 → 2.7.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/dist/{Arrow-Cuf9zUpa.cjs → Arrow-CwCPcRDq.cjs} +1 -1
- package/dist/{Arrow-SOQeOwmT.js → Arrow-DZ9pNVTr.js} +1 -1
- package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-BQ6ScTsr.cjs} +1 -1
- package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-CdxldTMn.js} +4 -3
- package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-D6mp4NrH.cjs} +1 -1
- package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-DF9jbKW-.js} +3 -3
- package/dist/{DataTable-ByOfBGEi.cjs → DataTable-4qcYZrGF.cjs} +1 -1
- package/dist/{DataTable-C_28ZqiP.js → DataTable-BFNGlApm.js} +2 -2
- package/dist/{Legend-CmKaL7xe.js → Legend-B4eIw732.js} +2 -2
- package/dist/{Legend-mrAy7yUC.cjs → Legend-D8qnv865.cjs} +1 -1
- package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BZ8-AoE_.js} +1 -1
- package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-sCi6-fwm.cjs} +1 -1
- package/dist/PenAndPaper--_AE7XzJ.js +374 -0
- package/dist/PenAndPaper-DXiYR_ED.cjs +1 -0
- package/dist/{Shape-iIO-95sh.js → Shape-BQd108EW.js} +1 -1
- package/dist/{Shape-x7U3IhoM.cjs → Shape-BjIO2Dd_.cjs} +1 -1
- package/dist/{Slicer-Ct66sqV1.cjs → Slicer-B10GL6W6.cjs} +1 -1
- package/dist/{Slicer-C49MotZz.js → Slicer-BtX8p8CI.js} +2 -2
- package/dist/{Title-BgVFZwZZ.cjs → Title-DWFudmma.cjs} +1 -1
- package/dist/{Title-Co3F59jq.js → Title-ND4kMErl.js} +1 -1
- package/dist/{Tooltip-Cr89wMKa.js → Tooltip-BWe5TPIJ.js} +1 -1
- package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-DPqJ5wwr.cjs} +1 -1
- package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-DBOO7SYL.cjs} +1 -1
- package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-DOe_fDQ9.js} +1 -1
- package/dist/{img-DgRUFehB.cjs → img-BTldOAS7.cjs} +1 -1
- package/dist/{img-DQDP5JIH.js → img-K80BXoXO.js} +1 -1
- package/dist/{index-gC66Se26.js → index-B_dU_4T8.js} +1 -1
- package/dist/{index-BeJeDy5m.cjs → index-HGCbG8YK.cjs} +1 -1
- package/dist/{pdf-lJiGVhtL.js → pdf-BKSh5KBc.js} +1 -1
- package/dist/{pdf-Bu1ahAX2.cjs → pdf-IEdK_h03.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -1
- package/dist/types/vue-data-ui.d.ts +2 -1
- package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-7s4Pw7x0.js} +1 -1
- package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-O_JTsxQj.cjs} +1 -1
- package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-B2PvJuo8.cjs} +1 -1
- package/dist/{usePrinter-KMFl0n0s.js → usePrinter-CLObTJ4a.js} +3 -3
- package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-Dvy8nai9.js} +60 -60
- package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-NmIWCiVH.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-CUG7pspB.cjs +19 -0
- package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-Cf-VSMqf.js} +30 -30
- package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-C5dj9Voo.js} +3 -3
- package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-CSuxLH7L.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-BYHyKvk4.js} +22 -22
- package/dist/vue-ui-age-pyramid-qT6V3Y8O.cjs +1 -0
- package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-KzRsqSTn.cjs} +1 -1
- package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-clyvpxxd.js} +2 -2
- package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-CJL4NBSU.js} +36 -36
- package/dist/vue-ui-bullet-DMuibl8n.cjs +34 -0
- package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-1jHdWerO.js} +11 -11
- package/dist/vue-ui-candlestick-CMsFiP9C.cjs +2 -0
- package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-BCVjpGff.js} +4 -4
- package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-CtGRQBIN.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-CEQFlk-j.cjs} +1 -1
- package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-YX5q5qpY.js} +32 -32
- package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-DFhj3arJ.js} +44 -44
- package/dist/vue-ui-circle-pack-cXdePcYh.cjs +1 -0
- package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-DGtZLxpF.cjs} +1 -1
- package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-DwDTg8Za.js} +2 -2
- package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-DQ4-1OKY.js} +3 -3
- package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-etx_lWpJ.cjs} +1 -1
- package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-Crcwygqg.js} +2 -2
- package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-lRbvyU_i.cjs} +1 -1
- package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-C2h_qoIM.js} +12 -12
- package/dist/vue-ui-donut-DQeJn_KK.cjs +1 -0
- package/dist/vue-ui-donut-evolution-Dbg5HueS.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DbzqkGBx.js} +69 -69
- package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BVuQjSso.js} +52 -52
- package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-BaYSfxY1.cjs} +1 -1
- package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-2FOH_Mxn.js} +75 -75
- package/dist/vue-ui-flow-B8NKKaa2.cjs +1 -0
- package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-CYt4xsc4.js} +28 -28
- package/dist/vue-ui-funnel-Cgm1VcJC.cjs +1 -0
- package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-CmmTED3N.js} +39 -39
- package/dist/vue-ui-galaxy-D8oPaBdc.cjs +1 -0
- package/dist/vue-ui-gauge-Ushp2qER.cjs +1 -0
- package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-vlhW2o0y.js} +26 -26
- package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-B16t4cjE.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-DtWADzHM.js} +3 -3
- package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BcNWrSYu.js} +10 -10
- package/dist/vue-ui-heatmap-PVrUXZ6f.cjs +1 -0
- package/dist/vue-ui-history-plot-D9hGmpzL.cjs +1 -0
- package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-aqwCckl3.js} +35 -35
- package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-fIEea6oo.js} +3 -3
- package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-zRnAot1s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-0TKahM6o.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-CnequKa7.js} +2 -2
- package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-C7qRnQk-.cjs} +1 -1
- package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-bHqvHzsr.js} +45 -45
- package/dist/vue-ui-mood-radar-BGHGOC3W.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-BLLnwnLw.js} +40 -40
- package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-C5mqI9Vf.js} +65 -65
- package/dist/vue-ui-nested-donuts-r9LWv_9T.cjs +17 -0
- package/dist/vue-ui-onion-CKJJIQO8.cjs +5 -0
- package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-DGU0vHXZ.js} +75 -75
- package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-B4tVo343.js} +38 -38
- package/dist/vue-ui-parallel-coordinate-plot-CTF--y5O.cjs +8 -0
- package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-CDZspHBg.js} +54 -54
- package/dist/vue-ui-quadrant-De8bmwz_.cjs +1 -0
- package/dist/vue-ui-quick-chart-Bi7Vdl9I.cjs +15 -0
- package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-baWAo-Ln.js} +9 -9
- package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-CG8tGSHg.js} +55 -55
- package/dist/vue-ui-radar-DAxiwdD4.cjs +1 -0
- package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-Bm6BESO1.cjs} +1 -1
- package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-CcMWLaSP.js} +2 -2
- package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-D4vD3HD_.js} +7 -7
- package/dist/vue-ui-relation-circle-rM2pEsYK.cjs +1 -0
- package/dist/vue-ui-rings-Mt51bBc5.cjs +2 -0
- package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-R91Q3vZF.js} +62 -62
- package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BKY7zeC_.js} +44 -44
- package/dist/vue-ui-scatter-COs46vAF.cjs +1 -0
- package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-BBWwBSGZ.cjs} +1 -1
- package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-CTZKsfWs.js} +3 -3
- package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-3XabGcpa.js} +2 -2
- package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-CZ2XNWEt.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-CZnUiwhV.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-Dd_5kNG9.js} +5 -5
- package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-CZJ8RFMM.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-DT_G3f_6.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CoGcwj8-.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-Cra2_GdA.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-ClJhce64.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-ZI-zkp6j.js} +5 -5
- package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-C4HvM0A7.js} +4 -4
- package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-Cehnojts.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-B6su4lbU.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-DbXifSgX.js} +5 -5
- package/dist/vue-ui-stackbar-Dxjx916g.cjs +6 -0
- package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-bBQdWmxo.js} +86 -86
- package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-BaAUPB0O.js} +36 -36
- package/dist/vue-ui-strip-plot-D3Mc4jJS.cjs +1 -0
- package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CO12Arh5.cjs} +1 -1
- package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-DyjampQ2.js} +1 -1
- package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BrXBITN7.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-DC3LbLR1.js} +4 -4
- package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-C-L8YXVO.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-MCUi0UPR.js} +5 -5
- package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-0Jw0Kc3K.js} +50 -50
- package/dist/vue-ui-thermometer-BbAmbpxI.cjs +1 -0
- package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-CgcO44Ga.cjs} +1 -1
- package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-D43Y73z-.js} +5 -5
- package/dist/vue-ui-tiremarks-B7GobiRR.cjs +1 -0
- package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-C2z7LZOy.js} +25 -25
- package/dist/vue-ui-treemap-YuZUqTkv.cjs +1 -0
- package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-t2jSZWbw.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-CXbzdSDN.js} +80 -80
- package/dist/vue-ui-vertical-bar-RH9oo9ao.cjs +4 -0
- package/dist/vue-ui-waffle-C6PA3aJK.cjs +1 -0
- package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-Z9KsaCxx.js} +45 -45
- package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BbBHPjUa.js} +27 -27
- package/dist/vue-ui-wheel-BmWfP7V3.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-CUi3fEZc.js} +72 -72
- package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-DysEgxAX.cjs} +1 -1
- package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-B7Q6HDzu.cjs} +2 -2
- package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-BWN8izeD.js} +16 -16
- package/dist/vue-ui-xy-canvas-DZB78JsG.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DfhloBZx.js +1672 -0
- package/package.json +1 -1
- package/dist/PenAndPaper-CmcfpltX.js +0 -243
- package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
- package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
- package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
- package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
- package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
- package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
- package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
- package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
- package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
- package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
- package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
- package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
- package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
- package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
- package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
- package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
- package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
- package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
- package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
- package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
- package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
- package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
- package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
- package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
- package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
- package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
- package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
- package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
- package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
- package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { computed as b, ref as i, watch as Ue, onMounted as st, onBeforeUnmount as ut, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as
|
|
2
|
-
import { u as it, c as dt, t as vt, p as Z, a as ct, o as ft, e as U, b as ht, J as Be, d as yt, m as Ee, f as x, X as pt, s as Ge, L as bt, k as ie, n as R, i as E, x as Ye, q as gt, r as mt, y as kt } from "./index-
|
|
1
|
+
import { computed as b, ref as i, watch as Ue, onMounted as st, onBeforeUnmount as ut, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as D, createBlock as z, createCommentVNode as f, createVNode as Re, createSlots as nt, withCtx as g, renderSlot as m, normalizeProps as V, guardReactiveProps as M, createElementVNode as k, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as rt } from "vue";
|
|
2
|
+
import { u as it, c as dt, t as vt, p as Z, a as ct, o as ft, e as U, b as ht, J as Be, d as yt, m as Ee, f as x, X as pt, s as Ge, L as bt, k as ie, n as R, i as E, x as Ye, q as gt, r as mt, y as kt } from "./index-B_dU_4T8.js";
|
|
3
3
|
import { t as wt, u as $t } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as Lt } from "./Title-
|
|
5
|
-
import { u as Ct, U as xt } from "./usePrinter-
|
|
6
|
-
import { D as _t } from "./DataTable-
|
|
7
|
-
import { _ as Tt } from "./Tooltip-
|
|
8
|
-
import { L as Ft } from "./Legend-
|
|
9
|
-
import Nt from "./vue-ui-skeleton-
|
|
10
|
-
import St from "./vue-ui-accordion-
|
|
11
|
-
import { u as Xe } from "./useNestedProp-
|
|
12
|
-
import { _ as Ot } from "./PackageVersion-
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { _ as
|
|
17
|
-
const
|
|
4
|
+
import { _ as Lt } from "./Title-ND4kMErl.js";
|
|
5
|
+
import { u as Ct, U as xt } from "./usePrinter-CLObTJ4a.js";
|
|
6
|
+
import { D as _t } from "./DataTable-BFNGlApm.js";
|
|
7
|
+
import { _ as Tt } from "./Tooltip-BWe5TPIJ.js";
|
|
8
|
+
import { L as Ft } from "./Legend-B4eIw732.js";
|
|
9
|
+
import Nt from "./vue-ui-skeleton-CTZKsfWs.js";
|
|
10
|
+
import St from "./vue-ui-accordion-C5dj9Voo.js";
|
|
11
|
+
import { u as Xe } from "./useNestedProp-7s4Pw7x0.js";
|
|
12
|
+
import { _ as Ot } from "./PackageVersion-BZ8-AoE_.js";
|
|
13
|
+
import { _ as It } from "./PenAndPaper--_AE7XzJ.js";
|
|
14
|
+
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
+
import { u as Dt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
|
+
import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
+
const Pt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["id"], Rt = ["offset", "stop-color"], Bt = ["offset", "stop-opacity"], Et = ["id"], Gt = ["id"], Yt = ["id"], Xt = ["flood-color"], Ht = ["d", "fill", "stroke", "stroke-width", "filter"], Wt = { key: 1 }, qt = ["d", "fill"], Jt = { key: 2 }, Kt = ["x", "y", "font-size", "font-weight", "fill"], Qt = { key: 3 }, Zt = ["filter"], jt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], el = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], tl = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], ll = ["d", "fill", "onMouseenter", "onClick"], al = {
|
|
18
18
|
key: 5,
|
|
19
19
|
class: "vue-data-ui-watermark"
|
|
20
20
|
}, ol = {
|
|
@@ -38,14 +38,14 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
38
38
|
},
|
|
39
39
|
emits: ["selectLegend", "selectDatapoint"],
|
|
40
40
|
setup(He, { expose: We, emit: qe }) {
|
|
41
|
-
const { vue_ui_nested_donuts: Je } = it(), O = He, G = b(() => !!O.dataset && O.dataset.length), $ = i(dt()), j = i(!1), ee = i(""), Ke = i(null), de = i(0), B = i(null), ve = i(null), te = i(null), ce = i(null), fe = i(null), he = i(0), ye = i(0), pe = i(0),
|
|
41
|
+
const { vue_ui_nested_donuts: Je } = it(), O = He, G = b(() => !!O.dataset && O.dataset.length), $ = i(dt()), j = i(!1), ee = i(""), Ke = i(null), de = i(0), B = i(null), ve = i(null), te = i(null), ce = i(null), fe = i(null), he = i(0), ye = i(0), pe = i(0), P = i(!1);
|
|
42
42
|
function Qe(t) {
|
|
43
|
-
|
|
43
|
+
P.value = t, de.value += 1;
|
|
44
44
|
}
|
|
45
45
|
const e = b({
|
|
46
46
|
get: () => ke(),
|
|
47
47
|
set: (t) => t
|
|
48
|
-
}), { userOptionsVisible: le, setUserOptionsVisibility: be, keepUserOptionState: ge } =
|
|
48
|
+
}), { userOptionsVisible: le, setUserOptionsVisibility: be, keepUserOptionState: ge } = At({ config: e.value }), { svgRef: me } = Dt({ config: e.value.style.chart.title });
|
|
49
49
|
function ke() {
|
|
50
50
|
const t = Xe({
|
|
51
51
|
userConfig: O.config,
|
|
@@ -208,16 +208,16 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
208
208
|
let v = function() {
|
|
209
209
|
l < 0.1 ? (cancelAnimationFrame(Se.value), p.value.push(t.id), h.value = h.value.map((L, N) => ({
|
|
210
210
|
...L,
|
|
211
|
-
series: L.series.map((
|
|
212
|
-
...
|
|
211
|
+
series: L.series.map((A) => A.id === t.id ? {
|
|
212
|
+
...A,
|
|
213
213
|
value: 0
|
|
214
|
-
} :
|
|
214
|
+
} : A)
|
|
215
215
|
}))) : (l /= 1.1, h.value = h.value.map((L, N) => ({
|
|
216
216
|
...L,
|
|
217
|
-
series: L.series.map((
|
|
218
|
-
...
|
|
217
|
+
series: L.series.map((A) => A.id === t.id ? {
|
|
218
|
+
...A,
|
|
219
219
|
value: l
|
|
220
|
-
} :
|
|
220
|
+
} : A)
|
|
221
221
|
})), Se.value = requestAnimationFrame(v));
|
|
222
222
|
};
|
|
223
223
|
v();
|
|
@@ -242,7 +242,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
242
242
|
oe.value
|
|
243
243
|
)
|
|
244
244
|
};
|
|
245
|
-
})),
|
|
245
|
+
})), Ie = b(() => [..._.value].map((t, s) => {
|
|
246
246
|
const a = s * T.value / _.value.length;
|
|
247
247
|
return {
|
|
248
248
|
sizeRatio: a,
|
|
@@ -260,9 +260,9 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
260
260
|
T.value / _.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
261
261
|
)[0]
|
|
262
262
|
};
|
|
263
|
-
})),
|
|
263
|
+
})), Ae = i(null), H = i(null), W = i(null), se = i(null);
|
|
264
264
|
function lt({ datapoint: t, _relativeIndex: s, seriesIndex: a }) {
|
|
265
|
-
|
|
265
|
+
Ae.value = t.arcOfId, H.value = t.id, W.value = a, se.value = {
|
|
266
266
|
datapoint: t,
|
|
267
267
|
seriesIndex: a,
|
|
268
268
|
series: h.value,
|
|
@@ -346,7 +346,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
346
346
|
function ue(t) {
|
|
347
347
|
return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function De(t, s) {
|
|
350
350
|
if (!e.value.useBlurOnHover)
|
|
351
351
|
return "";
|
|
352
352
|
if (e.value.style.chart.tooltip.showAllItemsAtIndex && p.value.length === 0)
|
|
@@ -376,7 +376,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
376
376
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
377
377
|
paddingBottom: 12,
|
|
378
378
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
379
|
-
})),
|
|
379
|
+
})), I = b(() => {
|
|
380
380
|
const t = h.value.flatMap((a) => a.series.map((o) => ({
|
|
381
381
|
name: `${a.name} - ${o.name}`,
|
|
382
382
|
color: o.color,
|
|
@@ -384,11 +384,11 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
384
384
|
}))), s = h.value.flatMap((a) => a.series.map((o) => o.value));
|
|
385
385
|
return { head: t, body: s };
|
|
386
386
|
});
|
|
387
|
-
function
|
|
387
|
+
function ze() {
|
|
388
388
|
rt(() => {
|
|
389
|
-
const t =
|
|
389
|
+
const t = I.value.head.map((o, l) => [[
|
|
390
390
|
o.name
|
|
391
|
-
], [
|
|
391
|
+
], [I.value.body[l]], [isNaN(I.value.body[l] / o.total) ? "-" : I.value.body[l] / o.total * 100]]), s = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), a = gt(s);
|
|
392
392
|
mt({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-nested-donuts" });
|
|
393
393
|
});
|
|
394
394
|
}
|
|
@@ -397,16 +397,16 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
397
397
|
e.value.table.columnNames.series,
|
|
398
398
|
e.value.table.columnNames.value,
|
|
399
399
|
e.value.table.columnNames.percentage
|
|
400
|
-
], s =
|
|
401
|
-
const w = x({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v:
|
|
400
|
+
], s = I.value.head.map((l, d) => {
|
|
401
|
+
const w = x({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: I.value.body[d], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
|
|
402
402
|
return [
|
|
403
403
|
{
|
|
404
404
|
color: l.color,
|
|
405
405
|
name: l.name
|
|
406
406
|
},
|
|
407
407
|
w,
|
|
408
|
-
isNaN(
|
|
409
|
-
v:
|
|
408
|
+
isNaN(I.value.body[d] / l.total) ? "-" : x({
|
|
409
|
+
v: I.value.body[d] / l.total * 100,
|
|
410
410
|
s: "%",
|
|
411
411
|
r: e.value.table.td.roundingPercentage
|
|
412
412
|
})
|
|
@@ -438,7 +438,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
438
438
|
function ot() {
|
|
439
439
|
return _.value;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Pe() {
|
|
442
442
|
y.value.showTable = !y.value.showTable;
|
|
443
443
|
}
|
|
444
444
|
function Ve() {
|
|
@@ -454,22 +454,22 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
454
454
|
return We({
|
|
455
455
|
getData: ot,
|
|
456
456
|
generatePdf: xe,
|
|
457
|
-
generateCsv:
|
|
457
|
+
generateCsv: ze,
|
|
458
458
|
generateImage: _e,
|
|
459
|
-
toggleTable:
|
|
459
|
+
toggleTable: Pe,
|
|
460
460
|
toggleLabels: Ve,
|
|
461
461
|
toggleTooltip: Me,
|
|
462
462
|
toggleAnnotator: re
|
|
463
463
|
}), (t, s) => (u(), n("div", {
|
|
464
464
|
ref_key: "nestedDonutsChart",
|
|
465
465
|
ref: B,
|
|
466
|
-
class:
|
|
466
|
+
class: D(`vue-ui-nested-donuts ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
467
467
|
style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
468
468
|
id: `nested_donuts_${$.value}`,
|
|
469
469
|
onMouseenter: s[3] || (s[3] = () => r(be)(!0)),
|
|
470
470
|
onMouseleave: s[4] || (s[4] = () => r(be)(!1))
|
|
471
471
|
}, [
|
|
472
|
-
e.value.userOptions.buttons.annotator ? (u(),
|
|
472
|
+
e.value.userOptions.buttons.annotator ? (u(), z(It, {
|
|
473
473
|
key: 0,
|
|
474
474
|
svgRef: r(me),
|
|
475
475
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -489,7 +489,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
489
489
|
ref_key: "chartTitle",
|
|
490
490
|
ref: ve
|
|
491
491
|
}, [
|
|
492
|
-
(u(),
|
|
492
|
+
(u(), z(Lt, {
|
|
493
493
|
key: `title_${he.value}`,
|
|
494
494
|
config: {
|
|
495
495
|
title: {
|
|
@@ -503,7 +503,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
503
503
|
}
|
|
504
504
|
}, null, 8, ["config"]))
|
|
505
505
|
], 512)) : f("", !0),
|
|
506
|
-
e.value.userOptions.show && G.value && (r(ge) || r(le)) ? (u(),
|
|
506
|
+
e.value.userOptions.show && G.value && (r(ge) || r(le)) ? (u(), z(xt, {
|
|
507
507
|
ref: "details",
|
|
508
508
|
key: `user_option_${de.value}`,
|
|
509
509
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -518,7 +518,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
518
518
|
hasTable: e.value.userOptions.buttons.table,
|
|
519
519
|
hasLabel: e.value.userOptions.buttons.labels,
|
|
520
520
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
521
|
-
isFullscreen:
|
|
521
|
+
isFullscreen: P.value,
|
|
522
522
|
isTooltip: y.value.showTooltip,
|
|
523
523
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
524
524
|
chartElement: B.value,
|
|
@@ -527,9 +527,9 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
527
527
|
isAnnotation: J.value,
|
|
528
528
|
onToggleFullscreen: Qe,
|
|
529
529
|
onGeneratePdf: r(xe),
|
|
530
|
-
onGenerateCsv:
|
|
530
|
+
onGenerateCsv: ze,
|
|
531
531
|
onGenerateImage: r(_e),
|
|
532
|
-
onToggleTable:
|
|
532
|
+
onToggleTable: Pe,
|
|
533
533
|
onToggleLabels: Ve,
|
|
534
534
|
onToggleTooltip: Me,
|
|
535
535
|
onToggleAnnotator: re,
|
|
@@ -606,7 +606,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
606
606
|
ref_key: "svgRef",
|
|
607
607
|
ref: me,
|
|
608
608
|
xmlns: r(pt),
|
|
609
|
-
class:
|
|
609
|
+
class: D({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
|
|
610
610
|
viewBox: `0 0 ${c.value.width <= 0 ? 1e-3 : c.value.width} ${c.value.height < 0 ? 1e-3 : c.value.height}`,
|
|
611
611
|
style: K(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${we.value.css}`)
|
|
612
612
|
}, [
|
|
@@ -624,7 +624,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
624
624
|
m(t.$slots, "chart-background", {}, void 0, !0)
|
|
625
625
|
], 8, Mt)) : f("", !0),
|
|
626
626
|
k("defs", null, [
|
|
627
|
-
(u(!0), n(C, null, F(
|
|
627
|
+
(u(!0), n(C, null, F(Ie.value, (a, o) => (u(), n("radialGradient", {
|
|
628
628
|
id: `radial_${$.value}_${o}`
|
|
629
629
|
}, [
|
|
630
630
|
s[5] || (s[5] = k("stop", {
|
|
@@ -688,12 +688,12 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
688
688
|
fill: r(Ge)(l.color, 80),
|
|
689
689
|
stroke: e.value.style.chart.backgroundColor,
|
|
690
690
|
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
691
|
-
filter:
|
|
691
|
+
filter: De(l, d)
|
|
692
692
|
}, null, 8, Ht)
|
|
693
693
|
]))), 256))
|
|
694
694
|
]))), 256)),
|
|
695
695
|
e.value.style.chart.useGradient ? (u(), n("g", Wt, [
|
|
696
|
-
(u(!0), n(C, null, F(
|
|
696
|
+
(u(!0), n(C, null, F(Ie.value, (a, o) => (u(), n("g", null, [
|
|
697
697
|
k("path", {
|
|
698
698
|
d: a.donut.arcSlice,
|
|
699
699
|
fill: `url(#radial_${$.value}_${o})`,
|
|
@@ -707,7 +707,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
707
707
|
(u(!0), n(C, null, F(a.donut, (l, d) => (u(), n("g", null, [
|
|
708
708
|
d === 0 && c.value.width && c.value.height ? (u(), n("text", {
|
|
709
709
|
key: 0,
|
|
710
|
-
class:
|
|
710
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
711
711
|
x: c.value.width / 2,
|
|
712
712
|
y: l.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
|
|
713
713
|
"text-anchor": "middle",
|
|
@@ -721,11 +721,11 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
721
721
|
e.value.style.chart.layout.labels.dataLabels.show ? (u(), n("g", Qt, [
|
|
722
722
|
(u(!0), n(C, null, F(X.value, (a, o) => (u(), n("g", null, [
|
|
723
723
|
(u(!0), n(C, null, F(a.donut, (l, d) => (u(), n("g", {
|
|
724
|
-
filter:
|
|
724
|
+
filter: De(l, d)
|
|
725
725
|
}, [
|
|
726
726
|
ue(l) && y.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage ? (u(), n("text", {
|
|
727
727
|
key: 0,
|
|
728
|
-
class:
|
|
728
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
729
729
|
"text-anchor": r(R)(l, !0).anchor,
|
|
730
730
|
x: r(R)(l, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
731
731
|
y: r(ie)(l, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
|
|
@@ -735,7 +735,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
735
735
|
}, S(r(x)({ v: l.proportion * 100, s: "%", r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage })), 11, jt)) : f("", !0),
|
|
736
736
|
ue(l) && y.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
|
|
737
737
|
key: 1,
|
|
738
|
-
class:
|
|
738
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
739
739
|
"text-anchor": r(R)(l, !0).anchor,
|
|
740
740
|
x: r(R)(l, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
741
741
|
y: r(ie)(l, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY) + e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
@@ -755,7 +755,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
755
755
|
)) + ") ", 11, el)) : f("", !0),
|
|
756
756
|
ue(l) && y.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
|
|
757
757
|
key: 2,
|
|
758
|
-
class:
|
|
758
|
+
class: D({ animated: e.value.useCssAnimation }),
|
|
759
759
|
"text-anchor": r(R)(l, !0).anchor,
|
|
760
760
|
x: r(R)(l, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
761
761
|
y: r(ie)(l, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
|
|
@@ -787,7 +787,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
787
787
|
}),
|
|
788
788
|
onClick: (w) => et({ datapoint: l, index: d }),
|
|
789
789
|
onMouseleave: s[0] || (s[0] = (w) => {
|
|
790
|
-
j.value = !1,
|
|
790
|
+
j.value = !1, Ae.value = null, H.value = null, W.value = null;
|
|
791
791
|
})
|
|
792
792
|
}, null, 40, ll)
|
|
793
793
|
]))), 256))
|
|
@@ -797,7 +797,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
797
797
|
t.$slots.watermark ? (u(), n("div", al, [
|
|
798
798
|
m(t.$slots, "watermark", V(M({ isPrinting: r(Le) || r(Ce) })), void 0, !0)
|
|
799
799
|
])) : f("", !0),
|
|
800
|
-
G.value ? f("", !0) : (u(),
|
|
800
|
+
G.value ? f("", !0) : (u(), z(Nt, {
|
|
801
801
|
key: 6,
|
|
802
802
|
config: {
|
|
803
803
|
type: "donut",
|
|
@@ -822,7 +822,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
822
822
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
823
823
|
parent: B.value,
|
|
824
824
|
content: ee.value,
|
|
825
|
-
isFullscreen:
|
|
825
|
+
isFullscreen: P.value,
|
|
826
826
|
isCustom: r(Ye)(e.value.style.chart.tooltip.customFormat)
|
|
827
827
|
}, {
|
|
828
828
|
"tooltip-before": g(() => [
|
|
@@ -837,9 +837,9 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
837
837
|
key: 7,
|
|
838
838
|
ref_key: "chartLegend",
|
|
839
839
|
ref: te,
|
|
840
|
-
class:
|
|
840
|
+
class: D({ "vue-ui-nested-donuts-legend": ne.value.length > 1 })
|
|
841
841
|
}, [
|
|
842
|
-
(u(!0), n(C, null, F(ne.value, (a, o) => (u(),
|
|
842
|
+
(u(!0), n(C, null, F(ne.value, (a, o) => (u(), z(Ft, {
|
|
843
843
|
key: `legend_${o}_${pe.value}`,
|
|
844
844
|
legendSet: a,
|
|
845
845
|
config: at.value,
|
|
@@ -889,7 +889,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
889
889
|
}, [
|
|
890
890
|
m(t.$slots, "source", {}, void 0, !0)
|
|
891
891
|
], 512)) : f("", !0),
|
|
892
|
-
G.value ? (u(),
|
|
892
|
+
G.value ? (u(), z(St, {
|
|
893
893
|
key: 10,
|
|
894
894
|
hideDetails: "",
|
|
895
895
|
config: {
|
|
@@ -906,7 +906,7 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
906
906
|
}
|
|
907
907
|
}, {
|
|
908
908
|
content: g(() => [
|
|
909
|
-
(u(),
|
|
909
|
+
(u(), z(_t, {
|
|
910
910
|
key: `table_${ye.value}`,
|
|
911
911
|
colNames: q.value.colNames,
|
|
912
912
|
head: q.value.head,
|
|
@@ -929,9 +929,9 @@ const zt = ["id"], Vt = ["xmlns", "viewBox"], Mt = ["width", "height"], Ut = ["i
|
|
|
929
929
|
]),
|
|
930
930
|
_: 1
|
|
931
931
|
}, 8, ["config"])) : f("", !0)
|
|
932
|
-
], 46,
|
|
932
|
+
], 46, Pt));
|
|
933
933
|
}
|
|
934
|
-
}, Cl = /* @__PURE__ */
|
|
934
|
+
}, Cl = /* @__PURE__ */ zt(nl, [["__scopeId", "data-v-23284122"]]);
|
|
935
935
|
export {
|
|
936
936
|
Cl as default
|
|
937
937
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-HGCbG8YK.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-DWFudmma.cjs"),be=require("./usePrinter-B2PvJuo8.cjs"),Oe=require("./DataTable-4qcYZrGF.cjs"),Pe=require("./Tooltip-DPqJ5wwr.cjs"),ze=require("./Legend-D8qnv865.cjs"),De=require("./vue-ui-skeleton-BBWwBSGZ.cjs"),Ae=require("./vue-ui-accordion-CSuxLH7L.cjs"),ge=require("./useNestedProp-O_JTsxQj.cjs"),Ie=require("./PackageVersion-sCi6-fwm.cjs"),Me=require("./PenAndPaper-DXiYR_ED.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Xe=["xmlns","viewBox"],Ge=["width","height"],He=["id"],We=["offset","stop-color"],Je=["offset","stop-opacity"],Ke=["id"],Qe=["id"],Ze=["id"],je=["flood-color"],et=["d","fill","stroke","stroke-width","filter"],tt={key:1},lt=["d","fill"],at={key:2},ot=["x","y","font-size","font-weight","fill"],nt={key:3},rt=["filter"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["text-anchor","x","y","fill","font-size","font-weight"],ct=["d","fill","onMouseenter","onClick"],dt={key:5,class:"vue-data-ui-watermark"},vt={key:0,class:"vue-ui-nested-donuts-legend-title"},ft=["onClick"],pt=["innerHTML"],ht={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ke,{expose:Ce,emit:we}){const{vue_ui_nested_donuts:Le}=s.useConfig(),k=ke,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(s.createUid()),F=e.ref(!1),T=e.ref(""),Be=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function xe(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Re.useUserOptionState({config:t.value}),{svgRef:Q}=Ue.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Le});return l.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,ee(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const j=e.computed(()=>{const{top:l,right:r,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${l}px ${r}px ${o}px ${n}px`,top:l,right:r,bottom:o,left:n}}),$=e.ref(null);e.onMounted(()=>{ee()});function ee(){if(s.objectIsEmpty(k.dataset)&&s.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:r,height:o}=me.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value,padding:j.value});requestAnimationFrame(()=>{c.value.width=r,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:te,isImaging:le,generatePdf:ae,generateImage:oe}=be.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ne=we;function Se({datapoint:l,index:r}){ne("selectDatapoint",{datapoint:l,index:r})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(l.series)?s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:r}):l.series.length===0?s.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${r}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,r)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>s.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:r,id:`${h.value}_${r}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${r}`,id:`${h.value}_${r}_${n}`,seriesIndex:n,datasetIndex:r,color:s.convertColorToHex(o.color)||Ne.value[n]||s.palette[n]||s.palette[n%s.palette.length],value:s.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,r)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function _e(l,r,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<r}const d=e.ref(re.value);e.watch(()=>re.value,l=>d.value=l);const se=e.ref(null),ue=e.ref(null);function z(l){ne("selectLegend",l);const r=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===r.arcOfId).series.map(i=>i.id),p=_e(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>r.value?(cancelAnimationFrame(se.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:r.value}:g)}))):(a+=r.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(ue.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),ue.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>d.value.map((l,r)=>b.value-r*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,r)=>{const o=r*b.value/m.value.length;return{...l,radius:b.value-o,donut:s.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ce=e.computed(()=>[...m.value].map((l,r)=>{const o=r*b.value/m.value.length;return{sizeRatio:o,donut:s.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),de=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Ve({datapoint:l,_relativeIndex:r,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(s.isFunction(n)&&s.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
|
|
2
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
|
+
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
5
|
+
<circle cx="10" cy="10" r="10" fill="${p.color}"/>
|
|
6
|
+
</svg>
|
|
7
|
+
<span>
|
|
8
|
+
${p.arcOf??""} - ${p.name}
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<span>
|
|
12
|
+
${t.value.style.chart.tooltip.showValue?`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}
|
|
13
|
+
</b>`:""}
|
|
14
|
+
${t.value.style.chart.tooltip.showPercentage?`(${s.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.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"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ve(l,r){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===r?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,r)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:r,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ee=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),r=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:r}});function fe(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=s.createCsvContent(r);s.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],r=C.value.head.map((a,u)=>{const p=s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":s.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:r,config:o}});function Fe(){return m.value}function pe(){v.value.showTable=!v.value.showTable}function he(){v.value.dataLabels.show=!v.value.dataLabels.show}function ye(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return Ce({getData:Fe,generatePdf:ae,generateCsv:fe,generateImage:oe,toggleTable:pe,toggleLabels:he,toggleTooltip:ye,toggleAnnotator:R}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:r[3]||(r[3]=()=>e.unref(J)(!0)),onMouseleave:r[4]||(r[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me._sfc_main,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(be.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(le),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ae),onGenerateCsv:fe,onGenerateImage:e.unref(oe),onToggleTable:pe,onToggleLabels:he,onToggleTooltip:ye,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${j.value.css}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[r[5]||(r[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n])*100}%`,"stop-color":e.unref(s.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,We),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Je),r[6]||(r[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Qe),r[7]||(r[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Ke),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,je)],8,Ze)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(s.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ve(a,u)},null,8,et)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,lt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(s.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,ot)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ve(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,ut)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,it)):e.createCommentVNode("",!0)],8,rt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Be.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>Ve({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Se({datapoint:a,index:u}),onMouseleave:r[0]||(r[0]=p=>{F.value=!1,de.value=null,S.value=null,_.value=null})},null,40,ct)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Pe._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(s.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(ze.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ee.value,onClickMarker:r[1]||(r[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(s.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,ft)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae.default,{key:10,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,pt)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ye))}},yt=qe._export_sfc(ht,[["__scopeId","data-v-23284122"]]);exports.default=yt;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-HGCbG8YK.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),$e=require("./Title-DWFudmma.cjs"),oe=require("./usePrinter-B2PvJuo8.cjs"),xe=require("./Legend-D8qnv865.cjs"),Be=require("./DataTable-4qcYZrGF.cjs"),Te=require("./Tooltip-DPqJ5wwr.cjs"),Se=require("./vue-ui-skeleton-BBWwBSGZ.cjs"),Pe=require("./vue-ui-accordion-CSuxLH7L.cjs"),re=require("./useNestedProp-O_JTsxQj.cjs"),Oe=require("./PackageVersion-sCi6-fwm.cjs"),Ne=require("./PenAndPaper-DXiYR_ED.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
|
+
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
|
+
A ${l},${l} 0 1 1
|
|
4
|
+
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
5
|
+
`.trim()}}const ke=se;function Q(l){d.value.includes(l)?d.value=d.value.filter(r=>r!==l):d.value.push(l),ke("selectLegend",h.value)}function we(){return h.value}const N=e.computed(()=>{const l=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=h.value.map(a=>[a.name,a.percentage,a.value]);return{head:l,body:r}}),B=e.computed(()=>{const l=N.value.head,r=h.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:a,colNames:l}});function Z(){e.nextTick(()=>{const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=N.value.head,a=N.value.body,o=l.concat([r]).concat(a),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const p=e.ref(void 0),y=e.ref(!1);function Ce(l){y.value=l,I.value+=1}const _=e.ref(null);function ee({datapoint:l,seriesIndex:r,show:a=!0}){const o=l.absoluteIndex;p.value=r,_.value={datapoint:l,seriesIndex:o,series:i.value,config:t.value},$.value=a;let c="";const w=t.value.style.chart.tooltip.customFormat;if(u.isFunction(w)&&u.functionReturnsString(()=>w({seriesIndex:o,datapoint:l,series:i.value,config:t.value})))S.value=w({seriesIndex:o,datapoint:l,series:i.value,config:t.value});else{const A=t.value.style.chart.tooltip.showPercentage,F=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span></span>${l.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${A?u.dataLabel({p:"",v:l.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${A&&F?"(":""}${F?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,l.value,u.dataLabel({p:l.prefix||"",v:l.value,s:l.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:r}):""}${A&&F?")":""}</div>`,S.value=`<div>${c}</div>`}}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const T=e.ref(!1);function V(){T.value=!T.value}return ue({getData:we,generatePdf:W,generateCsv:Z,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:V}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:b,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:r[4]||(r[4]=()=>e.unref(U)(!0)),onMouseleave:r[5]||(r[5]=()=>e.unref(U)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:V},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:L,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(Y)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(H),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(W),onGenerateCsv:Z,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:o})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:X,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Oe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ee)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<0?1e-4:a.radius,stroke:`${a.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Me))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ze)],8,Le)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,qe))),256))],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{p.value=void 0,$.value=!1})},null,40,Ue))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{p.value=void 0,$.value=!1})},[d.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:a.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value===o?a.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:a.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&a.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})})`:""}`),9,Ge))],40,Xe))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:6,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${q.value}`,legendSet:i.value,config:me.value,onClickMarker:r[2]||(r[2]=({legend:a})=>Q(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString((a.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,je)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:S.value,isFullscreen:y.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,We)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},Ke=Ae._export_sfc(Je,[["__scopeId","data-v-c097b7d4"]]);exports.default=Ke;
|