vue-data-ui 2.4.76 → 2.4.78
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-SYMRLSHC.js → Arrow-C7AmfY-d.js} +1 -1
- package/dist/{Arrow-BEL6nGJ5.cjs → Arrow-DbrjRMa6.cjs} +1 -1
- package/dist/{BaseIcon-Udj2sWh1.cjs → BaseIcon-CIjjPDqj.cjs} +1 -1
- package/dist/{BaseIcon-wfQ35Ioa.js → BaseIcon-Dzpk4O8L.js} +1 -1
- package/dist/{DataTable-CC3rD9iV.js → DataTable-DtRXoetj.js} +2 -2
- package/dist/{DataTable-RY8EUwF3.cjs → DataTable-wN-jvOfe.cjs} +1 -1
- package/dist/{Legend-CZrlsh2W.cjs → Legend-DqGE1lkA.cjs} +1 -1
- package/dist/{Legend-BBFx9L7u.js → Legend-RnRqBxiV.js} +2 -2
- package/dist/{PackageVersion-Cc8-1SRE.js → PackageVersion-CgJdp_Ki.js} +1 -1
- package/dist/{PackageVersion-C1zaH_aJ.cjs → PackageVersion-Dn-t7tbm.cjs} +1 -1
- package/dist/{PenAndPaper-BKX-8o1h.js → PenAndPaper-BTLEk55u.js} +3 -3
- package/dist/{PenAndPaper-Bv8oV7l0.cjs → PenAndPaper-DFXJJink.cjs} +1 -1
- package/dist/{Shape-CSj0rOyf.js → Shape-B1fqUhjt.js} +1 -1
- package/dist/{Shape-CuDuYYKF.cjs → Shape-D7IbPjU8.cjs} +1 -1
- package/dist/{Slicer-De-C8OB8.cjs → Slicer-8bCK41mN.cjs} +1 -1
- package/dist/{Slicer-4vVJHlL9.js → Slicer-GQf9ZyPj.js} +2 -2
- package/dist/{Title-m5N0oN0G.cjs → Title-D-6pIV0l.cjs} +1 -1
- package/dist/{Title-CmyP_ypC.js → Title-XYNHfYwN.js} +1 -1
- package/dist/{Tooltip-Dq7633oz.cjs → Tooltip-CNox4F8U.cjs} +1 -1
- package/dist/{Tooltip-Dz6sXvS2.js → Tooltip-DYRo59nq.js} +1 -1
- package/dist/{index-CpNLsWVB.js → index-B8Eaq54E.js} +1 -1
- package/dist/{index-CH3YkGpv.cjs → index-KJL8ra_6.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-2TBYsJKg.cjs → useNestedProp-Bu958azG.cjs} +1 -1
- package/dist/{useNestedProp-C14snYQ3.js → useNestedProp-Ka0R_Yqa.js} +1 -1
- package/dist/{usePrinter-D76t2otk.js → usePrinter-D83W2gfG.js} +1 -1
- package/dist/{usePrinter-A1_US3Dh.cjs → usePrinter-pDOF3CfL.cjs} +1 -1
- package/dist/{vue-data-ui-0qqDFsDV.js → vue-data-ui-DgmXnSUU.js} +60 -60
- package/dist/{vue-data-ui-C3B3pxcE.cjs → vue-data-ui-Ot5xYhbV.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DsPyvRtf.cjs → vue-ui-3d-bar-CB0XzatQ.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-vXI86Ftg.js → vue-ui-3d-bar-CqiW8qFZ.js} +9 -9
- package/dist/{vue-ui-accordion-7RGF7sa1.js → vue-ui-accordion--5td7b94.js} +3 -3
- package/dist/{vue-ui-accordion-_LFrGkGx.cjs → vue-ui-accordion-4-dyMgJA.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CotXvsaD.js → vue-ui-age-pyramid-Bsg0z9ei.js} +10 -10
- package/dist/{vue-ui-age-pyramid-ac5bW1yE.cjs → vue-ui-age-pyramid-DNseB8ej.cjs} +1 -1
- package/dist/{vue-ui-annotator-LO2QBLr-.cjs → vue-ui-annotator-CHjtF8NT.cjs} +1 -1
- package/dist/{vue-ui-annotator-C1RLefPu.js → vue-ui-annotator-obnYFvvq.js} +1 -1
- package/dist/{vue-ui-bullet-CngMCn0G.cjs → vue-ui-bullet-CNWHd7dO.cjs} +1 -1
- package/dist/{vue-ui-bullet-DZknfpTt.js → vue-ui-bullet-yKEVhE17.js} +8 -8
- package/dist/{vue-ui-candlestick-BIhS1XvX.js → vue-ui-candlestick-Cc-Ee4zv.js} +11 -11
- package/dist/{vue-ui-candlestick-BrHsZWBD.cjs → vue-ui-candlestick-VBq82rfW.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DQOyjYrs.js → vue-ui-carousel-table-B6v1NycN.js} +4 -4
- package/dist/{vue-ui-carousel-table-CEYvDVp-.cjs → vue-ui-carousel-table-DLwVijSb.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DOB6e1ur.js → vue-ui-chestnut-CekC1moT.js} +8 -8
- package/dist/{vue-ui-chestnut-Ck7UKhm3.cjs → vue-ui-chestnut-DHZbhIf_.cjs} +1 -1
- package/dist/{vue-ui-cursor-DbR8dGQz.cjs → vue-ui-cursor-Bz-jVx3a.cjs} +1 -1
- package/dist/{vue-ui-cursor-BaFPplLP.js → vue-ui-cursor-CISKzkNu.js} +2 -2
- package/dist/{vue-ui-dashboard-BiYrjIXc.cjs → vue-ui-dashboard-PAi8o4AC.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CU1IswIu.js → vue-ui-dashboard-w7Ts26Xc.js} +2 -2
- package/dist/{vue-ui-digits-LLkWsjVe.cjs → vue-ui-digits-I_lj1m6d.cjs} +1 -1
- package/dist/{vue-ui-digits-Ccu0VX39.js → vue-ui-digits-kaBR5FUU.js} +2 -2
- package/dist/{vue-ui-donut-BZbOZXBY.js → vue-ui-donut-BVuaExCl.js} +111 -114
- package/dist/vue-ui-donut-dDpMdK4G.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-BDBugP7m.cjs → vue-ui-donut-evolution-ChGao_WW.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DtgcRiGo.js → vue-ui-donut-evolution-DAmX1OX-.js} +11 -11
- package/dist/{vue-ui-dumbbell-CeWOqVMa.js → vue-ui-dumbbell-CrQNRN_m.js} +10 -10
- package/dist/{vue-ui-dumbbell-Dg6X5Vj5.cjs → vue-ui-dumbbell-DsR4RQY9.cjs} +1 -1
- package/dist/{vue-ui-flow-CjG35xEC.js → vue-ui-flow-B0lCe4G8.js} +9 -9
- package/dist/{vue-ui-flow-CoAgjhdm.cjs → vue-ui-flow-Dhcvvzee.cjs} +1 -1
- package/dist/{vue-ui-funnel-hjZrLAhZ.cjs → vue-ui-funnel-Bu_wMJ98.cjs} +1 -1
- package/dist/{vue-ui-funnel-D8c4Gp8b.js → vue-ui-funnel-Cinv1hUx.js} +9 -9
- package/dist/{vue-ui-galaxy-2WU_lJvz.js → vue-ui-galaxy-BcwunIK3.js} +11 -11
- package/dist/{vue-ui-galaxy-DfTXwfQR.cjs → vue-ui-galaxy-zx6O9AuV.cjs} +1 -1
- package/dist/{vue-ui-gauge-Bj4H5esH.js → vue-ui-gauge-C4W4OAXQ.js} +7 -7
- package/dist/{vue-ui-gauge-C_IgZirr.cjs → vue-ui-gauge-Cb6sxoZI.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CFUkIE1e.js → vue-ui-gizmo-D4VHyFmN.js} +3 -3
- package/dist/{vue-ui-gizmo-Dbsg9oG_.cjs → vue-ui-gizmo-DBSYx24z.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Df4woeNc.js → vue-ui-heatmap-C3WHfifV.js} +10 -10
- package/dist/{vue-ui-heatmap-DECng1-9.cjs → vue-ui-heatmap-CBNt4Huo.cjs} +1 -1
- package/dist/{vue-ui-history-plot-C0X1_s96.cjs → vue-ui-history-plot-Dp8Llb3A.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DHUuanXy.js → vue-ui-history-plot-dJp-Lai2.js} +11 -11
- package/dist/{vue-ui-kpi-d5eW2MQ3.js → vue-ui-kpi-B3XhowYx.js} +3 -3
- package/dist/{vue-ui-kpi-CGrN8rrL.cjs → vue-ui-kpi-Dnp8IUyb.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C2-zQHTF.cjs → vue-ui-mini-loader-BgwhuEda.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DRUBgzI9.js → vue-ui-mini-loader-Cca7PA4v.js} +2 -2
- package/dist/{vue-ui-molecule-Bst8lERC.cjs → vue-ui-molecule-B1AocG3H.cjs} +1 -1
- package/dist/{vue-ui-molecule-CqQBdd27.js → vue-ui-molecule-BcZNqWfD.js} +11 -11
- package/dist/{vue-ui-mood-radar-BM7pbHlc.cjs → vue-ui-mood-radar-Cn65TQEs.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-oB1S4QFm.js → vue-ui-mood-radar-HjLL0ZZ8.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DdgoTSGG.js → vue-ui-nested-donuts-BIqySYG_.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BUcrd4TR.cjs → vue-ui-nested-donuts-CymFt4B3.cjs} +1 -1
- package/dist/{vue-ui-onion-RimU8400.cjs → vue-ui-onion-BLMFR0GK.cjs} +1 -1
- package/dist/{vue-ui-onion-BD4CSF0A.js → vue-ui-onion-muCAMEG8.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CTUm9M3z.js → vue-ui-parallel-coordinate-plot-DYOlnKPw.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-Cj8VtclE.cjs → vue-ui-parallel-coordinate-plot-i-hhfnwF.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DjsY0y5B.cjs → vue-ui-quadrant-DJPOp1-A.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DKrkCfAn.js → vue-ui-quadrant-TU5fWoEw.js} +12 -12
- package/dist/{vue-ui-quick-chart-Dy7EL7ta.cjs → vue-ui-quick-chart-CTJxOisL.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BBCjtI-7.js → vue-ui-quick-chart-DzuUofFN.js} +9 -9
- package/dist/{vue-ui-radar-D5ufpNKc.js → vue-ui-radar-C0WA20R8.js} +12 -12
- package/dist/{vue-ui-radar-B3SwUPOg.cjs → vue-ui-radar-D4xX7TNQ.cjs} +1 -1
- package/dist/{vue-ui-rating-DzjVC24x.cjs → vue-ui-rating-C2JILb2g.cjs} +1 -1
- package/dist/{vue-ui-rating-D4G-LFWR.js → vue-ui-rating-DUcyhyrN.js} +2 -2
- package/dist/{vue-ui-relation-circle-WkD_rUnu.js → vue-ui-relation-circle-BYlIjbUK.js} +7 -7
- package/dist/{vue-ui-relation-circle-1pWCHVnC.cjs → vue-ui-relation-circle-D-Wxskec.cjs} +1 -1
- package/dist/{vue-ui-rings-CTYnhWv8.cjs → vue-ui-rings-CsXVOIn3.cjs} +1 -1
- package/dist/{vue-ui-rings-C8ty4dWD.js → vue-ui-rings-w4KQSfym.js} +12 -12
- package/dist/{vue-ui-scatter-BQVPLg6A.cjs → vue-ui-scatter--5Ob2lKM.cjs} +1 -1
- package/dist/{vue-ui-scatter-DfeNfnMl.js → vue-ui-scatter-CfgCA3Di.js} +12 -12
- package/dist/{vue-ui-screenshot-D03-LKwV.js → vue-ui-screenshot-BsD3ySuA.js} +1 -1
- package/dist/{vue-ui-screenshot-C7lsivHN.cjs → vue-ui-screenshot-UEVUHXWY.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DwmP0u2B.cjs → vue-ui-skeleton-D_YCUi1y.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CIp8lMA6.js → vue-ui-skeleton-DpadzgbS.js} +3 -3
- package/dist/{vue-ui-smiley-_J08wXf9.js → vue-ui-smiley-BHqeb-Ol.js} +2 -2
- package/dist/{vue-ui-smiley-Bp-UbI5r.cjs → vue-ui-smiley-C32dLhtP.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-UX4dEhft.cjs → vue-ui-spark-trend-Bt2wpc5C.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-iXsvKant.js → vue-ui-spark-trend-NAcB2zZ1.js} +5 -5
- package/dist/{vue-ui-sparkbar-JQ4SIcqX.js → vue-ui-sparkbar-BPpSxe5Z.js} +4 -4
- package/dist/{vue-ui-sparkbar-BJ_rGX_Y.cjs → vue-ui-sparkbar-CgoGRT0_.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Ci5Jx-i_.js → vue-ui-sparkgauge-C1mW3KbZ.js} +4 -4
- package/dist/{vue-ui-sparkgauge-YQBQjjX1.cjs → vue-ui-sparkgauge-frN6uK_L.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C5UeFik2.cjs → vue-ui-sparkhistogram-CqQY434G.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-D1VEZIa5.js → vue-ui-sparkhistogram-HgBi5OvP.js} +5 -5
- package/dist/{vue-ui-sparkline-CRFYizW3.js → vue-ui-sparkline-BABBXY2c.js} +4 -4
- package/dist/{vue-ui-sparkline-fF9WenrE.cjs → vue-ui-sparkline-XOa6LfX2.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CynLB9us.cjs → vue-ui-sparkstackbar-B4Xduiv1.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CWa5ELhE.js → vue-ui-sparkstackbar-Ch3JvFBq.js} +5 -5
- package/dist/{vue-ui-stackbar-jQdQH0Pu.cjs → vue-ui-stackbar-CH8tLDZq.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DSammmJH.js → vue-ui-stackbar-JIEn0g7t.js} +13 -13
- package/dist/{vue-ui-strip-plot-yE9w6drR.cjs → vue-ui-strip-plot-BkWzm1mI.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-PxONzaXd.js → vue-ui-strip-plot-RZu43QbP.js} +11 -11
- package/dist/{vue-ui-table-BskwuS44.js → vue-ui-table-CJ2gGmYi.js} +1 -1
- package/dist/{vue-ui-table-DG5RXhLE.cjs → vue-ui-table-CgtE4HWs.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CzxnV1-0.js → vue-ui-table-heatmap-B_TfeHsa.js} +4 -4
- package/dist/{vue-ui-table-heatmap-D9W-4tm9.cjs → vue-ui-table-heatmap-DxTs_PZF.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BlQy5f88.js → vue-ui-table-sparkline-DqMH7xbY.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DT8VzRHY.cjs → vue-ui-table-sparkline-PA9L6AjE.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CkJBESoa.cjs → vue-ui-thermometer-AwZdEG3j.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BBvQ4tYx.js → vue-ui-thermometer-D7aR0elr.js} +7 -7
- package/dist/{vue-ui-timer-CNp59qFF.cjs → vue-ui-timer-C6fnDeD8.cjs} +1 -1
- package/dist/{vue-ui-timer-DFvFQF6d.js → vue-ui-timer-C9sO9AoQ.js} +5 -5
- package/dist/{vue-ui-tiremarks-Cf1637KV.cjs → vue-ui-tiremarks-Dje0I1vf.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-D4_LO9A5.js → vue-ui-tiremarks-KvOyYNVW.js} +7 -7
- package/dist/{vue-ui-treemap-CWoi0iKf.js → vue-ui-treemap-BPxLXNZ5.js} +11 -11
- package/dist/{vue-ui-treemap-Dnq85nnj.cjs → vue-ui-treemap-C2Vrj3tg.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DgfIA9-H.js → vue-ui-vertical-bar-BAdSzbYU.js} +12 -12
- package/dist/{vue-ui-vertical-bar-pyVFnVaF.cjs → vue-ui-vertical-bar-_MWpPkwZ.cjs} +1 -1
- package/dist/{vue-ui-waffle-DQbEdVDN.js → vue-ui-waffle-CW1UVf-q.js} +12 -12
- package/dist/{vue-ui-waffle-DGeQNIVJ.cjs → vue-ui-waffle-DfJI5Lez.cjs} +1 -1
- package/dist/{vue-ui-wheel-Bhmjjfqi.cjs → vue-ui-wheel-CzZEsjmd.cjs} +1 -1
- package/dist/{vue-ui-wheel-B0vgQ4Ps.js → vue-ui-wheel-DAwYc7XY.js} +7 -7
- package/dist/{vue-ui-word-cloud-hcJsrwPF.cjs → vue-ui-word-cloud-BEyV6jMo.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-XrUyNMpH.js → vue-ui-word-cloud-BzfYkI08.js} +10 -10
- package/dist/vue-ui-xy-BolkwiXB.cjs +3 -0
- package/dist/{vue-ui-xy--QLh9NlZ.js → vue-ui-xy-CJYGMbMt.js} +610 -609
- package/dist/{vue-ui-xy-canvas-DO3kaKEf.cjs → vue-ui-xy-canvas-DkltjVWN.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-mtxLsToQ.js → vue-ui-xy-canvas-sB1dmJQc.js} +11 -11
- package/package.json +1 -1
- package/dist/vue-ui-donut-DzqE2EQ1.cjs +0 -1
- package/dist/vue-ui-xy-B8WkCl69.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CH3YkGpv.cjs"),ke=require("./useResponsive-BJ7DTGpm.cjs"),We=require("./Title-m5N0oN0G.cjs"),xe=require("./usePrinter-A1_US3Dh.cjs"),Xe=require("./Tooltip-Dq7633oz.cjs"),$e=require("./Shape-CuDuYYKF.cjs"),Ye=require("./Legend-CZrlsh2W.cjs"),Ae=require("./DataTable-RY8EUwF3.cjs"),Me=require("./vue-ui-skeleton-DwmP0u2B.cjs"),Pe=require("./vue-ui-accordion-_LFrGkGx.cjs"),Le=require("./useNestedProp-2TBYsJKg.cjs"),Oe=require("./PackageVersion-C1zaH_aJ.cjs"),Fe=require("./PenAndPaper-Bv8oV7l0.cjs"),De=require("./useUserOptionState-BgepsfED.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ue=["xmlns","viewBox","id"],Ie=["x","y","width","height"],Ge=["id"],Qe=["stop-color"],je=["stop-color"],Je={key:1},Ze=["fill","x","y","height","width","stroke-width","stroke","rx"],Ke=["x1","y1","x2","y2","stroke","stroke-width"],et=["x1","y1","x2","y2","stroke","stroke-width"],tt={key:2},lt=["points","fill"],at=["points","fill"],ot=["points","fill"],ut=["points","fill"],rt={key:3},nt=["y","fill","font-size"],st=["x","y","fill","font-size"],it=["x","y","fill","font-size"],ct=["y","fill","font-size"],vt={key:4},dt=["x","y","font-size","fill"],ht=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],bt=["id","font-size","transform","fill"],pt=["id","font-size","transform","fill"],ft=["id","font-size","transform","fill"],mt={key:5},gt=["fill","points"],kt=["x","y","width","height"],xt=["x","y","width","height"],$t=["x","y","width","height"],Lt=["x","y","width","height"],Ct={key:0,style:{"pointer-events":"none"}},wt=["x","y","font-size","fill"],St={key:0},Bt=["x","y","onMouseover","onClick"],qt={key:8,class:"vue-ui-dna"},_t=["points","fill"],zt=["points","fill"],Nt=["points","fill"],Vt=["points","fill"],Et={key:9},Tt=["x","y","font-size","fill","font-weight"],Wt={key:10},Xt=["x","y","fill"],Yt=["x","y","fill"],At=["x","y","fill"],Mt=["x","y","fill"],Pt=["stroke","d"],Ot=["stroke","d"],Ft={key:5,class:"vue-data-ui-watermark"},Dt=["onClick"],Rt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Ht=["innerHTML"],Ut={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(Ce,{expose:we,emit:M}){const k=Ce,{vue_ui_quadrant:Se}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Be=e.ref(null),E=e.ref(!1),P=e.ref(""),H=e.ref(0),h=e.ref(!1),w=e.ref(null),U=e.ref(null),I=e.ref(null),G=e.ref(null),Q=e.ref(null),j=e.ref(0),J=e.ref(0),Z=e.ref(0),l=e.computed({get:()=>te(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:K,keepUserOptionState:ee}=De.useUserOptionState({config:l.value});function te(){const a=Le.useNestedProp({userConfig:k.config,defaultConfig:Se});return a.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=te(),O.value=!l.value.showOnChartHover,le(),j.value+=1,J.value+=1,Z.value+=1},{deep:!0});const T=e.ref(null);function le(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=ke.throttle(()=>{const{width:u,height:o}=ke.useResponsive({chart:w.value,title:l.value.style.chart.title.text?U.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:G.value,noTitle:Q.value});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:ue,generateImage:re}=xe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),qe=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),ne=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),i=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(i.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const c=e.ref(null),C=e.computed(()=>{switch(c.value){case"TL":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),_e=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){c.value&&N(n);const v={x:a-i.value.startX,y:u-i.value.startY,w:o-i.value.width,h:r-i.value.height},d=l.value.zoomAnimationFrames;let x=0;function ge(){W.value=!0,i.value.startX+=v.x/d,i.value.startY+=v.y/d,i.value.width+=v.w/d,i.value.height+=v.h/d,x+=1,x<d?_e.value=requestAnimationFrame(ge):W.value=!1}ge()}function $(a){if(!W.value)if(h.value&&c.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),c.value=null,h.value=!1;else{switch(c.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:i.value.startX=0,i.value.startY=0,i.value.width=t.value.width,i.value.height=t.value.height;break}h.value=!0}}const ze=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||ne.value[u]||s.palette[u]}))),Ne=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Ve=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Ne.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ne.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function se(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function ie(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ye();M("selectLegend",u)}const ce=e.computed(()=>Ve.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),Ee=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function ve(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function de(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,P.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function he(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};M("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};M("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ye(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function be(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const B=e.ref(!1);function Te(a){B.value=a,H.value+=1}function pe(){p.value.showTable=!p.value.showTable}function fe(){p.value.plotLabels.show=!p.value.plotLabels.show}function me(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}return we({getData:ye,generatePdf:ue,generateCsv:be,generateImage:re,toggleTable:pe,toggleLabels:fe,toggleTooltip:me,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`),onMouseenter:u[16]||(u[16]=()=>e.unref(K)(!0)),onMouseleave:u[17]||(u[17]=()=>e.unref(K)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),qe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:U,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`table_${j.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value&&(e.unref(ee)||e.unref(O))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${H.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(oe),isPrinting:e.unref(ae),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(ue),onGenerateCsv:be,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleLabels:fe,onToggleTooltip:me,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`${i.value.startX} ${i.value.startY} ${i.value.width} ${i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Oe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:i.value.startX,y:i.value.startY,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,je)],8,Ge))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ze))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ke),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,et),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",tt,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,lt),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,at),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ot),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ut)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",rt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,nt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,st)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,it)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,dt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,ht),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,yt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,bt),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,pt),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,ft)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,gt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,kt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,xt),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,$t),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,Lt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>de(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,Bt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock($e._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>de(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,wt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",qt,[c.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,_t)):e.createCommentVNode("",!0),c.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,zt)):e.createCommentVNode("",!0),c.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Nt)):e.createCommentVNode("",!0),c.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Vt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&!W.value?(e.openBlock(),e.createElementBlock("g",Et,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,Tt)])):e.createCommentVNode("",!0),h.value&&c.value?(e.openBlock(),e.createElementBlock("g",Wt,[e.createElementVNode("rect",{x:b.value[c.value].tl.x,y:b.value[c.value].tl.y,height:"20",width:"20",fill:b.value[c.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TL"})},null,14,Xt),e.createElementVNode("rect",{x:b.value[c.value].tr.x,y:b.value[c.value].tr.y,height:"20",width:"20",fill:b.value[c.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TR"})},null,14,Yt),e.createElementVNode("rect",{x:b.value[c.value].br.x,y:b.value[c.value].br.y,height:"20",width:"20",fill:b.value[c.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BR"})},null,14,At),e.createElementVNode("rect",{x:b.value[c.value].bl.x,y:b.value[c.value].bl.y,height:"20",width:"20",fill:b.value[c.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BL"})},null,14,Mt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[c.value].crosshairs.horizontal},null,8,Pt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[c.value].crosshairs.vertical},null,8,Ot)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Ue)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ye.Legend,{key:`legend_${Z.value}`,legendSet:ce.value,config:Ee.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Dt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:G,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Xe._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:P.value,isFullscreen:B.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Rt,[e.createVNode($e._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ae.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Ht)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},It=Re._export_sfc(Ut,[["__scopeId","data-v-6d003baa"]]);exports.default=It;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-KJL8ra_6.cjs"),ke=require("./useResponsive-BJ7DTGpm.cjs"),We=require("./Title-D-6pIV0l.cjs"),xe=require("./usePrinter-pDOF3CfL.cjs"),Xe=require("./Tooltip-CNox4F8U.cjs"),$e=require("./Shape-D7IbPjU8.cjs"),Ye=require("./Legend-DqGE1lkA.cjs"),Ae=require("./DataTable-wN-jvOfe.cjs"),Me=require("./vue-ui-skeleton-D_YCUi1y.cjs"),Pe=require("./vue-ui-accordion-4-dyMgJA.cjs"),Le=require("./useNestedProp-Bu958azG.cjs"),Oe=require("./PackageVersion-Dn-t7tbm.cjs"),Fe=require("./PenAndPaper-DFXJJink.cjs"),De=require("./useUserOptionState-BgepsfED.cjs"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ue=["xmlns","viewBox","id"],Ie=["x","y","width","height"],Ge=["id"],Qe=["stop-color"],je=["stop-color"],Je={key:1},Ze=["fill","x","y","height","width","stroke-width","stroke","rx"],Ke=["x1","y1","x2","y2","stroke","stroke-width"],et=["x1","y1","x2","y2","stroke","stroke-width"],tt={key:2},lt=["points","fill"],at=["points","fill"],ot=["points","fill"],ut=["points","fill"],rt={key:3},nt=["y","fill","font-size"],st=["x","y","fill","font-size"],it=["x","y","fill","font-size"],ct=["y","fill","font-size"],vt={key:4},dt=["x","y","font-size","fill"],ht=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],bt=["id","font-size","transform","fill"],pt=["id","font-size","transform","fill"],ft=["id","font-size","transform","fill"],mt={key:5},gt=["fill","points"],kt=["x","y","width","height"],xt=["x","y","width","height"],$t=["x","y","width","height"],Lt=["x","y","width","height"],Ct={key:0,style:{"pointer-events":"none"}},wt=["x","y","font-size","fill"],St={key:0},Bt=["x","y","onMouseover","onClick"],qt={key:8,class:"vue-ui-dna"},_t=["points","fill"],zt=["points","fill"],Nt=["points","fill"],Vt=["points","fill"],Et={key:9},Tt=["x","y","font-size","fill","font-weight"],Wt={key:10},Xt=["x","y","fill"],Yt=["x","y","fill"],At=["x","y","fill"],Mt=["x","y","fill"],Pt=["stroke","d"],Ot=["stroke","d"],Ft={key:5,class:"vue-data-ui-watermark"},Dt=["onClick"],Rt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Ht=["innerHTML"],Ut={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(Ce,{expose:we,emit:M}){const k=Ce,{vue_ui_quadrant:Se}=s.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(s.createUid()),Be=e.ref(null),E=e.ref(!1),P=e.ref(""),H=e.ref(0),h=e.ref(!1),w=e.ref(null),U=e.ref(null),I=e.ref(null),G=e.ref(null),Q=e.ref(null),j=e.ref(0),J=e.ref(0),Z=e.ref(0),l=e.computed({get:()=>te(),set:a=>a}),{userOptionsVisible:O,setUserOptionsVisibility:K,keepUserOptionState:ee}=De.useUserOptionState({config:l.value});function te(){const a=Le.useNestedProp({userConfig:k.config,defaultConfig:Se});return a.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>k.config,a=>{l.value=te(),O.value=!l.value.showOnChartHover,le(),j.value+=1,J.value+=1,Z.value+=1},{deep:!0});const T=e.ref(null);function le(){if(s.objectIsEmpty(k.dataset)?s.error({componentName:"VueUiQuadrant",type:"dataset"}):k.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=ke.throttle(()=>{const{width:u,height:o}=ke.useResponsive({chart:w.value,title:l.value.style.chart.title.text?U.value:null,legend:l.value.style.chart.legend.show?I.value:null,source:G.value,noTitle:Q.value});y.value=48,t.value.height=o,t.value.usableHeight=o-y.value*2,t.value.width=u,t.value.usableWidth=u-y.value*2,t.value.top=y.value,t.value.left=y.value,t.value.right=u-y.value,t.value.bottom=o-y.value,t.value.centerX=u/2,t.value.centerY=o-o/2,t.value.padding=y.value});T.value=new ResizeObserver(a),T.value.observe(w.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:ue,generateImage:re}=xe.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),qe=e.computed(()=>l.value.userOptions.show&&!l.value.style.chart.title.text),ne=e.computed(()=>s.convertCustomPalette(l.value.customPalette)),p=e.ref({plotLabels:{show:l.value.style.chart.layout.labels.plotLabels.show},showTable:l.value.table.show,showTooltip:l.value.style.chart.tooltip.show}),y=e.ref(48),t=e.ref({height:l.value.style.chart.height,usableHeight:l.value.style.chart.height-y.value*2,width:l.value.style.chart.width,usableWidth:l.value.style.chart.width-y.value*2,top:y.value,left:y.value,right:l.value.style.chart.width-y.value,bottom:l.value.style.chart.height-y.value,centerX:l.value.style.chart.width/2,centerY:l.value.style.chart.height-l.value.style.chart.height/2,padding:y.value}),i=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(i.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const c=e.ref(null),C=e.computed(()=>{switch(c.value){case"TL":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tl.text||"Top Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tl.bold};case"TR":return{x:i.value.startX+i.value.width/2,y:i.value.height,text:l.value.style.chart.layout.labels.quadrantLabels.tr.text||"Top Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,bold:l.value.style.chart.layout.labels.quadrantLabels.tr.bold};case"BR":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.br.text||"Bottom Right",fontSize:l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,bold:l.value.style.chart.layout.labels.quadrantLabels.br.bold};case"BL":return{x:i.value.startX+i.value.width/2,y:i.value.height*1.678,text:l.value.style.chart.layout.labels.quadrantLabels.bl.text||"Bottom Left",fontSize:l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,bold:l.value.style.chart.layout.labels.quadrantLabels.bl.bold};default:return{x:0,y:0,text:"",fontSize:0,fill:"none",bold:!1}}}),_e=e.ref(null),W=e.ref(!1);function q({targetX:a,targetY:u,targetW:o,targetH:r,side:n}){c.value&&N(n);const v={x:a-i.value.startX,y:u-i.value.startY,w:o-i.value.width,h:r-i.value.height},d=l.value.zoomAnimationFrames;let x=0;function ge(){W.value=!0,i.value.startX+=v.x/d,i.value.startY+=v.y/d,i.value.width+=v.w/d,i.value.height+=v.h/d,x+=1,x<d?_e.value=requestAnimationFrame(ge):W.value=!1}ge()}function $(a){if(!W.value)if(h.value&&c.value===a)q({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),c.value=null,h.value=!1;else{switch(c.value=a,a){case"TL":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default:i.value.startX=0,i.value.startY=0,i.value.width=t.value.width,i.value.height=t.value.height;break}h.value=!0}}const ze=e.computed(()=>{const a=l.value.style.chart.layout.grid.graduations.steps,u=t.value.usableWidth/(a*2),o=t.value.top,r=[];for(let n=0;n<a;n+=1)r.push({x:t.value.padding+u*n,y:o+t.value.usableHeight*(n/a/2),height:t.value.usableHeight*(1-n/a),width:t.value.usableWidth*(1-n/a),opacity:Math.round((n+1)/a*20)});return r}),f=e.computed(()=>{let a=l.value.style.chart.layout.grid.xAxis.max,u=l.value.style.chart.layout.grid.xAxis.min,o=l.value.style.chart.layout.grid.yAxis.max,r=l.value.style.chart.layout.grid.yAxis.min;return l.value.style.chart.layout.grid.xAxis.auto&&(a=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.x))),u=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...S.value.flatMap(n=>n.series.map(v=>v.y))),r=Math.min(...S.value.flatMap(n=>n.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),S=e.computed(()=>k.dataset.map((a,u)=>({...a,series:s.largestTriangleThreeBuckets({data:a.series,threshold:l.value.downsample.threshold}),id:`cat_${u}_${g.value}`,color:s.convertColorToHex(a.color)||ne.value[u]||s.palette[u]}))),Ne=e.computed(()=>S.value.filter(a=>!L.value.includes(a.id))),Ve=e.computed(()=>S.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(k.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&s.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Ne.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ne.value[u]||s.palette[u],series:a.series.map(o=>({...o,x:se(o.x),y:ie(o.y),xValue:o.x,yValue:o.y,quadrantSide:ve({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:s.createUid()}))}))));function se(a){if(a>=0){const u=a/f.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(f.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function ie(a){if(a>=0){const u=a/f.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(f.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=m.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],n=a.map(d=>[d.category,d.name,d.x,d.y,d.sideName||d.quadrantSide]),v=a.map(d=>({shape:d.shape,color:d.color}));return{head:r,body:n,itsShapes:v,tableData:a}}),Y=e.computed(()=>{const a=X.value.head,u=X.value.tableData.map(r=>[{shape:r.shape,color:r.color,name:r.category},r.name,s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,s.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,s.dataLabel({v:r.y,r:l.value.style.chart.layout.labels.plotLabels.rounding})),r.sideName||r.quadrantSide]),o={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint};return{head:a,body:u,config:o,colNames:a}});function F(a){L.value.includes(a)?L.value=L.value.filter(o=>o!==a):L.value.push(a);const u=ye();M("selectLegend",u)}const ce=e.computed(()=>Ve.value.map(a=>({name:a.name,shape:a.shape,color:a.color,id:a.id,opacity:L.value.includes(a.id)?.5:1,segregate:()=>F(a.id),isSegregated:L.value.includes(a.id)}))),Ee=e.computed(()=>({cy:"quadrant-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""}));function ve(a){switch(!0){case(a.x>=0&&a.y>=0):return"tr";case(a.x>=0&&a.y<0):return"br";case(a.x<0&&a.y<0):return"bl";case(a.x<0&&a.y>=0):return"tl";default:return""}}const _=e.ref(null),z=e.ref(null),D=e.ref(null);function de(a,u,o){_.value=u.uid,z.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:m.value,config:l.value},E.value=!0;const r=l.value.style.chart.tooltip.customFormat;if(s.isFunction(r)&&s.functionReturnsString(()=>r({seriesIndex:o,datapoint:u,series:m.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:m.value,config:l.value});else{let n="";u.quadrantSide&&(n+=`<div style="color:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].color};font-weight:${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].bold?"bold":"400"}">${l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}</div>`),n+=`<div>${a.name}</div>`,n+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,n+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,s.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,n+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${s.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,s.dataLabel({v:u.yValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,P.value=`<div style="text-align:left;font-size:${l.value.style.chart.tooltip.fontSize}px">${n}</div>`}}function he(a,u){const o={category:a.name,shape:a.shape,itemName:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text};M("selectPlot",o)}function N(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(n=>n.quadrantSide===a).map(n=>({category:n.categoryName,itemName:n.name,x:n.xValue,y:n.yValue}))),o={quadrantSide:a,sideName:l.value.style.chart.layout.labels.quadrantLabels[a].text,items:[...u]};M("selectSide",o)}const b=e.computed(()=>({TL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},20 ${t.value.left+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.left+t.value.usableWidth/4},0 ${t.value.left+t.value.usableWidth/4},40`}},TR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:0,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:20,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},20 ${t.value.centerX+t.value.usableWidth/4+20},20`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},0 ${t.value.centerX+t.value.usableWidth/4},40`}},BR:{tl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.centerX+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.centerX+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.centerX+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.centerX+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.centerX+t.value.usableWidth/4},${t.value.centerY-8}`}},BL:{tl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color},tr:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-48,fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color},br:{x:t.value.left+t.value.usableWidth/4,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.br.color},bl:{x:t.value.left+t.value.usableWidth/4-20,y:t.value.centerY-28,fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${t.value.left+t.value.usableWidth/4-20},${t.value.centerY-28} ${t.value.left+t.value.usableWidth/4+20},${t.value.centerY-28}`,vertical:`M ${t.value.left+t.value.usableWidth/4},${t.value.centerY-48} ${t.value.left+t.value.usableWidth/4},${t.value.centerY-8}`}}}));function ye(){return m.value.map(a=>({color:a.color,name:a.name,shape:a.shape,series:a.series.map(u=>({name:u.name,x:u.xValue,y:u.yValue,quadrantSide:u.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[u.quadrantSide].text}))}))}function be(){e.nextTick(()=>{const a=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],u=X.value.head,o=X.value.body,r=a.concat([u]).concat(o),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const B=e.ref(!1);function Te(a){B.value=a,H.value+=1}function pe(){p.value.showTable=!p.value.showTable}function fe(){p.value.plotLabels.show=!p.value.plotLabels.show}function me(){p.value.showTooltip=!p.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}return we({getData:ye,generatePdf:ue,generateCsv:be,generateImage:re,toggleTable:pe,toggleLabels:fe,toggleTooltip:me,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:w,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`),onMouseenter:u[16]||(u[16]=()=>e.unref(K)(!0)),onMouseleave:u[17]||(u[17]=()=>e.unref(K)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Fe.PenAndPaper,{key:0,parent:w.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),qe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:U,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(We._sfc_main,{key:`table_${j.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value&&(e.unref(ee)||e.unref(O))?(e.openBlock(),e.createBlock(xe.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${H.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(oe),isPrinting:e.unref(ae),uid:g.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasLabel:l.value.userOptions.buttons.labels,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:w.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:Te,onGeneratePdf:e.unref(ue),onGenerateCsv:be,onGenerateImage:e.unref(re),onToggleTable:pe,onToggleLabels:fe,onToggleTooltip:me,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(ee)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`${i.value.startX} ${i.value.startY} ${i.value.width} ${i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:transparent;color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[e.createVNode(Oe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:i.value.startX,y:i.value.startY,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`quadrant_gradient_${g.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,je)],8,Ge))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(s.setOpacity)(l.value.style.chart.layout.grid.graduations.color,o.opacity):"none",x:o.x,y:o.y,height:o.height<=0?.001:o.height,width:o.width<=0?.001:o.width,"stroke-width":l.value.style.chart.layout.grid.graduations.strokeWidth,stroke:l.value.style.chart.layout.grid.graduations.stroke,rx:l.value.style.chart.layout.grid.graduations.roundingForce},null,8,Ze))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:t.value.left,y1:t.value.centerY,x2:t.value.right,y2:t.value.centerY,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,Ke),e.createElementVNode("line",{x1:t.value.centerX,y1:t.value.top,x2:t.value.centerX,y2:t.value.bottom,stroke:l.value.style.chart.layout.grid.stroke,"stroke-width":l.value.style.chart.layout.grid.strokeWidth},null,8,et),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",tt,[e.createElementVNode("polygon",{points:`${t.value.right-8},${t.value.centerY-6} ${t.value.right},${t.value.centerY} ${t.value.right-8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,lt),e.createElementVNode("polygon",{points:`${t.value.left+8},${t.value.centerY-6} ${t.value.left},${t.value.centerY} ${t.value.left+8},${t.value.centerY+6}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,at),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.top+8} ${t.value.centerX},${t.value.top} ${t.value.centerX+6},${t.value.top+8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ot),e.createElementVNode("polygon",{points:`${t.value.centerX-6},${t.value.bottom-8} ${t.value.centerX},${t.value.bottom} ${t.value.centerX+6},${t.value.bottom-8}`,fill:l.value.style.chart.layout.grid.stroke,stroke:"none"},null,8,ut)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",rt,[l.value.style.chart.layout.labels.quadrantLabels.tl.text?(e.openBlock(),e.createElementBlock("text",{key:0,x:0,y:t.value.top-t.value.padding/2,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.tl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tl.bold?"bold":""}`),onClick:u[0]||(u[0]=o=>N("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,nt)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.tr.text?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.value.width,y:t.value.top-t.value.padding/2,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.tr.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.tr.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.tr.bold?"bold":""}`),onClick:u[1]||(u[1]=o=>N("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,st)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.br.text?(e.openBlock(),e.createElementBlock("text",{key:2,x:t.value.width,y:t.value.bottom+t.value.padding*.7,"text-anchor":"end",fill:l.value.style.chart.layout.labels.quadrantLabels.br.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.br.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.br.bold?"bold":""}`),onClick:u[2]||(u[2]=o=>N("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,it)):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.bl.text?(e.openBlock(),e.createElementBlock("text",{key:3,x:0,y:t.value.bottom+t.value.padding*.7,"text-anchor":"start",fill:l.value.style.chart.layout.labels.quadrantLabels.bl.color,"font-size":l.value.style.chart.layout.labels.quadrantLabels.bl.fontSize,style:e.normalizeStyle(`font-weight:${l.value.style.chart.layout.labels.quadrantLabels.bl.bold?"bold":""}`),onClick:u[3]||(u[3]=o=>N("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,ct)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/6,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(s.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,dt),e.createElementVNode("text",{x:t.value.centerX,y:t.value.top-t.value.padding/2,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.yAxis.name),9,ht),e.createElementVNode("text",{x:t.value.centerX,y:t.value.bottom+t.value.padding*.35,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(s.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,yt),e.createElementVNode("text",{id:`xLabelMin_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.padding-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(-90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.negative},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(s.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,bt),e.createElementVNode("text",{id:`xLabelMax_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-t.value.padding+l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(s.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,pt),e.createElementVNode("text",{id:`xLabelMaxName_${g.value}`,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.axisLabels.fontSize,transform:`translate(${t.value.width-l.value.style.chart.layout.labels.axisLabels.fontSize}, ${t.value.height/2}), rotate(90)`,fill:l.value.style.chart.layout.labels.axisLabels.color.positive},e.toDisplayString(l.value.style.chart.layout.grid.xAxis.name),9,ft)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[o.series.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-quadrant-area":"",fill:l.value.style.chart.layout.areas.useGradient?`url(#quadrant_gradient_${g.value}_${r})`:e.unref(s.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(s.giftWrap)(o)},null,8,gt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{onClick:u[4]||(u[4]=o=>$("TL")),x:t.value.left,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,kt),e.createElementVNode("rect",{onClick:u[5]||(u[5]=o=>$("TR")),x:t.value.centerX,y:t.value.top,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,xt),e.createElementVNode("rect",{onClick:u[6]||(u[6]=o=>$("BR")),x:t.value.centerX,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,$t),e.createElementVNode("rect",{onClick:u[7]||(u[7]=o=>$("BL")),x:t.value.left,y:t.value.centerY,width:t.value.usableWidth/2<=0?.001:t.value.usableWidth/2,height:t.value.usableHeight/2<=0?.001:t.value.usableHeight/2,fill:"transparent",class:e.normalizeClass({"vue-data-ui-zoom-plus":!h.value,"vue-data-ui-zoom-minus":h.value})},null,10,Lt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:n.x-50,y:n.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>de(o,n,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(s.adaptColorToBackground)(o.color)};margin: 0 auto; font-size:${l.value.style.chart.layout.labels.plotLabels.fontSize}px; text-align:center;background:${o.color}; padding: 2px 4px; border-radius: 12px; height: ${l.value.style.chart.layout.labels.plotLabels.fontSize*1.5}px`)},e.toDisplayString(n.name),5)],40,Bt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,n=>(e.openBlock(),e.createBlock($e._sfc_main,{color:o.color,isSelected:_.value&&n.uid===_.value,plot:n,radius:l.value.style.chart.layout.plots.radius/(h.value?1.5:1),shape:o.shape,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none",strokeWidth:l.value.style.chart.layout.plots.outlineWidth,onMouseover:v=>de(o,n,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,_.value=null,z.value=null}),onClick:v=>he(o,n)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,o=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.series,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x,y:r.y+l.value.style.chart.layout.labels.plotLabels.offsetY+l.value.style.chart.layout.plots.radius,"text-anchor":"middle","font-size":l.value.style.chart.layout.labels.plotLabels.fontSize/(h.value?1.5:1),fill:l.value.style.chart.layout.labels.plotLabels.color},e.toDisplayString(r.name),9,wt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",qt,[c.value==="TL"?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:`${t.value.left-1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.top-1} ${t.value.right},${t.value.top-1} ${t.value.right},${t.value.bottom} ${t.value.left-1},${t.value.bottom} ${t.value.left-1},${t.value.centerY}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,_t)):e.createCommentVNode("",!0),c.value==="TR"?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:`${t.value.left},${t.value.top-1} ${t.value.centerX},${t.value.top-1} ${t.value.centerX},${t.value.centerY} ${t.value.right+1},${t.value.centerY} ${t.value.right+1},${t.value.bottom} ${t.value.left},${t.value.bottom} ${t.value.left},${t.value.top-1}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,zt)):e.createCommentVNode("",!0),c.value==="BR"?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:`${t.value.left},${t.value.top} ${t.value.right+1},${t.value.top} ${t.value.right+1},${t.value.centerY} ${t.value.centerX},${t.value.centerY} ${t.value.centerX},${t.value.bottom+1} ${t.value.left},${t.value.bottom+1} ${t.value.left},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Nt)):e.createCommentVNode("",!0),c.value==="BL"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:`${t.value.left-1},${t.value.top} ${t.value.right},${t.value.top} ${t.value.right},${t.value.bottom+1} ${t.value.centerX},${t.value.bottom+1} ${t.value.centerX},${t.value.centerY} ${t.value.left-1},${t.value.centerY} ${t.value.left-1},${t.value.top}`,fill:l.value.style.chart.backgroundColor,style:{opacity:"1"}},null,8,Vt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&!W.value?(e.openBlock(),e.createElementBlock("g",Et,[e.createElementVNode("text",{x:C.value.x,y:C.value.y-C.value.fontSize/1.5,"font-size":C.value.fontSize/1.5,fill:C.value.fill,"text-anchor":"middle","font-weight":C.value.bold?"bold":"normal"},e.toDisplayString(C.value.text),9,Tt)])):e.createCommentVNode("",!0),h.value&&c.value?(e.openBlock(),e.createElementBlock("g",Wt,[e.createElementVNode("rect",{x:b.value[c.value].tl.x,y:b.value[c.value].tl.y,height:"20",width:"20",fill:b.value[c.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TL"?1:.2}`),onClick:u[10]||(u[10]=o=>$("TL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TL"})},null,14,Xt),e.createElementVNode("rect",{x:b.value[c.value].tr.x,y:b.value[c.value].tr.y,height:"20",width:"20",fill:b.value[c.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="TR"?1:.2}`),onClick:u[11]||(u[11]=o=>$("TR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="TR"})},null,14,Yt),e.createElementVNode("rect",{x:b.value[c.value].br.x,y:b.value[c.value].br.y,height:"20",width:"20",fill:b.value[c.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BR"?1:.2}`),onClick:u[12]||(u[12]=o=>$("BR")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BR"})},null,14,At),e.createElementVNode("rect",{x:b.value[c.value].bl.x,y:b.value[c.value].bl.y,height:"20",width:"20",fill:b.value[c.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${c.value==="BL"?1:.2}`),onClick:u[13]||(u[13]=o=>$("BL")),class:e.normalizeClass({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":c.value!=="BL"})},null,14,Mt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[c.value].crosshairs.horizontal},null,8,Pt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[c.value].crosshairs.vertical},null,8,Ot)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,Ue)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Me.default,{key:6,config:{type:"quadrant",style:{backgroundColor:l.value.style.chart.backgroundColor,quadrant:{grid:{color:l.value.style.chart.layout.grid.stroke},plots:{color:l.value.style.chart.layout.grid.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ye.Legend,{key:`legend_${Z.value}`,legendSet:ce.value,config:Ee.value,onClickMarker:u[14]||(u[14]=({legend:o})=>F(o.id))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>F(o.id),style:e.normalizeStyle(`opacity:${L.value.includes(o.id)?.5:1}`)},e.toDisplayString(o.name),13,Dt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:G,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Xe._sfc_main,{show:p.value.showTooltip&&E.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,fontSize:l.value.style.chart.tooltip.fontSize,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:w.value,content:P.value,isFullscreen:B.value,isCustom:l.value.style.chart.tooltip.customFormat&&typeof l.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),default:e.withCtx(()=>[l.value.style.chart.tooltip.showShape?(e.openBlock(),e.createElementBlock("svg",Rt,[e.createVNode($e._sfc_main,{plot:{x:10,y:10},shape:z.value.shape,color:z.value.color,radius:8,stroke:l.value.style.chart.layout.plots.outline?l.value.style.chart.layout.plots.outlineColor:"none","stroke-width":l.value.style.chart.layout.plots.outlineWidth},null,8,["shape","color","stroke","stroke-width"])])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ae.DataTable,{key:`table_${J.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:u[15]||(u[15]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o.name||o},null,8,Ht)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},It=Re._export_sfc(Ut,[["__scopeId","data-v-6d003baa"]]);exports.default=It;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as h, watch as Fe, onMounted as lt, onBeforeUnmount as at, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as w, unref as y, createBlock as N, createCommentVNode as c, createSlots as ut, withCtx as x, renderSlot as $, normalizeProps as G, guardReactiveProps as Q, createVNode as ve, createElementVNode as d, Fragment as S, renderList as Y, toDisplayString as k, createTextVNode as ot, nextTick as st } from "vue";
|
|
2
|
-
import { u as rt, c as Re, t as nt, a as it, p as de, o as vt, e as H, b as dt, T as ct, d as ht, i as O, f as P, X as yt, s as ae, w as bt, U as ft, G as pt, x as gt, y as mt, q as xt, r as $t } from "./index-
|
|
2
|
+
import { u as rt, c as Re, t as nt, a as it, p as de, o as vt, e as H, b as dt, T as ct, d as ht, i as O, f as P, X as yt, s as ae, w as bt, U as ft, G as pt, x as gt, y as mt, q as xt, r as $t } from "./index-B8Eaq54E.js";
|
|
3
3
|
import { t as kt, u as Lt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as wt } from "./Title-
|
|
5
|
-
import { u as qt, U as _t } from "./usePrinter-
|
|
6
|
-
import { _ as St } from "./Tooltip-
|
|
7
|
-
import { _ as He } from "./Shape-
|
|
8
|
-
import { L as Ct } from "./Legend-
|
|
9
|
-
import { D as zt } from "./DataTable-
|
|
10
|
-
import Tt from "./vue-ui-skeleton-
|
|
11
|
-
import Xt from "./vue-ui-accordion
|
|
12
|
-
import { u as Ie } from "./useNestedProp-
|
|
13
|
-
import { _ as Wt } from "./PackageVersion-
|
|
14
|
-
import { P as Yt } from "./PenAndPaper-
|
|
4
|
+
import { _ as wt } from "./Title-XYNHfYwN.js";
|
|
5
|
+
import { u as qt, U as _t } from "./usePrinter-D83W2gfG.js";
|
|
6
|
+
import { _ as St } from "./Tooltip-DYRo59nq.js";
|
|
7
|
+
import { _ as He } from "./Shape-B1fqUhjt.js";
|
|
8
|
+
import { L as Ct } from "./Legend-RnRqBxiV.js";
|
|
9
|
+
import { D as zt } from "./DataTable-DtRXoetj.js";
|
|
10
|
+
import Tt from "./vue-ui-skeleton-DpadzgbS.js";
|
|
11
|
+
import Xt from "./vue-ui-accordion--5td7b94.js";
|
|
12
|
+
import { u as Ie } from "./useNestedProp-Ka0R_Yqa.js";
|
|
13
|
+
import { _ as Wt } from "./PackageVersion-CgJdp_Ki.js";
|
|
14
|
+
import { P as Yt } from "./PenAndPaper-BTLEk55u.js";
|
|
15
15
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Nt = ["id"], Ot = ["xmlns", "viewBox", "id"], Pt = ["x", "y", "width", "height"], Vt = ["id"], Bt = ["stop-color"], Ft = ["stop-color"], Rt = { key: 1 }, Ht = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], It = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ut = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Dt = { key: 2 }, Et = ["points", "fill"], Gt = ["points", "fill"], Qt = ["points", "fill"], Jt = ["points", "fill"], jt = { key: 3 }, Zt = ["y", "fill", "font-size"], Kt = ["x", "y", "fill", "font-size"], el = ["x", "y", "fill", "font-size"], tl = ["y", "fill", "font-size"], ll = { key: 4 }, al = ["x", "y", "font-size", "fill"], ul = ["x", "y", "font-size", "fill"], ol = ["x", "y", "font-size", "fill"], sl = ["id", "font-size", "transform", "fill"], rl = ["id", "font-size", "transform", "fill"], nl = ["id", "font-size", "transform", "fill"], il = { key: 5 }, vl = ["fill", "points"], dl = ["x", "y", "width", "height"], cl = ["x", "y", "width", "height"], hl = ["x", "y", "width", "height"], yl = ["x", "y", "width", "height"], bl = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CH3YkGpv.cjs"),Ce=require("./useResponsive-BJ7DTGpm.cjs"),se=require("./BaseIcon-Udj2sWh1.cjs"),Ge=require("./Tooltip-Dq7633oz.cjs"),ze=require("./usePrinter-A1_US3Dh.cjs"),Xe=require("./Slicer-De-C8OB8.cjs"),Ye=require("./vue-ui-skeleton-DwmP0u2B.cjs"),Ne=require("./useNestedProp-2TBYsJKg.cjs"),Ze=require("./PackageVersion-C1zaH_aJ.cjs"),Je=require("./PenAndPaper-Bv8oV7l0.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:d,barLineSwitch:w=6}){let h=null,B=null,N=0;if((typeof d=="number"||typeof d=="string")&&console.warn(`The provided dataset (${d}) is not sufficient to build a chart`),K(d)&&(P(d)&&(d.length<w?h=S.BAR:h=S.LINE,B=d,N=d.length),ce(d))){if(!lt(d))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(d[0]),j=Object.values(d[0]);if(!U.some(A=>at(A)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Ve(j,A=>typeof A=="number")&&(h=S.DONUT,B=d),Ve(j,A=>Array.isArray(A)&&P(A))&&($e(d)>w?h=S.LINE:h=S.BAR,N=$e(d),B=d.map(A=>({...A,data:ot(A,F=>P(F))}))),d=d.map(A=>Fe(A)),B=B.map(A=>Fe(A))}return K(d)&&[...new Set(d.flatMap(U=>Array.isArray(U)))][0],{dataset:d,type:h,usableDataset:B,maxSeriesLength:N}}function Pe(d){return!d||K(d)&&!d.length}function K(d){return Array.isArray(d)}function P(d){if(!K(d)||Pe(d))return!1;const w=d.map(h=>Number(h));return![...new Set(w.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ce(d){return!K(d)||Pe(d)||!![...new Set(d.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!d.map(h=>Object.keys(h).length>0).includes(!1)}function tt(d,w){const h=Object.keys(d).sort(),B=Object.keys(w).sort();if(h.length!==B.length)return!1;for(let N=0;N<h.length;N+=1){const V=h[N],M=B[N];if(V!==M||typeof d[V]!=typeof w[M])return!1}return!0}function lt(d){if(d.length<=1)return!0;for(let w=0;w<d.length;w+=1)for(let h=w+1;h<d.length;h+=1)if(!tt(d[w],d[h]))return!1;return!0}function at(d){return Ke.includes(d.toUpperCase())}function Ve(d,w){let h=[];for(let B=0;B<d.length;B+=1)h.push(w(d[B]));return h.includes(!0)}function $e(d){return Math.max(...[...d].flatMap(w=>Object.values(w).filter(h=>P(h)).map(h=>h.length)))}function ot(d,w){return Object.values(d).filter(h=>w(h))[0]}function Fe(d){const w={};for(let h in d)d.hasOwnProperty(h)&&(w[h.toUpperCase()]=d[h]);return w}const Ie=d=>(e.pushScopeId("data-v-8b56f397"),d=d(),e.popScopeId(),d),nt=["id"],rt=["xmlns","viewBox"],it=["x","y","width","height"],ut=["x","y","width","height"],st=["width","height"],ct=["id"],dt=["id"],vt=Ie(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),mt=["id"],ht=["flood-color"],ft={key:0,class:"donut-label-connectors"},pt=["d","stroke","stroke-width","filter"],kt=["cx","cy","r","fill","filter"],gt={class:"donut"},yt=["d","fill","stroke","stroke-width","filter"],xt=["d","onMouseenter","onClick"],St={key:1,class:"donut-labels quick-animation"},bt=["cx","cy","fill","stroke","filter"],Bt=["text-anchor","x","y","fill","font-size","filter"],wt=["text-anchor","x","y","fill","font-size","filter"],Et={key:2,class:"donut-hollow quick-animation"},At=["x","y","font-size","fill"],Lt=["x","y","font-size","fill"],_t={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt={key:1,class:"line-axis"},Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Ft={key:2,class:"yLabels"},Pt=["x1","x2","y1","y2","stroke","stroke-width"],It=["x","y","font-size","fill"],Tt={key:3,class:"periodLabels"},Ot=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["font-size","text-anchor","fill","transform"],Dt={class:"plots"},Mt={class:"line-plot-series"},Ut=["d","stroke","stroke-width"],qt=["d","stroke","stroke-width"],Ht=["d","stroke","stroke-width"],Wt=["d","stroke","stroke-width"],jt=["cx","cy","fill","stroke"],Gt={key:4,class:"dataLabels"},Xt=["font-size","fill","x","y"],Yt={class:"tooltip-traps"},Zt=["x","y","height","width","fill","onMouseenter","onClick"],Jt={key:0,class:"line-grid"},Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt=["x1","x2","y1","y2","stroke","stroke-width"],el={key:1,class:"line-axis"},tl=["x1","x2","y1","y2","stroke","stroke-width"],ll=["x1","x2","y1","y2","stroke","stroke-width"],al={key:2,class:"yLabels"},ol=["x1","x2","y1","y2","stroke","stroke-width"],nl=["x","y","font-size","fill"],rl={key:3,class:"periodLabels"},il=["x1","x2","y1","y2","stroke","stroke-width"],ul=["font-size","text-anchor","transform","fill"],sl={class:"plots"},cl=["x","width","height","y","fill","stroke","stroke-width"],dl=["to"],vl=["from","to"],ml={key:4,class:"dataLabels"},hl=["x","y","font-size","fill"],fl={class:"tooltip-traps"},pl=["x","y","height","width","fill","onMouseenter","onClick"],kl={key:6,class:"axis-labels"},gl={key:0},yl=["font-size","fill","x","y"],xl={key:1},Sl=["font-size","fill","x","y"],bl={key:2},Bl=["font-size","fill","transform"],wl={key:3},El=["font-size","fill","transform"],Al={key:6,class:"vue-data-ui-watermark"},Ll=["onClick"],_l=["onClick"],Cl=["onClick"],zl={key:1,class:"vue-ui-quick-chart-not-processable"},Nl=Ie(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),Vl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(d,{expose:w,emit:h}){const B=d,{vue_ui_quick_chart:N}=i.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),A=e.ref(i.createUid()),F=e.ref(!1),G=e.ref(null),T=e.ref(""),$=e.ref(null),me=e.ref(null),he=e.ref(null),x=e.ref([]),fe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ge(),set:a=>a}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),pe=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),te=e.ref(!t.value.showUserOptionsOnChartHover);function ke(a=!1){Te.value&&(te.value=a)}function ge(){const a=Ne.useNestedProp({userConfig:B.config,defaultConfig:N});let s={};return a.theme?s={...Ne.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[a.theme]||B.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:s=a,B.config&&i.hasDeepProperty(B.config,"zoomStartIndex")?s.zoomStartIndex=B.config.zoomStartIndex:s.zoomStartIndex=null,B.config&&i.hasDeepProperty(B.config,"zoomEndIndex")?s.zoomEndIndex=B.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>B.config,a=>{t.value=ge(),k.value.width=t.value.width,k.value.height=t.value.height,te.value=!t.value.showUserOptionsOnChartHover,Se()},{deep:!0}),e.watch(()=>B.dataset,a=>{f.value=Y.value,g.value.start=0,g.value.end=f.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const a=et({dataset:i.sanitizeArray(B.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return a||console.error("VueUiQuickChart : Dataset is not processable"),a}),f=e.ref(Y.value),Oe=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,a=>{a||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:le,isImaging:ae,generatePdf:ye,generateImage:xe}=ze.usePrinter({elementId:`${b.value}_${A.value}`,fileName:t.value.title||b.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),k=e.ref({width:t.value.width,height:t.value.height}),oe=e.ref({showTooltip:t.value.showTooltip}),ne=e.ref(null);e.onMounted(()=>{Se()});function Se(){if(t.value.responsive){const a=Ce.throttle(()=>{const{width:s,height:l}=Ce.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null,source:me.value,noTitle:he.value});k.value.width=s,k.value.height=l});ne.value=new ResizeObserver(a),ne.value.observe(V.value.parentNode)}Le()}e.onBeforeUnmount(()=>{ne.value&&ne.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.BAR:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.DONUT:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;default:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`}});function be(a){return[...a].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(a){return t.value.blurOnHover&&![null,void 0].includes($.value)&&$.value!==a?`url(#blur_${A.value})`:""}function Be(a,s){x.value.includes(a)?x.value=x.value.filter(l=>l!==a):x.value.length<s&&x.value.push(a)}const we=e.ref(null),Ee=e.ref(null),re=e.ref(!1);function Me(a,s){re.value=!0;let l=a.value;const r=Y.value.dataset.find((u,m)=>a.id===`donut_${m}`).VALUE;if(x.value.includes(a.id)){let u=function(){l>r?(re.value=!1,cancelAnimationFrame(Ee.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==a.id),u()}else if(s.length>1){let u=function(){l<r/100?(re.value=!1,cancelAnimationFrame(we.value),x.value.push(a.id),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},we.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(a){I.value=a}const Ae=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(b.value!==S.DONUT)return null;const a=f.value.dataset.map((o,n)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`donut_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):X.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,n){return i.dataLabel({v:isNaN(o.value/be(n))?0:o.value/be(n)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function r(o,n){const y=Y.value.dataset.find((L,C)=>`donut_${C}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(n.toFixed(0))).length)}function u({datapoint:o,seriesIndex:n}){G.value={datapoint:o,seriesIndex:n,config:t.value,dataset:a},$.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:n,series:a,config:t.value})))T.value=y({datapoint:o,seriesIndex:n,series:a,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,p+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,p+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:n})}</b>`,p+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}F.value=!0}function m(){F.value=!1,$.value=null,I.value=null}const _={centerX:k.value.width/2,centerY:k.value.height/2},z=a.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,n)=>o+n,0),H=a.map((o,n)=>({...o,proportion:(o.value||0)/z,value:o.value||0,absoluteValue:Y.value.dataset.find((y,p)=>`donut_${p}`===o.id).VALUE})),O=k.value.width/2,W=k.value.height/2,R=k.value.height*t.value.donutRadiusRatio;return{dataset:H.filter(o=>!x.value.includes(o.id)),legend:H,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:z,cx:O,cy:W,radius:R,chart:i.makeDonut({series:a.filter(o=>!x.value.includes(o.id))},O,W,R,R,1.99999,2,1,360,105.25,k.value.height*Ae.value)}}),g=e.ref({start:0,end:f.value.maxSeriesLength});function qe(){Le()}const q=e.ref(null);async function Le(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(He(t.value.zoomEndIndex+1)))):(g.value={start:0,end:f.value.maxSeriesLength},ee.value+=1)}function He(a){const s=f.value.maxSeriesLength;return a>s?s:a<0||t.value.zoomStartIndex!==null&&a<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:a}const We=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let a=[];P(f.value.dataset)&&(a=f.value.dataset),ce(f.value.dataset)&&(a=f.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=P(a)?a.length:Math.max(...a.map(u=>u.values.length));let l=[];if(P(a))l=a;else for(let u=0;u<s;u+=1)l.push(a.map(m=>m.values[u]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(b.value!==S.LINE)return null;const a={height:k.value.height,width:k.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:f.value.dataset.map((o,n)=>n).slice(g.value.start,g.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),ce(f.value.dataset)&&(l=f.value.dataset.map((o,n)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`line_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):X.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((y,p)=>p).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.map(o=>o.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,z=s.width/r.maxSeries,H=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=l.map((o,n)=>({...o,coordinates:o.values.map((y,p)=>({x:s.left+z*(p+1)-z/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let n=[];return o.coordinates.forEach(y=>{n.push(`${y.x},${y.y} `)}),{...o,linePath:n.join(" ")}});function W(o){$.value=o,I.value=o;const n=l.map(p=>({...p,value:p.values[o],absoluteIndex:p.absoluteIndices[o]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:n,seriesIndex:o,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:n,seriesIndex:o,series:l,config:t.value})))T.value=y({datapoint:n,seriesIndex:o,series:l,config:t.value});else{let p="";t.value.xyPeriods[n[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[n[0].absoluteIndex]}</div>`),n.forEach((L,C)=>{p+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-KJL8ra_6.cjs"),Ce=require("./useResponsive-BJ7DTGpm.cjs"),se=require("./BaseIcon-CIjjPDqj.cjs"),Ge=require("./Tooltip-CNox4F8U.cjs"),ze=require("./usePrinter-pDOF3CfL.cjs"),Xe=require("./Slicer-8bCK41mN.cjs"),Ye=require("./vue-ui-skeleton-D_YCUi1y.cjs"),Ne=require("./useNestedProp-Bu958azG.cjs"),Ze=require("./PackageVersion-Dn-t7tbm.cjs"),Je=require("./PenAndPaper-DFXJJink.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:d,barLineSwitch:w=6}){let h=null,B=null,N=0;if((typeof d=="number"||typeof d=="string")&&console.warn(`The provided dataset (${d}) is not sufficient to build a chart`),K(d)&&(P(d)&&(d.length<w?h=S.BAR:h=S.LINE,B=d,N=d.length),ce(d))){if(!lt(d))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(d[0]),j=Object.values(d[0]);if(!U.some(A=>at(A)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Ve(j,A=>typeof A=="number")&&(h=S.DONUT,B=d),Ve(j,A=>Array.isArray(A)&&P(A))&&($e(d)>w?h=S.LINE:h=S.BAR,N=$e(d),B=d.map(A=>({...A,data:ot(A,F=>P(F))}))),d=d.map(A=>Fe(A)),B=B.map(A=>Fe(A))}return K(d)&&[...new Set(d.flatMap(U=>Array.isArray(U)))][0],{dataset:d,type:h,usableDataset:B,maxSeriesLength:N}}function Pe(d){return!d||K(d)&&!d.length}function K(d){return Array.isArray(d)}function P(d){if(!K(d)||Pe(d))return!1;const w=d.map(h=>Number(h));return![...new Set(w.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ce(d){return!K(d)||Pe(d)||!![...new Set(d.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!d.map(h=>Object.keys(h).length>0).includes(!1)}function tt(d,w){const h=Object.keys(d).sort(),B=Object.keys(w).sort();if(h.length!==B.length)return!1;for(let N=0;N<h.length;N+=1){const V=h[N],M=B[N];if(V!==M||typeof d[V]!=typeof w[M])return!1}return!0}function lt(d){if(d.length<=1)return!0;for(let w=0;w<d.length;w+=1)for(let h=w+1;h<d.length;h+=1)if(!tt(d[w],d[h]))return!1;return!0}function at(d){return Ke.includes(d.toUpperCase())}function Ve(d,w){let h=[];for(let B=0;B<d.length;B+=1)h.push(w(d[B]));return h.includes(!0)}function $e(d){return Math.max(...[...d].flatMap(w=>Object.values(w).filter(h=>P(h)).map(h=>h.length)))}function ot(d,w){return Object.values(d).filter(h=>w(h))[0]}function Fe(d){const w={};for(let h in d)d.hasOwnProperty(h)&&(w[h.toUpperCase()]=d[h]);return w}const Ie=d=>(e.pushScopeId("data-v-8b56f397"),d=d(),e.popScopeId(),d),nt=["id"],rt=["xmlns","viewBox"],it=["x","y","width","height"],ut=["x","y","width","height"],st=["width","height"],ct=["id"],dt=["id"],vt=Ie(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),mt=["id"],ht=["flood-color"],ft={key:0,class:"donut-label-connectors"},pt=["d","stroke","stroke-width","filter"],kt=["cx","cy","r","fill","filter"],gt={class:"donut"},yt=["d","fill","stroke","stroke-width","filter"],xt=["d","onMouseenter","onClick"],St={key:1,class:"donut-labels quick-animation"},bt=["cx","cy","fill","stroke","filter"],Bt=["text-anchor","x","y","fill","font-size","filter"],wt=["text-anchor","x","y","fill","font-size","filter"],Et={key:2,class:"donut-hollow quick-animation"},At=["x","y","font-size","fill"],Lt=["x","y","font-size","fill"],_t={key:0,class:"line-grid"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt={key:1,class:"line-axis"},Vt=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Ft={key:2,class:"yLabels"},Pt=["x1","x2","y1","y2","stroke","stroke-width"],It=["x","y","font-size","fill"],Tt={key:3,class:"periodLabels"},Ot=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["font-size","text-anchor","fill","transform"],Dt={class:"plots"},Mt={class:"line-plot-series"},Ut=["d","stroke","stroke-width"],qt=["d","stroke","stroke-width"],Ht=["d","stroke","stroke-width"],Wt=["d","stroke","stroke-width"],jt=["cx","cy","fill","stroke"],Gt={key:4,class:"dataLabels"},Xt=["font-size","fill","x","y"],Yt={class:"tooltip-traps"},Zt=["x","y","height","width","fill","onMouseenter","onClick"],Jt={key:0,class:"line-grid"},Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt=["x1","x2","y1","y2","stroke","stroke-width"],el={key:1,class:"line-axis"},tl=["x1","x2","y1","y2","stroke","stroke-width"],ll=["x1","x2","y1","y2","stroke","stroke-width"],al={key:2,class:"yLabels"},ol=["x1","x2","y1","y2","stroke","stroke-width"],nl=["x","y","font-size","fill"],rl={key:3,class:"periodLabels"},il=["x1","x2","y1","y2","stroke","stroke-width"],ul=["font-size","text-anchor","transform","fill"],sl={class:"plots"},cl=["x","width","height","y","fill","stroke","stroke-width"],dl=["to"],vl=["from","to"],ml={key:4,class:"dataLabels"},hl=["x","y","font-size","fill"],fl={class:"tooltip-traps"},pl=["x","y","height","width","fill","onMouseenter","onClick"],kl={key:6,class:"axis-labels"},gl={key:0},yl=["font-size","fill","x","y"],xl={key:1},Sl=["font-size","fill","x","y"],bl={key:2},Bl=["font-size","fill","transform"],wl={key:3},El=["font-size","fill","transform"],Al={key:6,class:"vue-data-ui-watermark"},Ll=["onClick"],_l=["onClick"],Cl=["onClick"],zl={key:1,class:"vue-ui-quick-chart-not-processable"},Nl=Ie(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),Vl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(d,{expose:w,emit:h}){const B=d,{vue_ui_quick_chart:N}=i.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),A=e.ref(i.createUid()),F=e.ref(!1),G=e.ref(null),T=e.ref(""),$=e.ref(null),me=e.ref(null),he=e.ref(null),x=e.ref([]),fe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ge(),set:a=>a}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),pe=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),te=e.ref(!t.value.showUserOptionsOnChartHover);function ke(a=!1){Te.value&&(te.value=a)}function ge(){const a=Ne.useNestedProp({userConfig:B.config,defaultConfig:N});let s={};return a.theme?s={...Ne.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[a.theme]||B.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:s=a,B.config&&i.hasDeepProperty(B.config,"zoomStartIndex")?s.zoomStartIndex=B.config.zoomStartIndex:s.zoomStartIndex=null,B.config&&i.hasDeepProperty(B.config,"zoomEndIndex")?s.zoomEndIndex=B.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>B.config,a=>{t.value=ge(),k.value.width=t.value.width,k.value.height=t.value.height,te.value=!t.value.showUserOptionsOnChartHover,Se()},{deep:!0}),e.watch(()=>B.dataset,a=>{f.value=Y.value,g.value.start=0,g.value.end=f.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const a=et({dataset:i.sanitizeArray(B.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return a||console.error("VueUiQuickChart : Dataset is not processable"),a}),f=e.ref(Y.value),Oe=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,a=>{a||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:le,isImaging:ae,generatePdf:ye,generateImage:xe}=ze.usePrinter({elementId:`${b.value}_${A.value}`,fileName:t.value.title||b.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),k=e.ref({width:t.value.width,height:t.value.height}),oe=e.ref({showTooltip:t.value.showTooltip}),ne=e.ref(null);e.onMounted(()=>{Se()});function Se(){if(t.value.responsive){const a=Ce.throttle(()=>{const{width:s,height:l}=Ce.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?j.value:null,source:me.value,noTitle:he.value});k.value.width=s,k.value.height=l});ne.value=new ResizeObserver(a),ne.value.observe(V.value.parentNode)}Le()}e.onBeforeUnmount(()=>{ne.value&&ne.value.disconnect()});const De=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.BAR:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;case S.DONUT:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`;default:return`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`}});function be(a){return[...a].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(a){return t.value.blurOnHover&&![null,void 0].includes($.value)&&$.value!==a?`url(#blur_${A.value})`:""}function Be(a,s){x.value.includes(a)?x.value=x.value.filter(l=>l!==a):x.value.length<s&&x.value.push(a)}const we=e.ref(null),Ee=e.ref(null),re=e.ref(!1);function Me(a,s){re.value=!0;let l=a.value;const r=Y.value.dataset.find((u,m)=>a.id===`donut_${m}`).VALUE;if(x.value.includes(a.id)){let u=function(){l>r?(re.value=!1,cancelAnimationFrame(Ee.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==a.id),u()}else if(s.length>1){let u=function(){l<r/100?(re.value=!1,cancelAnimationFrame(we.value),x.value.push(a.id),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>a.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},we.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(a){I.value=a}const Ae=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(b.value!==S.DONUT)return null;const a=f.value.dataset.map((o,n)=>({...o,value:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`donut_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):X.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],immutableValue:o.value}));function s(o,n){return i.dataLabel({v:isNaN(o.value/be(n))?0:o.value/be(n)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(o){return o.proportion*100>t.value.donutHideLabelUnderPercentage}function r(o,n){const y=Y.value.dataset.find((L,C)=>`donut_${C}`===o).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(n.toFixed(0))).length)}function u({datapoint:o,seriesIndex:n}){G.value={datapoint:o,seriesIndex:n,config:t.value,dataset:a},$.value=o.id;const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:o,seriesIndex:n,series:a,config:t.value})))T.value=y({datapoint:o,seriesIndex:n,series:a,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,p+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}"/></svg>`,p+=`<b>${i.applyDataLabel(t.value.formatter,o.value,i.dataLabel({p:t.value.valuePrefix,v:o.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:o,seriesIndex:n})}</b>`,p+=`<span>(${i.dataLabel({v:o.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${p}</div>`}F.value=!0}function m(){F.value=!1,$.value=null,I.value=null}const _={centerX:k.value.width/2,centerY:k.value.height/2},z=a.filter(o=>!x.value.includes(o.id)).map(o=>o.value||0).reduce((o,n)=>o+n,0),H=a.map((o,n)=>({...o,proportion:(o.value||0)/z,value:o.value||0,absoluteValue:Y.value.dataset.find((y,p)=>`donut_${p}`===o.id).VALUE})),O=k.value.width/2,W=k.value.height/2,R=k.value.height*t.value.donutRadiusRatio;return{dataset:H.filter(o=>!x.value.includes(o.id)),legend:H,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:z,cx:O,cy:W,radius:R,chart:i.makeDonut({series:a.filter(o=>!x.value.includes(o.id))},O,W,R,R,1.99999,2,1,360,105.25,k.value.height*Ae.value)}}),g=e.ref({start:0,end:f.value.maxSeriesLength});function qe(){Le()}const q=e.ref(null);async function Le(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(He(t.value.zoomEndIndex+1)))):(g.value={start:0,end:f.value.maxSeriesLength},ee.value+=1)}function He(a){const s=f.value.maxSeriesLength;return a>s?s:a<0||t.value.zoomStartIndex!==null&&a<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:a}const We=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let a=[];P(f.value.dataset)&&(a=f.value.dataset),ce(f.value.dataset)&&(a=f.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=P(a)?a.length:Math.max(...a.map(u=>u.values.length));let l=[];if(P(a))l=a;else for(let u=0;u<s;u+=1)l.push(a.map(m=>m.values[u]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(b.value!==S.LINE)return null;const a={height:k.value.height,width:k.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:a.width-t.value.xyPaddingRight,bottom:a.height-t.value.xyPaddingBottom,width:a.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:a.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(f.value.dataset)&&(l=[{values:f.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:f.value.dataset.map((o,n)=>n).slice(g.value.start,g.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),ce(f.value.dataset)&&(l=f.value.dataset.map((o,n)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${n}`,id:`line_${n}`})).map((o,n)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):X.value[n+t.value.paletteStartIndex]||i.palette[n+t.value.paletteStartIndex]||i.palette[(n+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((y,p)=>p).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.map(o=>o.values.length))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,z=s.width/r.maxSeries,H=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=l.map((o,n)=>({...o,coordinates:o.values.map((y,p)=>({x:s.left+z*(p+1)-z/2,y:s.bottom-(y+m)/(u.max+m)*s.height,value:y}))})).map(o=>{let n=[];return o.coordinates.forEach(y=>{n.push(`${y.x},${y.y} `)}),{...o,linePath:n.join(" ")}});function W(o){$.value=o,I.value=o;const n=l.map(p=>({...p,value:p.values[o],absoluteIndex:p.absoluteIndices[o]})).filter(p=>!x.value.includes(p.id));G.value={datapoint:n,seriesIndex:o,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(i.isFunction(y)&&i.functionReturnsString(()=>y({datapoint:n,seriesIndex:o,series:l,config:t.value})))T.value=y({datapoint:n,seriesIndex:o,series:l,config:t.value});else{let p="";t.value.xyPeriods[n[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[n[0].absoluteIndex]}</div>`),n.forEach((L,C)=>{p+=`
|
|
2
2
|
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
3
|
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.color}"/></svg>
|
|
4
4
|
<span>${L.name}:</span>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as L, computed as U, watch as Ne, onMounted as St, onBeforeUnmount as wt, nextTick as Ce, openBlock as a, createElementBlock as l, normalizeClass as re, normalizeStyle as N, createBlock as Ie, createCommentVNode as f, unref as g, createSlots as At, withCtx as Q, renderSlot as M, normalizeProps as G, guardReactiveProps as se, toDisplayString as O, createVNode as ve, createElementVNode as _, Fragment as p, renderList as $, mergeProps as Me, pushScopeId as _t, popScopeId as zt } from "vue";
|
|
2
|
-
import { u as Lt, c as $t, t as Ct, a as It, p as V, C as lt, b as Et, J as Pt, e as Tt, d as Fe, m as Ot, D as ot, X as Rt, j as Nt, k as xe, n as Ue, i as X, f as B, R as nt, v as Z, x as Ee, y as Be } from "./index-
|
|
2
|
+
import { u as Lt, c as $t, t as Ct, a as It, p as V, C as lt, b as Et, J as Pt, e as Tt, d as Fe, m as Ot, D as ot, X as Rt, j as Nt, k as xe, n as Ue, i as X, f as B, R as nt, v as Z, x as Ee, y as Be } from "./index-B8Eaq54E.js";
|
|
3
3
|
import { t as Mt, u as Ft } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import Pe from "./BaseIcon-
|
|
5
|
-
import { _ as Ut } from "./Tooltip-
|
|
6
|
-
import { u as Bt, U as Dt } from "./usePrinter-
|
|
7
|
-
import { S as Vt } from "./Slicer-
|
|
8
|
-
import qt from "./vue-ui-skeleton-
|
|
9
|
-
import { u as it } from "./useNestedProp-
|
|
10
|
-
import { _ as Wt } from "./PackageVersion-
|
|
11
|
-
import { P as Ht } from "./PenAndPaper-
|
|
4
|
+
import Pe from "./BaseIcon-Dzpk4O8L.js";
|
|
5
|
+
import { _ as Ut } from "./Tooltip-DYRo59nq.js";
|
|
6
|
+
import { u as Bt, U as Dt } from "./usePrinter-D83W2gfG.js";
|
|
7
|
+
import { S as Vt } from "./Slicer-GQf9ZyPj.js";
|
|
8
|
+
import qt from "./vue-ui-skeleton-DpadzgbS.js";
|
|
9
|
+
import { u as it } from "./useNestedProp-Ka0R_Yqa.js";
|
|
10
|
+
import { _ as Wt } from "./PackageVersion-CgJdp_Ki.js";
|
|
11
|
+
import { P as Ht } from "./PenAndPaper-BTLEk55u.js";
|
|
12
12
|
import { _ as jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const A = {
|
|
14
14
|
LINE: "LINE",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as h, ref as i, watch as je, onMounted as He, onBeforeUnmount as Ye, openBlock as r, createElementBlock as n, normalizeClass as z, normalizeStyle as W, unref as d, createBlock as _, createCommentVNode as c, createSlots as qe, withCtx as m, renderSlot as f, normalizeProps as M, guardReactiveProps as R, createVNode as ee, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as U, createTextVNode as Te, nextTick as Je } from "vue";
|
|
2
|
-
import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as S, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Fe, f as V, X as lt, s as te, w as rt, P as Ne, x as st, y as nt, q as ut, r as it } from "./index-
|
|
2
|
+
import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as S, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Fe, f as V, X as lt, s as te, w as rt, P as Ne, x as st, y as nt, q as ut, r as it } from "./index-B8Eaq54E.js";
|
|
3
3
|
import { t as dt, u as ct } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as vt } from "./Title-
|
|
5
|
-
import { u as pt, U as ht } from "./usePrinter-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import ft from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import { D as mt } from "./DataTable-
|
|
10
|
-
import bt from "./vue-ui-skeleton-
|
|
11
|
-
import kt from "./vue-ui-accordion
|
|
12
|
-
import { u as Se } from "./useNestedProp-
|
|
13
|
-
import { _ as Ct } from "./PackageVersion-
|
|
14
|
-
import { P as wt } from "./PenAndPaper-
|
|
4
|
+
import { _ as vt } from "./Title-XYNHfYwN.js";
|
|
5
|
+
import { u as pt, U as ht } from "./usePrinter-D83W2gfG.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-DYRo59nq.js";
|
|
7
|
+
import ft from "./vue-ui-sparkbar-BPpSxe5Z.js";
|
|
8
|
+
import { L as yt } from "./Legend-RnRqBxiV.js";
|
|
9
|
+
import { D as mt } from "./DataTable-DtRXoetj.js";
|
|
10
|
+
import bt from "./vue-ui-skeleton-DpadzgbS.js";
|
|
11
|
+
import kt from "./vue-ui-accordion--5td7b94.js";
|
|
12
|
+
import { u as Se } from "./useNestedProp-Ka0R_Yqa.js";
|
|
13
|
+
import { _ as Ct } from "./PackageVersion-CgJdp_Ki.js";
|
|
14
|
+
import { P as wt } from "./PenAndPaper-BTLEk55u.js";
|
|
15
15
|
import { u as _t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Pt = ["id"], Tt = ["xmlns", "viewBox"], xt = ["width", "height"], Ot = ["id"], At = ["stop-color"], Ft = ["stop-color"], Nt = { key: 1 }, St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], It = { key: 0 }, Lt = ["d", "stroke", "stroke-width"], zt = ["d", "stroke", "stroke-width"], Mt = { key: 2 }, Rt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], Ut = ["points", "stroke", "stroke-width"], Vt = ["points", "stroke", "stroke-width", "fill"], Et = { key: 3 }, Bt = ["cx", "cy", "fill", "r", "stroke"], Dt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CH3YkGpv.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-m5N0oN0G.cjs"),se=require("./usePrinter-A1_US3Dh.cjs"),Be=require("./Tooltip-Dq7633oz.cjs"),Pe=require("./vue-ui-sparkbar-BJ_rGX_Y.cjs"),_e=require("./Legend-CZrlsh2W.cjs"),$e=require("./DataTable-RY8EUwF3.cjs"),xe=require("./vue-ui-skeleton-DwmP0u2B.cjs"),Ne=require("./vue-ui-accordion-_LFrGkGx.cjs"),ue=require("./useNestedProp-2TBYsJKg.cjs"),Te=require("./PackageVersion-C1zaH_aJ.cjs"),Se=require("./PenAndPaper-Bv8oV7l0.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Oe=["xmlns","viewBox"],Ae=["width","height"],Le=["id"],ze=["stop-color"],Ie=["stop-color"],Re={key:1},qe=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:0},Ue=["d","stroke","stroke-width"],De=["d","stroke","stroke-width"],Ge={key:2},We=["x","y","text-anchor","font-size","fill","onMouseenter"],He=["points","stroke","stroke-width"],je=["points","stroke","stroke-width","fill"],Xe={key:3},Ye=["cx","cy","fill","r","stroke"],Je={key:5,class:"vue-data-ui-watermark"},Ke=["onClick"],Qe={key:0,style:{"max-width":"200px",margin:"0 auto"}},Ze={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,j(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function j(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:X,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ge=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r: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{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),F=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";F.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,tt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){h.value.showTable=!h.value.showTable}function re(){h.value.showTooltip=!h.value.showTooltip}const $=e.ref(!1);function O(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:O}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,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:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},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:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.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}`)},[e.createVNode(Te._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,Ae)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ie)],8,Le))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,qe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ue))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,De),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,We))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,Ye))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Ke)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:h.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:N.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(Pe.default,{dataset:V.value,config:ge.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:h.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($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},et=Ve._export_sfc(Ze,[["__scopeId","data-v-7a50d021"]]);exports.default=et;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-KJL8ra_6.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-D-6pIV0l.cjs"),se=require("./usePrinter-pDOF3CfL.cjs"),Be=require("./Tooltip-CNox4F8U.cjs"),Pe=require("./vue-ui-sparkbar-CgoGRT0_.cjs"),_e=require("./Legend-DqGE1lkA.cjs"),$e=require("./DataTable-wN-jvOfe.cjs"),xe=require("./vue-ui-skeleton-D_YCUi1y.cjs"),Ne=require("./vue-ui-accordion-4-dyMgJA.cjs"),ue=require("./useNestedProp-Bu958azG.cjs"),Te=require("./PackageVersion-Dn-t7tbm.cjs"),Se=require("./PenAndPaper-DFXJJink.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Oe=["xmlns","viewBox"],Ae=["width","height"],Le=["id"],ze=["stop-color"],Ie=["stop-color"],Re={key:1},qe=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:0},Ue=["d","stroke","stroke-width"],De=["d","stroke","stroke-width"],Ge={key:2},We=["x","y","text-anchor","font-size","fill","onMouseenter"],He=["points","stroke","stroke-width"],je=["points","stroke","stroke-width","fill"],Xe={key:3},Ye=["cx","cy","fill","r","stroke"],Je={key:5,class:"vue-data-ui-watermark"},Ke=["onClick"],Qe={key:0,style:{"max-width":"200px",margin:"0 auto"}},Ze={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,j(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function j(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:X,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),he=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ge=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r: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{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),F=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";F.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,tt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){h.value.showTable=!h.value.showTable}function re(){h.value.showTooltip=!h.value.showTooltip}const $=e.ref(!1);function O(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:O}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:O},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),he.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,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:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(X),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:O,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},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:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.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}`)},[e.createVNode(Te._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,Ae)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ie)],8,Le))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,qe))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ue))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,De),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,We))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,Ye))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Ke)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:h.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:N.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(Pe.default,{dataset:V.value,config:ge.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:h.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($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},et=Ve._export_sfc(Ze,[["__scopeId","data-v-7a50d021"]]);exports.default=et;
|