vue-data-ui 2.3.76 → 2.3.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-DY9RKUmG.js → Arrow-BCYtOwX7.js} +1 -1
- package/dist/{Arrow-D7M4-bW7.cjs → Arrow-DWkvIpW8.cjs} +1 -1
- package/dist/{BaseIcon-rwm-10Hu.js → BaseIcon-BIQXWVMS.js} +1 -1
- package/dist/{BaseIcon-DB7Apwv_.cjs → BaseIcon-Bcpzfk34.cjs} +1 -1
- package/dist/{DataTable-CsNozyz7.cjs → DataTable-C5TOiC61.cjs} +1 -1
- package/dist/{DataTable-e2fnfjXV.js → DataTable-y1lX5jVj.js} +2 -2
- package/dist/{Legend-5cQ0xZjK.js → Legend-BLXcdrri.js} +1 -1
- package/dist/{Legend-DgFd-O0m.cjs → Legend-CGGD8NhP.cjs} +1 -1
- package/dist/{Shape-CiTElr_0.js → Shape-CsoTtJx6.js} +1 -1
- package/dist/{Shape-yPECDLiP.cjs → Shape-qJYTY2BC.cjs} +1 -1
- package/dist/{Slicer-DaZgCKV7.cjs → Slicer-CZJXKSeE.cjs} +1 -1
- package/dist/{Slicer-DwBBu3kB.js → Slicer-DzJZ4axa.js} +12 -12
- package/dist/{Title-3EduyW4p.cjs → Title-BSpa3uge.cjs} +1 -1
- package/dist/{Title-gUz6GDA3.js → Title-Bx-VO3md.js} +1 -1
- package/dist/{Tooltip-DfSM1mNP.js → Tooltip-Dk-cimhQ.js} +23 -23
- package/dist/Tooltip-rmhZhv96.cjs +1 -0
- package/dist/index-CzjC8LfY.cjs +4 -0
- package/dist/{index-CaV1s-yZ.js → index-DP8dqFNd.js} +1147 -1145
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-tWCzZrLx.js → useNestedProp-B-oZxD4x.js} +1 -1
- package/dist/{useNestedProp-CisbRRo_.cjs → useNestedProp-CY7DebVH.cjs} +1 -1
- package/dist/{usePrinter-DzTaA1eh.cjs → usePrinter-DiLM6jav.cjs} +1 -1
- package/dist/{usePrinter-rvJyT65A.js → usePrinter-DiuHo4LO.js} +1 -1
- package/dist/{vue-data-ui-BGkWRPUY.cjs → vue-data-ui-Ce5IFSYA.cjs} +1 -1
- package/dist/{vue-data-ui-BO89gTtq.js → vue-data-ui-Ct7n5wkM.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +9 -9
- package/dist/vue-ui-3d-bar-B_i2EoFu.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CcTMIHiB.js → vue-ui-3d-bar-O3fB5J7V.js} +342 -342
- package/dist/{vue-ui-accordion-CpzGQ63y.js → vue-ui-accordion-Dl8zkZPk.js} +3 -3
- package/dist/{vue-ui-accordion-7e4Myhcg.cjs → vue-ui-accordion-DpI7fTKZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-D71ZLkVV.js → vue-ui-age-pyramid-BeiREI6d.js} +22 -22
- package/dist/vue-ui-age-pyramid-BsAfxkN4.cjs +1 -0
- package/dist/{vue-ui-annotator-B8Iu6cYt.js → vue-ui-annotator-0yje27Qq.js} +39 -39
- package/dist/{vue-ui-annotator-BKQrweqm.cjs → vue-ui-annotator-DpN-6IwB.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Bx4QVkY0.js → vue-ui-candlestick-D9UteVvx.js} +34 -34
- package/dist/{vue-ui-candlestick-DAc1FQ-i.cjs → vue-ui-candlestick-lv78wnpS.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-uFRqkghO.cjs → vue-ui-carousel-table-Br6FwMKM.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-xuQG6bcH.js → vue-ui-carousel-table-jxZ3h5pq.js} +31 -31
- package/dist/{vue-ui-chestnut-Bo6rDcU7.js → vue-ui-chestnut-DXuHRJy4.js} +291 -288
- package/dist/vue-ui-chestnut-DbYHeNaL.cjs +6 -0
- package/dist/{vue-ui-cursor-C0KOqEOq.js → vue-ui-cursor-BzPbdVRJ.js} +20 -20
- package/dist/vue-ui-cursor-iss6SJ1Y.cjs +1 -0
- package/dist/{vue-ui-dashboard-BT71xS7P.js → vue-ui-dashboard-CGjWuFrI.js} +2 -2
- package/dist/{vue-ui-dashboard-0Hsjx-bO.cjs → vue-ui-dashboard-DKT82yQ4.cjs} +1 -1
- package/dist/{vue-ui-digits-BRqpKYvD.js → vue-ui-digits-BCguvLxB.js} +2 -2
- package/dist/{vue-ui-digits-C2ReH6w0.cjs → vue-ui-digits-BfwDCfYp.cjs} +1 -1
- package/dist/{vue-ui-donut-NQW-3prf.js → vue-ui-donut-DJTeGLVG.js} +209 -212
- package/dist/{vue-ui-donut-evolution-jbXQQGTc.js → vue-ui-donut-evolution-BaLDZNDG.js} +106 -106
- package/dist/vue-ui-donut-evolution-Bil1AIhX.cjs +1 -0
- package/dist/vue-ui-donut-uVPdO4UH.cjs +1 -0
- package/dist/{vue-ui-dumbbell-Dyz8xdtC.js → vue-ui-dumbbell-BqtDdV5w.js} +17 -17
- package/dist/{vue-ui-dumbbell-DXQSg6wa.cjs → vue-ui-dumbbell-DiL3xhKY.cjs} +1 -1
- package/dist/{vue-ui-flow-UqSNwH9d.cjs → vue-ui-flow-BVTbbsCK.cjs} +1 -1
- package/dist/{vue-ui-flow-BL3JWW1m.js → vue-ui-flow-zfTGon4s.js} +28 -28
- package/dist/{vue-ui-galaxy-Dx9nsOuM.js → vue-ui-galaxy-5iRb5sQ-.js} +22 -22
- package/dist/{vue-ui-galaxy-DTQWGvRH.cjs → vue-ui-galaxy-GSO_6KIe.cjs} +1 -1
- package/dist/vue-ui-gauge-Bz7oLa51.cjs +1 -0
- package/dist/{vue-ui-gauge-CLaKGi0-.js → vue-ui-gauge-DljHYdCS.js} +101 -110
- package/dist/{vue-ui-gizmo-of-4s5HG.js → vue-ui-gizmo-B-fxFOZy.js} +2 -2
- package/dist/{vue-ui-gizmo-Kitfqu0J.cjs → vue-ui-gizmo-KL0OJY2K.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BIzjOMXO.js → vue-ui-heatmap-ketn_NV3.js} +17 -17
- package/dist/{vue-ui-heatmap-DUw2350O.cjs → vue-ui-heatmap-thMJPCfo.cjs} +1 -1
- package/dist/{vue-ui-kpi-By3YPwgo.js → vue-ui-kpi-Bxu8uZ21.js} +3 -3
- package/dist/{vue-ui-kpi-DyL2Hcz-.cjs → vue-ui-kpi-e1QWa8D4.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DnK3V2z2.js → vue-ui-mini-loader-BZ_2aV8O.js} +2 -2
- package/dist/{vue-ui-mini-loader-C048-8Kd.cjs → vue-ui-mini-loader-paRZQU8H.cjs} +1 -1
- package/dist/{vue-ui-molecule-BfhbIqa5.js → vue-ui-molecule-Bpp5unvI.js} +33 -33
- package/dist/{vue-ui-molecule-D-ahly6R.cjs → vue-ui-molecule-VOBL4Osc.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DXxEKr3x.js → vue-ui-mood-radar-BY8XP_Q5.js} +129 -132
- package/dist/vue-ui-mood-radar-CwtMLwP8.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BdUdHFd-.js → vue-ui-nested-donuts-5uuLi3If.js} +98 -98
- package/dist/{vue-ui-nested-donuts-C7qM_FRw.cjs → vue-ui-nested-donuts-CLnVnAiD.cjs} +2 -2
- package/dist/{vue-ui-onion-DX3gofXZ.cjs → vue-ui-onion-CMSPSSSG.cjs} +1 -1
- package/dist/{vue-ui-onion-D0vF5jBt.js → vue-ui-onion-zDy4ecPl.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs → vue-ui-parallel-coordinate-plot-1PFxiI__.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CTZY-pY8.js → vue-ui-parallel-coordinate-plot-BeEkL7Dq.js} +24 -24
- package/dist/vue-ui-quadrant-Cx5z_c90.cjs +1 -0
- package/dist/{vue-ui-quadrant-ByY8GP3y.js → vue-ui-quadrant-MCIlbbsW.js} +35 -35
- package/dist/{vue-ui-quick-chart-DWZEgUJF.cjs → vue-ui-quick-chart-Xn-47NQG.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DTxJ__7j.js → vue-ui-quick-chart-r6Qa7qg_.js} +69 -69
- package/dist/{vue-ui-radar-DEED0rTz.cjs → vue-ui-radar-ANQ1wXFc.cjs} +1 -1
- package/dist/{vue-ui-radar-5UBmAU6W.js → vue-ui-radar-DFV5cFkl.js} +39 -39
- package/dist/{vue-ui-rating-Ce_Ewqtl.cjs → vue-ui-rating-BVzCbQbv.cjs} +1 -1
- package/dist/{vue-ui-rating-Dr6jquxh.js → vue-ui-rating-DYu1EuJF.js} +6 -6
- package/dist/{vue-ui-relation-circle-BU8i2miI.js → vue-ui-relation-circle-BAcmDQB_.js} +29 -29
- package/dist/vue-ui-relation-circle-DEM6C6Or.cjs +1 -0
- package/dist/{vue-ui-rings-Ctl3Jywh.js → vue-ui-rings-BiLlYpgu.js} +31 -31
- package/dist/{vue-ui-rings-OQ8a1Ruw.cjs → vue-ui-rings-Ce4G4hat.cjs} +2 -2
- package/dist/{vue-ui-scatter-BwJ_koWT.js → vue-ui-scatter-D2ndYfkQ.js} +95 -95
- package/dist/vue-ui-scatter-OtlcTCUF.cjs +1 -0
- package/dist/{vue-ui-screenshot-BS3L5vhN.js → vue-ui-screenshot-CKCNPn-e.js} +4 -4
- package/dist/{vue-ui-screenshot-bAVk3EPl.cjs → vue-ui-screenshot-DTQx4VsM.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CvFX_ExX.js → vue-ui-skeleton-B30ZhUV7.js} +96 -96
- package/dist/vue-ui-skeleton-CwqzJlQf.cjs +41 -0
- package/dist/{vue-ui-smiley-CGYZpNt9.js → vue-ui-smiley-DzLvZR1k.js} +2 -2
- package/dist/{vue-ui-smiley-sF8QIso1.cjs → vue-ui-smiley-L6o24M6h.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B4XSSKl9.js → vue-ui-spark-trend-BKsmENbH.js} +21 -21
- package/dist/vue-ui-spark-trend-BoWeviHk.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BbsJGDMZ.js → vue-ui-sparkbar-DNzZkp8z.js} +10 -10
- package/dist/vue-ui-sparkbar-DY3iOLo4.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-D4w_i_QJ.js → vue-ui-sparkgauge-B2DngjVP.js} +8 -8
- package/dist/{vue-ui-sparkgauge-BKyQoI7C.cjs → vue-ui-sparkgauge-BlZ-lJm4.cjs} +1 -1
- package/dist/vue-ui-sparkhistogram-BUBewgdH.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-CYybrW-6.js → vue-ui-sparkhistogram-Co9N3BeQ.js} +111 -101
- package/dist/vue-ui-sparkline-BhL0mxXD.cjs +1 -0
- package/dist/{vue-ui-sparkline-DjN1SVdO.js → vue-ui-sparkline-Dpqo4aRJ.js} +34 -34
- package/dist/{vue-ui-sparkstackbar-BZ2bESBi.cjs → vue-ui-sparkstackbar-DtNbx3EV.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BLMhJxaN.js → vue-ui-sparkstackbar-_JwfRxF8.js} +5 -5
- package/dist/{vue-ui-stackbar-BTKOHUYc.js → vue-ui-stackbar-BtN7ZM7-.js} +202 -200
- package/dist/{vue-ui-stackbar-DRHaJFR8.cjs → vue-ui-stackbar-C7AWHP6m.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-o6GTsGAT.js → vue-ui-strip-plot-6L9a7BSw.js} +26 -26
- package/dist/{vue-ui-strip-plot-DxQxFbWg.cjs → vue-ui-strip-plot-cgOFTunJ.cjs} +1 -1
- package/dist/{vue-ui-table-BFIj1Rgh.cjs → vue-ui-table-4Pf9tmFg.cjs} +1 -1
- package/dist/{vue-ui-table-CnquiTpr.js → vue-ui-table-BFYHRMCS.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CZRIwv-Q.js → vue-ui-table-heatmap--kPCu8mA.js} +24 -24
- package/dist/{vue-ui-table-heatmap-CCGK12Fa.cjs → vue-ui-table-heatmap-CltKb2V9.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DYmgfHz4.cjs → vue-ui-table-sparkline-B5OjJud8.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B3zEeq6Z.js → vue-ui-table-sparkline-CsWx1Ksy.js} +26 -26
- package/dist/{vue-ui-thermometer-CzPRBt6c.cjs → vue-ui-thermometer-62_4QovL.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BopiohUh.js → vue-ui-thermometer-nTD7sp8r.js} +40 -40
- package/dist/{vue-ui-timer-Bonw69Lt.cjs → vue-ui-timer-BU0s7Vt9.cjs} +1 -1
- package/dist/{vue-ui-timer-C7WkW8hK.js → vue-ui-timer-DMFHjnzA.js} +8 -8
- package/dist/{vue-ui-tiremarks-BurRtFv4.js → vue-ui-tiremarks-1X9B1VKM.js} +18 -18
- package/dist/{vue-ui-tiremarks-DkIGfq8t.cjs → vue-ui-tiremarks-mwBeBMJY.cjs} +1 -1
- package/dist/{vue-ui-treemap-DWy4voIr.js → vue-ui-treemap-CVTwqPFA.js} +29 -29
- package/dist/{vue-ui-treemap-CalhJmnp.cjs → vue-ui-treemap-DQmBbm7e.cjs} +1 -1
- package/dist/vue-ui-vertical-bar-BXiy8KRC.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CJW1YhtY.js → vue-ui-vertical-bar-Br6Z0A3F.js} +14 -14
- package/dist/{vue-ui-waffle-faQMBYNx.cjs → vue-ui-waffle-CLCsHw9j.cjs} +1 -1
- package/dist/{vue-ui-waffle-DB7X6nTS.js → vue-ui-waffle-DEXMh07q.js} +84 -84
- package/dist/{vue-ui-wheel-CryKap2E.js → vue-ui-wheel-CwjuVi6U.js} +24 -24
- package/dist/{vue-ui-wheel-BzjbGP6a.cjs → vue-ui-wheel-DSFKKX65.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-COqUkvei.js → vue-ui-word-cloud-BKeD3fHb.js} +19 -19
- package/dist/{vue-ui-word-cloud-DJN9I4q4.cjs → vue-ui-word-cloud-DZS4hCeR.cjs} +1 -1
- package/dist/vue-ui-xy-B5aCogSL.cjs +3 -0
- package/dist/{vue-ui-xy-b1Z_HPsx.js → vue-ui-xy-DA3qqL8u.js} +351 -350
- package/dist/{vue-ui-xy-canvas-BgbLnY5B.js → vue-ui-xy-canvas-B7DH4RK5.js} +18 -18
- package/dist/vue-ui-xy-canvas-heCdqh5X.cjs +9 -0
- package/package.json +1 -1
- package/dist/Tooltip-DScSrYXJ.cjs +0 -1
- package/dist/index-BTgtr0F8.cjs +0 -4
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +0 -1
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +0 -6
- package/dist/vue-ui-cursor-BQbeuW-k.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +0 -1
- package/dist/vue-ui-donut-v81suIOX.cjs +0 -1
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +0 -1
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +0 -1
- package/dist/vue-ui-quadrant-CgApzie6.cjs +0 -1
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +0 -1
- package/dist/vue-ui-scatter-B8StSjt8.cjs +0 -1
- package/dist/vue-ui-skeleton-CMQzFTs9.cjs +0 -41
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +0 -1
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +0 -1
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +0 -1
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +0 -4
- package/dist/vue-ui-xy-BmA0tspd.cjs +0 -3
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CzjC8LfY.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),Ce=require("./Title-BSpa3uge.cjs"),ie=require("./usePrinter-DiLM6jav.cjs"),Le=require("./DataTable-C5TOiC61.cjs"),we=require("./Tooltip-rmhZhv96.cjs"),xe=require("./Legend-CGGD8NhP.cjs"),Be=require("./vue-ui-skeleton-CwqzJlQf.cjs"),_e=require("./vue-ui-accordion-DpI7fTKZ.cjs"),ce=require("./useNestedProp-CY7DebVH.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=w=>(e.pushScopeId("data-v-8ee0a3c3"),w=w(),e.popScopeId(),w),Ne=["id"],Se=["xmlns","viewBox"],Ee=["id","fr"],Ve=A(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Fe=["offset","stop-opacity"],Te=A(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),De=["id"],ze=["id"],Pe=A(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ie=["id"],Oe=["flood-color"],Ae=["cx","cy","r","fill","filter"],Me=["d","fill","stroke","stroke-width","filter"],Re={key:0},Ue=["d","fill"],qe={key:1},Ye=["x","y","font-size","font-weight","fill"],Xe={key:2},Ge=["filter"],He=["text-anchor","x","y","fill","font-size","font-weight"],We=["text-anchor","x","y","fill","font-size","font-weight"],Je=["text-anchor","x","y","fill","font-size","font-weight"],Ke=["d","fill","onMouseenter","onClick"],Qe={key:3,class:"vue-data-ui-watermark"},Ze={key:0,class:"vue-ui-nested-donuts-legend-title"},je=["onClick"],et=["innerHTML"],tt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:de,emit:M}){const k=w,{vue_ui_nested_donuts:ve}=r.useConfig(),$=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),fe=e.ref(null),R=e.ref(0),x=e.ref(null),U=e.ref(null),D=e.ref(null),q=e.ref(0),Y=e.ref(0),X=e.ref(0),B=e.ref(!1);function pe(l){B.value=l,R.value+=1}const t=e.computed({get:()=>G(),set:l=>l});function G(){const l=ce.useNestedProp({userConfig:k.config,defaultConfig:ve});return l.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=G(),H(),q.value+=1,Y.value+=1,X.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{H()});function H(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ue.throttle(()=>{const{width:s,height:o}=ue.useResponsive({chart:x.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?D.value:null});c.value.width=s,c.value.height=o});N.value=new ResizeObserver(l),N.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:W,isImaging:J,generatePdf:K,generateImage:Q}=ie.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),he=e.computed(()=>r.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}),c=e.ref({height:512,width:512});function ye({datapoint:l,index:s}){M("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||he.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),Z=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function me(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(Z.value);e.watch(()=>Z.value,l=>d.value=l);const j=e.ref(null),ee=e.ref(null);function z(l){M("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=me(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(j.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),j.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ee.value),v.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ee.value=requestAnimationFrame(i))};i()}}const _=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)}})),te=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),le=e.ref(null),S=e.ref(null),E=e.ref(null),P=e.ref(null);function be({datapoint:l,_relativeIndex:s,seriesIndex:o}){le.value=l.arcOfId,S.value=l.id,E.value=o,P.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=d.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:f.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
15
15
|
</span>
|
|
16
16
|
</div>
|
|
17
|
-
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ae(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0)return[null,void 0].includes(E.value)||E.value===s?"":`url(#blur_${p.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||v.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${p.value})`}const O=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:v.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:v.value.includes(o.id)})))),ge=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function oe(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const f=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},f,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function ke(){return m.value}function ne(){h.value.showTable=!h.value.showTable}function re(){h.value.dataLabels.show=!h.value.dataLabels.show}function se(){h.value.showTooltip=!h.value.showTooltip}return de({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:ne,toggleLabels:re,toggleTooltip:se}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:x,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${!t.value.style.chart.title.text&&t.value.userOptions.show?"padding-top:36px":""};background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${p.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:U},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref:"details",key:`user_option_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(W),isImaging:e.unref(J),uid:p.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:se},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${p.value}_${n}`,cx:"50%",cy:"50%",r:"50%",fr:30-1*(n+1)+"%"},[Ve,e.createElementVNode("stop",{offset:70-20*n+"%","stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Fe),Te],8,Ee))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${p.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${p.value}`},null,8,ze),Pe],8,De),e.createElementVNode("filter",{id:`shadow_${p.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Oe)],8,Ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,o=>(e.openBlock(),e.createElementBlock("circle",{cx:c.value.width/2,cy:c.value.height/2,r:o.radius<0?1e-5:o.radius,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${p.value})`:""},null,8,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:`${a.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ae(a,u)},null,8,Me)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${p.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,Ue)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,Ye)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ae(a,u)},[I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,He)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,We)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,Je)):e.createCommentVNode("",!0)],8,Ge))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:a.arcSlice,fill:fe.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:f=>be({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex}),onClick:f=>ye({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=f=>{F.value=!1,le.value=null,S.value=null,E.value=null})},null,40,Ke)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(we._sfc_main,{show:h.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:T.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:D,class:e.normalizeClass({"vue-ui-nested-donuts-legend":O.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${n}_${X.value}`,legendSet:o,config:ge.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",Ze,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:f=>z(a),style:e.normalizeStyle(`opacity:${v.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),v.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,je)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:D},[e.renderSlot(l.$slots,"legend",{legend:O.value},void 0,!0)],512)),$.value?(e.openBlock(),e.createBlock(_e.default,{key:7,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(Le.DataTable,{key:`table_${Y.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},lt=$e._export_sfc(tt,[["__scopeId","data-v-7e1c384d"]]);exports.default=lt;
|
|
17
|
+
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ae(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0)return[null,void 0].includes(E.value)||E.value===s?"":`url(#blur_${p.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||v.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${p.value})`}const O=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!v.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:v.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:v.value.includes(o.id)})))),ge=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function oe(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const f=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},f,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function ke(){return m.value}function ne(){h.value.showTable=!h.value.showTable}function re(){h.value.dataLabels.show=!h.value.dataLabels.show}function se(){h.value.showTooltip=!h.value.showTooltip}return de({getData:ke,generatePdf:K,generateCsv:oe,generateImage:Q,toggleTable:ne,toggleLabels:re,toggleTooltip:se}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:x,class:e.normalizeClass(`vue-ui-nested-donuts ${B.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${!t.value.style.chart.title.text&&t.value.userOptions.show?"padding-top:36px":""};background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${p.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:U},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref:"details",key:`user_option_${R.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(W),isImaging:e.unref(J),uid:p.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(K),onGenerateCsv:oe,onGenerateImage:e.unref(Q),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:se},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${p.value}_${n}`,cx:"50%",cy:"50%",r:"50%",fr:30-1*(n+1)+"%"},[Ve,e.createElementVNode("stop",{offset:70-20*n+"%","stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Fe),Te],8,Ee))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${p.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${p.value}`},null,8,ze),Pe],8,De),e.createElementVNode("filter",{id:`shadow_${p.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Oe)],8,Ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,o=>(e.openBlock(),e.createElementBlock("circle",{cx:c.value.width/2,cy:c.value.height/2,r:o.radius<0?1e-5:o.radius,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${p.value})`:""},null,8,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ae(a,u)},null,8,Me)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${p.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,Ue)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,Ye)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ae(a,u)},[I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,He)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,We)):e.createCommentVNode("",!0),I(a)&&h.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,Je)):e.createCommentVNode("",!0)],8,Ge))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-donut-trap":"",d:a.arcSlice,fill:fe.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:f=>be({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex}),onClick:f=>ye({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=f=>{F.value=!1,le.value=null,S.value=null,E.value=null})},null,40,Ke)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Qe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(we._sfc_main,{show:h.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:T.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:D,class:e.normalizeClass({"vue-ui-nested-donuts-legend":O.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(o,n)=>(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${n}_${X.value}`,legendSet:o,config:ge.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",Ze,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:f=>z(a),style:e.normalizeStyle(`opacity:${v.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),v.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,je)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:D},[e.renderSlot(l.$slots,"legend",{legend:O.value},void 0,!0)],512)),$.value?(e.openBlock(),e.createBlock(_e.default,{key:7,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(Le.DataTable,{key:`table_${Y.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>h.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,et)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ne))}},lt=$e._export_sfc(tt,[["__scopeId","data-v-8ee0a3c3"]]);exports.default=lt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CzjC8LfY.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),he=require("./Title-BSpa3uge.cjs"),J=require("./usePrinter-DiLM6jav.cjs"),pe=require("./Legend-CGGD8NhP.cjs"),fe=require("./DataTable-C5TOiC61.cjs"),ge=require("./Tooltip-rmhZhv96.cjs"),me=require("./vue-ui-skeleton-CwqzJlQf.cjs"),ye=require("./vue-ui-accordion-DpI7fTKZ.cjs"),K=require("./useNestedProp-CY7DebVH.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],we=["xmlns","viewBox"],Ce=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],$e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["id"],Be=["stdDeviation"],Te=["filter"],Se=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],_e=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Pe={key:1},Ne=["onMouseenter"],Oe=["x","y","font-size","fill","font-weight"],Fe={key:3,class:"vue-data-ui-watermark"},Ie=["onClick"],Ee=["innerHTML"],Le={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const p=Q,{vue_ui_onion:te}=u.useConfig(),C=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),le=e.ref(null),F=e.ref(0),$=e.ref(!1),T=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),E=e.ref(null),L=e.ref(0),M=e.ref(0),V=e.ref(0),t=e.computed({get:()=>D(),set:a=>a});function D(){const a=K.useNestedProp({userConfig:p.config,defaultConfig:te});return a.theme?{...K.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=D(),q(),L.value+=1,M.value+=1,V.value+=1},{deep:!0});const{isPrinting:R,isImaging:z,generatePdf:A,generateImage:Y}=J.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ae=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{q()});function q(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=j.throttle(()=>{const{width:l,height:o}=j.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?E.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||ae.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>X(l),isSegregated:d.value.includes(l)}}))),b=e.ref(i.value),oe=e.computed(()=>t.value.useStartAnimation),re=e.ref(null),ne=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ue,{immediate:!0});function ue(){if(oe.value&&!S.value){let r=function(){a>=ne.value?(cancelAnimationFrame(re.value),b.value=i.value,S.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const se=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ie=e.computed(()=>i.value.filter(a=>!d.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>b.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/ie.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:ce(l,a.percentage||0)}}));function ce(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,w=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-a}
|
|
3
3
|
A ${a},${a} 0 1 1
|
|
4
4
|
${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as u, watch as he, onMounted as Fe, onBeforeUnmount as Ne, openBlock as s, createElementBlock as n, normalizeClass as z, normalizeStyle as Y, createBlock as x, createCommentVNode as b, unref as v, createSlots as Re, withCtx as h, renderSlot as g, normalizeProps as B, guardReactiveProps as V, Fragment as M, renderList as F, createElementVNode as T, toDisplayString as _, createVNode as Ae, createTextVNode as De, nextTick as Le } from "vue";
|
|
2
|
-
import { u as ze, c as Ye, t as Be, a as Ve, p as fe, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as ge, q as He, r as We, y as je } from "./index-
|
|
2
|
+
import { u as ze, c as Ye, t as Be, a as Ve, p as fe, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as ge, q as He, r as We, y as je } from "./index-DP8dqFNd.js";
|
|
3
3
|
import { t as qe, u as Je } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ke } from "./Title-
|
|
5
|
-
import { u as Qe, U as Ze } from "./usePrinter-
|
|
6
|
-
import { L as et } from "./Legend-
|
|
7
|
-
import { D as tt } from "./DataTable-
|
|
8
|
-
import { _ as at } from "./Tooltip-
|
|
9
|
-
import lt from "./vue-ui-skeleton-
|
|
10
|
-
import ot from "./vue-ui-accordion-
|
|
11
|
-
import { u as pe } from "./useNestedProp-
|
|
4
|
+
import { _ as Ke } from "./Title-Bx-VO3md.js";
|
|
5
|
+
import { u as Qe, U as Ze } from "./usePrinter-DiuHo4LO.js";
|
|
6
|
+
import { L as et } from "./Legend-BLXcdrri.js";
|
|
7
|
+
import { D as tt } from "./DataTable-y1lX5jVj.js";
|
|
8
|
+
import { _ as at } from "./Tooltip-Dk-cimhQ.js";
|
|
9
|
+
import lt from "./vue-ui-skeleton-B30ZhUV7.js";
|
|
10
|
+
import ot from "./vue-ui-accordion-Dl8zkZPk.js";
|
|
11
|
+
import { u as pe } from "./useNestedProp-B-oZxD4x.js";
|
|
12
12
|
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const st = ["id"], ut = ["xmlns", "viewBox"], nt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], it = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ct = ["id"], dt = ["stdDeviation"], vt = ["filter"], ht = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ft = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], gt = { key: 1 }, pt = ["onMouseenter"], yt = ["x", "y", "font-size", "fill", "font-weight"], mt = {
|
|
14
14
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CzjC8LfY.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-BSpa3uge.cjs"),fe=require("./Legend-CGGD8NhP.cjs"),ge=require("./Tooltip-rmhZhv96.cjs"),be=require("./Shape-qJYTY2BC.cjs"),ae=require("./usePrinter-DiLM6jav.cjs"),ke=require("./DataTable-C5TOiC61.cjs"),xe=require("./vue-ui-accordion-DpI7fTKZ.cjs"),Ce=require("./vue-ui-skeleton-CwqzJlQf.cjs"),oe=require("./useNestedProp-CY7DebVH.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Be=["id"],$e=["xmlns","viewBox"],Se={style:{"pointer-events":"none"}},ze=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size","font-weight"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x","y","fill","font-size","font-weight"],Fe={key:0},Pe=["x","y","font-size","fill"],Ae=["width","x","y"],Me={style:{width:"100%"}},Le=["x","y","fill","font-weight","font-size","onMouseenter"],Ee=["d","stroke","stroke-width","onMouseenter"],Ie={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],De=["innerHTML"],Oe={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ne,{expose:se,emit:M}){const b=ne,{vue_ui_parallel_coordinate_plot:re}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),V=e.ref(0),D=e.ref(0),O=e.ref(0),N=e.ref(i.createUid()),B=e.ref(!1);function ie(l){B.value=l,L.value+=1}const t=e.computed({get:()=>q(),set:l=>l});function q(){const l=oe.useNestedProp({userConfig:b.config,defaultConfig:re});return l.theme?{...oe.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=q(),R(),V.value+=1,O.value+=1,D.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{R()});function R(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=le.throttle(()=>{const{width:o,height:a}=le.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=a,c.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(l),S.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:U,isImaging:W,generatePdf:j,generateImage:H}=ae.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),ue=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function G(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ue.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),ce=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>G(l.id),isSegregated:f.value.includes(l.id)}))),de=e.computed(()=>({cy:"pcp-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":""})),Y=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/Y.value),_=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),h=e.computed(()=>{let l=[];for(let o=0;o<Y.value;o+=1){const a=Math.min(..._.value.flatMap(v=>v.series.map(z=>z.values[o]||0)||0)),n=Math.max(..._.value.flatMap(v=>v.series.map(z=>z.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,z)=>{const he=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),me=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(he/me),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),T=e.computed(()=>_.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function X({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const p=e.ref(null),F=e.ref(null),$=e.ref(!1),P=e.ref("");function A({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){F.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},$.value=!0,p.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}))?P.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { computed as f, ref as h, watch as Oe, onMounted as De, onBeforeUnmount as We, openBlock as u, createElementBlock as i, normalizeClass as
|
|
2
|
-
import { u as
|
|
1
|
+
import { computed as f, ref as h, watch as Oe, onMounted as De, onBeforeUnmount as We, openBlock as u, createElementBlock as i, normalizeClass as B, normalizeStyle as _, createBlock as I, createCommentVNode as g, unref as A, createSlots as Ee, withCtx as b, renderSlot as x, normalizeProps as R, guardReactiveProps as j, Fragment as C, renderList as M, createElementVNode as F, toDisplayString as S, createVNode as Be, createTextVNode as Re } from "vue";
|
|
2
|
+
import { u as je, c as J, t as Ue, a as Ve, p as U, o as Ge, e as xe, g as He, b as Xe, d as Ye, C as qe, P as Qe, Q as Je, R as Ke, X as Ze, x as ke, i as Ce, f as we, y as et, q as tt, r as at, E as V } from "./index-DP8dqFNd.js";
|
|
3
3
|
import { t as lt, u as ot } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as st } from "./Title-
|
|
5
|
-
import { L as nt } from "./Legend-
|
|
6
|
-
import { _ as ut } from "./Tooltip-
|
|
7
|
-
import { _ as it } from "./Shape-
|
|
8
|
-
import { u as rt, U as ct } from "./usePrinter-
|
|
9
|
-
import { D as vt } from "./DataTable-
|
|
10
|
-
import dt from "./vue-ui-accordion-
|
|
11
|
-
import ht from "./vue-ui-skeleton-
|
|
12
|
-
import { u as $e } from "./useNestedProp-
|
|
4
|
+
import { _ as st } from "./Title-Bx-VO3md.js";
|
|
5
|
+
import { L as nt } from "./Legend-BLXcdrri.js";
|
|
6
|
+
import { _ as ut } from "./Tooltip-Dk-cimhQ.js";
|
|
7
|
+
import { _ as it } from "./Shape-CsoTtJx6.js";
|
|
8
|
+
import { u as rt, U as ct } from "./usePrinter-DiuHo4LO.js";
|
|
9
|
+
import { D as vt } from "./DataTable-y1lX5jVj.js";
|
|
10
|
+
import dt from "./vue-ui-accordion-Dl8zkZPk.js";
|
|
11
|
+
import ht from "./vue-ui-skeleton-B30ZhUV7.js";
|
|
12
|
+
import { u as $e } from "./useNestedProp-B-oZxD4x.js";
|
|
13
13
|
import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events": "none" } }, gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bt = ["x", "y", "fill", "font-size", "font-weight"], xt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], kt = ["x", "y", "fill", "font-size", "font-weight"], Ct = { key: 0 }, wt = ["x", "y", "font-size", "fill"], $t = ["width", "x", "y"], _t = { style: { width: "100%" } }, Tt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], zt = ["d", "stroke", "stroke-width", "onMouseenter"], At = {
|
|
15
15
|
key: 3,
|
|
@@ -32,7 +32,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["selectLegend", "selectDatapoint"],
|
|
34
34
|
setup(_e, { expose: Te, emit: K }) {
|
|
35
|
-
const T = _e, { vue_ui_parallel_coordinate_plot: ze } =
|
|
35
|
+
const T = _e, { vue_ui_parallel_coordinate_plot: ze } = je(), P = f({
|
|
36
36
|
get() {
|
|
37
37
|
return !!T.dataset && T.dataset.length;
|
|
38
38
|
},
|
|
@@ -187,7 +187,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
187
187
|
)), k = f(() => v.value.width / de.value), H = f(() => z.value.filter((t) => !w.value.includes(t.id))), m = f(() => {
|
|
188
188
|
let t = [];
|
|
189
189
|
for (let l = 0; l < de.value; l += 1) {
|
|
190
|
-
const a = Math.min(...H.value.flatMap((d) => d.series.map((
|
|
190
|
+
const a = Math.min(...H.value.flatMap((d) => d.series.map((E) => E.values[l] || 0) || 0)), o = Math.max(...H.value.flatMap((d) => d.series.map((E) => E.values[l] || 0) || 0)), n = o === a ? a / 4 : a, s = o === a ? o * 2 : o, r = qe(n, s, e.value.style.chart.yAxis.scaleTicks), $ = r.ticks.map((d, E) => {
|
|
191
191
|
const Se = r.min < 0 ? d + Math.abs(r.min) : d - Math.abs(r.min), Le = r.min < 0 ? r.max + Math.abs(r.min) : r.max - Math.abs(r.min);
|
|
192
192
|
return {
|
|
193
193
|
y: v.value.bottom - v.value.height * (Se / Le),
|
|
@@ -345,7 +345,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
345
345
|
}), (t, l) => (u(), i("div", {
|
|
346
346
|
ref_key: "pcpChart",
|
|
347
347
|
ref: L,
|
|
348
|
-
class:
|
|
348
|
+
class: B(`vue-ui-pcp ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
349
349
|
style: _(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
350
350
|
id: `pcp_${G.value}`
|
|
351
351
|
}, [
|
|
@@ -395,7 +395,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
395
395
|
onToggleTable: fe,
|
|
396
396
|
onToggleLabels: ge,
|
|
397
397
|
onToggleTooltip: be
|
|
398
|
-
},
|
|
398
|
+
}, Ee({ _: 2 }, [
|
|
399
399
|
t.$slots.optionPdf ? {
|
|
400
400
|
name: "optionPdf",
|
|
401
401
|
fn: b(() => [
|
|
@@ -434,7 +434,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
434
434
|
t.$slots.optionFullscreen ? {
|
|
435
435
|
name: "optionFullscreen",
|
|
436
436
|
fn: b(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
437
|
-
x(t.$slots, "optionFullscreen", j(
|
|
437
|
+
x(t.$slots, "optionFullscreen", R(j({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
438
438
|
]),
|
|
439
439
|
key: "5"
|
|
440
440
|
} : void 0
|
|
@@ -442,7 +442,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
442
442
|
P.value ? (u(), i("svg", {
|
|
443
443
|
key: 2,
|
|
444
444
|
xmlns: A(Ze),
|
|
445
|
-
class:
|
|
445
|
+
class: B({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
|
|
446
446
|
viewBox: `0 0 ${v.value.chartWidth <= 0 ? 10 : v.value.chartWidth} ${v.value.chartHeight <= 0 ? 10 : v.value.chartHeight}`,
|
|
447
447
|
style: _(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
448
448
|
}, [
|
|
@@ -541,7 +541,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
541
541
|
fill: e.value.style.chart.yAxis.labels.datapoints.useSerieColor ? a.color : e.value.style.chart.yAxis.labels.datapoints.color,
|
|
542
542
|
"text-anchor": "start",
|
|
543
543
|
"font-weight": e.value.style.chart.yAxis.labels.datapoints.bold ? "bold" : "normal",
|
|
544
|
-
class:
|
|
544
|
+
class: B({ "vue-ui-pcp-animated": !1, "vue-ui-pcp-transition": !0 }),
|
|
545
545
|
"font-size": c.value.datapointFontSize,
|
|
546
546
|
onMouseenter: ($) => Q({
|
|
547
547
|
shape: a.shape,
|
|
@@ -560,7 +560,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
560
560
|
stroke: a.color,
|
|
561
561
|
"stroke-width": e.value.style.chart.lines.strokeWidth,
|
|
562
562
|
fill: "none",
|
|
563
|
-
class:
|
|
563
|
+
class: B({ "vue-ui-pcp-animated vue-data-ui-line-animated": e.value.useCssAnimation, "vue-ui-pcp-transition": !0 }),
|
|
564
564
|
onMouseenter: (s) => Q({
|
|
565
565
|
shape: a.shape,
|
|
566
566
|
serieName: a.name,
|
|
@@ -578,7 +578,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
578
578
|
x(t.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
579
579
|
], 14, yt)) : g("", !0),
|
|
580
580
|
t.$slots.watermark ? (u(), i("div", At, [
|
|
581
|
-
x(t.$slots, "watermark", j(
|
|
581
|
+
x(t.$slots, "watermark", R(j({ isPrinting: A(ue) || A(ie) })), void 0, !0)
|
|
582
582
|
])) : g("", !0),
|
|
583
583
|
P.value ? g("", !0) : (u(), I(ht, {
|
|
584
584
|
key: 4,
|
|
@@ -615,7 +615,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
615
615
|
legend: z.value
|
|
616
616
|
}, void 0, !0)
|
|
617
617
|
], 512),
|
|
618
|
-
|
|
618
|
+
Be(ut, {
|
|
619
619
|
show: y.value.showTooltip && D.value,
|
|
620
620
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
621
621
|
color: e.value.style.chart.tooltip.color,
|
|
@@ -631,10 +631,10 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
631
631
|
isCustom: A(ke)(e.value.style.chart.tooltip.customFormat)
|
|
632
632
|
}, {
|
|
633
633
|
"tooltip-before": b(() => [
|
|
634
|
-
x(t.$slots, "tooltip-before", j(
|
|
634
|
+
x(t.$slots, "tooltip-before", R(j({ ...Y.value })), void 0, !0)
|
|
635
635
|
]),
|
|
636
636
|
"tooltip-after": b(() => [
|
|
637
|
-
x(t.$slots, "tooltip-after", j(
|
|
637
|
+
x(t.$slots, "tooltip-after", R(j({ ...Y.value })), void 0, !0)
|
|
638
638
|
]),
|
|
639
639
|
_: 3
|
|
640
640
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
@@ -668,7 +668,7 @@ const mt = ["id"], yt = ["xmlns", "viewBox"], ft = { style: { "pointer-events":
|
|
|
668
668
|
F("div", { innerHTML: a }, null, 8, It)
|
|
669
669
|
]),
|
|
670
670
|
td: b(({ td: a }) => [
|
|
671
|
-
|
|
671
|
+
Re(S(a), 1)
|
|
672
672
|
]),
|
|
673
673
|
_: 1
|
|
674
674
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CzjC8LfY.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./Title-BSpa3uge.cjs"),ye=require("./usePrinter-DiLM6jav.cjs"),qe=require("./Tooltip-rmhZhv96.cjs"),be=require("./Shape-qJYTY2BC.cjs"),_e=require("./Legend-CGGD8NhP.cjs"),ze=require("./DataTable-C5TOiC61.cjs"),Ne=require("./vue-ui-skeleton-CwqzJlQf.cjs"),Ve=require("./vue-ui-accordion-DpI7fTKZ.cjs"),pe=require("./useNestedProp-CY7DebVH.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],We=["xmlns","viewBox","id"],Xe=["id"],Ye=["stop-color"],Me=["stop-color"],Pe={key:0},Fe=["fill","x","y","height","width","stroke-width","stroke","rx"],De=["x1","y1","x2","y2","stroke","stroke-width"],Ae=["x1","y1","x2","y2","stroke","stroke-width"],Re={key:1},Oe=["points","fill"],He=["points","fill"],Ie=["points","fill"],Ue=["points","fill"],Ge={key:2},Qe=["y","fill","font-size"],Je=["x","y","fill","font-size"],je=["x","y","fill","font-size"],Ze=["y","fill","font-size"],Ke={key:3},et=["x","y","font-size","fill"],tt=["x","y","font-size","fill"],lt=["x","y","font-size","fill"],at=["id","font-size","transform","fill"],ot=["id","font-size","transform","fill"],ut=["id","font-size","transform","fill"],rt={key:4},st=["fill","points"],nt=["x","y","width","height"],it=["x","y","width","height"],ct=["x","y","width","height"],vt=["x","y","width","height"],dt={key:0},ht=["x","y","font-size","fill"],yt={key:0},bt=["x","y","onMouseover","onClick"],pt={key:7,class:"vue-ui-dna"},ft=["points","fill"],mt=["points","fill"],gt=["points","fill"],xt=["points","fill"],kt={key:8},$t=["x","y","font-size","fill","font-weight"],Lt={key:9},Ct=["x","y","fill"],wt=["x","y","fill"],St=["x","y","fill"],Bt=["x","y","fill"],qt=["stroke","d"],_t=["stroke","d"],zt={key:3,class:"vue-data-ui-watermark"},Nt=["onClick"],Vt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Et=["innerHTML"],Tt={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(fe,{expose:me,emit:M}){const x=fe,{vue_ui_quadrant:ge}=n.useConfig(),V=e.computed(()=>!!x.dataset&&x.dataset.length),g=e.ref(n.createUid()),xe=e.ref(null),E=e.ref(!1),P=e.ref(""),A=e.ref(0),h=e.ref(!1),S=e.ref(null),R=e.ref(null),O=e.ref(null),H=e.ref(0),I=e.ref(0),U=e.ref(0),l=e.computed({get:()=>G(),set:a=>a});function G(){const a=pe.useNestedProp({userConfig:x.config,defaultConfig:ge});return a.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_quadrant[a.theme]||x.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>x.config,a=>{l.value=G(),Q(),H.value+=1,I.value+=1,U.value+=1},{deep:!0});const T=e.ref(null);function Q(){if(n.objectIsEmpty(x.dataset)?n.error({componentName:"VueUiQuadrant",type:"dataset"}):x.dataset.forEach((a,u)=>{[null,void 0].includes(a.name)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",index:u}),[null,void 0].includes(a.series)?n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"series",index:u}):a.series.forEach((o,r)=>{[null,void 0].includes(o.name)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"name",key:"series",index:r})})}),l.value.responsive){const a=he.throttle(()=>{const{width:u,height:o}=he.useResponsive({chart:S.value,title:l.value.style.chart.title.text?R.value:null,legend:l.value.style.chart.legend.show?O.value:null});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(S.value.parentNode)}}e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:J,isImaging:j,generatePdf:Z,generateImage:K}=ye.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),ee=e.computed(()=>n.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}),c=e.ref({...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0});e.watch(()=>t.value,a=>{a&&(c.value={...JSON.parse(JSON.stringify(t.value)),startX:0,startY:0})},{deep:!0});const i=e.ref(null),C=e.computed(()=>{switch(i.value){case"TL":return{x:c.value.startX+c.value.width/2,y:c.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:c.value.startX+c.value.width/2,y:c.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:c.value.startX+c.value.width/2,y:c.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:c.value.startX+c.value.width/2,y:c.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}}}),ke=e.ref(null),W=e.ref(!1);function B({targetX:a,targetY:u,targetW:o,targetH:r,side:s}){i.value&&z(s);const v={x:a-c.value.startX,y:u-c.value.startY,w:o-c.value.width,h:r-c.value.height},d=l.value.zoomAnimationFrames;let k=0;function de(){W.value=!0,c.value.startX+=v.x/d,c.value.startY+=v.y/d,c.value.width+=v.w/d,c.value.height+=v.h/d,k+=1,k<d?ke.value=requestAnimationFrame(de):W.value=!1}de()}function $(a){if(!W.value)if(h.value&&i.value===a)B({targetX:0,targetY:0,targetW:t.value.width,targetH:t.value.height}),i.value=null,h.value=!1;else{switch(i.value=a,a){case"TL":B({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":B({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":B({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":B({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:c.value.startX=0,c.value.startY=0,c.value.width=t.value.width,c.value.height=t.value.height;break}h.value=!0}}const $e=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 s=0;s<a;s+=1)r.push({x:t.value.padding+u*s,y:o+t.value.usableHeight*(s/a/2),height:t.value.usableHeight*(1-s/a),width:t.value.usableWidth*(1-s/a),opacity:Math.round((s+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(...w.value.flatMap(s=>s.series.map(v=>v.x))),u=Math.min(...w.value.flatMap(s=>s.series.map(v=>v.x)))),l.value.style.chart.layout.grid.yAxis.auto&&(o=Math.max(...w.value.flatMap(s=>s.series.map(v=>v.y))),r=Math.min(...w.value.flatMap(s=>s.series.map(v=>v.y)))),{x:{max:a,min:u},y:{max:o,min:r}}}),L=e.ref([]),w=e.computed(()=>x.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:n.convertColorToHex(a.color)||ee.value[u]||n.palette[u]}))),Le=e.computed(()=>w.value.filter(a=>!L.value.includes(a.id))),Ce=e.computed(()=>w.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:te(o.x),y:le(o.y),xValue:o.x,yValue:o.y,quadrantSide:oe({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),m=e.computed(()=>(x.dataset.forEach((a,u)=>{a.series.forEach((o,r)=>{[null,void 0].includes(o.x)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"x",key:"series",index:r}),[null,void 0].includes(o.y)&&n.error({componentName:"VueUiQuadrant",type:"datasetSerieAttribute",property:"y",key:"series",index:r})})}),Le.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||ee.value[u]||n.palette[u],series:a.series.map(o=>({...o,x:te(o.x),y:le(o.y),xValue:o.x,yValue:o.y,quadrantSide:oe({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:n.createUid()}))}))));function te(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 le(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(k=>({x:k.xValue,y:k.yValue,name:k.name,category:k.categoryName,quadrantSide:k.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[k.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],s=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:s,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,n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,r.x,n.dataLabel({v:r.x,r:l.value.style.chart.layout.labels.plotLabels.rounding})),n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,r.y,n.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=se();M("selectLegend",u)}const ae=e.computed(()=>Ce.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)}))),we=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 oe(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 q=e.ref(null),_=e.ref(null),D=e.ref(null);function ue(a,u,o){q.value=u.uid,_.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(n.isFunction(r)&&n.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 s="";u.quadrantSide&&(s+=`<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>`),s+=`<div>${a.name}</div>`,s+=`<div style="padding-bottom:6px;border-bottom:1px solid ${l.value.style.chart.tooltip.borderColor};margin-bottom:3px">${u.name}</div>`,s+=`<div>${l.value.style.chart.layout.grid.xAxis.name?l.value.style.chart.layout.grid.xAxis.name:"x"}: <b>${n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.x.formatter,u.xValue,n.dataLabel({v:u.xValue,r:l.value.style.chart.tooltip.roundingValue}),{datapoint:u,category:a,categoryIndex:o})}</b></div>`,s+=`<div>${l.value.style.chart.layout.grid.yAxis.name?l.value.style.chart.layout.grid.yAxis.name:"y"}: <b>${n.applyDataLabel(l.value.style.chart.layout.labels.plotLabels.y.formatter,u.yValue,n.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">${s}</div>`}}function re(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 z(a){if(!a)return;const u=m.value.flatMap(r=>r.series.filter(s=>s.quadrantSide===a).map(s=>({category:s.categoryName,itemName:s.name,x:s.xValue,y:s.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 se(){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 ne(){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),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:l.value.style.chart.title.text||"vue-ui-quadrant"})})}const N=e.ref(!1);function Se(a){N.value=a,A.value+=1}function ie(){p.value.showTable=!p.value.showTable}function ce(){p.value.plotLabels.show=!p.value.plotLabels.show}function ve(){p.value.showTooltip=!p.value.showTooltip}return me({getData:se,generatePdf:Z,generateCsv:ne,generateImage:K,toggleTable:ie,toggleLabels:ce,toggleTooltip:ve}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-quadrant ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${l.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"quadrantChart",ref:S,id:`vue-ui-quadrant_${g.value}`,style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;${l.value.style.chart.title.text?"":"padding-top: 36px"};background:${l.value.style.chart.backgroundColor};${l.value.responsive?"height: 100%":""}`)},[l.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:R,style:e.normalizeStyle(`width:100%;background:${l.value.style.chart.backgroundColor};padding-bottom:12px`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`table_${H.value}`,config:{title:{cy:"quadrant-title",...l.value.style.chart.title},subtitle:{cy:"quadrant-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),l.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:xe,key:`user_options_${A.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(J),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:N.value,isTooltip:p.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:S.value,onToggleFullscreen:Se,onGeneratePdf:e.unref(Z),onGenerateCsv:ne,onGenerateImage:e.unref(K),onToggleTable:ie,onToggleLabels:ce,onToggleTooltip:ve},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]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`${c.value.startX} ${c.value.startY} ${c.value.width} ${c.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:${h.value?"hidden":"visible"};background:${l.value.style.chart.backgroundColor};color:${l.value.style.chart.color}`),id:`svg_${g.value}`},[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(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),l.value.style.chart.layout.areas.opacity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity)},null,8,Me)],8,Xe))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($e.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?e.unref(n.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,Fe))),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,De),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,Ae),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Re,[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,Oe),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,He),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,Ie),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,Ue)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Ge,[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=>z("tl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tl.text),13,Qe)):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=>z("tr"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.tr.text),13,Je)):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=>z("br"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.br.text),13,je)):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=>z("bl"))},e.toDisplayString(l.value.style.chart.layout.labels.quadrantLabels.bl.text),13,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",Ke,[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(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.max,e.unref(n.dataLabel)({v:f.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,et),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,tt),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(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.y.formatter,f.value.y.min,e.unref(n.dataLabel)({v:f.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,lt),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(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.min,e.unref(n.dataLabel)({v:f.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,at),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(n.applyDataLabel)(l.value.style.chart.layout.labels.plotLabels.x.formatter,f.value.x.max,e.unref(n.dataLabel)({v:f.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,ot),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,ut)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",rt,[(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(n.setOpacity)(o.color,l.value.style.chart.layout.areas.opacity),points:e.unref(n.giftWrap)(o)},null,8,st)):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,nt),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,it),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,ct),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,vt)]),l.value.style.chart.layout.labels.plotLabels.showAsTag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",yt,[(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,s=>(e.openBlock(),e.createElementBlock("foreignObject",{style:{overflow:"visible"},height:"10",width:"100",x:s.x-50,y:s.y-l.value.style.chart.layout.labels.plotLabels.fontSize,onMouseover:v=>ue(o,s,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>re(o,s)},[e.createElementVNode("div",{style:e.normalizeStyle(`color:${e.unref(n.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(s.name),5)],40,bt))),256))],64))),256))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(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,s=>(e.openBlock(),e.createBlock(be._sfc_main,{color:o.color,isSelected:q.value&&s.uid===q.value,plot:s,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=>ue(o,s,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,q.value=null,_.value=null}),onClick:v=>re(o,s)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",dt,[(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,ht))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",pt,[i.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,ft)):e.createCommentVNode("",!0),i.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,mt)):e.createCommentVNode("",!0),i.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,gt)):e.createCommentVNode("",!0),i.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,xt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",kt,[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,$t)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",Lt,[e.createElementVNode("rect",{x:b.value[i.value].tl.x,y:b.value[i.value].tl.y,height:"20",width:"20",fill:b.value[i.value].tl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.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":i.value!=="TL"})},null,14,Ct),e.createElementVNode("rect",{x:b.value[i.value].tr.x,y:b.value[i.value].tr.y,height:"20",width:"20",fill:b.value[i.value].tr.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.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":i.value!=="TR"})},null,14,wt),e.createElementVNode("rect",{x:b.value[i.value].br.x,y:b.value[i.value].br.y,height:"20",width:"20",fill:b.value[i.value].br.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.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":i.value!=="BR"})},null,14,St),e.createElementVNode("rect",{x:b.value[i.value].bl.x,y:b.value[i.value].bl.y,height:"20",width:"20",fill:b.value[i.value].bl.fill,style:e.normalizeStyle(`cursor: pointer; opacity: ${i.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":i.value!=="BL"})},null,14,Bt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.horizontal},null,8,qt),e.createElementVNode("path",{class:"vue-ui-quadrant-minimap-crosshairs",stroke:l.value.style.chart.backgroundColor,"stroke-width":1,d:b.value[i.value].crosshairs.vertical},null,8,_t)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,We)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:4,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:O},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${U.value}`,legendSet:ae.value,config:we.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,Nt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:ae.value},void 0,!0)],512),e.createVNode(qe._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:S.value,content:P.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",Vt,[e.createVNode(be._sfc_main,{plot:{x:10,y:10},shape:_.value.shape,color:_.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","isCustom"]),V.value?(e.openBlock(),e.createBlock(Ve.default,{key:5,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(ze.DataTable,{key:`table_${I.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,Et)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Te))}},Wt=Ee._export_sfc(Tt,[["__scopeId","data-v-8da9ae95"]]);exports.default=Wt;
|