vue-data-ui 2.3.26 → 2.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -7
- package/dist/{Arrow-BRk7ox-0.cjs → Arrow-HROOtfWV.cjs} +1 -1
- package/dist/{Arrow-Bkhcj4Ua.js → Arrow-O38M_J_k.js} +1 -1
- package/dist/{BaseIcon-r5Y-jYX5.cjs → BaseIcon-CiO8gP9x.cjs} +1 -1
- package/dist/{BaseIcon-Cr58pV0U.js → BaseIcon-D8FXGup9.js} +4 -3
- package/dist/{DataTable-BM_PreHp.cjs → DataTable-C6HTLT7L.cjs} +1 -1
- package/dist/{DataTable-DFEpvyNK.js → DataTable-EqeVt-K-.js} +2 -2
- package/dist/{Legend-C-mWIWYw.js → Legend-8eVERYMn.js} +1 -1
- package/dist/{Legend-yNP9uHMI.cjs → Legend-C_lBCmBu.cjs} +1 -1
- package/dist/{Shape-DBO11ZkD.cjs → Shape-D8RdmYWq.cjs} +1 -1
- package/dist/{Shape-CN-v5JU3.js → Shape-DvcgW6uK.js} +1 -1
- package/dist/{Slicer-CTw_6ddN.cjs → Slicer-BvYL7yVK.cjs} +1 -1
- package/dist/{Slicer-DK9Yp2l3.js → Slicer-CH_5wnFM.js} +1 -1
- package/dist/{Title-R6PrAyfG.cjs → Title-B9iq63n1.cjs} +1 -1
- package/dist/{Title-BFBOWO3Q.js → Title-C3Ez1ceq.js} +1 -1
- package/dist/{Tooltip-DravvC2X.js → Tooltip-7SRMoiu-.js} +1 -1
- package/dist/{Tooltip-DAjRpG7b.cjs → Tooltip-DcDEanxk.cjs} +1 -1
- package/dist/documentation/installation.md +3 -2
- package/dist/index-BQOxn6SH.cjs +4 -0
- package/dist/{index-Ck92ROEN.js → index-DiWO-_ca.js} +874 -537
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +169 -33
- package/dist/types/vue-data-ui.d.ts +169 -33
- package/dist/{useNestedProp-CUrnndD5.cjs → useNestedProp-BtqgWTf9.cjs} +1 -1
- package/dist/{useNestedProp-C0fDv_7c.js → useNestedProp-DNX5EefQ.js} +1 -1
- package/dist/{usePrinter-DBPRZcAN.js → usePrinter-BD40aUzH.js} +1 -1
- package/dist/{usePrinter-c6hW2FYl.cjs → usePrinter-Q1J--baX.cjs} +1 -1
- package/dist/{vue-data-ui-BhnYYgwX.js → vue-data-ui-GHpxkf8a.js} +64 -62
- package/dist/vue-data-ui-yd5q4Ura.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +37 -36
- package/dist/{vue-ui-3d-bar-B2bAI0Ok.js → vue-ui-3d-bar-CAmoj5dT.js} +7 -7
- package/dist/{vue-ui-3d-bar-DXLZL0d1.cjs → vue-ui-3d-bar-DkJ4c3HQ.cjs} +1 -1
- package/dist/{vue-ui-accordion-CYyb5N_o.js → vue-ui-accordion-CiNdgRO9.js} +3 -3
- package/dist/{vue-ui-accordion-jSupvtFc.cjs → vue-ui-accordion-ogVvFfQy.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DfD0KmQj.js → vue-ui-age-pyramid-BrTpbEha.js} +8 -8
- package/dist/{vue-ui-age-pyramid-07V7HAUc.cjs → vue-ui-age-pyramid-CkKVbbl8.cjs} +1 -1
- package/dist/{vue-ui-annotator-DPxczJLi.js → vue-ui-annotator-B9IqZ-Hy.js} +1 -1
- package/dist/{vue-ui-annotator-Cn3IeVBP.cjs → vue-ui-annotator-QbetAXoj.cjs} +1 -1
- package/dist/{vue-ui-candlestick-3oyL2e4C.cjs → vue-ui-candlestick-BvRwlc3d.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D5lyf_Oa.js → vue-ui-candlestick-XjjwFaDO.js} +9 -9
- package/dist/{vue-ui-carousel-table-BolCtd-r.cjs → vue-ui-carousel-table-DtxcnSEp.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CMm6zqzo.js → vue-ui-carousel-table-KYENY5gp.js} +4 -4
- package/dist/{vue-ui-chestnut-7EjCEIHL.cjs → vue-ui-chestnut-C7gFvKLJ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BaZuTrGs.js → vue-ui-chestnut-DfIcguJd.js} +6 -6
- package/dist/{vue-ui-cursor-BNflEMT2.js → vue-ui-cursor-C4pJe90O.js} +2 -2
- package/dist/{vue-ui-cursor-D_Q1P1gt.cjs → vue-ui-cursor-COS_MXr8.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CjPmVfs3.js → vue-ui-dashboard-B_NUnxEF.js} +2 -2
- package/dist/{vue-ui-dashboard-D2RbUnMC.cjs → vue-ui-dashboard-DNOjWStr.cjs} +1 -1
- package/dist/{vue-ui-digits-CgrkyBWm.cjs → vue-ui-digits-Vx5prxaT.cjs} +1 -1
- package/dist/{vue-ui-digits-DZPhwYe-.js → vue-ui-digits-uufqLbRt.js} +2 -2
- package/dist/{vue-ui-donut-CT4WPUa9.js → vue-ui-donut-C33U3e8H.js} +9 -9
- package/dist/{vue-ui-donut-OZoCX5cL.cjs → vue-ui-donut-CeHnjIGu.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-HBigDBJ1.js → vue-ui-donut-evolution-IzfAVo5I.js} +9 -9
- package/dist/{vue-ui-donut-evolution-B5QxzbPT.cjs → vue-ui-donut-evolution-hHfvz1Yd.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BbsbYS3D.js → vue-ui-dumbbell-KvrVLLw6.js} +8 -8
- package/dist/{vue-ui-dumbbell-D3bJRtj_.cjs → vue-ui-dumbbell-z_Ck4W33.cjs} +1 -1
- package/dist/{vue-ui-flow-JFuGf_sv.js → vue-ui-flow-BjMikE9b.js} +7 -7
- package/dist/{vue-ui-flow-CfoQVPzv.cjs → vue-ui-flow-Dg4dkrcd.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CvZ1nzpB.cjs → vue-ui-galaxy-B8EoId23.cjs} +1 -1
- package/dist/{vue-ui-galaxy-e4ZjPVWn.js → vue-ui-galaxy-BdgveN18.js} +9 -9
- package/dist/{vue-ui-gauge-KjRrEYR0.js → vue-ui-gauge-D01FLnNz.js} +5 -5
- package/dist/{vue-ui-gauge-B_LND1ru.cjs → vue-ui-gauge-D8pokfoA.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CBtza3IW.cjs → vue-ui-gizmo-8lKc8m8b.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DzUxGQT6.js → vue-ui-gizmo-Cp-EftjP.js} +2 -2
- package/dist/{vue-ui-heatmap-BYrZ7lqp.js → vue-ui-heatmap-BEsvmj5R.js} +8 -8
- package/dist/{vue-ui-heatmap-CT1YT1xR.cjs → vue-ui-heatmap-DvpvKq3Q.cjs} +1 -1
- package/dist/{vue-ui-kpi-C5hCo3ZN.js → vue-ui-kpi-D6rVKouk.js} +2 -2
- package/dist/{vue-ui-kpi-DViXiLEh.cjs → vue-ui-kpi-PWurAGxE.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DDcjfpGi.cjs → vue-ui-mini-loader-BsypWozL.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BVSeWn2P.js → vue-ui-mini-loader-YV68i0nk.js} +2 -2
- package/dist/{vue-ui-molecule-pOHE_E-U.js → vue-ui-molecule-BWYCf3Km.js} +9 -9
- package/dist/{vue-ui-molecule--7cCYOj1.cjs → vue-ui-molecule-Bx3fXHnw.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DhmpKZpW.cjs → vue-ui-mood-radar-C6devC4e.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Co6cLOze.js → vue-ui-mood-radar-DsZozq6x.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BFyjhjQ_.cjs → vue-ui-nested-donuts-BtT3VsSf.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-kZh0P2Zc.js → vue-ui-nested-donuts-qaViBhR3.js} +9 -9
- package/dist/{vue-ui-onion-DSGKwLbh.js → vue-ui-onion-0iFsjuLM.js} +9 -9
- package/dist/{vue-ui-onion-BoKPJLJS.cjs → vue-ui-onion-9ATTDUpw.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BLAKE17u.cjs → vue-ui-parallel-coordinate-plot-BkZOKTIS.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-B1I7MZP6.js → vue-ui-parallel-coordinate-plot-DxDFs1Lb.js} +10 -10
- package/dist/{vue-ui-quadrant-BIPClpre.cjs → vue-ui-quadrant-DD4H_Dhk.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CHdlKi32.js → vue-ui-quadrant-Tw7SKMbQ.js} +10 -10
- package/dist/{vue-ui-quick-chart-ChnLIxWE.js → vue-ui-quick-chart-CpFHKtpm.js} +6 -6
- package/dist/{vue-ui-quick-chart-5GZ03bOo.cjs → vue-ui-quick-chart-D1udOl47.cjs} +1 -1
- package/dist/{vue-ui-radar-BWPQ2p4R.cjs → vue-ui-radar-CZmJDj3q.cjs} +1 -1
- package/dist/{vue-ui-radar-BIogM1O1.js → vue-ui-radar-D5FV2IDm.js} +10 -10
- package/dist/{vue-ui-rating-BI9eigGC.cjs → vue-ui-rating-DTWIh_CV.cjs} +1 -1
- package/dist/{vue-ui-rating-Y3i8Ogz9.js → vue-ui-rating-Dds9tjxd.js} +2 -2
- package/dist/{vue-ui-relation-circle-m1hqaBQ0.js → vue-ui-relation-circle-B2p8F7-L.js} +5 -5
- package/dist/{vue-ui-relation-circle-9tS5nJOC.cjs → vue-ui-relation-circle-Cu9lKkX3.cjs} +1 -1
- package/dist/{vue-ui-rings-BGa6d8nO.js → vue-ui-rings-BKzCFSx-.js} +9 -9
- package/dist/{vue-ui-rings-C2f4ARZJ.cjs → vue-ui-rings-DN7XmhKZ.cjs} +1 -1
- package/dist/{vue-ui-scatter-B5aIcdg9.js → vue-ui-scatter-CwV9l1P7.js} +10 -10
- package/dist/{vue-ui-scatter-CSAIrCEA.cjs → vue-ui-scatter-DJlC5mz4.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BxURLkX-.js → vue-ui-screenshot-Bo6i-aRF.js} +1 -1
- package/dist/{vue-ui-screenshot-CHnimNZm.cjs → vue-ui-screenshot-CnPWz57l.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DwEcR_uq.cjs → vue-ui-skeleton-CcrGR_Vh.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B_c8tnen.js → vue-ui-skeleton-CeNL0kH-.js} +2 -2
- package/dist/{vue-ui-smiley-UfNprSwL.cjs → vue-ui-smiley-BBcmwq4z.cjs} +1 -1
- package/dist/{vue-ui-smiley-CV3_wGOs.js → vue-ui-smiley-BGMzw-SW.js} +2 -2
- package/dist/{vue-ui-spark-trend-7KqTeaKP.js → vue-ui-spark-trend-CSC9zmt7.js} +4 -4
- package/dist/{vue-ui-spark-trend-DgqT22Rz.cjs → vue-ui-spark-trend-DlvTlA9z.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-ekQGLCse.js → vue-ui-sparkbar-0CNZluKs.js} +3 -3
- package/dist/{vue-ui-sparkbar-DZoXx0tC.cjs → vue-ui-sparkbar-Di-BPkJ0.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-7hgIimV9.cjs → vue-ui-sparkgauge-B5g5nxUh.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CsU1IpLn.js → vue-ui-sparkgauge-DJPt0cLe.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CRY_Y5eU.cjs → vue-ui-sparkhistogram-BhkYmR4U.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-_S3BGzoc.js → vue-ui-sparkhistogram-DpvQcFls.js} +4 -4
- package/dist/{vue-ui-sparkline-BR6TRx3i.cjs → vue-ui-sparkline-Bw3y-88R.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DRu2dwsD.js → vue-ui-sparkline-CDSg9rhl.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-aI73Hnxf.cjs → vue-ui-sparkstackbar-Ckcir2dk.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DbxeqSNo.js → vue-ui-sparkstackbar-DveNwcVx.js} +3 -3
- package/dist/vue-ui-stackbar-CZUsUeZ_.js +750 -0
- package/dist/vue-ui-stackbar-jNWFgXiA.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CuhUA0Qj.cjs → vue-ui-strip-plot-CzHFNhr3.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-B1C5JAka.js → vue-ui-strip-plot-lVVqtsNc.js} +9 -9
- package/dist/{vue-ui-table-vZxmfkYh.js → vue-ui-table-8hNkBy1z.js} +1 -1
- package/dist/{vue-ui-table-heatmap-B-we4-9Z.js → vue-ui-table-heatmap-BAPA4nvf.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CMASM_wg.cjs → vue-ui-table-heatmap-HgHQKSax.cjs} +1 -1
- package/dist/{vue-ui-table-BKq6uaQQ.cjs → vue-ui-table-qtBWpg0m.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DBBEauiC.js → vue-ui-table-sparkline-DZY_23mg.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CXr9vhM1.cjs → vue-ui-table-sparkline-Q8y6tloS.cjs} +1 -1
- package/dist/{vue-ui-thermometer-8Nd55_MN.cjs → vue-ui-thermometer-Cbu9jVvC.cjs} +1 -1
- package/dist/{vue-ui-thermometer-_KBWIP2u.js → vue-ui-thermometer-CcH1qmLq.js} +5 -5
- package/dist/{vue-ui-timer-CgYqGFuQ.cjs → vue-ui-timer-C52mSn4m.cjs} +1 -1
- package/dist/{vue-ui-timer-D_UhMYSm.js → vue-ui-timer-DJfYr02u.js} +4 -4
- package/dist/{vue-ui-tiremarks-Dy1h0ZlT.js → vue-ui-tiremarks-CcLcd5oA.js} +5 -5
- package/dist/{vue-ui-tiremarks-7TlDnrfz.cjs → vue-ui-tiremarks-dNuNMt_R.cjs} +1 -1
- package/dist/{vue-ui-treemap-DrXs6PXS.js → vue-ui-treemap-BOz94BVK.js} +9 -9
- package/dist/{vue-ui-treemap-feRelA00.cjs → vue-ui-treemap-orjA7Y0U.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-ICikmicE.cjs → vue-ui-vertical-bar-BHIt5cjc.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BcIZTywJ.js → vue-ui-vertical-bar-BquCm_UG.js} +9 -9
- package/dist/{vue-ui-waffle-DtIGHSlB.js → vue-ui-waffle-CNlp7RTS.js} +9 -9
- package/dist/{vue-ui-waffle-CGhfSP2_.cjs → vue-ui-waffle-Dv8pXiYm.cjs} +1 -1
- package/dist/{vue-ui-wheel-EdABo6ty.cjs → vue-ui-wheel-BVjbh4oM.cjs} +1 -1
- package/dist/{vue-ui-wheel-B6Cya6I_.js → vue-ui-wheel-DMRiVkhu.js} +5 -5
- package/dist/{vue-ui-word-cloud-narokI2y.js → vue-ui-word-cloud-CHRE8f_k.js} +6 -6
- package/dist/{vue-ui-word-cloud-DQV03srb.cjs → vue-ui-word-cloud-CZum_IjT.cjs} +1 -1
- package/dist/{vue-ui-xy-DOWVG8x2.cjs → vue-ui-xy-BOoG4xg8.cjs} +1 -1
- package/dist/{vue-ui-xy-D1yhL28g.js → vue-ui-xy-CsFr8tix.js} +12 -12
- package/dist/{vue-ui-xy-canvas-Dp8YKKTs.cjs → vue-ui-xy-canvas-BHa3-phi.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D2VfaNJf.js → vue-ui-xy-canvas-Bb2Z3E-7.js} +10 -10
- package/package.json +2 -1
- package/dist/index-D2z8eN-t.cjs +0 -4
- package/dist/vue-data-ui-B1MbygY4.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-BtqgWTf9.cjs"),O=require("./index-BQOxn6SH.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-BtqgWTf9.cjs"),L=require("./index-BQOxn6SH.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const u=e,$=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes(u.quanta)?$.value.X:$.value[u.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as k, computed as d, openBlock as $, createElementBlock as i, Fragment as o, createElementVNode as l, createCommentVNode as m, unref as v, normalizeStyle as C, renderList as b, createBlock as N } from "vue";
|
|
2
|
-
import { u as q } from "./useNestedProp-
|
|
3
|
-
import { u as M, X as S } from "./index-
|
|
2
|
+
import { u as q } from "./useNestedProp-DNX5EefQ.js";
|
|
3
|
+
import { u as M, X as S } from "./index-DiWO-_ca.js";
|
|
4
4
|
const w = { key: 0 }, B = ["d", "fill"], F = ["d", "fill"], X = ["d", "fill"], E = ["d", "fill"], I = ["d", "fill"], O = ["d", "fill"], A = ["d", "fill"], D = { key: 1 }, G = ["cx", "cy", "fill"], V = {
|
|
5
5
|
__name: "Digit",
|
|
6
6
|
props: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as g, ref as d, onMounted as Be, onBeforeUnmount as Me, watch as Ge, openBlock as n, createElementBlock as r, normalizeClass as ae, normalizeStyle as C, renderSlot as b, createVNode as oe, createCommentVNode as c, createBlock as J, unref as o, createSlots as Ue, withCtx as m, normalizeProps as E, guardReactiveProps as R, createElementVNode as y, Fragment as j, renderList as W, toDisplayString as k, createTextVNode as $e, nextTick as Ee, pushScopeId as Re, popScopeId as je } from "vue";
|
|
2
|
-
import { u as We, o as Ye, e as Se, g as He, c as Xe, t as qe, a as Je, p as O, b as Ke, d as K, m as Qe, f as N, X as Ze, r as el, i as ll, j as h, k as Y, v as Te, w as tl, n as al, q as ol } from "./index-
|
|
2
|
+
import { u as We, o as Ye, e as Se, g as He, c as Xe, t as qe, a as Je, p as O, b as Ke, d as K, m as Qe, f as N, X as Ze, r as el, i as ll, j as h, k as Y, v as Te, w as tl, n as al, q as ol } from "./index-DiWO-_ca.js";
|
|
3
3
|
import { t as ul, u as sl } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as nl } from "./Title-
|
|
5
|
-
import { u as rl, U as il } from "./usePrinter-
|
|
6
|
-
import { D as vl } from "./DataTable-
|
|
7
|
-
import { _ as cl } from "./Tooltip-
|
|
8
|
-
import { L as dl } from "./Legend-
|
|
9
|
-
import hl from "./vue-ui-skeleton-
|
|
10
|
-
import fl from "./vue-ui-accordion-
|
|
11
|
-
import { u as Le } from "./useNestedProp-
|
|
4
|
+
import { _ as nl } from "./Title-C3Ez1ceq.js";
|
|
5
|
+
import { u as rl, U as il } from "./usePrinter-BD40aUzH.js";
|
|
6
|
+
import { D as vl } from "./DataTable-EqeVt-K-.js";
|
|
7
|
+
import { _ as cl } from "./Tooltip-7SRMoiu-.js";
|
|
8
|
+
import { L as dl } from "./Legend-8eVERYMn.js";
|
|
9
|
+
import hl from "./vue-ui-skeleton-CeNL0kH-.js";
|
|
10
|
+
import fl from "./vue-ui-accordion-CiNdgRO9.js";
|
|
11
|
+
import { u as Le } from "./useNestedProp-DNX5EefQ.js";
|
|
12
12
|
import { _ as yl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const gl = (V) => (Re("data-v-b9acc50e"), V = V(), je(), V), bl = ["id"], pl = ["xmlns", "viewBox"], ml = ["id"], wl = ["stop-color"], kl = ["stop-color"], _l = ["stop-color"], xl = ["id"], Cl = ["id"], $l = /* @__PURE__ */ gl(() => /* @__PURE__ */ y("feColorMatrix", {
|
|
14
14
|
type: "saturate",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D2z8eN-t.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-R6PrAyfG.cjs"),re=require("./usePrinter-c6hW2FYl.cjs"),me=require("./DataTable-BM_PreHp.cjs"),ge=require("./Tooltip-DAjRpG7b.cjs"),be=require("./Legend-yNP9uHMI.cjs"),ke=require("./vue-ui-skeleton-DwEcR_uq.cjs"),we=require("./vue-ui-accordion-jSupvtFc.cjs"),ne=require("./useNestedProp-CUrnndD5.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-b9acc50e"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],Ve=["id"],ze=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Te=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["filter"],Ue={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt={key:3,class:"vue-data-ui-watermark"},lt=["onClick"],ot={key:0,style:{"font-variant-numeric":"tabular-nums"}},at={key:1},rt=["innerHTML"],nt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:ue,emit:D}){const y=B,{vue_ui_donut:se}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),L=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:o}=ae.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});L.value=new ResizeObserver(l),L.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});const h=e.ref(a.createUid()),ie=e.ref(null),T=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ne.useNestedProp({userConfig:y.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:q,isImaging:R,generatePdf:G,generateImage:Y}=re.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),H=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),U=e.ref(null),j=e.ref(null),C=e.ref(!1);function W(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(U.value),v.value=v.value.map((d,M)=>l===M?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,M)=>l===M?{...d,value:n}:d),U.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(j.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),j.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),J=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>W(r),isSegregated:f.value.includes(r)}))),de=e.computed(()=>({cy:"donut-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":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(l,r){return isNaN(l.value/Q(r))?0:(l.value/Q(r)*100).toFixed(0)+"%"}function Q(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},T.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<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&&(u+=`<b>${a.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function P(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function Z(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(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}}),E=e.ref(!1);function fe(l){E.value=l,A.value+=1}const ee=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(l,r){D("selectDatapoint",{datapoint:l,index:r})}function te(){c.value.showTable=!c.value.showTable}function le(){c.value.dataLabels.show=!c.value.dataLabels.show}function oe(){c.value.showTooltip=!c.value.showTooltip}return ue({getData:ce,generatePdf:G,generateCsv:Z,generateImage:Y,toggleTable:te,toggleLabels:le,toggleTooltip:oe}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(R),uid:h.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(G),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:te,onToggleLabels:le,onToggleTooltip:oe},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,Se)):e.createCommentVNode("",!0)]),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,Ve),ze],8,Le),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,Oe)],8,Te)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{T.value=!1,p.value=null}),onClick:u=>z(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix})),13,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,Ye)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:P(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(ee.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ee.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:K(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>z(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:u=>z(o,n)},e.toDisplayString(K(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:u=>z(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,He))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:J.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>W(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",at," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",ot," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:J.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:5,hideDetails:"",config:{open:c.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.createVNode(me.DataTable,{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=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,rt)]),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)],14,_e))}},ut=Ce._export_sfc(nt,[["__scopeId","data-v-b9acc50e"]]);exports.default=ut;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BQOxn6SH.cjs"),ae=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-B9iq63n1.cjs"),re=require("./usePrinter-Q1J--baX.cjs"),me=require("./DataTable-C6HTLT7L.cjs"),ge=require("./Tooltip-DcDEanxk.cjs"),be=require("./Legend-C_lBCmBu.cjs"),ke=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),we=require("./vue-ui-accordion-ogVvFfQy.cjs"),ne=require("./useNestedProp-BtqgWTf9.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-b9acc50e"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],Ve=["id"],ze=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Te=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Pe=["cx","cy","r","fill","filter"],Me=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],Ye=["x","y","fill","font-size"],He=["filter"],Ue={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt={key:3,class:"vue-data-ui-watermark"},lt=["onClick"],ot={key:0,style:{"font-variant-numeric":"tabular-nums"}},at={key:1},rt=["innerHTML"],nt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:ue,emit:D}){const y=B,{vue_ui_donut:se}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),L=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:r,height:o}=ae.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});L.value=new ResizeObserver(l),L.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});const h=e.ref(a.createUid()),ie=e.ref(null),T=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ne.useNestedProp({userConfig:y.config,defaultConfig:se});return l.theme?{...ne.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:q,isImaging:R,generatePdf:G,generateImage:Y}=re.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),H=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),U=e.ref(null),j=e.ref(null),C=e.ref(!1);function W(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(U.value),v.value=v.value.map((d,M)=>l===M?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,M)=>l===M?{...d,value:n}:d),U.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(j.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),j.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),J=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||H.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>W(r),isSegregated:f.value.includes(r)}))),de=e.computed(()=>({cy:"donut-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":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function K(l,r){return isNaN(l.value/Q(r))?0:(l.value/Q(r)*100).toFixed(0)+"%"}function Q(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},T.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<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&&(u+=`<b>${a.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function P(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function Z(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(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}}),E=e.ref(!1);function fe(l){E.value=l,A.value+=1}const ee=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function z(l,r){D("selectDatapoint",{datapoint:l,index:r})}function te(){c.value.showTable=!c.value.showTable}function le(){c.value.dataLabels.show=!c.value.dataLabels.show}function oe(){c.value.showTooltip=!c.value.showTooltip}return ue({getData:ce,generatePdf:G,generateCsv:Z,generateImage:Y,toggleTable:te,toggleLabels:le,toggleTooltip:oe}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${E.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:ie,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(q),isImaging:e.unref(R),uid:h.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(G),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:te,onToggleLabels:le,onToggleTooltip:oe},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}: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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ee)],8,Se)):e.createCommentVNode("",!0)]),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,Ve),ze],8,Le),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,Oe)],8,Te)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:P(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Pe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:P(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{T.value=!1,p.value=null}),onClick:u=>z(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix})),13,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,Ye)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:P(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(ee.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ee.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:K(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>z(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:u=>z(o,n)},e.toDisplayString(K(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:u=>z(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,He))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:J.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>W(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",at," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",ot," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:J.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:5,hideDetails:"",config:{open:c.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.createVNode(me.DataTable,{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=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,rt)]),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)],14,_e))}},ut=Ce._export_sfc(nt,[["__scopeId","data-v-b9acc50e"]]);exports.default=ut;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as x, ref as $, onMounted as Re, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as j, createVNode as Ce, createCommentVNode as v, createBlock as R, unref as y, createSlots as Ue, withCtx as P, renderSlot as T, normalizeProps as le, guardReactiveProps as ae, createElementVNode as c, Fragment as m, renderList as p, toDisplayString as g, withKeys as Xe, createTextVNode as we, nextTick as Ge } from "vue";
|
|
2
|
-
import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-
|
|
3
|
-
import { _ as lt } from "./Title-
|
|
4
|
-
import { u as at, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ot } from "./DataTable-
|
|
6
|
-
import { L as st } from "./Legend-
|
|
7
|
-
import nt from "./vue-ui-skeleton-
|
|
8
|
-
import { S as rt } from "./Slicer-
|
|
9
|
-
import it from "./vue-ui-accordion-
|
|
10
|
-
import { u as ze } from "./useNestedProp-
|
|
2
|
+
import { u as je, o as Be, e as B, g as Ye, c as $e, t as Ke, a as qe, p as Y, b as Je, d as ue, z as Le, m as oe, X as Qe, r as se, A as Ze, i as Se, j as K, k as Ne, D as Ae, n as et, q as tt } from "./index-DiWO-_ca.js";
|
|
3
|
+
import { _ as lt } from "./Title-C3Ez1ceq.js";
|
|
4
|
+
import { u as at, U as ut } from "./usePrinter-BD40aUzH.js";
|
|
5
|
+
import { D as ot } from "./DataTable-EqeVt-K-.js";
|
|
6
|
+
import { L as st } from "./Legend-8eVERYMn.js";
|
|
7
|
+
import nt from "./vue-ui-skeleton-CeNL0kH-.js";
|
|
8
|
+
import { S as rt } from "./Slicer-CH_5wnFM.js";
|
|
9
|
+
import it from "./vue-ui-accordion-CiNdgRO9.js";
|
|
10
|
+
import { u as ze } from "./useNestedProp-DNX5EefQ.js";
|
|
11
11
|
import { _ as ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const vt = ["id"], dt = ["xmlns", "viewBox"], ht = ["id"], yt = ["stop-color"], gt = ["stop-color"], ft = ["id"], bt = ["stop-color"], xt = ["stop-color"], mt = ["stop-color"], pt = { key: 0 }, kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ct = { key: 0 }, wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "font-size", "fill", "font-weight"], St = ["text-anchor", "font-size", "fill", "transform"], Nt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], At = { key: 1 }, zt = ["cx", "cy", "r", "fill"], Ft = { key: 0 }, Pt = { key: 0 }, Dt = ["d", "stroke"], Tt = ["text-anchor", "x", "y", "fill"], Et = ["cx", "cy", "r", "fill"], It = { key: 0 }, Ot = ["cx", "cy", "fill"], Vt = { key: 1 }, Ht = ["d", "fill", "stroke"], Mt = { key: 2 }, Wt = ["d", "fill", "stroke"], Rt = ["x", "y", "font-size", "fill"], Ut = ["x", "y", "width", "fill", "onClick"], Xt = ["x", "y", "width", "height", "onMouseenter", "onClick"], Gt = {
|
|
13
13
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-D2z8eN-t.cjs"),me=require("./Title-R6PrAyfG.cjs"),le=require("./usePrinter-c6hW2FYl.cjs"),ge=require("./DataTable-BM_PreHp.cjs"),fe=require("./Legend-yNP9uHMI.cjs"),ke=require("./vue-ui-skeleton-DwEcR_uq.cjs"),pe=require("./Slicer-CTw_6ddN.cjs"),be=require("./vue-ui-accordion-jSupvtFc.cjs"),oe=require("./useNestedProp-CUrnndD5.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=e.computed(()=>({cy:"donut-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":""}));function O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={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},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),uid:_.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:v.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(B.value.subtotal)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[B.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(B.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.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.createVNode(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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]=l=>F.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BQOxn6SH.cjs"),me=require("./Title-B9iq63n1.cjs"),le=require("./usePrinter-Q1J--baX.cjs"),ge=require("./DataTable-C6HTLT7L.cjs"),fe=require("./Legend-C_lBCmBu.cjs"),ke=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),pe=require("./Slicer-BvYL7yVK.cjs"),be=require("./vue-ui-accordion-ogVvFfQy.cjs"),oe=require("./useNestedProp-BtqgWTf9.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],Ce=["xmlns","viewBox"],_e=["id"],Ee=["stop-color"],Ne=["stop-color"],we=["id"],Se=["stop-color"],Le=["stop-color"],Ve=["stop-color"],$e={key:0},Fe=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:0},De=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","font-size","fill","font-weight"],Oe=["text-anchor","font-size","fill","transform"],Me=["x1","y1","x2","y2","stroke","stroke-width"],Ie={key:1},He=["cx","cy","r","fill"],Re={key:0},We={key:0},Ue=["d","stroke"],Xe=["text-anchor","x","y","fill"],qe=["cx","cy","r","fill"],Ge={key:0},Ye=["cx","cy","fill"],je={key:1},Ke=["d","fill","stroke"],Je={key:2},Qe=["d","fill","stroke"],Ze=["x","y","font-size","fill"],et=["x","y","width","fill","onClick"],tt=["x","y","width","height","onMouseenter","onClick"],lt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},ot=["x","y","width","height","fill"],at=["x1","y1","x2","y2","stroke"],ut=["x1","y2","x2","y1","stroke"],nt=["onKeypress","cx","cy","r"],rt=["d","stroke"],st=["cx","cy","r","fill"],ct=["d","fill","stroke"],it={class:"vue-ui-donut-evolution-focus"},dt=["text-anchor","x","y","fill"],vt=["cx","cy","r","fill"],ht=["cx","cy","r","fill"],yt=["x","y","fill"],mt=["x","y","font-size","fill"],gt={key:3,class:"vue-data-ui-watermark"},ft=["onClick"],kt={key:0},pt={key:1},bt={key:0},xt={key:1},Bt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:ue,emit:I}){const x=ae,{vue_ui_donut_evolution:ne}=c.useConfig(),$=e.computed(()=>!!x.dataset&&x.dataset.length),i=e.ref({start:0,end:Math.max(...x.dataset.map(o=>o.values.length))});function re(){i.value={start:0,end:L.value},W.value+=1}e.onMounted(()=>{c.objectIsEmpty(x.dataset)?c.error({componentName:"VueUiDonutEvolution",type:"dataset"}):x.dataset.length&&x.dataset.forEach((o,r)=>{c.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:r})})})});const _=e.ref(c.createUid()),y=e.ref([]),v=e.ref(null),A=e.ref(null),k=e.ref(!1),B=e.ref(null),H=e.ref(null),R=e.ref(0),W=e.ref(0),t=e.computed(()=>{const o=oe.useNestedProp({userConfig:x.config,defaultConfig:ne});return o.theme?{...oe.useNestedProp({userConfig:c.themes.vue_ui_donut_evolution[o.theme]||x.config,defaultConfig:o}),customPalette:c.themePalettes[o.theme]||c.palette}:o}),{isPrinting:U,isImaging:X,generatePdf:q,generateImage:G}=le.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),se=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),F=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const o=t.value.style.chart.layout.height,r=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=r-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:r,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(x.dataset.forEach((o,r)=>{[null,void 0].includes(o.name)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(o.values)&&c.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:r})}),x.dataset.map((o,r)=>({...o,values:o.values||[],color:c.convertColorToHex(o.color)||se.value[r]||c.palette[r]||c.palette[r%c.palette.length],length:(o.values||[]).length,uid:c.createUid()})))),S=e.computed(()=>C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((r,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(o=>o.length))),g=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const o=[];for(let a=0;a<i.value.end-i.value.start;a+=1){const h=S.value.map(b=>b.values[a]??null),d=h.filter(b=>[void 0,null].includes(b)).length===h.length,p=h.reduce((b,f)=>b+f,0),M=h.map(b=>b/p),w=u.value.left+g.value*a+g.value/2;o.push({index:a,percentages:M,subtotal:d||p<0?null:p,values:h,x:w})}const r=0,l=Math.max(...o.map(a=>a.subtotal)),s=o.length===1?l*2:l;return o.map((a,h)=>{const d=g.value/2*.7,p=d>n.value.width/16?n.value.width/16:d,M=v.value===a.index?n.value.width/16:p,w=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,b=n.value.absoluteHeight-u.value.bottom-n.value.height*a.subtotal/c.calculateNiceScale(r,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...a,y:b,radius:p,activeRadius:M,hoverRadius:w,donut:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,p,p,1.99999,2,1,360,105.25,p/2),donutHover:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},a.x,b,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:c.makeDonut({series:S.value.map((f,te)=>({color:f.color,name:f.name,value:f.values[h]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function z(o){return`${t.value.style.chart.layout.dataLabels.prefix}${isNaN(o)?"-":Number(o.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`}const D=e.computed(()=>({max:Math.max(...m.value.map(o=>o.subtotal)),min:0})),E=e.computed(()=>{const o=m.value.length===1?D.value.max*2:D.value.max;return c.calculateNiceScale(D.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ce(o){return o/E.value.max}const ie=e.computed(()=>E.value.ticks.map(o=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ce(o),value:o})));function Y(o,r){return isNaN(o.value/c.sumByAttribute(r,"value"))?0:(o.value/c.sumByAttribute(r,"value")*100).toFixed(0)+"%"}function j(){k.value||(v.value=null,A.value=null)}function de(o){k.value||(v.value=o.index,A.value=o)}const P=e.ref(null);function T(o,r){o.subtotal&&(A.value=null,v.value=null,k.value=!0,B.value=o,[null,void 0].includes(r)||(P.value=r))}function K(){B.value=null,k.value=!1,P.value=null}const J=e.computed(()=>C.value.map((o,r)=>({name:o.name,value:o.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:o.uid,color:o.color})).sort((o,r)=>r.value-o.value).map(o=>({...o,opacity:y.value.includes(o.uid)?.5:1,segregate:()=>O(o.uid),isSegregated:y.value.includes(o.uid)}))),Q=e.computed(()=>m.value.map(o=>o.subtotal).reduce((o,r)=>o+r,0)),ve=e.computed(()=>({cy:"donut-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":""}));function O(o){if(y.value.includes(o))y.value=y.value.filter(r=>r!==o),I("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(o),I("selectLegend",C.value.find(r=>r.uid===o))}B.value&&T(m.value.find((r,l)=>l===P.value))}const N=e.computed(()=>{const o=[""].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({name:a.name,color:a.color}))).concat(["Σ"]);let r=[];for(let a=0;a<L.value;a+=1){const h=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[a]??0).reduce((d,p)=>d+p,0);r.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[a]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[a]??0,percentage:d.values[a]?d.values[a]/h*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(h.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={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},s=[t.value.table.columnNames.period].concat(C.value.filter(a=>!y.value.includes(a.uid)).map(a=>a.name)).concat(t.value.table.columnNames.total);return{head:o,body:r,config:l,colNames:s}});function he(){return C.value}function Z(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=[...N.value.head.map(h=>h.name??h)],l=[...N.value.body.map(h=>h.map(d=>d.value??d))],s=o.concat([r]).concat(l),a=c.createCsvContent(s);c.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function ye(o){V.value=o,R.value+=1}function ee(){F.value.showTable=!F.value.showTable}return ue({getData:he,generatePdf:q,generateCsv:Z,generateImage:G,toggleTable:ee}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:H,class:e.normalizeClass(`vue-ui-donut-evolution ${V.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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:j},[e.createVNode(me._sfc_main,{config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_options_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(X),uid:_.value,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:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:H.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(q),onGenerateCsv:Z,onGenerateImage:e.unref(G),onToggleTable:ee},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.layout.highlighter.color}${e.unref(c.opacity)[t.value.style.chart.layout.highlighter.opacity]}`},null,8,Ne)],8,_e),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Se),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(c.opacity)[30]},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(c.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Ve)],8,we)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,ze),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*g.value,x2:u.value.left+(s+1)*g.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Pe)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.chart.layout.dataLabels.prefix)+" "+e.toDisplayString(e.unref(c.canShowValue)(l.value)?l.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.chart.layout.dataLabels.suffix),9,Te)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+g.value*s+g.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,Oe)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":v.value!==null||k.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Me)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ie,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Re,[v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(c.calcNutArrowPath)(a,{x:a.center.endX,y:a.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:a.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ue)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(c.calcMarkerOffsetX)(a,!0,0).anchor,x:e.unref(c.calcMarkerOffsetX)(a,!0,3).x,y:e.unref(c.calcMarkerOffsetY)(a),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(a.name)+": "+e.toDisplayString(Y(a,l.donut))+" ("+e.toDisplayString(a.value===null?"-":z(a.value))+") ",9,Xe)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Ge,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ye)):v.value!==null&&v.value===s?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Ke))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(a,h)=>(e.openBlock(),e.createElementBlock("path",{d:a.arcSlice,fill:`${a.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Qe))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==v.value&&v.value!==null||k.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:v.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(z(l.subtotal)),9,Ze)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:n.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:v.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,10,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*g.value,y:u.value.top,width:g.value,height:n.value.height,fill:"transparent",onMouseenter:a=>de(l),onMouseleave:j,onClick:a=>T(l,s),class:e.normalizeClass({"donut-hover":v.value===l.index&&l.subtotal})},null,42,tt))),256)),k.value?(e.openBlock(),e.createElementBlock("g",lt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,ot),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,at),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ut),e.createElementVNode("circle",{"data-cy-close":"",onClick:K,onKeypress:e.withKeys(K,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(c.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,1),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,rt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",it,[e.createElementVNode("text",{"text-anchor":e.unref(c.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(c.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(c.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(Y(l,B.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":z(l.value))+") ",9,dt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,vt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,ht),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(z(B.value.subtotal)),9,yt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[B.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(B.value.index)+Number(i.value.start)]),9,mt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,Ce)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe.Slicer,{key:`slicer_${W.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":r[0]||(r[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":r[1]||(r[1]=l=>i.value.end=l),onReset:re},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:6,legendSet:J.value,config:ve.value,onClickMarker:r[2]||(r[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:a=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(Number(l.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString())+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",pt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",kt," ("+e.toDisplayString(isNaN(l.value/Q.value)?"-":(l.value/Q.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ft)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:J.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(be.default,{key:7,hideDetails:"",config:{open:F.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.createVNode(ge.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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]=l=>F.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",bt,"-")):(e.openBlock(),e.createElementBlock("b",xt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Be))}},Ct=xe._export_sfc(Bt,[["__scopeId","data-v-9d3fb16f"]]);exports.default=Ct;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as m, ref as g, onMounted as K, onBeforeUnmount as me, openBlock as o, createElementBlock as r, normalizeClass as Q, normalizeStyle as F, createVNode as ee, createCommentVNode as b, createBlock as I, unref as d, createSlots as pe, withCtx as _, renderSlot as C, normalizeProps as te, guardReactiveProps as le, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ae, nextTick as _e } from "vue";
|
|
2
|
-
import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-
|
|
2
|
+
import { u as xe, c as se, t as ke, o as Ce, e as oe, g as we, z as $e, f as z, X as re, l as ne, h as ue, n as Le, q as ze } from "./index-DiWO-_ca.js";
|
|
3
3
|
import { t as Xe, u as Ae } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Se } from "./Title-
|
|
5
|
-
import { u as Ne, U as Te } from "./usePrinter-
|
|
6
|
-
import { D as Pe } from "./DataTable-
|
|
7
|
-
import Ge from "./vue-ui-skeleton-
|
|
8
|
-
import { L as Me } from "./Legend-
|
|
9
|
-
import De from "./vue-ui-accordion-
|
|
10
|
-
import { u as ie } from "./useNestedProp-
|
|
4
|
+
import { _ as Se } from "./Title-C3Ez1ceq.js";
|
|
5
|
+
import { u as Ne, U as Te } from "./usePrinter-BD40aUzH.js";
|
|
6
|
+
import { D as Pe } from "./DataTable-EqeVt-K-.js";
|
|
7
|
+
import Ge from "./vue-ui-skeleton-CeNL0kH-.js";
|
|
8
|
+
import { L as Me } from "./Legend-8eVERYMn.js";
|
|
9
|
+
import De from "./vue-ui-accordion-CiNdgRO9.js";
|
|
10
|
+
import { u as ie } from "./useNestedProp-DNX5EefQ.js";
|
|
11
11
|
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Ie = ["id"], Oe = ["xmlns", "viewBox"], Ve = { key: 0 }, Ee = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], We = { key: 1 }, He = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Re = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Be = { key: 2 }, Ue = ["x", "y", "font-size", "fill", "font-weight"], je = ["x", "y", "font-size", "fill"], qe = { key: 3 }, Ye = ["x", "y", "font-size", "fill", "font-weight"], Ze = ["id"], Je = ["stop-color"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], at = ["stop-color"], st = ["id"], ot = ["stop-color"], rt = ["stop-color"], nt = ["id"], ut = ["stop-color"], it = ["stop-color"], ct = { key: 0 }, dt = ["d", "fill"], vt = { key: 1 }, ht = ["x", "y", "height", "width", "fill"], yt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], bt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ft = { key: 2 }, gt = ["x", "y", "fill", "font-size"], mt = { key: 3 }, pt = ["x", "y", "fill", "font-size"], _t = {
|
|
13
13
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D2z8eN-t.cjs"),M=require("./useResponsive-B3TrDDIG.cjs"),Z=require("./Title-R6PrAyfG.cjs"),G=require("./usePrinter-c6hW2FYl.cjs"),J=require("./DataTable-BM_PreHp.cjs"),K=require("./vue-ui-skeleton-DwEcR_uq.cjs"),Q=require("./Legend-yNP9uHMI.cjs"),ee=require("./vue-ui-accordion-jSupvtFc.cjs"),I=require("./useNestedProp-CUrnndD5.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],oe={key:0},re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se={key:1},ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce={key:2},ie=["x","y","font-size","fill","font-weight"],de=["x","y","font-size","fill"],ve={key:3},he=["x","y","font-size","fill","font-weight"],ye=["id"],me=["stop-color"],be=["stop-color"],fe=["stop-color"],ge=["id"],pe=["stop-color"],ke=["stop-color"],xe=["stop-color"],_e=["id"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le={key:0},$e=["d","fill"],Ve={key:1},Se=["x","y","height","width","fill"],ze=["cx","cy","r","fill","stroke","stroke-width"],Xe=["cx","cy","r","fill","stroke","stroke-width"],Ae={key:2},Pe=["x","y","fill","font-size"],Te={key:3},Fe=["x","y","fill","font-size"],De={key:3,class:"vue-data-ui-watermark"},Me=["xmlns","height","width"],Ge=["fill"],Ie=["innerHTML"],Oe={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(O,{expose:H,emit:qe}){const y=O,{vue_ui_dumbbell:q}=s.useConfig(),f=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),i=e.ref(s.createUid()),L=e.ref(0),p=e.ref(null),$=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=I.useNestedProp({userConfig:y.config,defaultConfig:q});return a.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}),k=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=M.throttle(()=>{const{width:n,height:l}=M.useResponsive({chart:p.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});_.value=n,d.value=l/y.dataset.length,v.value=C()});k.value=new ResizeObserver(a),k.value.observe(p.value.parentNode)}}),e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const{isPrinting:S,isImaging:z,generatePdf:X,generateImage:A}=G.usePrinter({elementId:`dumbbell_${i.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),d=e.ref(t.value.style.chart.rowHeight),_=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=d.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+_.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=u.value.ticks.length*(_.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:_.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,c=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:c,y:o.value.top+n*d.value+d.value/2,endVal:a.start}})}const v=e.ref([]),P=e.ref(null),R=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=R.value?(cancelAnimationFrame(P.value),v.value=C()):(v.value=v.value.map((r,c)=>{r.endVal+=l[c]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+c*d.value+d.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,c)=>r+c,0),P.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()});const T=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${i.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${i.value})`:t.value.style.chart.plots.endColor}]),W=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=b.value.head.map((c,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),Y=s.dataLabel({v:100*(b.value.body[h].end/b.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:c.name},B,E,Y]}),l={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.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function F(){e.nextTick(()=>{const a=b.value.head.map((r,c)=>[[r.name],[b.value.body[c].start],[b.value.body[c].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const g=e.ref(!1);function U(a){g.value=a,L.value+=1}function j(){return v.value}function D(){x.value.showTable=!x.value.showTable}return H({getData:j,generatePdf:X,generateCsv:F,generateImage:A,toggleTable:D}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${i.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(z),uid:i.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,onToggleFullscreen:U,onGeneratePdf:e.unref(X),onGenerateCsv:F,onGenerateImage:e.unref(A),onToggleTable:D},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(u.value.ticks.length-1),x2:o.value.left+r*o.value.width/(u.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*d.value,y2:o.value.top+r*d.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ne))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ue)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+(t.value.style.chart.labels.yAxisLabels.showProgression?d.value/3:d.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,ie))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+d.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,de))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(u.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding})),9,he))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,me),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,fe)],8,ye),e.createElementVNode("radialGradient",{id:`end_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,xe)],8,ge)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,we)],8,_e),e.createElementVNode("linearGradient",{id:`grad_negative_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ee)],8,Be)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BQOxn6SH.cjs"),M=require("./useResponsive-B3TrDDIG.cjs"),Z=require("./Title-B9iq63n1.cjs"),G=require("./usePrinter-Q1J--baX.cjs"),J=require("./DataTable-C6HTLT7L.cjs"),K=require("./vue-ui-skeleton-CcrGR_Vh.cjs"),Q=require("./Legend-C_lBCmBu.cjs"),ee=require("./vue-ui-accordion-ogVvFfQy.cjs"),I=require("./useNestedProp-BtqgWTf9.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],oe={key:0},re=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],se={key:1},ne=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ce={key:2},ie=["x","y","font-size","fill","font-weight"],de=["x","y","font-size","fill"],ve={key:3},he=["x","y","font-size","fill","font-weight"],ye=["id"],me=["stop-color"],be=["stop-color"],fe=["stop-color"],ge=["id"],pe=["stop-color"],ke=["stop-color"],xe=["stop-color"],_e=["id"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le={key:0},$e=["d","fill"],Ve={key:1},Se=["x","y","height","width","fill"],ze=["cx","cy","r","fill","stroke","stroke-width"],Xe=["cx","cy","r","fill","stroke","stroke-width"],Ae={key:2},Pe=["x","y","fill","font-size"],Te={key:3},Fe=["x","y","fill","font-size"],De={key:3,class:"vue-data-ui-watermark"},Me=["xmlns","height","width"],Ge=["fill"],Ie=["innerHTML"],Oe={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(O,{expose:H,emit:qe}){const y=O,{vue_ui_dumbbell:q}=s.useConfig(),f=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),i=e.ref(s.createUid()),L=e.ref(0),p=e.ref(null),$=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=I.useNestedProp({userConfig:y.config,defaultConfig:q});return a.theme?{...I.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}),k=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=M.throttle(()=>{const{width:n,height:l}=M.useResponsive({chart:p.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});_.value=n,d.value=l/y.dataset.length,v.value=C()});k.value=new ResizeObserver(a),k.value.observe(p.value.parentNode)}}),e.onBeforeUnmount(()=>{k.value&&k.value.disconnect()});const{isPrinting:S,isImaging:z,generatePdf:X,generateImage:A}=G.usePrinter({elementId:`dumbbell_${i.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),d=e.ref(t.value.style.chart.rowHeight),_=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=d.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+_.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=u.value.ticks.length*(_.value/u.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:_.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,c=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:c,y:o.value.top+n*d.value+d.value/2,endVal:a.start}})}const v=e.ref([]),P=e.ref(null),R=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=R.value?(cancelAnimationFrame(P.value),v.value=C()):(v.value=v.value.map((r,c)=>{r.endVal+=l[c]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+c*d.value+d.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,c)=>r+c,0),P.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()});const T=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${i.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${i.value})`:t.value.style.chart.plots.endColor}]),W=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=b.value.head.map((c,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:b.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),Y=s.dataLabel({v:100*(b.value.body[h].end/b.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:c.name},B,E,Y]}),l={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.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function F(){e.nextTick(()=>{const a=b.value.head.map((r,c)=>[[r.name],[b.value.body[c].start],[b.value.body[c].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const g=e.ref(!1);function U(a){g.value=a,L.value+=1}function j(){return v.value}function D(){x.value.showTable=!x.value.showTable}return H({getData:j,generatePdf:X,generateCsv:F,generateImage:A,toggleTable:D}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:p,class:e.normalizeClass(`vue-ui-dumbbell ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${i.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(G.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(z),uid:i.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,titles:{...t.value.userOptions.buttonTitles},chartElement:p.value,onToggleFullscreen:U,onGeneratePdf:e.unref(X),onGenerateCsv:F,onGenerateImage:e.unref(A),onToggleTable:D},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(u.value.ticks.length-1),x2:o.value.left+r*o.value.width/(u.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*d.value,y2:o.value.top+r*d.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ne))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ue)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+(t.value.style.chart.labels.yAxisLabels.showProgression?d.value/3:d.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,ie))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*d.value+d.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,de))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(u.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding})),9,he))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,me),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,fe)],8,ye),e.createElementVNode("radialGradient",{id:`end_grad_${i.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,xe)],8,ge)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,we)],8,_e),e.createElementVNode("linearGradient",{id:`grad_negative_${i.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ee)],8,Be)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("path",{d:`M
|
|
2
2
|
${l.startX},${l.y+t.value.style.chart.plots.radius/2}
|
|
3
3
|
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
4
4
|
${l.endX},${l.y+t.value.style.chart.plots.radius/2}
|