vue-data-ui 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Cuf9zUpa.cjs → Arrow-Bslu6In_.cjs} +1 -1
- package/dist/{Arrow-SOQeOwmT.js → Arrow-Kbu7LT-f.js} +1 -1
- package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-BLhJaEYy.js} +4 -3
- package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-WIhlX3LN.cjs} +1 -1
- package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-Dlg-p-yo.js} +3 -3
- package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-mXlj2N11.cjs} +1 -1
- package/dist/{DataTable-C_28ZqiP.js → DataTable-DOKlm7k4.js} +2 -2
- package/dist/{DataTable-ByOfBGEi.cjs → DataTable-c3nDhwbO.cjs} +1 -1
- package/dist/{Legend-mrAy7yUC.cjs → Legend-Bhl2d6oj.cjs} +1 -1
- package/dist/{Legend-CmKaL7xe.js → Legend-CIjMjfNk.js} +2 -2
- package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BCLALL_i.js} +1 -1
- package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-DFYAej2o.cjs} +1 -1
- package/dist/PenAndPaper-CAqWCUZx.cjs +1 -0
- package/dist/PenAndPaper-CZs431Nx.js +374 -0
- package/dist/{Shape-iIO-95sh.js → Shape-D9MuIPm8.js} +1 -1
- package/dist/{Shape-x7U3IhoM.cjs → Shape-wMij_bxG.cjs} +1 -1
- package/dist/{Slicer-C49MotZz.js → Slicer-CqYLlNlU.js} +2 -2
- package/dist/{Slicer-Ct66sqV1.cjs → Slicer-Duh-nBCD.cjs} +1 -1
- package/dist/{Title-BgVFZwZZ.cjs → Title-C5w8bVlo.cjs} +1 -1
- package/dist/{Title-Co3F59jq.js → Title-UjBqdYyD.js} +1 -1
- package/dist/{Tooltip-Cr89wMKa.js → Tooltip-3NNIdJ6N.js} +1 -1
- package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-Dbe23pmt.cjs} +1 -1
- package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-6NoDv4_U.js} +1 -1
- package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-C-_IolaZ.cjs} +1 -1
- package/dist/{img-DQDP5JIH.js → img-BxGd_UqS.js} +1 -1
- package/dist/{img-DgRUFehB.cjs → img-DCkGlbCr.cjs} +1 -1
- package/dist/{index-gC66Se26.js → index-D3VntmA9.js} +1 -1
- package/dist/{index-BeJeDy5m.cjs → index-MIJJ8liG.cjs} +1 -1
- package/dist/{pdf-Bu1ahAX2.cjs → pdf-BGp1xMhT.cjs} +1 -1
- package/dist/{pdf-lJiGVhtL.js → pdf-BpVckOt1.js} +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-DTlOqz2P.js} +1 -1
- package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-DwR4JSzw.cjs} +1 -1
- package/dist/{usePrinter-KMFl0n0s.js → usePrinter-H3tAjGXs.js} +3 -3
- package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-U1x-RAEA.cjs} +1 -1
- package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-BuY9ggUz.cjs} +1 -1
- package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-DFwVHeO8.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DeTBYGV_.cjs +19 -0
- package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-NNib9NTc.js} +30 -30
- package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-DGJQIcdB.js} +3 -3
- package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-cBSqrYy3.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-DWG7C-nA.js} +22 -22
- package/dist/vue-ui-age-pyramid-DfGSS3SE.cjs +1 -0
- package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-Bpy0V7AA.cjs} +1 -1
- package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-D21j4NL0.js} +2 -2
- package/dist/vue-ui-bullet-CrgeKJBE.cjs +34 -0
- package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-MrNlqcTX.js} +36 -36
- package/dist/vue-ui-candlestick-DfEQ057F.cjs +2 -0
- package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-Dgwjzuq0.js} +11 -11
- package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-B9AHiJLA.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-TOSDOJ0J.js} +4 -4
- package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-BQwGKI2l.cjs} +1 -1
- package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-DAlxKIqD.js} +32 -32
- package/dist/vue-ui-circle-pack-B9HW-E4V.cjs +1 -0
- package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-BjD7UG4l.js} +44 -44
- package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-Bv_hn_5f.cjs} +1 -1
- package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-CS0L4MjH.js} +2 -2
- package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-Cu4QabFb.js} +3 -3
- package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-DGJjS8TM.cjs} +1 -1
- package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-BusMzORo.cjs} +1 -1
- package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-CrqD5QXP.js} +2 -2
- package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-CbDkvk9s.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DKD_efmP.js} +69 -69
- package/dist/vue-ui-donut-evolution-Dul--Pi_.cjs +1 -0
- package/dist/vue-ui-donut-vqs5auMD.cjs +1 -0
- package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BGN-Rshy.js} +52 -52
- package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-CB6lYwMc.cjs} +1 -1
- package/dist/vue-ui-flow-CDPkL02l.cjs +1 -0
- package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-g93Xo1mO.js} +75 -75
- package/dist/vue-ui-funnel-D1PhFKgP.cjs +1 -0
- package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-r_WI2IRS.js} +28 -28
- package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-B4JnwjLW.js} +39 -39
- package/dist/vue-ui-galaxy-DSXcoM3k.cjs +1 -0
- package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-BPz7mbOb.js} +26 -26
- package/dist/vue-ui-gauge-Ct1Knstr.cjs +1 -0
- package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-BbUqDkQz.js} +3 -3
- package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-tet3qRDX.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BbmFxESu.js} +10 -10
- package/dist/vue-ui-heatmap-RHN_eSK2.cjs +1 -0
- package/dist/vue-ui-history-plot-B8_Kig_-.cjs +1 -0
- package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-CJFtY1Rm.js} +35 -35
- package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-C0IWPkaZ.cjs} +1 -1
- package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-CQo8VsEv.js} +3 -3
- package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-8wZYNxLC.js} +2 -2
- package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-DoOFKxep.cjs} +1 -1
- package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-DHb8Roml.js} +45 -45
- package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-HnReqNMq.cjs} +1 -1
- package/dist/vue-ui-mood-radar-BjmCUY0q.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-CdBmESCg.js} +40 -40
- package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-CO7sSeR-.js} +65 -65
- package/dist/vue-ui-nested-donuts-SBaCzHQP.cjs +17 -0
- package/dist/vue-ui-onion-BehdICTa.cjs +5 -0
- package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-Ci15BQ0y.js} +75 -75
- package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-BJbrb-Mp.js} +38 -38
- package/dist/vue-ui-parallel-coordinate-plot-BLLONfts.cjs +8 -0
- package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-BZTZY3LG.js} +54 -54
- package/dist/vue-ui-quadrant-ntmlYIVx.cjs +1 -0
- package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-B2OUF1Pk.js} +9 -9
- package/dist/vue-ui-quick-chart-BCdm0tx2.cjs +15 -0
- package/dist/vue-ui-radar-CUoLdojY.cjs +1 -0
- package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-D8DHrSPP.js} +55 -55
- package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-BWlmz08s.cjs} +1 -1
- package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-D4H6cT0d.js} +2 -2
- package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-CWvX8cvJ.js} +7 -7
- package/dist/vue-ui-relation-circle-DighSxmd.cjs +1 -0
- package/dist/vue-ui-rings-CPIzjzdm.cjs +2 -0
- package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-Dq5YT7h-.js} +62 -62
- package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BMuJyp6q.js} +44 -44
- package/dist/vue-ui-scatter-BSgMQLjw.cjs +1 -0
- package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-DOE444ST.cjs} +1 -1
- package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-pHcbvN3-.js} +3 -3
- package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-BsPExuQ7.js} +2 -2
- package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-bHv8hVve.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-S0FbKqDW.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-eJ5IZSRQ.js} +5 -5
- package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-B1pwFeeg.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-B9E03kBf.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-BpAFpJN9.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CbtRwF8H.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-4gAnz36n.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-BJfFPQ-X.js} +5 -5
- package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-CJ8rlJiI.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-CLz-PMi0.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-C5ZzOhRM.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-ja3t34Mt.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-BnuJOk6L.js} +86 -86
- package/dist/vue-ui-stackbar-DSWEq3Pa.cjs +6 -0
- package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-Cbr3Dkmd.js} +36 -36
- package/dist/vue-ui-strip-plot-CyiaXAxw.cjs +1 -0
- package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CPJeRMDV.cjs} +1 -1
- package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-Cr6jEi4z.js} +1 -1
- package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BfKruH6W.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-C0J52xWN.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-C9PHXjbW.js} +5 -5
- package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-CGUs_6Ij.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-Cs8Xt7tQ.js} +50 -50
- package/dist/vue-ui-thermometer-DWC--OtD.cjs +1 -0
- package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-DD0VvMEs.cjs} +1 -1
- package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-DDZHmPLV.js} +5 -5
- package/dist/vue-ui-tiremarks-B_koqVkj.cjs +1 -0
- package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-DHAdNbAA.js} +25 -25
- package/dist/vue-ui-treemap-C_yhbpyF.cjs +1 -0
- package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-CfH-P5Oh.js} +12 -12
- package/dist/vue-ui-vertical-bar-BRplGFjj.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-oBdc4YQS.js} +80 -80
- package/dist/vue-ui-waffle-Bg5T7RVn.cjs +1 -0
- package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-DZ2zIujl.js} +45 -45
- package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BerXCO4A.js} +27 -27
- package/dist/vue-ui-wheel-Bj3Z92nh.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-BWQ1ogz9.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-U5KISxTe.js} +72 -72
- package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-C078AHoi.cjs} +2 -2
- package/dist/vue-ui-xy-canvas-BpblELcE.js +1672 -0
- package/dist/vue-ui-xy-canvas-C76OoGNJ.cjs +9 -0
- package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-y9zEQYMK.js} +16 -16
- 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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-MIJJ8liG.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-C5w8bVlo.cjs"),be=require("./usePrinter-U1x-RAEA.cjs"),Oe=require("./DataTable-c3nDhwbO.cjs"),Pe=require("./Tooltip-Dbe23pmt.cjs"),ze=require("./Legend-Bhl2d6oj.cjs"),De=require("./vue-ui-skeleton-DOE444ST.cjs"),Ae=require("./vue-ui-accordion-cBSqrYy3.cjs"),ge=require("./useNestedProp-DwR4JSzw.cjs"),Ie=require("./PackageVersion-DFYAej2o.cjs"),Me=require("./PenAndPaper-CAqWCUZx.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-MIJJ8liG.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),$e=require("./Title-C5w8bVlo.cjs"),oe=require("./usePrinter-U1x-RAEA.cjs"),xe=require("./Legend-Bhl2d6oj.cjs"),Be=require("./DataTable-c3nDhwbO.cjs"),Te=require("./Tooltip-Dbe23pmt.cjs"),Se=require("./vue-ui-skeleton-DOE444ST.cjs"),Pe=require("./vue-ui-accordion-cBSqrYy3.cjs"),re=require("./useNestedProp-DwR4JSzw.cjs"),Oe=require("./PackageVersion-DFYAej2o.cjs"),Ne=require("./PenAndPaper-CAqWCUZx.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;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { computed as h, ref as r, watch as we, onMounted as Xe, onBeforeUnmount as Ge, createElementBlock as u, openBlock as
|
|
2
|
-
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-
|
|
3
|
-
import { t as
|
|
4
|
-
import { _ as rt } from "./Title-
|
|
5
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
6
|
-
import { L as ct } from "./Legend-
|
|
7
|
-
import { D as dt } from "./DataTable-
|
|
8
|
-
import { _ as vt } from "./Tooltip-
|
|
9
|
-
import ht from "./vue-ui-skeleton-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Te } from "./useNestedProp-
|
|
12
|
-
import { _ as gt } from "./PackageVersion-
|
|
13
|
-
import {
|
|
1
|
+
import { computed as h, ref as r, watch as we, onMounted as Xe, onBeforeUnmount as Ge, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as g, createElementVNode as _, createVNode as $e, createSlots as Ee, withCtx as f, renderSlot as d, normalizeProps as O, guardReactiveProps as P, Fragment as M, renderList as N, toDisplayString as I, createTextVNode as He, nextTick as We } from "vue";
|
|
2
|
+
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-D3VntmA9.js";
|
|
3
|
+
import { t as st, u as nt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
+
import { _ as rt } from "./Title-UjBqdYyD.js";
|
|
5
|
+
import { u as ut, U as it } from "./usePrinter-H3tAjGXs.js";
|
|
6
|
+
import { L as ct } from "./Legend-CIjMjfNk.js";
|
|
7
|
+
import { D as dt } from "./DataTable-DOKlm7k4.js";
|
|
8
|
+
import { _ as vt } from "./Tooltip-3NNIdJ6N.js";
|
|
9
|
+
import ht from "./vue-ui-skeleton-pHcbvN3-.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-DGJQIcdB.js";
|
|
11
|
+
import { u as Te } from "./useNestedProp-DTlOqz2P.js";
|
|
12
|
+
import { _ as gt } from "./PackageVersion-BCLALL_i.js";
|
|
13
|
+
import { _ as pt } from "./PenAndPaper-CZs431Nx.js";
|
|
14
14
|
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as mt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
-
const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], xt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Tt = ["id"],
|
|
17
|
+
const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], xt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Tt = ["id"], _t = ["stdDeviation"], Ot = ["filter"], Pt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], It = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], At = { key: 2 }, St = ["onMouseenter"], Ft = ["x", "y", "font-size", "fill", "font-weight"], Mt = {
|
|
18
18
|
key: 5,
|
|
19
19
|
class: "vue-data-ui-watermark"
|
|
20
20
|
}, Nt = ["onClick"], Rt = ["innerHTML"], Dt = {
|
|
@@ -34,8 +34,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
emits: ["selectLegend"],
|
|
37
|
-
setup(
|
|
38
|
-
const { vue_ui_onion: Ie } = je(), w =
|
|
37
|
+
setup(_e, { expose: Oe, emit: Pe }) {
|
|
38
|
+
const { vue_ui_onion: Ie } = je(), w = _e, D = h(() => !!w.dataset && w.dataset.length), x = r(qe()), Ae = r(null), Z = r(0), L = r(!1), X = r(""), y = r([]), A = r(null), ee = r(null), te = r(null), ae = r(null), le = r(null), oe = r(0), se = r(0), ne = r(0), e = h({
|
|
39
39
|
get: () => ce(),
|
|
40
40
|
set: (t) => t
|
|
41
41
|
}), { userOptionsVisible: G, setUserOptionsVisibility: re, keepUserOptionState: ue } = yt({ config: e.value }), { svgRef: ie } = mt({ config: e.value.style.chart.title });
|
|
@@ -53,7 +53,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
53
53
|
} : t;
|
|
54
54
|
}
|
|
55
55
|
we(() => w.config, (t) => {
|
|
56
|
-
e.value = ce(), G.value = !e.value.userOptions.showOnChartHover, ge(), oe.value += 1,
|
|
56
|
+
e.value = ce(), G.value = !e.value.userOptions.showOnChartHover, ge(), oe.value += 1, se.value += 1, ne.value += 1, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
57
57
|
}, { deep: !0 });
|
|
58
58
|
const { isPrinting: de, isImaging: ve, generatePdf: he, generateImage: fe } = ut({
|
|
59
59
|
elementId: `vue-ui-onion_${x.value}`,
|
|
@@ -62,7 +62,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
62
62
|
}), Se = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), Fe = h(() => Qe(e.value.customPalette)), m = r({
|
|
63
63
|
showTable: e.value.table.show,
|
|
64
64
|
showTooltip: e.value.style.chart.tooltip.show
|
|
65
|
-
}),
|
|
65
|
+
}), s = r({
|
|
66
66
|
height: 512,
|
|
67
67
|
width: 512,
|
|
68
68
|
padding: {
|
|
@@ -81,8 +81,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
81
81
|
componentName: "VueUiOnion",
|
|
82
82
|
type: "dataset"
|
|
83
83
|
}), e.value.responsive) {
|
|
84
|
-
const o =
|
|
85
|
-
const { width: a, height: l } =
|
|
84
|
+
const o = st(() => {
|
|
85
|
+
const { width: a, height: l } = nt({
|
|
86
86
|
chart: A.value,
|
|
87
87
|
title: e.value.style.chart.title.text ? ee.value : null,
|
|
88
88
|
legend: e.value.style.chart.legend.show ? te.value : null,
|
|
@@ -90,7 +90,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
90
90
|
noTitle: le.value
|
|
91
91
|
});
|
|
92
92
|
requestAnimationFrame(() => {
|
|
93
|
-
|
|
93
|
+
s.value.width = a, s.value.height = l, s.value.padding.top = Math.max(a, l) * 0.125, s.value.padding.right = Math.max(a, l) * 0.125, s.value.padding.bottom = Math.max(a, l) * 0.125, s.value.padding.left = Math.max(a, l) * 0.125, s.value.minRadius = Math.min(a, l) * 0.125;
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
V.value = new ResizeObserver(o), V.value.observe(A.value.parentNode);
|
|
@@ -100,16 +100,16 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
100
100
|
V.value && V.value.disconnect();
|
|
101
101
|
});
|
|
102
102
|
const c = h(() => ({
|
|
103
|
-
top:
|
|
104
|
-
left:
|
|
105
|
-
right:
|
|
106
|
-
bottom:
|
|
107
|
-
centerX:
|
|
108
|
-
centerY:
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
111
|
-
minRadius:
|
|
112
|
-
maxRadius: Math.min(
|
|
103
|
+
top: s.value.padding.top,
|
|
104
|
+
left: s.value.padding.left,
|
|
105
|
+
right: s.value.width - s.value.padding.right,
|
|
106
|
+
bottom: s.value.height - s.value.padding.bottom,
|
|
107
|
+
centerX: s.value.width / 2,
|
|
108
|
+
centerY: s.value.height / 2,
|
|
109
|
+
width: s.value.width - s.value.padding.right - s.value.padding.left,
|
|
110
|
+
height: s.value.height - s.value.padding.bottom - s.value.padding.top,
|
|
111
|
+
minRadius: s.value.minRadius,
|
|
112
|
+
maxRadius: Math.min(s.value.width, s.value.height) - s.value.padding.top * 2
|
|
113
113
|
})), v = h(() => (w.dataset.forEach((t, o) => {
|
|
114
114
|
[null, void 0].includes(t.name) && K({
|
|
115
115
|
componentName: "VueUiOnion",
|
|
@@ -285,7 +285,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
285
285
|
function j() {
|
|
286
286
|
Y.value = !Y.value;
|
|
287
287
|
}
|
|
288
|
-
return
|
|
288
|
+
return Oe({
|
|
289
289
|
getData: Be,
|
|
290
290
|
generatePdf: he,
|
|
291
291
|
generateCsv: ye,
|
|
@@ -293,7 +293,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
293
293
|
toggleTable: be,
|
|
294
294
|
toggleTooltip: ke,
|
|
295
295
|
toggleAnnotator: j
|
|
296
|
-
}), (t, o) => (
|
|
296
|
+
}), (t, o) => (n(), u("div", {
|
|
297
297
|
class: U(`vue-ui-onion ${T.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
298
298
|
ref_key: "onionChart",
|
|
299
299
|
ref: A,
|
|
@@ -302,7 +302,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
302
302
|
onMouseenter: o[4] || (o[4] = () => i(re)(!0)),
|
|
303
303
|
onMouseleave: o[5] || (o[5] = () => i(re)(!1))
|
|
304
304
|
}, [
|
|
305
|
-
e.value.userOptions.buttons.annotator ? (
|
|
305
|
+
e.value.userOptions.buttons.annotator ? (n(), C(pt, {
|
|
306
306
|
key: 0,
|
|
307
307
|
svgRef: i(ie),
|
|
308
308
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -310,20 +310,20 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
310
310
|
active: Y.value,
|
|
311
311
|
onClose: j
|
|
312
312
|
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
313
|
-
Se.value ? (
|
|
313
|
+
Se.value ? (n(), u("div", {
|
|
314
314
|
key: 1,
|
|
315
315
|
ref_key: "noTitle",
|
|
316
316
|
ref: le,
|
|
317
317
|
class: "vue-data-ui-no-title-space",
|
|
318
318
|
style: "height:36px; width: 100%;background:transparent"
|
|
319
319
|
}, null, 512)) : g("", !0),
|
|
320
|
-
e.value.style.chart.title.text ? (
|
|
320
|
+
e.value.style.chart.title.text ? (n(), u("div", {
|
|
321
321
|
key: 2,
|
|
322
322
|
ref_key: "chartTitle",
|
|
323
323
|
ref: ee,
|
|
324
324
|
style: "width:100%;background:transparent"
|
|
325
325
|
}, [
|
|
326
|
-
(
|
|
326
|
+
(n(), C(rt, {
|
|
327
327
|
key: `title_${oe.value}`,
|
|
328
328
|
config: {
|
|
329
329
|
title: {
|
|
@@ -337,7 +337,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
337
337
|
}
|
|
338
338
|
}, null, 8, ["config"]))
|
|
339
339
|
], 512)) : g("", !0),
|
|
340
|
-
e.value.userOptions.show && D.value && (i(ue) || i(G)) ? (
|
|
340
|
+
e.value.userOptions.show && D.value && (i(ue) || i(G)) ? (n(), C(it, {
|
|
341
341
|
ref_key: "details",
|
|
342
342
|
ref: Ae,
|
|
343
343
|
key: `user_options${Z.value}`,
|
|
@@ -373,7 +373,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
373
373
|
t.$slots.menuIcon ? {
|
|
374
374
|
name: "menuIcon",
|
|
375
375
|
fn: f(({ isOpen: a, color: l }) => [
|
|
376
|
-
d(t.$slots, "menuIcon",
|
|
376
|
+
d(t.$slots, "menuIcon", O(P({ isOpen: a, color: l })), void 0, !0)
|
|
377
377
|
]),
|
|
378
378
|
key: "0"
|
|
379
379
|
} : void 0,
|
|
@@ -415,41 +415,41 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
415
415
|
t.$slots.optionFullscreen ? {
|
|
416
416
|
name: "optionFullscreen",
|
|
417
417
|
fn: f(({ toggleFullscreen: a, isFullscreen: l }) => [
|
|
418
|
-
d(t.$slots, "optionFullscreen",
|
|
418
|
+
d(t.$slots, "optionFullscreen", O(P({ toggleFullscreen: a, isFullscreen: l })), void 0, !0)
|
|
419
419
|
]),
|
|
420
420
|
key: "6"
|
|
421
421
|
} : void 0,
|
|
422
422
|
t.$slots.optionAnnotator ? {
|
|
423
423
|
name: "optionAnnotator",
|
|
424
424
|
fn: f(({ toggleAnnotator: a, isAnnotator: l }) => [
|
|
425
|
-
d(t.$slots, "optionAnnotator",
|
|
425
|
+
d(t.$slots, "optionAnnotator", O(P({ toggleAnnotator: a, isAnnotator: l })), void 0, !0)
|
|
426
426
|
]),
|
|
427
427
|
key: "7"
|
|
428
428
|
} : void 0
|
|
429
429
|
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
430
|
-
D.value ? (
|
|
430
|
+
D.value ? (n(), u("svg", {
|
|
431
431
|
key: 4,
|
|
432
432
|
ref_key: "svgRef",
|
|
433
433
|
ref: ie,
|
|
434
434
|
xmlns: i(tt),
|
|
435
435
|
class: U({ "vue-data-ui-fullscreen--on": T.value, "vue-data-ui-fulscreen--off": !T.value }),
|
|
436
|
-
viewBox: `0 0 ${
|
|
436
|
+
viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
|
|
437
437
|
style: B(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
438
438
|
}, [
|
|
439
439
|
$e(gt),
|
|
440
|
-
t.$slots["chart-background"] ? (
|
|
440
|
+
t.$slots["chart-background"] ? (n(), u("foreignObject", {
|
|
441
441
|
key: 0,
|
|
442
442
|
x: 0,
|
|
443
443
|
y: 0,
|
|
444
|
-
width:
|
|
445
|
-
height:
|
|
444
|
+
width: s.value.width <= 0 ? 10 : s.value.width,
|
|
445
|
+
height: s.value.height <= 0 ? 10 : s.value.height,
|
|
446
446
|
style: {
|
|
447
447
|
pointerEvents: "none"
|
|
448
448
|
}
|
|
449
449
|
}, [
|
|
450
450
|
d(t.$slots, "chart-background", {}, void 0, !0)
|
|
451
451
|
], 8, $t)) : g("", !0),
|
|
452
|
-
(
|
|
452
|
+
(n(!0), u(M, null, N(b.value, (a, l) => (n(), u("circle", {
|
|
453
453
|
cx: c.value.centerX,
|
|
454
454
|
cy: c.value.centerY,
|
|
455
455
|
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
@@ -462,7 +462,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
462
462
|
class: U({ "vue-ui-onion-path": !0, "vue-ui-onion-blur": e.value.useBlurOnHover && ![null, void 0].includes(k.value) && k.value !== l }),
|
|
463
463
|
style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
|
|
464
464
|
}, null, 10, Ct))), 256)),
|
|
465
|
-
(
|
|
465
|
+
(n(!0), u(M, null, N(b.value, (a, l) => (n(), u("circle", {
|
|
466
466
|
cx: c.value.centerX,
|
|
467
467
|
cy: c.value.centerY,
|
|
468
468
|
r: a.radius < 0 ? 1e-4 : a.radius,
|
|
@@ -475,25 +475,25 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
475
475
|
"stroke-linecap": "round",
|
|
476
476
|
style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
|
|
477
477
|
}, null, 10, xt))), 256)),
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
_("defs", null, [
|
|
479
|
+
_("filter", {
|
|
480
480
|
id: `blur_${x.value}`,
|
|
481
481
|
x: "-50%",
|
|
482
482
|
y: "-50%",
|
|
483
483
|
width: "200%",
|
|
484
484
|
height: "200%"
|
|
485
485
|
}, [
|
|
486
|
-
|
|
486
|
+
_("feGaussianBlur", {
|
|
487
487
|
in: "SourceGraphic",
|
|
488
488
|
stdDeviation: 100 / e.value.style.chart.gradientIntensity
|
|
489
|
-
}, null, 8,
|
|
489
|
+
}, null, 8, _t)
|
|
490
490
|
], 8, Tt)
|
|
491
491
|
]),
|
|
492
|
-
e.value.style.chart.useGradient ? (
|
|
492
|
+
e.value.style.chart.useGradient ? (n(), u("g", {
|
|
493
493
|
key: 1,
|
|
494
494
|
filter: `url(#blur_${x.value})`
|
|
495
495
|
}, [
|
|
496
|
-
(
|
|
496
|
+
(n(!0), u(M, null, N(b.value, (a, l) => (n(), u("circle", {
|
|
497
497
|
cx: c.value.centerX,
|
|
498
498
|
cy: c.value.centerY,
|
|
499
499
|
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
@@ -505,8 +505,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
505
505
|
"stroke-dashoffset": a.path.dashOffset,
|
|
506
506
|
style: { transform: "rotate(-90deg)", "transform-origin": "50% 50%" }
|
|
507
507
|
}, null, 8, Pt))), 256))
|
|
508
|
-
], 8,
|
|
509
|
-
(
|
|
508
|
+
], 8, Ot)) : g("", !0),
|
|
509
|
+
(n(!0), u(M, null, N(b.value, (a, l) => (n(), u("circle", {
|
|
510
510
|
cx: c.value.centerX,
|
|
511
511
|
cy: c.value.centerY,
|
|
512
512
|
r: a.radius <= 0 ? 1e-4 : a.radius,
|
|
@@ -527,8 +527,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
527
527
|
k.value = void 0, L.value = !1;
|
|
528
528
|
})
|
|
529
529
|
}, null, 40, It))), 256)),
|
|
530
|
-
e.value.style.chart.layout.labels.show ? (
|
|
531
|
-
(
|
|
530
|
+
e.value.style.chart.layout.labels.show ? (n(), u("g", At, [
|
|
531
|
+
(n(!0), u(M, null, N(b.value, (a, l) => (n(), u("g", {
|
|
532
532
|
onMouseenter: (p) => me({
|
|
533
533
|
datapoint: a,
|
|
534
534
|
show: !0,
|
|
@@ -538,9 +538,9 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
538
538
|
k.value = void 0, L.value = !1;
|
|
539
539
|
})
|
|
540
540
|
}, [
|
|
541
|
-
y.value.includes(a.id) ? g("", !0) : (
|
|
541
|
+
y.value.includes(a.id) ? g("", !0) : (n(), u("text", {
|
|
542
542
|
key: 0,
|
|
543
|
-
x:
|
|
543
|
+
x: s.value.width / 2 - $.value.gutter * 0.8 + e.value.style.chart.layout.labels.offsetX,
|
|
544
544
|
y: a.labelY + e.value.style.chart.layout.labels.offsetY,
|
|
545
545
|
"text-anchor": "end",
|
|
546
546
|
"font-size": e.value.style.chart.layout.labels.fontSize,
|
|
@@ -573,12 +573,12 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
573
573
|
)})` : ""}`), 9, Ft))
|
|
574
574
|
], 40, St))), 256))
|
|
575
575
|
])) : g("", !0),
|
|
576
|
-
d(t.$slots, "svg", { svg:
|
|
576
|
+
d(t.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
577
577
|
], 14, wt)) : g("", !0),
|
|
578
|
-
t.$slots.watermark ? (
|
|
579
|
-
d(t.$slots, "watermark",
|
|
578
|
+
t.$slots.watermark ? (n(), u("div", Mt, [
|
|
579
|
+
d(t.$slots, "watermark", O(P({ isPrinting: i(de) || i(ve) })), void 0, !0)
|
|
580
580
|
])) : g("", !0),
|
|
581
|
-
D.value ? g("", !0) : (
|
|
581
|
+
D.value ? g("", !0) : (n(), C(ht, {
|
|
582
582
|
key: 6,
|
|
583
583
|
config: {
|
|
584
584
|
type: "onion",
|
|
@@ -590,18 +590,18 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
}, null, 8, ["config"])),
|
|
593
|
-
|
|
593
|
+
_("div", {
|
|
594
594
|
ref_key: "chartLegend",
|
|
595
595
|
ref: te
|
|
596
596
|
}, [
|
|
597
|
-
e.value.style.chart.legend.show ? (
|
|
598
|
-
key: `legend_${
|
|
597
|
+
e.value.style.chart.legend.show ? (n(), C(ct, {
|
|
598
|
+
key: `legend_${ne.value}`,
|
|
599
599
|
legendSet: v.value,
|
|
600
600
|
config: Le.value,
|
|
601
601
|
onClickMarker: o[2] || (o[2] = ({ legend: a }) => pe(a.id))
|
|
602
602
|
}, {
|
|
603
603
|
item: f(({ legend: a }) => [
|
|
604
|
-
|
|
604
|
+
_("div", {
|
|
605
605
|
"data-cy-legend-item": "",
|
|
606
606
|
onClick: (l) => a.segregate(),
|
|
607
607
|
style: B(`opacity:${y.value.includes(a.id) ? 0.5 : 1}`)
|
|
@@ -613,7 +613,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
613
613
|
legend: v.value
|
|
614
614
|
}, void 0, !0)
|
|
615
615
|
], 512),
|
|
616
|
-
t.$slots.source ? (
|
|
616
|
+
t.$slots.source ? (n(), u("div", {
|
|
617
617
|
key: 7,
|
|
618
618
|
ref_key: "source",
|
|
619
619
|
ref: ae,
|
|
@@ -638,14 +638,14 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
638
638
|
isCustom: i(xe)(e.value.style.chart.tooltip.customFormat)
|
|
639
639
|
}, {
|
|
640
640
|
"tooltip-before": f(() => [
|
|
641
|
-
d(t.$slots, "tooltip-before",
|
|
641
|
+
d(t.$slots, "tooltip-before", O(P({ ...W.value })), void 0, !0)
|
|
642
642
|
]),
|
|
643
643
|
"tooltip-after": f(() => [
|
|
644
|
-
d(t.$slots, "tooltip-after",
|
|
644
|
+
d(t.$slots, "tooltip-after", O(P({ ...W.value })), void 0, !0)
|
|
645
645
|
]),
|
|
646
646
|
_: 3
|
|
647
647
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
648
|
-
D.value ? (
|
|
648
|
+
D.value ? (n(), C(ft, {
|
|
649
649
|
key: 8,
|
|
650
650
|
hideDetails: "",
|
|
651
651
|
config: {
|
|
@@ -662,8 +662,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
662
662
|
}
|
|
663
663
|
}, {
|
|
664
664
|
content: f(() => [
|
|
665
|
-
(
|
|
666
|
-
key: `table_${
|
|
665
|
+
(n(), C(dt, {
|
|
666
|
+
key: `table_${se.value}`,
|
|
667
667
|
colNames: z.value.colNames,
|
|
668
668
|
head: z.value.head,
|
|
669
669
|
body: z.value.body,
|
|
@@ -675,7 +675,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
675
675
|
He(I(a), 1)
|
|
676
676
|
]),
|
|
677
677
|
td: f(({ td: a }) => [
|
|
678
|
-
|
|
678
|
+
_("div", { innerHTML: a }, null, 8, Rt)
|
|
679
679
|
]),
|
|
680
680
|
_: 1
|
|
681
681
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|