vue-data-ui 2.10.8 → 2.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-NnfTvwbg.cjs → Arrow-CjydbHaJ.cjs} +1 -1
- package/dist/{Arrow-aCcBx0NS.js → Arrow-CkVAj2ex.js} +1 -1
- package/dist/{BaseIcon-DTt4YbQE.js → BaseIcon-CeAuvfV6.js} +1 -1
- package/dist/{BaseIcon-DmfPEj6j.cjs → BaseIcon-DvVvIgek.cjs} +1 -1
- package/dist/{ColorPicker-DsEujcIN.cjs → ColorPicker-Bc4l4E7Z.cjs} +1 -1
- package/dist/{ColorPicker-DrovFYIL.js → ColorPicker-DcVKrz_V.js} +3 -3
- package/dist/{DataTable-zSU-0X__.cjs → DataTable-CJVWuZQ7.cjs} +1 -1
- package/dist/{DataTable-CX-Ynkp4.js → DataTable-Dz3uePkM.js} +2 -2
- package/dist/{Legend-DFQ4iWI3.cjs → Legend-BVXdf95S.cjs} +1 -1
- package/dist/{Legend-BTvPguV6.js → Legend-DRjI7VTS.js} +2 -2
- package/dist/{PackageVersion-CkUbRQrt.js → PackageVersion-BNm7stW7.js} +1 -1
- package/dist/PackageVersion-NIHFWeLx.cjs +1 -0
- package/dist/{PenAndPaper-Br3OdauM.js → PenAndPaper-Ba1SBNDw.js} +3 -3
- package/dist/{PenAndPaper-CG9o3ymS.cjs → PenAndPaper-dU138eET.cjs} +1 -1
- package/dist/{Shape-D9l3WJGO.cjs → Shape-CwHZ-sW6.cjs} +1 -1
- package/dist/{Shape-Y1FgLdPz.js → Shape-DqWzVzjZ.js} +1 -1
- package/dist/{Slicer-C2GR76As.js → Slicer-9CXQSz7y.js} +2 -2
- package/dist/{Slicer-B7FJCuCB.cjs → Slicer-DLFjRDKI.cjs} +1 -1
- package/dist/{Title-CEZO2hzQ.cjs → Title-CcJuov8a.cjs} +1 -1
- package/dist/{Title-tlFeM12I.js → Title-CiymPFBZ.js} +1 -1
- package/dist/{Tooltip-BCtHh3BT.js → Tooltip-BXojuEca.js} +1 -1
- package/dist/{Tooltip-BZa-QzER.cjs → Tooltip-DolT-Egr.cjs} +1 -1
- package/dist/{dom-to-png-fAhFmKHV.cjs → dom-to-png-BACUnvWN.cjs} +1 -1
- package/dist/{dom-to-png-CjxHTZgX.js → dom-to-png-BbzDwc8c.js} +1 -1
- package/dist/{img-Ds_hWTTu.cjs → img-BCxvOZEr.cjs} +1 -1
- package/dist/{img-w_iFTYRY.js → img-O1YZMZE1.js} +1 -1
- package/dist/{index-Dy2-pNb6.cjs → index-CFHk7XOI.cjs} +1 -1
- package/dist/{index-Co5UfCMK.js → index-DvXHhwi7.js} +1 -1
- package/dist/{pdf-CCdcXY_7.cjs → pdf-Bq_WJR-q.cjs} +1 -1
- package/dist/{pdf-BfkOvZWw.js → pdf-CG4EnFNu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-C22WP03t.js → useNestedProp-Bw2_FZ80.js} +1 -1
- package/dist/{useNestedProp-DQ8Jt3-Y.cjs → useNestedProp-dCmM2zfv.cjs} +1 -1
- package/dist/{usePrinter-BQEYwy4a.cjs → usePrinter-Cr-rXufG.cjs} +1 -1
- package/dist/{usePrinter-D_wgo-7k.js → usePrinter-D0Njbrwg.js} +3 -3
- package/dist/{vue-data-ui-zmg06AF1.cjs → vue-data-ui-BXsbflWH.cjs} +1 -1
- package/dist/{vue-data-ui-C18HDIa2.js → vue-data-ui-ukeuQLYG.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C_gJuhTV.cjs → vue-ui-3d-bar-C3-VA6Iq.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-SB6p5amV.js → vue-ui-3d-bar-CaoKpu9l.js} +9 -9
- package/dist/{vue-ui-accordion-dVGUWjXH.cjs → vue-ui-accordion-BvbhG2QO.cjs} +1 -1
- package/dist/{vue-ui-accordion-CfB_jW1X.js → vue-ui-accordion-rd6DBLB5.js} +3 -3
- package/dist/{vue-ui-age-pyramid-G8ggvkGU.js → vue-ui-age-pyramid-Cjr5nyxr.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DZ_ajGY_.cjs → vue-ui-age-pyramid-Cle-IO4l.cjs} +1 -1
- package/dist/{vue-ui-annotator-DeoWv4A3.js → vue-ui-annotator-DxegikPh.js} +2 -2
- package/dist/{vue-ui-annotator-BkZat_7T.cjs → vue-ui-annotator-Rvcr7Sf7.cjs} +1 -1
- package/dist/{vue-ui-bullet-D9jaszdm.cjs → vue-ui-bullet-BLYaTFAz.cjs} +1 -1
- package/dist/{vue-ui-bullet-CvjS0_Pz.js → vue-ui-bullet-CmuRRP70.js} +8 -8
- package/dist/{vue-ui-candlestick-gnsNiFI3.cjs → vue-ui-candlestick-BieBlp2c.cjs} +1 -1
- package/dist/{vue-ui-candlestick-xBYW3oOn.js → vue-ui-candlestick-DmA7Uqy4.js} +11 -11
- package/dist/{vue-ui-carousel-table-DNW8HJNv.cjs → vue-ui-carousel-table-9SZvnl9Q.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BKQIWhzt.js → vue-ui-carousel-table-CP0CJfcG.js} +4 -4
- package/dist/{vue-ui-chestnut-D9UKh8la.cjs → vue-ui-chestnut-CPF5eohd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C5RprHfl.js → vue-ui-chestnut-rna7-x5E.js} +8 -8
- package/dist/{vue-ui-circle-pack-Cx4gGG1K.js → vue-ui-circle-pack-COHe6gAY.js} +9 -9
- package/dist/{vue-ui-circle-pack-OTXbeD89.cjs → vue-ui-circle-pack-CwtKnUdV.cjs} +1 -1
- package/dist/{vue-ui-cursor-BuEDX1kV.cjs → vue-ui-cursor-B0CTU0OJ.cjs} +1 -1
- package/dist/{vue-ui-cursor-Cdvi-0lD.js → vue-ui-cursor-Bnz6m5UN.js} +2 -2
- package/dist/{vue-ui-dashboard-BAPaHtqr.cjs → vue-ui-dashboard-DZUi9h4u.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BLHl6FJI.js → vue-ui-dashboard-DumW8xZp.js} +62 -62
- package/dist/{vue-ui-digits-CCAt8_aJ.js → vue-ui-digits-AvU7LQwA.js} +2 -2
- package/dist/{vue-ui-digits-YV4qxb86.cjs → vue-ui-digits-C9Lc2vf6.cjs} +1 -1
- package/dist/{vue-ui-donut-CNZIha3Z.js → vue-ui-donut-CF8KPH2H.js} +12 -12
- package/dist/{vue-ui-donut-BvjPFjpd.cjs → vue-ui-donut-CFadUVCm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Dxx5Psl4.cjs → vue-ui-donut-evolution-CF3yvm9u.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DNhwy9qU.js → vue-ui-donut-evolution-D_eA5afL.js} +11 -11
- package/dist/{vue-ui-dumbbell-MGMSs7vG.cjs → vue-ui-dumbbell-CWZNqHum.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BmRkAtBK.js → vue-ui-dumbbell-CwvokBZU.js} +10 -10
- package/dist/vue-ui-flow-D8XUyGoY.cjs +3 -0
- package/dist/{vue-ui-flow-CxhJwDZa.js → vue-ui-flow-DH4I9526.js} +274 -273
- package/dist/{vue-ui-funnel-CJHKcUDg.js → vue-ui-funnel-BYQyM9Qy.js} +9 -9
- package/dist/{vue-ui-funnel-twMmn36_.cjs → vue-ui-funnel-Cj0ZTNhc.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BjBTNZ6j.cjs → vue-ui-galaxy-BviAjFrA.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CDonLoXv.js → vue-ui-galaxy-CKXBzmN1.js} +11 -11
- package/dist/{vue-ui-gauge-DXadxMZn.cjs → vue-ui-gauge-Cy31bXmf.cjs} +1 -1
- package/dist/{vue-ui-gauge-C7L0uVvx.js → vue-ui-gauge-DG6gMQYv.js} +7 -7
- package/dist/{vue-ui-gizmo-u7ypeW6n.cjs → vue-ui-gizmo-17lmQTkY.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C9JuTLL-.js → vue-ui-gizmo-DFndi5tZ.js} +3 -3
- package/dist/{vue-ui-heatmap-Cjckqsrg.cjs → vue-ui-heatmap-BqjWfqcB.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DaAgigHH.js → vue-ui-heatmap-D0qsMawE.js} +10 -10
- package/dist/{vue-ui-history-plot-KoGpnC64.js → vue-ui-history-plot-Cekgkdnm.js} +11 -11
- package/dist/{vue-ui-history-plot-YLMX8PqM.cjs → vue-ui-history-plot-Dgfl_nqu.cjs} +1 -1
- package/dist/{vue-ui-kpi-DNUDGlWM.js → vue-ui-kpi-DVJmaGJs.js} +3 -3
- package/dist/{vue-ui-kpi-GZlFX5zg.cjs → vue-ui-kpi-D_1edGUC.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-D1HhmCbC.cjs → vue-ui-mini-loader-Ba-YuHH3.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-9YvdM0_A.js → vue-ui-mini-loader-DeZTsVLO.js} +2 -2
- package/dist/{vue-ui-molecule-B71fJREj.js → vue-ui-molecule-Bl3QO6ap.js} +11 -11
- package/dist/{vue-ui-molecule-DDsKb9re.cjs → vue-ui-molecule-OfRmGbBu.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BO4yaBxo.cjs → vue-ui-mood-radar-C5m5P61q.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DH4RYmdT.js → vue-ui-mood-radar-DMAnLGTo.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BlxuqLPb.cjs → vue-ui-nested-donuts-DfECvthA.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-bOXvQ01U.js → vue-ui-nested-donuts-pcIPwSEN.js} +11 -11
- package/dist/{vue-ui-onion-BugH4ThJ.cjs → vue-ui-onion-BERoTmw5.cjs} +1 -1
- package/dist/{vue-ui-onion-D7VhEicc.js → vue-ui-onion-BJQrXERJ.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DjTMM1Zt.cjs → vue-ui-parallel-coordinate-plot-CcxszfT5.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Bc5Yr0Yr.js → vue-ui-parallel-coordinate-plot-V5yjq2qt.js} +12 -12
- package/dist/{vue-ui-quadrant-Dni5Lkhg.cjs → vue-ui-quadrant-BjTSploz.cjs} +1 -1
- package/dist/{vue-ui-quadrant-PrjG5beo.js → vue-ui-quadrant-DmBXoM1K.js} +12 -12
- package/dist/{vue-ui-quick-chart-C46V8Ffa.js → vue-ui-quick-chart-8JQHu8_6.js} +9 -9
- package/dist/{vue-ui-quick-chart-LuGKbIvU.cjs → vue-ui-quick-chart-Vg51F_fv.cjs} +1 -1
- package/dist/{vue-ui-radar-05pd47HM.js → vue-ui-radar-B59hKBs9.js} +12 -12
- package/dist/{vue-ui-radar-j2Vgot8p.cjs → vue-ui-radar-DM6Sp8pR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bl_q3TYs.js → vue-ui-rating-BOpo_dKd.js} +2 -2
- package/dist/{vue-ui-rating-ClxiMhPq.cjs → vue-ui-rating-DoWnn_wH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Bu5eYbEg.js → vue-ui-relation-circle-BNSUjYth.js} +7 -7
- package/dist/{vue-ui-relation-circle-BuoQTWw_.cjs → vue-ui-relation-circle-Dw3E2cQS.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-ESRn_Q1y.cjs → vue-ui-ridgeline-CfgyyLHT.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-D4ot7MF8.js → vue-ui-ridgeline-DNLWxIOo.js} +12 -12
- package/dist/{vue-ui-rings-Dyl5VV9I.js → vue-ui-rings-Dz1eSPrm.js} +12 -12
- package/dist/{vue-ui-rings-D7o_vleu.cjs → vue-ui-rings-waaeEddc.cjs} +1 -1
- package/dist/{vue-ui-scatter-njuULIsD.js → vue-ui-scatter-CBfydDzi.js} +12 -12
- package/dist/{vue-ui-scatter-B31kZz0w.cjs → vue-ui-scatter-D66nsMM5.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BSlYUHZA.js → vue-ui-skeleton-CJ9j8gHc.js} +3 -3
- package/dist/{vue-ui-skeleton-Db7PiDqL.cjs → vue-ui-skeleton-DcQQl9nv.cjs} +1 -1
- package/dist/{vue-ui-smiley-BmNRkSub.js → vue-ui-smiley-B62ZaIXL.js} +2 -2
- package/dist/{vue-ui-smiley-CfdbRWq6.cjs → vue-ui-smiley-CKgBpYEI.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CwtYlUEX.cjs → vue-ui-spark-trend-CcHJtofv.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B0Xvu1YP.js → vue-ui-spark-trend-DS6c__u7.js} +5 -5
- package/dist/{vue-ui-sparkbar-Xy7idkhv.cjs → vue-ui-sparkbar-ZAyG8tz6.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-e2-8wHQH.js → vue-ui-sparkbar-oQceGXzy.js} +4 -4
- package/dist/{vue-ui-sparkgauge-vjcDqzGe.cjs → vue-ui-sparkgauge-DK08SKBD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-_cMBBl3V.js → vue-ui-sparkgauge-Nqea8uqi.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BpD6XxfA.cjs → vue-ui-sparkhistogram-CRXHUkEG.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DUyGQgqZ.js → vue-ui-sparkhistogram-D53Fp0iI.js} +5 -5
- package/dist/{vue-ui-sparkline-D1wfG3Yw.js → vue-ui-sparkline-BGytINYe.js} +4 -4
- package/dist/{vue-ui-sparkline-cPPxz94c.cjs → vue-ui-sparkline-CcN5BzJC.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-iRVpx_xT.cjs → vue-ui-sparkstackbar-BzN70G0w.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BCTx016Z.js → vue-ui-sparkstackbar-j7zxJEwR.js} +5 -5
- package/dist/{vue-ui-stackbar--QKW68d6.js → vue-ui-stackbar-DG1zFQ6I.js} +13 -13
- package/dist/{vue-ui-stackbar-DCotybpB.cjs → vue-ui-stackbar-_Rbe0zcH.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BhLBOV7s.js → vue-ui-strip-plot-BXBF0O7V.js} +11 -11
- package/dist/{vue-ui-strip-plot-CdceC4jP.cjs → vue-ui-strip-plot-DfLu7xBj.cjs} +1 -1
- package/dist/{vue-ui-table-DjDENKmJ.js → vue-ui-table-CQkGKA38.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CZdiE-l3.js → vue-ui-table-heatmap-Be3sBs1v.js} +4 -4
- package/dist/{vue-ui-table-heatmap-gbdWhEG_.cjs → vue-ui-table-heatmap-D6q9ISlX.cjs} +1 -1
- package/dist/{vue-ui-table-Cd9UeZXy.cjs → vue-ui-table-jufn4CSz.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-zGotm14D.js → vue-ui-table-sparkline-BGA_BtKK.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BFQ4DQRu.cjs → vue-ui-table-sparkline-DXn5vFtK.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CRhrvWm0.cjs → vue-ui-thermometer-C2QTnZLg.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DA3KgSw1.js → vue-ui-thermometer-D0ajQG3p.js} +7 -7
- package/dist/{vue-ui-timer-DnXYrfrB.cjs → vue-ui-timer-BUgMA6gQ.cjs} +1 -1
- package/dist/{vue-ui-timer-ult9htF3.js → vue-ui-timer-D8pO4CRs.js} +5 -5
- package/dist/{vue-ui-tiremarks-CRXtVmEM.js → vue-ui-tiremarks-BBeVDMLy.js} +7 -7
- package/dist/{vue-ui-tiremarks-Dht-uT9E.cjs → vue-ui-tiremarks-Cz1hC6e6.cjs} +1 -1
- package/dist/{vue-ui-treemap-pbhS4FfC.cjs → vue-ui-treemap-BNuJbnXL.cjs} +1 -1
- package/dist/{vue-ui-treemap-Ck5tHVnE.js → vue-ui-treemap-DUoEwGF0.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BZjsolLB.cjs → vue-ui-vertical-bar-ASDnRvkD.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-egz76l34.js → vue-ui-vertical-bar-j-ZfufVH.js} +12 -12
- package/dist/{vue-ui-waffle-C7za7d0u.cjs → vue-ui-waffle-CHV-QmJq.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrMkCjJJ.js → vue-ui-waffle-Dev3qUVT.js} +12 -12
- package/dist/{vue-ui-wheel-DIgPyNrB.cjs → vue-ui-wheel-Drcpu-bo.cjs} +1 -1
- package/dist/{vue-ui-wheel-DzMpr4xY.js → vue-ui-wheel-JMze39OW.js} +7 -7
- package/dist/{vue-ui-word-cloud-CNqAz548.cjs → vue-ui-word-cloud-B_8TgWf5.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-TS3az-LK.js → vue-ui-word-cloud-Bywulitd.js} +10 -10
- package/dist/{vue-ui-world-DMdqTY5G.cjs → vue-ui-world-BPpDQcP7.cjs} +1 -1
- package/dist/{vue-ui-world-D3X01xYB.js → vue-ui-world-BSDboMw1.js} +11 -11
- package/dist/{vue-ui-xy-CF87Afh2.cjs → vue-ui-xy-Do294mp4.cjs} +2 -2
- package/dist/{vue-ui-xy-tIBPr8r8.js → vue-ui-xy-_RG7ZoSc.js} +16 -16
- package/dist/{vue-ui-xy-canvas-2IL8lPL4.cjs → vue-ui-xy-canvas-BHznnIA0.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BHeV-3t9.js → vue-ui-xy-canvas-Cs3pXcFe.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-DxR-fKLM.cjs +0 -1
- package/dist/vue-ui-flow-B3t_sNr4.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Dy2-pNb6.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),We=require("./Title-CEZO2hzQ.cjs"),Pe=require("./usePrinter-BQEYwy4a.cjs"),je=require("./DataTable-zSU-0X__.cjs"),He=require("./Tooltip-BZa-QzER.cjs"),Je=require("./Legend-DFQ4iWI3.cjs"),Ke=require("./vue-ui-skeleton-Db7PiDqL.cjs"),Qe=require("./vue-ui-accordion-dVGUWjXH.cjs"),Fe=require("./useNestedProp-DQ8Jt3-Y.cjs"),Ze=require("./PackageVersion-DxR-fKLM.cjs"),et=require("./PenAndPaper-CG9o3ymS.cjs"),tt=require("./useUserOptionState-BgepsfED.cjs"),lt=require("./Shape-D9l3WJGO.cjs"),ot=require("./useChartAccessibility-Cm7nkzTG.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),nt=["id"],rt=["xmlns","viewBox"],ut=["width","height"],st={key:1},it=["id"],ct=["stop-color"],dt=["offset","stop-color"],vt=["offset","stop-color"],ht=["stop-color"],ft={key:2},mt=["id","cx","cy"],yt=["stop-color","stop-opacity"],pt=["stop-color"],gt=["id"],kt=["id"],bt=["id"],wt=["flood-color"],Ct=["id"],Bt=["flood-color"],_t=["d","stroke","filter"],xt=["d","stroke","filter"],$t=["cx","cy","r","fill","filter"],St={key:6},Nt=["stroke","d"],Et={key:0},Pt=["d","fill","stroke","stroke-width","filter"],Ft=["d","fill","stroke","stroke-width","filter"],Vt={key:0},Lt=["stroke","d"],Tt={key:0},Ot=["d","stroke","stroke-width","filter"],zt={key:1},At=["d","fill","stroke","stroke-width","filter"],Mt=["d","fill","stroke","stroke-width","filter"],Xt={key:1},Dt=["cx","cy","r","fill","stroke","stroke-width"],Yt=["cx","cy","r","fill","stroke","stroke-width"],It=["cx","cy","r","stroke"],qt=["cx","cy","r","fill"],Rt={key:0},Gt=["d","fill","onMouseenter","onClick"],Ut={key:1},Wt=["cx","cy","r","fill"],jt=["x","y","fill","font-size"],Ht=["x","y","fill","font-size"],Jt=["x","y","fill","font-size"],Kt=["x","y","fill","font-size"],Qt=["filter"],Zt={key:0},el=["x","y"],tl={key:1},ll=["cx","cy","fill","stroke","filter","onClick"],ol=["cx","cy","fill","stroke","filter","onClick"],al=["text-anchor","x","y","fill","font-size","onClick"],nl=["text-anchor","x","y","fill","font-size","onClick"],rl=["text-anchor","x","y","fill","font-size","onClick"],ul=["text-anchor","x","y","fill","font-size","onClick"],sl={key:2},il=["x","y","width"],cl=["x","y","width"],dl={key:5,class:"vue-data-ui-watermark"},vl=["onClick"],hl={key:0,style:{"font-variant-numeric":"tabular-nums"}},fl={key:1},ml=["innerHTML"],yl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Q,{expose:Ve,emit:Le}){const{vue_ui_donut:Te}=n.useConfig(),Oe=e.useSlots(),b=Q,A=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),M=e.ref(null),Z=e.ref(null),ee=e.ref(null),Y=e.ref(null),te=e.ref(null),le=e.ref(null),oe=e.ref(0),ae=e.ref(0),ne=e.ref(0);e.onMounted(()=>{re()}),e.onBeforeUnmount(()=>{Y.value&&Y.value.disconnect()});function re(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{A.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const o=Ee.throttle(()=>{const{width:r,height:l}=Ee.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Z.value:null,legend:t.value.style.chart.legend.show?ee.value:null,source:te.value,noTitle:le.value,padding:de.value});requestAnimationFrame(()=>{u.value.width=r,u.value.height=l})});Y.value=new ResizeObserver(o),Y.value.observe(M.value.parentNode)}}const d=e.ref(n.createUid()),ze=e.ref(null),I=e.ref(!1),U=e.ref(""),p=e.ref(null),ue=e.ref(0);function se(){const o=Fe.useNestedProp({userConfig:b.config,defaultConfig:Te});return o.theme?{...Fe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>se(),set:o=>o}),y=e.ref(!0),$=e.ref([]);function Ae(o,r=1e3,l=50){return new Promise(a=>{const s=o.length;$.value=Array(s).fill(0);let v=0;o.forEach((h,m)=>{setTimeout(()=>{const N=performance.now();function _(D){const G=Math.min((D-N)/r,1),Ue=n.easeOutCubic(G);$.value[m]=h*Ue,$.value=[...$.value],G<1?requestAnimationFrame(_):($.value[m]=h,$.value=[...$.value],v+=1,v===s&&a())}requestAnimationFrame(_)},m*l)})})}e.onMounted(async()=>{const o=b.dataset.map(r=>r.values.reduce((l,a)=>l+a,0));t.value.startAnimation.show&&await Ae(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs),y.value=!1});const{userOptionsVisible:W,setUserOptionsVisibility:ie,keepUserOptionState:ce}=tt.useUserOptionState({config:t.value}),{svgRef:j}=ot.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=se(),W.value=!t.value.userOptions.showOnChartHover,re(),oe.value+=1,ae.value+=1,ne.value+=1,c.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const de=e.computed(()=>{const{top:o,right:r,bottom:l,left:a}=t.value.style.chart.padding;return{css:`padding:${o}px ${r}px ${l}px ${a}px`,top:o,right:r,bottom:l,left:a}}),{isPrinting:ve,isImaging:he,generatePdf:fe,generateImage:me}=Pe.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Me=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ye=e.computed(()=>n.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}),u=e.ref({height:360,width:512}),T=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,r=Math.min(u.value.width,u.value.height)*o,l=r>f.value?f.value:r;return Math.max(l,3)}),pe=Le,S=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:r,seriesIndex:r,ghost:!1,pattern:`pattern_${d.value}_${r}`}))),w=e.ref(S.value);e.watch(()=>S.value,o=>w.value=o);function Xe(){return S.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const x=e.ref([]);e.ref(null),e.ref(null);const V=e.ref(!1);function ge({from:o,to:r,duration:l,onUpdate:a,onDone:s,easing:v=n.easeOutCubic}){const h=performance.now();function m(N){const _=Math.min((N-h)/l,1),D=v(_),G=o+(r-o)*D;a(G,_),_<1?requestAnimationFrame(m):(a(r,1),s&&s())}requestAnimationFrame(m)}function ke(o){const r=S.value.find((s,v)=>v===o);let a=w.value.find((s,v)=>v===o).value;if(x.value.includes(o)){let v=function(){w.value=w.value.map((m,N)=>o===N?{...m,value:s}:m)},h=function(){V.value=!0,ge({from:a,to:s,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(m,N)=>{w.value=w.value.map((_,D)=>o===D?{..._,value:m}:_)},onDone:()=>{v(),V.value=!1}})};x.value=x.value.filter(m=>m!==o);const s=r.value;t.value.serieToggleAnimation.show&&t.value.type==="classic"?h():v()}else if(x.value.length<S.value.length-1){let s=function(){x.value.push(o),w.value=w.value.map((h,m)=>o===m?{...h,value:0}:h)},v=function(){V.value=!0,ge({from:a,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(h,m)=>{w.value=w.value.map((N,_)=>o===_?{...N,value:h}:N)},onDone:()=>{s(),V.value=!1}})};t.value.serieToggleAnimation.show&&t.value.type==="classic"?v():s()}pe("selectLegend",E.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const De=e.computed(()=>b.dataset.reduce((o,r)=>o+r.values.reduce((l,a)=>l+a,0),0)),E=e.computed(()=>{if(y.value){const o=$.value.map((l,a)=>({...S.value[a],value:l,color:S.value[a].color,ghost:!1})),r=De.value-$.value.reduce((l,a)=>l+a,0);return r>0&&o.push({name:"__ghost__",value:r,color:"transparent",ghost:!0}),o}else return w.value.forEach((o,r)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),w.value.map((o,r)=>({...o,seriesIndex:r})).filter((o,r)=>!x.value.includes(r))}),be=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:r})).map((o,r)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:x.value.includes(r)?.5:1,segregate:()=>!V.value&&ke(r),isSegregated:x.value.includes(r)}))),Ye=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":""})),f=e.computed(()=>{const o=Math.min(u.value.width/3,u.value.height/3);return o<55?55:o}),g=e.computed(()=>n.makeDonut({series:E.value},u.value.width/2,u.value.height/2,f.value,f.value,1.99999,2,1,360,105.25,T.value)),C=e.computed(()=>g.value.filter(o=>!o.ghost)),i=e.computed(()=>{const o=Math.max(...E.value.map(l=>l.value)),r=E.value.map(l=>l.value/o);return n.createPolarAreas({series:r,center:{x:u.value.width/2,y:u.value.height/2},maxRadius:Math.min(u.value.width,u.value.height)/3,hasGhost:y.value})});function O(o){return o.x>u.value.width/2+6?"start":o.x<u.value.width/2-6?"end":"middle"}function Ie(o){return o.middlePoint.y>u.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:u.value.width/2,centerY:u.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:u.value.width/2,centerY:u.value.height/2}).y-100}function B(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function H(o,r){const l=o.value/qe(r);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function qe(o){return[...o].map(r=>r.value).reduce((r,l)=>r+l,0)}const k=e.computed(()=>E.value.map(o=>o.value).reduce((o,r)=>o+r,0)),we=e.computed(()=>k.value/E.value.length),Ce=e.computed(()=>o=>V.value?o.proportion*100:o.value/k.value*100),J=e.ref(null),X=e.ref(!1);function Be({datapoint:o,relativeIndex:r,seriesIndex:l,show:a=!1}){J.value={datapoint:o,seriesIndex:l,config:t.value,series:S.value},I.value=a,p.value=r;let s="";const v=t.value.style.chart.tooltip.customFormat;if(X.value=!1,n.isFunction(v))try{const h=v({seriesIndex:l,datapoint:o,series:S.value,config:t.value});typeof h=="string"&&(U.value=h,X.value=!0)}catch{console.warn("Custom format cannot be applied."),X.value=!1}if(!X.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}"/>${Oe.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.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.tooltip.roundingValue}),{datapoint:o,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const h=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${h})</span></div>`:s+=`<b>${h}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),U.value=`<div>${s}</div>`}}function L(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.value})`:""}const P=e.computed(()=>{const o=E.value.map(l=>({name:l.name,color:l.color})),r=E.value.map(l=>l.value);return{head:o,body:r}});function _e(){e.nextTick(()=>{const o=P.value.head.map((a,s)=>[[a.name],[P.value.body[s]],[isNaN(P.value.body[s]/k.value)?"-":P.value.body[s]/k.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(r);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const q=e.computed(()=>{const o=[' <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>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=P.value.head.map((s,v)=>[{color:s.color,name:s.name},P.value.body[v],isNaN(P.value.body[v]/k.value)?"-":(P.value.body[v]/k.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),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.value,t.value.table.columnNames.percentage],head:o,body:r,config:l}}),z=e.ref(!1);function Re(o){z.value=o,ue.value+=1}const xe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ge(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function F(o,r){pe("selectDatapoint",{datapoint:o,index:r})}function $e(){c.value.showTable=!c.value.showTable}function Se(){c.value.dataLabels.show=!c.value.dataLabels.show}function Ne(){c.value.showTooltip=!c.value.showTooltip}const R=e.ref(!1);function K(){R.value=!R.value}return Ve({getData:Xe,generatePdf:fe,generateCsv:_e,generateImage:me,toggleTable:$e,toggleLabels:Se,toggleTooltip:Ne,toggleAnnotator:K}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:M,class:e.normalizeClass(`vue-ui-donut ${z.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;background:${t.value.style.chart.backgroundColor}`),id:`donut__${d.value}`,onMouseenter:r[6]||(r[6]=()=>e.unref(ie)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ie)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(j)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:R.value,svgRef:e.unref(j),onClose:K},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:le,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ce)||e.unref(W))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref_key:"details",ref:ze,key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ve),isImaging:e.unref(he),uid:d.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:z.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:R.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(fe),onGenerateCsv:_e,onGenerateImage:e.unref(me),onToggleTable:$e,onToggleLabels:Se,onToggleTooltip:Ne,onToggleAnnotator:K,style:e.normalizeStyle({visibility:e.unref(ce)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${de.value.css}`)},[e.createVNode(Ze._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),t.value.type==="classic"&&!isNaN(T.value/f.value)?(e.openBlock(),e.createElementBlock("defs",st,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ct),e.createElementVNode("stop",{offset:`${(1-T.value/f.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,dt),e.createElementVNode("stop",{offset:`${(1-T.value/f.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ht)],8,it)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:(isNaN(l.middlePoint.x/u.value.width*100)?0:l.middlePoint.x/u.value.width*100)+"%",cy:(isNaN(l.middlePoint.y/u.value.height*100)?0:l.middlePoint.y/u.value.height*100)+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(g.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":g.value[a].color},null,8,pt)],8,mt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,kt),r[8]||(r[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,gt),e.createElementVNode("filter",{id:`shadow_${d.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,wt)],8,bt),e.createElementVNode("filter",{id:`drop_shadow_${d.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Bt)],8,Ct)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:u.value.width/2,y:u.value.height/2},16,16,!1,!1,T.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a)},null,8,_t)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x},${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y} ${i.value[a].middlePoint.x},${i.value[a].middlePoint.y}`,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,xt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,$t)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.dataset,(l,a)=>(e.openBlock(),e.createElementBlock("defs",{key:`pattern-${l.patternIndex}`},[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a,patternId:`pattern_${d.value}_${a}`}),void 0,!0)]))),128))])):e.createCommentVNode("",!0),k.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Nt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Pt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Ft))),256))],64)):e.createCommentVNode("",!0),k.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.value.length>1?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${d.value})`,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,At))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Mt))),256))])):(e.openBlock(),e.createElementBlock("g",Xt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:`url(#pattern_${d.value}_${g.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Dt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:g.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Yt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,It)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:`url(#gradient_${d.value})`},null,8,qt)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[g.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("path",{d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>Be({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=s=>{I.value=!1,p.value=null}),onClick:s=>F(l,a)},null,40,Gt))),256))])):(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:r[1]||(r[1]=l=>Be({datapoint:g.value[0],relativeIndex:0,seriesIndex:g.value[0].seriesIndex,show:!0})),onMouseleave:r[2]||(r[2]=l=>{I.value=!1,p.value=null}),onClick:r[3]||(r[3]=l=>F(g.value[0],o.i))},null,40,Wt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:u.value.width/2,y:u.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,jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:u.value.width/2,y:u.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(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,k.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:k.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:u.value.width/2,y:u.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,Jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:u.value.width/2,y:u.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(V.value||y.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,we.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:we.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:L(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(xe.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:xe.value,isVisible:B(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:H(l,C.value)}),void 0,!0)])],8,el))])):(e.openBlock(),e.createElementBlock("g",tl,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a)},null,8,ll)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,ol)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),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:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,al)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+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:s=>F(l,a)},e.toDisplayString(l.name),13,nl)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.percentage.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,rl)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y+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({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.name.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,ul)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",sl,[B(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+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(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,isFirstLoad:y.value}},void 0,!0)])],8,il)):e.createCommentVNode("",!0),B(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(O(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width:O(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x),y:Ie(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:"visible",pointerEvents:"none"})},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:O(i.value[a].middlePoint),flexAlign:O(i.value[a].middlePoint),isFirstLoad:y.value}},void 0,!0)])],12,cl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Qt))),256)),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,rt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ve)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ke.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:T.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:ee},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${ne.value}`,legendSet:be.value,config:Ye.value,onClickMarker:r[4]||(r[4]=({i:l})=>ke(l))},e.createSlots({item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${x.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),x.value.includes(a)?(e.openBlock(),e.createElementBlock("span",fl," ( "+e.toDisplayString(Ge(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",hl," ("+e.toDisplayString(isNaN(l.value/k.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,Ce.value(l),e.unref(n.dataLabel)({v:Ce.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,vl)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:be.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:te,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:c.value.showTooltip&&I.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:M.value,content:U.value,isCustom:X.value,isFullscreen:z.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),A.value?(e.openBlock(),e.createBlock(Qe.default,{key:8,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.openBlock(),e.createBlock(je.DataTable,{key:`table_${ae.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.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[5]||(r[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ml)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,nt))}},pl=at._export_sfc(yl,[["__scopeId","data-v-5f5d7ad3"]]);exports.default=pl;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CFHk7XOI.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),We=require("./Title-CcJuov8a.cjs"),Pe=require("./usePrinter-Cr-rXufG.cjs"),je=require("./DataTable-CJVWuZQ7.cjs"),He=require("./Tooltip-DolT-Egr.cjs"),Je=require("./Legend-BVXdf95S.cjs"),Ke=require("./vue-ui-skeleton-DcQQl9nv.cjs"),Qe=require("./vue-ui-accordion-BvbhG2QO.cjs"),Fe=require("./useNestedProp-dCmM2zfv.cjs"),Ze=require("./PackageVersion-NIHFWeLx.cjs"),et=require("./PenAndPaper-dU138eET.cjs"),tt=require("./useUserOptionState-BgepsfED.cjs"),lt=require("./Shape-CwHZ-sW6.cjs"),ot=require("./useChartAccessibility-Cm7nkzTG.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),nt=["id"],rt=["xmlns","viewBox"],ut=["width","height"],st={key:1},it=["id"],ct=["stop-color"],dt=["offset","stop-color"],vt=["offset","stop-color"],ht=["stop-color"],ft={key:2},mt=["id","cx","cy"],yt=["stop-color","stop-opacity"],pt=["stop-color"],gt=["id"],kt=["id"],bt=["id"],wt=["flood-color"],Ct=["id"],Bt=["flood-color"],_t=["d","stroke","filter"],xt=["d","stroke","filter"],$t=["cx","cy","r","fill","filter"],St={key:6},Nt=["stroke","d"],Et={key:0},Pt=["d","fill","stroke","stroke-width","filter"],Ft=["d","fill","stroke","stroke-width","filter"],Vt={key:0},Lt=["stroke","d"],Tt={key:0},Ot=["d","stroke","stroke-width","filter"],zt={key:1},At=["d","fill","stroke","stroke-width","filter"],Mt=["d","fill","stroke","stroke-width","filter"],Xt={key:1},Dt=["cx","cy","r","fill","stroke","stroke-width"],Yt=["cx","cy","r","fill","stroke","stroke-width"],It=["cx","cy","r","stroke"],qt=["cx","cy","r","fill"],Rt={key:0},Gt=["d","fill","onMouseenter","onClick"],Ut={key:1},Wt=["cx","cy","r","fill"],jt=["x","y","fill","font-size"],Ht=["x","y","fill","font-size"],Jt=["x","y","fill","font-size"],Kt=["x","y","fill","font-size"],Qt=["filter"],Zt={key:0},el=["x","y"],tl={key:1},ll=["cx","cy","fill","stroke","filter","onClick"],ol=["cx","cy","fill","stroke","filter","onClick"],al=["text-anchor","x","y","fill","font-size","onClick"],nl=["text-anchor","x","y","fill","font-size","onClick"],rl=["text-anchor","x","y","fill","font-size","onClick"],ul=["text-anchor","x","y","fill","font-size","onClick"],sl={key:2},il=["x","y","width"],cl=["x","y","width"],dl={key:5,class:"vue-data-ui-watermark"},vl=["onClick"],hl={key:0,style:{"font-variant-numeric":"tabular-nums"}},fl={key:1},ml=["innerHTML"],yl={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(Q,{expose:Ve,emit:Le}){const{vue_ui_donut:Te}=n.useConfig(),Oe=e.useSlots(),b=Q,A=e.computed({get(){return!!b.dataset&&b.dataset.length},set(o){return o}}),M=e.ref(null),Z=e.ref(null),ee=e.ref(null),Y=e.ref(null),te=e.ref(null),le=e.ref(null),oe=e.ref(0),ae=e.ref(0),ne=e.ref(0);e.onMounted(()=>{re()}),e.onBeforeUnmount(()=>{Y.value&&Y.value.disconnect()});function re(){if(n.objectIsEmpty(b.dataset)?n.error({componentName:"VueUiDonut",type:"dataset"}):b.dataset.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{A.value=!1,n.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive){const o=Ee.throttle(()=>{const{width:r,height:l}=Ee.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Z.value:null,legend:t.value.style.chart.legend.show?ee.value:null,source:te.value,noTitle:le.value,padding:de.value});requestAnimationFrame(()=>{u.value.width=r,u.value.height=l})});Y.value=new ResizeObserver(o),Y.value.observe(M.value.parentNode)}}const d=e.ref(n.createUid()),ze=e.ref(null),I=e.ref(!1),U=e.ref(""),p=e.ref(null),ue=e.ref(0);function se(){const o=Fe.useNestedProp({userConfig:b.config,defaultConfig:Te});return o.theme?{...Fe.useNestedProp({userConfig:n.themes.vue_ui_donut[o.theme]||b.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const t=e.computed({get:()=>se(),set:o=>o}),y=e.ref(!0),$=e.ref([]);function Ae(o,r=1e3,l=50){return new Promise(a=>{const s=o.length;$.value=Array(s).fill(0);let v=0;o.forEach((h,m)=>{setTimeout(()=>{const N=performance.now();function _(D){const G=Math.min((D-N)/r,1),Ue=n.easeOutCubic(G);$.value[m]=h*Ue,$.value=[...$.value],G<1?requestAnimationFrame(_):($.value[m]=h,$.value=[...$.value],v+=1,v===s&&a())}requestAnimationFrame(_)},m*l)})})}e.onMounted(async()=>{const o=b.dataset.map(r=>r.values.reduce((l,a)=>l+a,0));t.value.startAnimation.show&&await Ae(o,t.value.startAnimation.durationMs,t.value.startAnimation.staggerMs),y.value=!1});const{userOptionsVisible:W,setUserOptionsVisibility:ie,keepUserOptionState:ce}=tt.useUserOptionState({config:t.value}),{svgRef:j}=ot.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>b.config,o=>{t.value=se(),W.value=!t.value.userOptions.showOnChartHover,re(),oe.value+=1,ae.value+=1,ne.value+=1,c.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const de=e.computed(()=>{const{top:o,right:r,bottom:l,left:a}=t.value.style.chart.padding;return{css:`padding:${o}px ${r}px ${l}px ${a}px`,top:o,right:r,bottom:l,left:a}}),{isPrinting:ve,isImaging:he,generatePdf:fe,generateImage:me}=Pe.usePrinter({elementId:`donut__${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut",options:t.value.userOptions.print}),Me=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ye=e.computed(()=>n.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}),u=e.ref({height:360,width:512}),T=e.computed(()=>{const o=t.value.style.chart.layout.donut.strokeWidth/512,r=Math.min(u.value.width,u.value.height)*o,l=r>f.value?f.value:r;return Math.max(l,3)}),pe=Le,S=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:o.values.reduce((l,a)=>l+a,0),absoluteValues:o.values,comment:o.comment||"",patternIndex:r,seriesIndex:r,ghost:!1,pattern:`pattern_${d.value}_${r}`}))),w=e.ref(S.value);e.watch(()=>S.value,o=>w.value=o);function Xe(){return S.value.map(o=>({name:o.name,color:o.color,value:o.value}))}const x=e.ref([]);e.ref(null),e.ref(null);const V=e.ref(!1);function ge({from:o,to:r,duration:l,onUpdate:a,onDone:s,easing:v=n.easeOutCubic}){const h=performance.now();function m(N){const _=Math.min((N-h)/l,1),D=v(_),G=o+(r-o)*D;a(G,_),_<1?requestAnimationFrame(m):(a(r,1),s&&s())}requestAnimationFrame(m)}function ke(o){const r=S.value.find((s,v)=>v===o);let a=w.value.find((s,v)=>v===o).value;if(x.value.includes(o)){let v=function(){w.value=w.value.map((m,N)=>o===N?{...m,value:s}:m)},h=function(){V.value=!0,ge({from:a,to:s,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(m,N)=>{w.value=w.value.map((_,D)=>o===D?{..._,value:m}:_)},onDone:()=>{v(),V.value=!1}})};x.value=x.value.filter(m=>m!==o);const s=r.value;t.value.serieToggleAnimation.show&&t.value.type==="classic"?h():v()}else if(x.value.length<S.value.length-1){let s=function(){x.value.push(o),w.value=w.value.map((h,m)=>o===m?{...h,value:0}:h)},v=function(){V.value=!0,ge({from:a,to:0,duration:t.value.serieToggleAnimation.durationMs,onUpdate:(h,m)=>{w.value=w.value.map((N,_)=>o===_?{...N,value:h}:N)},onDone:()=>{s(),V.value=!1}})};t.value.serieToggleAnimation.show&&t.value.type==="classic"?v():s()}pe("selectLegend",E.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const De=e.computed(()=>b.dataset.reduce((o,r)=>o+r.values.reduce((l,a)=>l+a,0),0)),E=e.computed(()=>{if(y.value){const o=$.value.map((l,a)=>({...S.value[a],value:l,color:S.value[a].color,ghost:!1})),r=De.value-$.value.reduce((l,a)=>l+a,0);return r>0&&o.push({name:"__ghost__",value:r,color:"transparent",ghost:!0}),o}else return w.value.forEach((o,r)=>{if([null,void 0].includes(o.values))return{...o,values:[]}}),w.value.map((o,r)=>({...o,seriesIndex:r})).filter((o,r)=>!x.value.includes(r))}),be=e.computed(()=>b.dataset.map((o,r)=>({name:o.name,color:n.convertColorToHex(o.color)||ye.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:(o.values||[]).reduce((l,a)=>l+a,0),shape:"circle",patternIndex:r})).map((o,r)=>({...o,proportion:o.value/b.dataset.map(l=>(l.values||[]).reduce((a,s)=>a+s,0)).reduce((l,a)=>l+a,0),opacity:x.value.includes(r)?.5:1,segregate:()=>!V.value&&ke(r),isSegregated:x.value.includes(r)}))),Ye=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":""})),f=e.computed(()=>{const o=Math.min(u.value.width/3,u.value.height/3);return o<55?55:o}),g=e.computed(()=>n.makeDonut({series:E.value},u.value.width/2,u.value.height/2,f.value,f.value,1.99999,2,1,360,105.25,T.value)),C=e.computed(()=>g.value.filter(o=>!o.ghost)),i=e.computed(()=>{const o=Math.max(...E.value.map(l=>l.value)),r=E.value.map(l=>l.value/o);return n.createPolarAreas({series:r,center:{x:u.value.width/2,y:u.value.height/2},maxRadius:Math.min(u.value.width,u.value.height)/3,hasGhost:y.value})});function O(o){return o.x>u.value.width/2+6?"start":o.x<u.value.width/2-6?"end":"middle"}function Ie(o){return o.middlePoint.y>u.value.height/2?n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:100,centerX:u.value.width/2,centerY:u.value.height/2}).y:n.offsetFromCenterPoint({initX:o.middlePoint.x,initY:o.middlePoint.y,offset:0,centerX:u.value.width/2,centerY:u.value.height/2}).y-100}function B(o){return o.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function H(o,r){const l=o.value/qe(r);return isNaN(l)?0:n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,n.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:o})}function qe(o){return[...o].map(r=>r.value).reduce((r,l)=>r+l,0)}const k=e.computed(()=>E.value.map(o=>o.value).reduce((o,r)=>o+r,0)),we=e.computed(()=>k.value/E.value.length),Ce=e.computed(()=>o=>V.value?o.proportion*100:o.value/k.value*100),J=e.ref(null),X=e.ref(!1);function Be({datapoint:o,relativeIndex:r,seriesIndex:l,show:a=!1}){J.value={datapoint:o,seriesIndex:l,config:t.value,series:S.value},I.value=a,p.value=r;let s="";const v=t.value.style.chart.tooltip.customFormat;if(X.value=!1,n.isFunction(v))try{const h=v({seriesIndex:l,datapoint:o,series:S.value,config:t.value});typeof h=="string"&&(U.value=h,X.value=!0)}catch{console.warn("Custom format cannot be applied."),X.value=!1}if(!X.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}"/>${Oe.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${d.value}_${l})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,o.value,n.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.tooltip.roundingValue}),{datapoint:o,relativeIndex:r,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const h=n.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,o.proportion*100,n.dataLabel({v:o.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:o,relativeIndex:r,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${h})</span></div>`:s+=`<b>${h}</b></div>`}t.value.style.chart.comments.showInTooltip&&o.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${o.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${o.color}">${o.comment}</div>`),U.value=`<div>${s}</div>`}}function L(o){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o?`url(#blur_${d.value})`:""}const P=e.computed(()=>{const o=E.value.map(l=>({name:l.name,color:l.color})),r=E.value.map(l=>l.value);return{head:o,body:r}});function _e(){e.nextTick(()=>{const o=P.value.head.map((a,s)=>[[a.name],[P.value.body[s]],[isNaN(P.value.body[s]/k.value)?"-":P.value.body[s]/k.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=n.createCsvContent(r);n.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const q=e.computed(()=>{const o=[' <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>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=P.value.head.map((s,v)=>[{color:s.color,name:s.name},P.value.body[v],isNaN(P.value.body[v]/k.value)?"-":(P.value.body[v]/k.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),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.value,t.value.table.columnNames.percentage],head:o,body:r,config:l}}),z=e.ref(!1);function Re(o){z.value=o,ue.value+=1}const xe=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ge(o){return o.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function F(o,r){pe("selectDatapoint",{datapoint:o,index:r})}function $e(){c.value.showTable=!c.value.showTable}function Se(){c.value.dataLabels.show=!c.value.dataLabels.show}function Ne(){c.value.showTooltip=!c.value.showTooltip}const R=e.ref(!1);function K(){R.value=!R.value}return Ve({getData:Xe,generatePdf:fe,generateCsv:_e,generateImage:me,toggleTable:$e,toggleLabels:Se,toggleTooltip:Ne,toggleAnnotator:K}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:M,class:e.normalizeClass(`vue-ui-donut ${z.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;background:${t.value.style.chart.backgroundColor}`),id:`donut__${d.value}`,onMouseenter:r[6]||(r[6]=()=>e.unref(ie)(!0)),onMouseleave:r[7]||(r[7]=()=>e.unref(ie)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(j)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:R.value,svgRef:e.unref(j),onClose:K},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Me.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:le,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&A.value&&(e.unref(ce)||e.unref(W))?(e.openBlock(),e.createBlock(Pe.UserOptions,{ref_key:"details",ref:ze,key:`user_option_${ue.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ve),isImaging:e.unref(he),uid:d.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:z.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:R.value,onToggleFullscreen:Re,onGeneratePdf:e.unref(fe),onGenerateCsv:_e,onGenerateImage:e.unref(me),onToggleTable:$e,onToggleLabels:Se,onToggleTooltip:Ne,onToggleAnnotator:K,style:e.normalizeStyle({visibility:e.unref(ce)?e.unref(W)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:a})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:a})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),A.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${de.value.css}`)},[e.createVNode(Ze._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ut)):e.createCommentVNode("",!0),t.value.type==="classic"&&!isNaN(T.value/f.value)?(e.openBlock(),e.createElementBlock("defs",st,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ct),e.createElementVNode("stop",{offset:`${(1-T.value/f.value)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,dt),e.createElementVNode("stop",{offset:`${(1-T.value/f.value/2)*100}%`,"stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,vt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,ht)],8,it)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,a)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${a}_${d.value}`,cx:(isNaN(l.middlePoint.x/u.value.width*100)?0:l.middlePoint.x/u.value.width*100)+"%",cy:(isNaN(l.middlePoint.y/u.value.height*100)?0:l.middlePoint.y/u.value.height*100)+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.shiftHue)(g.value[a].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":g.value[a].color},null,8,pt)],8,mt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${d.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${d.value}`},null,8,kt),r[8]||(r[8]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,gt),e.createElementVNode("filter",{id:`shadow_${d.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,wt)],8,bt),e.createElementVNode("filter",{id:`drop_shadow_${d.value}`,"color-interpolation-filters":"sRGB",x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"3","flood-opacity":"1","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Bt)],8,Ct)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(n.calcNutArrowPath)(l,{x:u.value.width/2,y:u.value.height/2},16,16,!1,!1,T.value,12,t.value.style.chart.layout.curvedMarkers),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a)},null,8,_t)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x},${e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y} ${i.value[a].middlePoint.x},${i.value[a].middlePoint.y}`,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,xt)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"&&t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("circle",{key:5,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:t.value.style.chart.backgroundColor,filter:`url(#shadow_${d.value})`},null,8,$t)):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.dataset,(l,a)=>(e.openBlock(),e.createElementBlock("defs",{key:`pattern-${l.patternIndex}`},[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a,patternId:`pattern_${d.value}_${a}`}),void 0,!0)]))),128))])):e.createCommentVNode("",!0),k.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,Nt))),256)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Pt))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(n.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a)},null,8,Ft))),256))],64)):e.createCommentVNode("",!0),k.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[g.value.length>1?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[a].path,fill:"#FFFFFF",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256)),t.value.style.chart.layout.donut.useShadow?(e.openBlock(),e.createElementBlock("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:"transparent",stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:`url(#drop_shadow_${d.value})`,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ot))),256))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:`url(#${l.pattern})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,At))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[a].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${a}_${d.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:L(a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Mt))),256))])):(e.openBlock(),e.createElementBlock("g",Xt,[o.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:`url(#pattern_${d.value}_${g.value[0].patternIndex})`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Dt)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${d.value})`:g.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,Yt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:9,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,It)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:10,cx:u.value.width/2,cy:u.value.height/2,r:f.value<=0?10:f.value,fill:`url(#gradient_${d.value})`},null,8,qt)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[g.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("path",{d:t.value.type==="classic"?l.arcSlice:i.value[a].path,fill:p.value===a?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>Be({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=s=>{I.value=!1,p.value=null}),onClick:s=>F(l,a)},null,40,Gt))),256))])):(e.openBlock(),e.createElementBlock("g",Ut,[e.createElementVNode("circle",{cx:u.value.width/2,cy:u.value.height/2,r:f.value,fill:p.value===o.i?"rgba(0,0,0,0.1)":"transparent",onMouseenter:r[1]||(r[1]=l=>Be({datapoint:g.value[0],relativeIndex:0,seriesIndex:g.value[0].seriesIndex,show:!0})),onMouseleave:r[2]||(r[2]=l=>{I.value=!1,p.value=null}),onClick:r[3]||(r[3]=l=>F(g.value[0],o.i))},null,40,Wt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:u.value.width/2,y:u.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,jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:u.value.width/2,y:u.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(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,k.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:k.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,Ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:u.value.width/2,y:u.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,Jt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:u.value.width/2,y:u.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(V.value||y.value?"--":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,we.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:we.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,Kt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.filter(l=>!l.ghost),(l,a)=>(e.openBlock(),e.createElementBlock("g",{filter:L(a),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Zt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-120:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-60:e.unref(n.calcMarkerOffsetX)(l).x,y:e.unref(n.calcMarkerOffsetY)(l)-(xe.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"dataLabel",e.mergeProps({ref_for:!0},{datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a,isSafari:xe.value,isVisible:B(l)&&c.value.dataLabels.show,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,percentage:H(l,C.value)}),void 0,!0)])],8,el))])):(e.openBlock(),e.createElementBlock("g",tl,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.calcMarkerOffsetX)(l).x,cy:e.unref(n.calcMarkerOffsetY)(l)-3.5,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a)},null,8,ll)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).x,cy:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:24,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":1,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===a?"":`url(#blur_${d.value})`,onClick:s=>F(l,a),style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,ol)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(n.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l),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:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,al)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(n.calcMarkerOffsetX)(l).anchor,x:e.unref(n.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(n.calcMarkerOffsetY)(l)+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:s=>F(l,a)},e.toDisplayString(l.name),13,nl)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.percentage.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(H(l,C.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.layout.labels.value.rounding}),{datapoint:l})})`:""),13,rl)):e.createCommentVNode("",!0),B(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":O(i.value[a].middlePoint),x:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x,y:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).y+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({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:t.value.style.chart.layout.labels.name.bold?"bold":"normal"}),onClick:s=>F(l,a)},e.toDisplayString(l.name),13,ul)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",sl,[B(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(n.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(n.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(n.calcMarkerOffsetX)(l).x),y:e.unref(n.calcMarkerOffsetY)(l)+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(o.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(n.calcMarkerOffsetX)(l,!0,16).anchor,isFirstLoad:y.value}},void 0,!0)])],8,il)):e.createCommentVNode("",!0),B(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(O(i.value[a].middlePoint)==="end"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width:O(i.value[a].middlePoint)==="middle"?e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(n.offsetFromCenterPoint)({initX:i.value[a].middlePoint.x,initY:i.value[a].middlePoint.y,offset:42,centerX:u.value.width/2,centerY:u.value.height/2}).x),y:Ie(i.value[a])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:e.normalizeStyle({transition:y.value||!t.value.serieToggleAnimation.show?"none":`all ${t.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:"visible",pointerEvents:"none"})},[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"plot-comment",{plot:{...l,textAlign:O(i.value[a].middlePoint),flexAlign:O(i.value[a].middlePoint),isFirstLoad:y.value}},void 0,!0)])],12,cl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Qt))),256)),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,rt)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dl,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ve)||e.unref(he)})),void 0,!0)])):e.createCommentVNode("",!0),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ke.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:T.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:ee},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Je.Legend,{key:`legend_${ne.value}`,legendSet:be.value,config:Ye.value,onClickMarker:r[4]||(r[4]=({i:l})=>ke(l))},e.createSlots({item:e.withCtx(({legend:l,index:a})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${x.value.includes(a)?.5:1}`),onClick:s=>l.segregate()},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(n.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.legend.roundingValue}),{datapoint:l,index:a}))+" ",1),x.value.includes(a)?(e.openBlock(),e.createElementBlock("span",fl," ( "+e.toDisplayString(Ge(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",hl," ("+e.toDisplayString(isNaN(l.value/k.value)?"-":e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,Ce.value(l),e.unref(n.dataLabel)({v:Ce.value(l),s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,vl)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:a})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${d.value}_${a})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:be.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:te,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:c.value.showTooltip&&I.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:M.value,content:U.value,isCustom:X.value,isFullscreen:z.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...J.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),A.value?(e.openBlock(),e.createBlock(Qe.default,{key:8,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.openBlock(),e.createBlock(je.DataTable,{key:`table_${ae.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.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[5]||(r[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ml)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(n.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,nt))}},pl=at._export_sfc(yl,[["__scopeId","data-v-5f5d7ad3"]]);exports.default=pl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dy2-pNb6.cjs"),De=require("./Title-CEZO2hzQ.cjs"),pe=require("./usePrinter-BQEYwy4a.cjs"),Fe=require("./DataTable-zSU-0X__.cjs"),Pe=require("./Legend-DFQ4iWI3.cjs"),Ie=require("./vue-ui-skeleton-Db7PiDqL.cjs"),Oe=require("./Slicer-B7FJCuCB.cjs"),Te=require("./vue-ui-accordion-dVGUWjXH.cjs"),ke=require("./useNestedProp-DQ8Jt3-Y.cjs"),He=require("./PackageVersion-DxR-fKLM.cjs"),Re=require("./PenAndPaper-CG9o3ymS.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),We=["id"],Xe=["xmlns","viewBox"],Ge=["x","y","width","height"],je=["id"],Ye=["stop-color"],Ke=["stop-color"],Ze=["id"],Je=["stop-color"],Qe=["stop-color"],et=["stop-color"],tt={key:1},lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x1","x2","y1","y2","stroke","stroke-width"],at={key:0},nt=["x1","x2","y1","y2","stroke","stroke-width"],ut=["x1","x2","y1","y2","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight"],st=["text-anchor","font-size","fill","transform"],ct=["x1","y1","x2","y2","stroke","stroke-width"],it={key:1},dt=["cx","cy","r","fill"],vt={key:0},ht={key:0},yt=["d","stroke"],mt=["text-anchor","x","y","fill"],ft=["cx","cy","r","fill"],gt={key:0},pt=["cx","cy","fill"],kt={key:1},bt=["d","fill","stroke"],xt={key:2},Bt=["d","fill","stroke"],Ct=["x","y","font-size","fill"],_t=["x","y","width","fill","onClick"],Et=["x","y","width","height","onMouseenter","onClick"],Nt={key:4,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},wt=["x","y","width","height","fill"],St=["x1","y1","x2","y2","stroke"],Lt=["x1","y2","x2","y1","stroke"],zt=["cx","cy","r"],Vt=["d","stroke"],At=["cx","cy","r","fill"],$t=["d","fill","stroke"],Dt={class:"vue-ui-donut-evolution-focus"},Ft=["text-anchor","x","y","fill"],Pt=["cx","cy","r","fill"],It=["cx","cy","r","fill"],Ot=["x","y","fill"],Tt=["x","y","font-size","fill"],Ht={key:5,class:"vue-data-ui-watermark"},Rt=["onClick"],Mt={key:0},Ut={key:1},qt={key:9,ref:"source",dir:"auto"},Wt={key:0},Xt={key:1},Gt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:xe,emit:Be}){const{vue_ui_donut_evolution:Ce}=r.useConfig(),y=be,$=e.computed(()=>!!y.dataset&&y.dataset.length),i=e.ref({start:0,end:Math.max(...y.dataset.map(o=>o.values.length))});function q(){W()}const N=e.ref(null);async function W(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&N.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(i.value={start:0,end:E.value},Y.value+=1)}function _e(o){const a=E.value;return o>a?a:o<0||t.value.style.chart.zoom.startIndex!==null&&o<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:o}e.onMounted(()=>{X()});function X(){r.objectIsEmpty(y.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):y.dataset.length&&y.dataset.forEach((o,a)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:a})})}),W()}const _=e.ref(r.createUid()),m=e.ref([]),h=e.ref(null),P=e.ref(null),k=e.ref(!1),b=e.ref(null),G=e.ref(null),Ee=e.ref(null),j=e.ref(0),Y=e.ref(0),K=e.ref(0),Z=e.ref(0),J=e.ref(0),Q=Be,t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value}),{svgRef:le}=Ue.useChartAccessibility({config:t.value.style.chart.title});function oe(){const o=ke.useNestedProp({userConfig:y.config,defaultConfig:Ce});let a={};return o.theme?a={...ke.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[o.theme]||y.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:a=o,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=y.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=y.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}e.watch(()=>y.config,o=>{t.value=oe(),I.value=!t.value.userOptions.showOnChartHover,X(),K.value+=1,Z.value+=1,J.value+=1,z.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>y.dataset,o=>{q()},{deep:!0});const{isPrinting:ae,isImaging:ne,generatePdf:ue,generateImage:re}=pe.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),we=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=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})),c=e.computed(()=>{const o=t.value.style.chart.layout.height,a=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=a-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:a,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(y.dataset.forEach((o,a)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:a}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:a})}),y.dataset.map((o,a)=>({...o,values:r.sanitizeArray(o.values),color:r.convertColorToHex(o.color)||we.value[a]||r.palette[a]||r.palette[a%r.palette.length],length:(o.values||[]).length,uid:r.createUid()})))),V=e.computed(()=>C.value.filter(o=>!m.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((a,l)=>l>=i.value.start&&l<=i.value.end)}))),E=e.computed(()=>Math.max(...V.value.map(o=>o.length))),g=e.computed(()=>c.value.width/(i.value.end-i.value.start)),f=e.computed(()=>{const o=[];for(let n=0;n<i.value.end-i.value.start;n+=1){const v=V.value.map(B=>B.values[n]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,p)=>B+p,0),U=v.map(B=>B/x),L=u.value.left+g.value*n+g.value/2;o.push({index:n,percentages:U,subtotal:d||x<0?null:x,values:v,x:L})}const a=0,l=Math.max(...o.map(n=>n.subtotal)),s=o.length===1?l*2:l;return o.map((n,v)=>{const d=g.value/2*.7,x=d>c.value.width/16?c.value.width/16:d,U=h.value===n.index?c.value.width/16:x,L=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,B=c.value.absoluteHeight-u.value.bottom-c.value.height*n.subtotal/r.calculateNiceScale(a,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...n,y:B,radius:x,activeRadius:U,hoverRadius:L,donut:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,L,L,1.99999,2,1,360,105.25,L/2),donutFocus:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},c.value.centerX,c.value.centerY,c.value.height/3.6,c.value.height/3.6,1.99999,2,1,360,105.25,c.value.height/6)}})});function D(o,a,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,o,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:o,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:a,index:l})}const O=e.computed(()=>({max:Math.max(...f.value.map(o=>o.subtotal)),min:0})),w=e.computed(()=>{const o=f.value.length===1?O.value.max*2:O.value.max;return r.calculateNiceScale(O.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function Se(o){return o/w.value.max}const Le=e.computed(()=>w.value.ticks.map(o=>({y:c.value.absoluteHeight-u.value.bottom-c.value.height*Se(o),value:o})));function se(o,a){return isNaN(o.value/r.sumByAttribute(a,"value"))?0:(o.value/r.sumByAttribute(a,"value")*100).toFixed(0)+"%"}function ce(){k.value||(h.value=null,P.value=null)}function ze(o){k.value||(h.value=o.index,P.value=o)}const T=e.ref(null);function H(o,a){o.subtotal&&(P.value=null,h.value=null,k.value=!0,b.value=o,[null,void 0].includes(a)||(T.value=a))}function ie(){b.value=null,k.value=!1,T.value=null}const de=e.computed(()=>C.value.map((o,a)=>({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,a)=>a.value-o.value).map(o=>({...o,opacity:m.value.includes(o.uid)?.5:1,segregate:()=>R(o.uid),isSegregated:m.value.includes(o.uid)}))),ve=e.computed(()=>f.value.map(o=>o.subtotal).reduce((o,a)=>o+a,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 R(o){if(m.value.includes(o))m.value=m.value.filter(a=>a!==o),Q("selectLegend",null);else{if(m.value.length===C.value.length-1)return;m.value.push(o),Q("selectLegend",C.value.find(a=>a.uid===o))}b.value&&H(f.value.find((a,l)=>l===T.value))}const S=e.computed(()=>{const o=[""].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>({name:n.name,color:n.color}))).concat(["Σ"]);let a=[];for(let n=0;n<E.value;n+=1){const v=C.value.filter(d=>!m.value.includes(d.uid)).map(d=>d.values[n]??0).reduce((d,x)=>d+x,0);a.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[n]??"-"].concat(C.value.filter(d=>!m.value.includes(d.uid)).map(d=>({value:d.values[n]??0,percentage:d.values[n]?d.values[n]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.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(n=>!m.value.includes(n.uid)).map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:o,body:a,config:l,colNames:s}});function Ae(){return C.value}function he(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[...S.value.head.map(v=>v.name??v)],l=[...S.value.body.map(v=>v.map(d=>d.value??d))],s=o.concat([a]).concat(l),n=r.createCsvContent(s);r.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const A=e.ref(!1);function $e(o){A.value=o,j.value+=1}function ye(){z.value.showTable=!z.value.showTable}const F=e.ref(!1);function M(){F.value=!F.value}function me(o){return o.proportion*100>t.value.style.chart.donuts.hover.hideLabelsUnderValue}function fe(o){return o.proportion*100>t.value.style.chart.donuts.zoom.hideLabelsUnderValue}return xe({getData:Ae,generatePdf:ue,generateCsv:he,generateImage:re,toggleTable:ye,toggleAnnotator:M}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:G,class:e.normalizeClass(`vue-ui-donut-evolution ${A.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:_.value,onMouseenter:a[4]||(a[4]=()=>e.unref(ee)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re._sfc_main,{key:0,svgRef:e.unref(le),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Ee,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ce},[(e.openBlock(),e.createBlock(De._sfc_main,{key:`title_${K.value}`,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"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(te)||e.unref(I))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(ne),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:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:G.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(ue),onGenerateCsv:he,onGenerateImage:e.unref(re),onToggleTable:ye,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:s})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:s})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}: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:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:le,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),viewBox:`0 0 ${c.value.absoluteWidth} ${c.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(He._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),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":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,Ke)],8,je),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Je),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,et)],8,Ze)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",tt,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+c.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,lt),e.createElementVNode("line",{x1:u.value.left,x2:c.value.absoluteWidth-u.value.right,y1:c.value.absoluteHeight-u.value.bottom,y2:c.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,ot),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",at,[(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:c.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,nt))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=w.value.min&&l.value<=w.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,ut)):e.createCommentVNode("",!0),l.value>=w.value.min&&l.value<=w.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(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,rt)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:3,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===E.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+c.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,st)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<f.value.length-1&&![l.subtotal,f.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:f.value[s+1].x,y2:f.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,ct)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",it,[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,dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",vt,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,n=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(r.calcNutArrowPath)(n,{x:n.center.endX,y:n.center.endY},12,12,{x:l.x,y:l.y},!1,20),stroke:n.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,yt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("text",{key:0,"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!0,9).x,y:e.unref(r.calcMarkerOffsetY)(n,14,10),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(n.name)+": "+e.toDisplayString(se(n,l.donut))+" ("+e.toDisplayString(n.value===null?"-":D(n.value,n,v))+") ",9,mt)):e.createCommentVNode("",!0)]))),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,ft)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",gt,[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,pt)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,bt))),256))])):(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Bt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.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:h.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(D(l.subtotal,l,s)),9,Ct)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:c.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,_t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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:c.value.height,fill:"transparent",onMouseenter:n=>ze(l),onMouseleave:ce,onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,Et))),256)),k.value?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,wt),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:c.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,St),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:c.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,Lt),e.createElementVNode("circle",{"data-cy-close":"",onClick:ie,onKeypress:e.withKeys(ie,["enter"]),cx:c.value.absoluteWidth-u.value.right-c.value.width/40,cy:u.value.top+c.value.height/30,r:c.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,zt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[fe(l)?(e.openBlock(),e.createElementBlock("path",{key:0,"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:c.value.centerX,y:c.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,Vt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,At),(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,$t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",Dt,[fe(l)?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(se(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":D(l.value,l,s))+") ",9,Ft)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Pt),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,It),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+c.value.width/2,y:u.value.top+c.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(D(b.value.subtotal,b.value,null)),9,Ot),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,Tt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),E.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Oe.Slicer,{ref_key:"slicerComponent",ref:N,key:`slicer_${Y.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:E.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":a[0]||(a[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":a[1]||(a[1]=l=>i.value.end=l),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:E.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:q},{"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","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${J.value}`,legendSet:de.value,config:Ve.value,onClickMarker:a[2]||(a[2]=({legend:l})=>R(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{onClick:n=>R(l.uid),style:e.normalizeStyle(`opacity:${m.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),m.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Mt," ("+e.toDisplayString(isNaN(l.value/ve.value)?"-":e.unref(r.dataLabel)({v:l.value/ve.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Rt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qt,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(Te.default,{key:10,hideDetails:"",config:{open:z.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${Z.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=l=>z.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",Wt,"-")):(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)],46,We))}},jt=qe._export_sfc(Gt,[["__scopeId","data-v-5d9bec59"]]);exports.default=jt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CFHk7XOI.cjs"),De=require("./Title-CcJuov8a.cjs"),pe=require("./usePrinter-Cr-rXufG.cjs"),Fe=require("./DataTable-CJVWuZQ7.cjs"),Pe=require("./Legend-BVXdf95S.cjs"),Ie=require("./vue-ui-skeleton-DcQQl9nv.cjs"),Oe=require("./Slicer-DLFjRDKI.cjs"),Te=require("./vue-ui-accordion-BvbhG2QO.cjs"),ke=require("./useNestedProp-dCmM2zfv.cjs"),He=require("./PackageVersion-NIHFWeLx.cjs"),Re=require("./PenAndPaper-dU138eET.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),We=["id"],Xe=["xmlns","viewBox"],Ge=["x","y","width","height"],je=["id"],Ye=["stop-color"],Ke=["stop-color"],Ze=["id"],Je=["stop-color"],Qe=["stop-color"],et=["stop-color"],tt={key:1},lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x1","x2","y1","y2","stroke","stroke-width"],at={key:0},nt=["x1","x2","y1","y2","stroke","stroke-width"],ut=["x1","x2","y1","y2","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight"],st=["text-anchor","font-size","fill","transform"],ct=["x1","y1","x2","y2","stroke","stroke-width"],it={key:1},dt=["cx","cy","r","fill"],vt={key:0},ht={key:0},yt=["d","stroke"],mt=["text-anchor","x","y","fill"],ft=["cx","cy","r","fill"],gt={key:0},pt=["cx","cy","fill"],kt={key:1},bt=["d","fill","stroke"],xt={key:2},Bt=["d","fill","stroke"],Ct=["x","y","font-size","fill"],_t=["x","y","width","fill","onClick"],Et=["x","y","width","height","onMouseenter","onClick"],Nt={key:4,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},wt=["x","y","width","height","fill"],St=["x1","y1","x2","y2","stroke"],Lt=["x1","y2","x2","y1","stroke"],zt=["cx","cy","r"],Vt=["d","stroke"],At=["cx","cy","r","fill"],$t=["d","fill","stroke"],Dt={class:"vue-ui-donut-evolution-focus"},Ft=["text-anchor","x","y","fill"],Pt=["cx","cy","r","fill"],It=["cx","cy","r","fill"],Ot=["x","y","fill"],Tt=["x","y","font-size","fill"],Ht={key:5,class:"vue-data-ui-watermark"},Rt=["onClick"],Mt={key:0},Ut={key:1},qt={key:9,ref:"source",dir:"auto"},Wt={key:0},Xt={key:1},Gt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:xe,emit:Be}){const{vue_ui_donut_evolution:Ce}=r.useConfig(),y=be,$=e.computed(()=>!!y.dataset&&y.dataset.length),i=e.ref({start:0,end:Math.max(...y.dataset.map(o=>o.values.length))});function q(){W()}const N=e.ref(null);async function W(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&N.value?(t.value.style.chart.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),N.value&&N.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(i.value={start:0,end:E.value},Y.value+=1)}function _e(o){const a=E.value;return o>a?a:o<0||t.value.style.chart.zoom.startIndex!==null&&o<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:o}e.onMounted(()=>{X()});function X(){r.objectIsEmpty(y.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):y.dataset.length&&y.dataset.forEach((o,a)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:a})})}),W()}const _=e.ref(r.createUid()),m=e.ref([]),h=e.ref(null),P=e.ref(null),k=e.ref(!1),b=e.ref(null),G=e.ref(null),Ee=e.ref(null),j=e.ref(0),Y=e.ref(0),K=e.ref(0),Z=e.ref(0),J=e.ref(0),Q=Be,t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:I,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value}),{svgRef:le}=Ue.useChartAccessibility({config:t.value.style.chart.title});function oe(){const o=ke.useNestedProp({userConfig:y.config,defaultConfig:Ce});let a={};return o.theme?a={...ke.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[o.theme]||y.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:a=o,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=y.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,y.config&&r.hasDeepProperty(y.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=y.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}e.watch(()=>y.config,o=>{t.value=oe(),I.value=!t.value.userOptions.showOnChartHover,X(),K.value+=1,Z.value+=1,J.value+=1,z.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>y.dataset,o=>{q()},{deep:!0});const{isPrinting:ae,isImaging:ne,generatePdf:ue,generateImage:re}=pe.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution",options:t.value.userOptions.print}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),we=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=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})),c=e.computed(()=>{const o=t.value.style.chart.layout.height,a=t.value.style.chart.layout.width,l=o-u.value.top-u.value.bottom,s=a-u.value.left-u.value.right;return{absoluteHeight:o,absoluteWidth:a,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(y.dataset.forEach((o,a)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:a}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:a})}),y.dataset.map((o,a)=>({...o,values:r.sanitizeArray(o.values),color:r.convertColorToHex(o.color)||we.value[a]||r.palette[a]||r.palette[a%r.palette.length],length:(o.values||[]).length,uid:r.createUid()})))),V=e.computed(()=>C.value.filter(o=>!m.value.includes(o.uid)).map(o=>({...o,values:o.values.filter((a,l)=>l>=i.value.start&&l<=i.value.end)}))),E=e.computed(()=>Math.max(...V.value.map(o=>o.length))),g=e.computed(()=>c.value.width/(i.value.end-i.value.start)),f=e.computed(()=>{const o=[];for(let n=0;n<i.value.end-i.value.start;n+=1){const v=V.value.map(B=>B.values[n]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,p)=>B+p,0),U=v.map(B=>B/x),L=u.value.left+g.value*n+g.value/2;o.push({index:n,percentages:U,subtotal:d||x<0?null:x,values:v,x:L})}const a=0,l=Math.max(...o.map(n=>n.subtotal)),s=o.length===1?l*2:l;return o.map((n,v)=>{const d=g.value/2*.7,x=d>c.value.width/16?c.value.width/16:d,U=h.value===n.index?c.value.width/16:x,L=o.length>4?d*2:d*2>g.value/2*.7?g.value/2*.7:d*2,B=c.value.absoluteHeight-u.value.bottom-c.value.height*n.subtotal/r.calculateNiceScale(a,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...n,y:B,radius:x,activeRadius:U,hoverRadius:L,donut:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},n.x,B,L,L,1.99999,2,1,360,105.25,L/2),donutFocus:r.makeDonut({series:V.value.map((p,ge)=>({color:p.color,name:p.name,value:p.values[v]??0}))},c.value.centerX,c.value.centerY,c.value.height/3.6,c.value.height/3.6,1.99999,2,1,360,105.25,c.value.height/6)}})});function D(o,a,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,o,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:o,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:a,index:l})}const O=e.computed(()=>({max:Math.max(...f.value.map(o=>o.subtotal)),min:0})),w=e.computed(()=>{const o=f.value.length===1?O.value.max*2:O.value.max;return r.calculateNiceScale(O.value.min,o,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function Se(o){return o/w.value.max}const Le=e.computed(()=>w.value.ticks.map(o=>({y:c.value.absoluteHeight-u.value.bottom-c.value.height*Se(o),value:o})));function se(o,a){return isNaN(o.value/r.sumByAttribute(a,"value"))?0:(o.value/r.sumByAttribute(a,"value")*100).toFixed(0)+"%"}function ce(){k.value||(h.value=null,P.value=null)}function ze(o){k.value||(h.value=o.index,P.value=o)}const T=e.ref(null);function H(o,a){o.subtotal&&(P.value=null,h.value=null,k.value=!0,b.value=o,[null,void 0].includes(a)||(T.value=a))}function ie(){b.value=null,k.value=!1,T.value=null}const de=e.computed(()=>C.value.map((o,a)=>({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,a)=>a.value-o.value).map(o=>({...o,opacity:m.value.includes(o.uid)?.5:1,segregate:()=>R(o.uid),isSegregated:m.value.includes(o.uid)}))),ve=e.computed(()=>f.value.map(o=>o.subtotal).reduce((o,a)=>o+a,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 R(o){if(m.value.includes(o))m.value=m.value.filter(a=>a!==o),Q("selectLegend",null);else{if(m.value.length===C.value.length-1)return;m.value.push(o),Q("selectLegend",C.value.find(a=>a.uid===o))}b.value&&H(f.value.find((a,l)=>l===T.value))}const S=e.computed(()=>{const o=[""].concat(C.value.filter(n=>!m.value.includes(n.uid)).map(n=>({name:n.name,color:n.color}))).concat(["Σ"]);let a=[];for(let n=0;n<E.value;n+=1){const v=C.value.filter(d=>!m.value.includes(d.uid)).map(d=>d.values[n]??0).reduce((d,x)=>d+x,0);a.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[n]??"-"].concat(C.value.filter(d=>!m.value.includes(d.uid)).map(d=>({value:d.values[n]??0,percentage:d.values[n]?d.values[n]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.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(n=>!m.value.includes(n.uid)).map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:o,body:a,config:l,colNames:s}});function Ae(){return C.value}function he(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[...S.value.head.map(v=>v.name??v)],l=[...S.value.body.map(v=>v.map(d=>d.value??d))],s=o.concat([a]).concat(l),n=r.createCsvContent(s);r.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const A=e.ref(!1);function $e(o){A.value=o,j.value+=1}function ye(){z.value.showTable=!z.value.showTable}const F=e.ref(!1);function M(){F.value=!F.value}function me(o){return o.proportion*100>t.value.style.chart.donuts.hover.hideLabelsUnderValue}function fe(o){return o.proportion*100>t.value.style.chart.donuts.zoom.hideLabelsUnderValue}return xe({getData:Ae,generatePdf:ue,generateCsv:he,generateImage:re,toggleTable:ye,toggleAnnotator:M}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:G,class:e.normalizeClass(`vue-ui-donut-evolution ${A.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:_.value,onMouseenter:a[4]||(a[4]=()=>e.unref(ee)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re._sfc_main,{key:0,svgRef:e.unref(le),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Ee,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,style:"width:100%;background:transparent;padding-bottom:24px",onMouseleave:ce},[(e.openBlock(),e.createBlock(De._sfc_main,{key:`title_${K.value}`,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"]))],32)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(te)||e.unref(I))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref:"details",key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(ne),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:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:G.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(ue),onGenerateCsv:he,onGenerateImage:e.unref(re),onToggleTable:ye,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(I)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:s})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:s})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}: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:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:le,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),viewBox:`0 0 ${c.value.absoluteWidth} ${c.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(He._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),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":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,Ke)],8,je),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Je),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,et)],8,Ze)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",tt,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+c.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,lt),e.createElementVNode("line",{x1:u.value.left,x2:c.value.absoluteWidth-u.value.right,y1:c.value.absoluteHeight-u.value.bottom,y2:c.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,ot),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",at,[(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:c.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,nt))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=w.value.min&&l.value<=w.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,ut)):e.createCommentVNode("",!0),l.value>=w.value.min&&l.value<=w.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(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,rt)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:3,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===E.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+c.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,st)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<f.value.length-1&&![l.subtotal,f.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||k.value}),x1:l.x,y1:l.y,x2:f.value[s+1].x,y2:f.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,ct)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",it,[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,dt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",vt,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,n=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(r.calcNutArrowPath)(n,{x:n.center.endX,y:n.center.endY},12,12,{x:l.x,y:l.y},!1,20),stroke:n.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,yt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("g",null,[me(n)?(e.openBlock(),e.createElementBlock("text",{key:0,"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(n,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(n,!0,9).x,y:e.unref(r.calcMarkerOffsetY)(n,14,10),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(n.name)+": "+e.toDisplayString(se(n,l.donut))+" ("+e.toDisplayString(n.value===null?"-":D(n.value,n,v))+") ",9,mt)):e.createCommentVNode("",!0)]))),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,ft)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||k.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",gt,[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,pt)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,bt))),256))])):(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(n,v)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:`${n.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,Bt))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.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:h.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(D(l.subtotal,l,s)),9,Ct)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*g.value,y:c.value.absoluteHeight-u.value.bottom-10,width:g.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,_t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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:c.value.height,fill:"transparent",onMouseenter:n=>ze(l),onMouseleave:ce,onClick:n=>H(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,Et))),256)),k.value?(e.openBlock(),e.createElementBlock("g",Nt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:c.value.width,height:c.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,wt),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:c.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,St),e.createElementVNode("line",{"data-dom-to-png-ignore":"",x1:c.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:c.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,Lt),e.createElementVNode("circle",{"data-cy-close":"",onClick:ie,onKeypress:e.withKeys(ie,["enter"]),cx:c.value.absoluteWidth-u.value.right-c.value.width/40,cy:u.value.top+c.value.height/30,r:c.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,zt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[fe(l)?(e.openBlock(),e.createElementBlock("path",{key:0,"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:c.value.centerX,y:c.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,Vt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,At),(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,$t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",Dt,[fe(l)?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(se(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":D(l.value,l,s))+") ",9,Ft)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,Pt),e.createElementVNode("circle",{cx:u.value.left+c.value.width/2,cy:u.value.top+c.value.height/2,r:c.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,It),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+c.value.width/2,y:u.value.top+c.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(D(b.value.subtotal,b.value,null)),9,Ot),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,Tt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),E.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Oe.Slicer,{ref_key:"slicerComponent",ref:N,key:`slicer_${Y.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:E.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":a[0]||(a[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":a[1]||(a[1]=l=>i.value.end=l),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:E.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:q},{"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","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${J.value}`,legendSet:de.value,config:Ve.value,onClickMarker:a[2]||(a[2]=({legend:l})=>R(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{onClick:n=>R(l.uid),style:e.normalizeStyle(`opacity:${m.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),m.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Ut," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Mt," ("+e.toDisplayString(isNaN(l.value/ve.value)?"-":e.unref(r.dataLabel)({v:l.value/ve.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Rt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:de.value},void 0,!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",qt,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createBlock(Te.default,{key:10,hideDetails:"",config:{open:z.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${Z.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=l=>z.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",Wt,"-")):(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)],46,We))}},jt=qe._export_sfc(Gt,[["__scopeId","data-v-5d9bec59"]]);exports.default=jt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as x, ref as b, onMounted as vt, watch as Ue, createElementBlock as o, openBlock as a, unref as c, normalizeStyle as J, normalizeClass as O, createBlock as D, createCommentVNode as v, renderSlot as S, createSlots as dt, withCtx as $, normalizeProps as B, guardReactiveProps as G, createVNode as ht, createElementVNode as y, Fragment as k, renderList as _, toDisplayString as m, withKeys as yt, createTextVNode as We, nextTick as j } from "vue";
|
|
2
|
-
import { u as ft, o as gt, e as Q, g as bt, c as Xe, t as mt, p as ee, a as pt, C as Be, b as xt, d as ve, H as kt, D as Ge, m as de, X as _t, s as Y, E as Ct, i as he, f as te, j as je, k as Ye, n as le, q as wt, r as zt, I as qe } from "./index-
|
|
3
|
-
import { _ as Lt } from "./Title-
|
|
4
|
-
import { u as St, U as $t } from "./usePrinter-
|
|
5
|
-
import { D as At } from "./DataTable-
|
|
6
|
-
import { L as It } from "./Legend-
|
|
7
|
-
import Nt from "./vue-ui-skeleton-
|
|
8
|
-
import { S as Ft } from "./Slicer-
|
|
9
|
-
import Ot from "./vue-ui-accordion-
|
|
10
|
-
import { u as Ke } from "./useNestedProp-
|
|
11
|
-
import { _ as Pt } from "./PackageVersion-
|
|
12
|
-
import { _ as Dt } from "./PenAndPaper-
|
|
2
|
+
import { u as ft, o as gt, e as Q, g as bt, c as Xe, t as mt, p as ee, a as pt, C as Be, b as xt, d as ve, H as kt, D as Ge, m as de, X as _t, s as Y, E as Ct, i as he, f as te, j as je, k as Ye, n as le, q as wt, r as zt, I as qe } from "./index-DvXHhwi7.js";
|
|
3
|
+
import { _ as Lt } from "./Title-CiymPFBZ.js";
|
|
4
|
+
import { u as St, U as $t } from "./usePrinter-D0Njbrwg.js";
|
|
5
|
+
import { D as At } from "./DataTable-Dz3uePkM.js";
|
|
6
|
+
import { L as It } from "./Legend-DRjI7VTS.js";
|
|
7
|
+
import Nt from "./vue-ui-skeleton-CJ9j8gHc.js";
|
|
8
|
+
import { S as Ft } from "./Slicer-9CXQSz7y.js";
|
|
9
|
+
import Ot from "./vue-ui-accordion-rd6DBLB5.js";
|
|
10
|
+
import { u as Ke } from "./useNestedProp-Bw2_FZ80.js";
|
|
11
|
+
import { _ as Pt } from "./PackageVersion-BNm7stW7.js";
|
|
12
|
+
import { _ as Dt } from "./PenAndPaper-Ba1SBNDw.js";
|
|
13
13
|
import { u as Et } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { u as Tt } from "./useChartAccessibility-BWojgys7.js";
|
|
15
15
|
import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Dy2-pNb6.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-CEZO2hzQ.cjs"),ee=require("./usePrinter-BQEYwy4a.cjs"),ve=require("./DataTable-zSU-0X__.cjs"),he=require("./vue-ui-skeleton-Db7PiDqL.cjs"),ye=require("./Legend-DFQ4iWI3.cjs"),fe=require("./vue-ui-accordion-dVGUWjXH.cjs"),te=require("./useNestedProp-DQ8Jt3-Y.cjs"),me=require("./PackageVersion-DxR-fKLM.cjs"),be=require("./PenAndPaper-CG9o3ymS.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.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:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.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_${c.value})`:t.value.style.chart.plots.endColor}]),ne=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":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.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=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),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 J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].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 k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.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,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.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,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.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,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.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,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.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,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.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.applyDataLabel)(t.value.style.chart.labels.formatter,l,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}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.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,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.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,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[e.createElementVNode("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CFHk7XOI.cjs"),Q=require("./useResponsive-DQmBAoBf.cjs"),de=require("./Title-CcJuov8a.cjs"),ee=require("./usePrinter-Cr-rXufG.cjs"),ve=require("./DataTable-CJVWuZQ7.cjs"),he=require("./vue-ui-skeleton-DcQQl9nv.cjs"),ye=require("./Legend-BVXdf95S.cjs"),fe=require("./vue-ui-accordion-BvbhG2QO.cjs"),te=require("./useNestedProp-dCmM2zfv.cjs"),me=require("./PackageVersion-NIHFWeLx.cjs"),be=require("./PenAndPaper-dU138eET.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],xe=["xmlns","viewBox"],Ce=["x","y","width","height"],we={key:1},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ne={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Le={key:3},Se=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill"],ze={key:4},Ae=["x","y","font-size","fill","font-weight"],Pe=["id"],Te=["stop-color"],Xe=["stop-color"],Oe=["stop-color"],De=["id"],Fe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Ge=["id"],qe=["stop-color"],Re=["stop-color"],He=["id"],Ue=["stop-color"],We=["stop-color"],je={key:0},Ye=["d","fill"],Ze={key:1},Je=["x","y","height","width","fill"],Ke=["cx","cy","r","fill","stroke","stroke-width"],Qe=["cx","cy","r","fill","stroke","stroke-width"],et={key:5},tt=["x","y","fill","font-size"],lt={key:6},at=["x","y","fill","font-size"],ot={key:5,class:"vue-data-ui-watermark"},rt=["xmlns","height","width"],st=["fill"],nt=["innerHTML"],ut={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(le,{expose:ae,emit:ct}){const{vue_ui_dumbbell:oe}=s.useConfig(),v=le,b=e.computed({get(){return!!v.dataset&&v.dataset.length},set(a){return a}}),c=e.ref(s.createUid()),V=e.ref(0),_=e.ref(null),z=e.ref(null),A=e.ref(null),P=e.ref(null),T=e.ref(null),X=e.ref(0),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>G(),set:a=>a}),{userOptionsVisible:E,setUserOptionsVisibility:F,keepUserOptionState:M}=pe.useUserOptionState({config:t.value}),{svgRef:I}=ge.useChartAccessibility({config:t.value.style.chart.title});function G(){const a=te.useNestedProp({userConfig:v.config,defaultConfig:oe});return a.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=G(),E.value=!t.value.userOptions.showOnChartHover,q(),X.value+=1,O.value+=1,D.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width,p.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>v.dataset,a=>{Y()},{deep:!0});const x=e.ref(null);e.onMounted(()=>{q()});function q(){if(s.objectIsEmpty(v.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):v.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=Q.throttle(()=>{const{width:n,height:l}=Q.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?A.value:null,source:P.value,noTitle:T.value});requestAnimationFrame(()=>{g.value=n,i.value=l/v.dataset.length,d.value=C()})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const{isPrinting:R,isImaging:H,generatePdf:U,generateImage:W}=ee.usePrinter({elementId:`dumbbell_${c.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell",options:t.value.userOptions.print}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),y=e.computed(()=>v.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),$=e.computed(()=>({max:Math.max(...y.value.flatMap(a=>[a.start,a.end])),min:Math.min(...y.value.flatMap(a=>[a.start,a.end]))})),u=e.computed(()=>s.calculateNiceScale($.value.min<0?$.value.min:0,$.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),r=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*v.dataset.length,o=u.value.ticks.length*(g.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:g.value,height:a*v.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:o}});function C(){return y.value.map((a,n)=>{const l=r.value.left+(a.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,o=r.value.left+(a.end+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,h=l+(o-l)/2;return{...a,startX:l,endX:o,centerX:h,y:r.value.top+n*i.value+i.value/2,endVal:a.start}})}const d=e.ref([]),j=e.ref(null),se=e.computed(()=>y.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{Y()});function Y(){d.value=C();let a=d.value.map(l=>l.start).reduce((l,o)=>l+o,0);function n(){const l=y.value.map(o=>o.end-o.start);a>=se.value?(cancelAnimationFrame(j.value),d.value=C()):(d.value=d.value.map((o,h)=>{o.endVal+=l[h]*(t.value.animationSpeed/100);const m=r.value.left+(o.start+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,N=r.value.left+(o.endVal+Math.abs(u.value.min))/(u.value.max+Math.abs(u.value.min))*r.value.widthPlotReference,S=m+(N-m)/2;return{...o,startX:m,endX:N,centerX:S,y:r.value.top+h*i.value+i.value/2,endVal:o.endVal}}),a=d.value.map(o=>o.endVal).reduce((o,h)=>o+h,0),j.value=requestAnimationFrame(n))}t.value.useAnimation?n():d.value=C()}const Z=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${c.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_${c.value})`:t.value.style.chart.plots.endColor}]),ne=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":""})),f=e.computed(()=>{const a=d.value.map(l=>({name:l.name})),n=d.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=f.value.head.map((h,m)=>{const N=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),S=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[m].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),ce=s.dataLabel({v:100*(f.value.body[m].end/f.value.body[m].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:h.name},N,S,ce]}),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 J(){e.nextTick(()=>{const a=f.value.head.map((o,h)=>[[o.name],[f.value.body[h].start],[f.value.body[h].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 k=e.ref(!1);function ue(a){k.value=a,V.value+=1}function ie(){return d.value}function K(){p.value.showTable=!p.value.showTable}const B=e.ref(!1);function L(){B.value=!B.value}return ae({getData:ie,generatePdf:U,generateCsv:J,generateImage:W,toggleTable:K,toggleAnnotator:L}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:_,class:e.normalizeClass(`vue-ui-dumbbell ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${c.value}`,onMouseenter:n[1]||(n[1]=()=>e.unref(F)(!0)),onMouseleave:n[2]||(n[2]=()=>e.unref(F)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(be._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:L},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:T,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(M)||e.unref(E))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(R),isImaging:e.unref(H),uid:c.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:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(W),onToggleTable:K,onToggleAnnotator:L,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(E)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${r.value.absoluteWidth<=0?10:r.value.absoluteWidth} ${r.value.absoluteHeight<=0?10:r.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:r.value.left,y:r.value.top,width:r.value.width,height:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ce)):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+o*r.value.width/(u.value.ticks.length-1),x2:r.value.left+o*r.value.width/(u.value.ticks.length-1),y1:r.value.top,y2:r.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,Be))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left,x2:r.value.right,y1:r.value.top+o*i.value,y2:r.value.top+o*i.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,Ee))),256)),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.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,$e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.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,Se))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:r.value.top+o*i.value+i.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,Ve))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.ticks,(l,o)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+o*(r.value.width/(u.value.ticks.length-1)),y:r.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.applyDataLabel)(t.value.style.chart.labels.formatter,l,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}),{datapoint:l,seriesIndex:o})),9,Ae))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${c.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,Te),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Oe)],8,Pe),e.createElementVNode("radialGradient",{id:`end_grad_${c.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,Fe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ie)],8,De)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Re)],8,Ge),e.createElementVNode("linearGradient",{id:`grad_negative_${c.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,We)],8,He)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",je,[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}
|