vue-data-ui 2.3.70 → 2.3.72
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-Bog1nRXc.js → Arrow-CC7jRg59.js} +1 -1
- package/dist/{Arrow-D4M9K4_y.cjs → Arrow-ZIElM1Qw.cjs} +1 -1
- package/dist/{BaseIcon-DlKBf9ve.cjs → BaseIcon-CBTIJ_i3.cjs} +1 -1
- package/dist/{BaseIcon-D6HKiBWY.js → BaseIcon-CPk98Gv1.js} +1 -1
- package/dist/{DataTable-BTNru9rE.cjs → DataTable-03mHwPdu.cjs} +1 -1
- package/dist/{DataTable-C3P8lB6X.js → DataTable-B9bLH4Tw.js} +2 -2
- package/dist/{Legend-Bvm45WSa.js → Legend-VJiB_MLq.js} +1 -1
- package/dist/{Legend-D_1fNWhT.cjs → Legend-rxEBmJRW.cjs} +1 -1
- package/dist/{Shape-o5RyMUAR.js → Shape-D95l9PFa.js} +1 -1
- package/dist/{Shape-BlFLyhaj.cjs → Shape-DGhwVgQc.cjs} +1 -1
- package/dist/{Slicer-C9gqz7Yw.js → Slicer-DBgvUVRS.js} +2 -2
- package/dist/{Slicer-DfQWN_HX.cjs → Slicer-DUMKJ_f0.cjs} +1 -1
- package/dist/{Title-s23qMfox.js → Title-B_AI8tEZ.js} +1 -1
- package/dist/{Title-96aF3-Z1.cjs → Title-Du743m6e.cjs} +1 -1
- package/dist/{Tooltip-Bkzl1VQe.cjs → Tooltip-B_WP5J9X.cjs} +1 -1
- package/dist/{Tooltip-DrhztkFj.js → Tooltip-CPewpyRa.js} +1 -1
- package/dist/{index--JGgf0j_.js → index-BYuu8ZDR.js} +1 -1
- package/dist/{index-CsqP5b4f.cjs → index-Cuc8JBQE.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +7 -7
- package/dist/types/vue-data-ui.d.ts +7 -7
- package/dist/{useNestedProp-DQ2DOe-8.cjs → useNestedProp-DZwVoxS3.cjs} +1 -1
- package/dist/{useNestedProp-BMj7Pe83.js → useNestedProp-DdJ6Grxg.js} +1 -1
- package/dist/{usePrinter-CobCVhRp.cjs → usePrinter-BaExNQdD.cjs} +1 -1
- package/dist/{usePrinter-DLzQ_BtZ.js → usePrinter-DqIk1aRq.js} +1 -1
- package/dist/{vue-data-ui-BKqUj7bC.js → vue-data-ui-C-epWCMP.js} +57 -57
- package/dist/{vue-data-ui-BGmGXTCr.cjs → vue-data-ui-CUctczUX.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CmnWR3OF.js → vue-ui-3d-bar-BWgmK5sr.js} +7 -7
- package/dist/{vue-ui-3d-bar-B2viWRX5.cjs → vue-ui-3d-bar-xEpa156l.cjs} +1 -1
- package/dist/{vue-ui-accordion-CT0j1v1a.js → vue-ui-accordion-CW9p_36e.js} +3 -3
- package/dist/{vue-ui-accordion-C1ybaK7v.cjs → vue-ui-accordion-CX_qmhfk.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-TTbeq_lD.js → vue-ui-age-pyramid-C2anlrIJ.js} +8 -8
- package/dist/{vue-ui-age-pyramid-zVLLlC3O.cjs → vue-ui-age-pyramid-DgdE2kzJ.cjs} +1 -1
- package/dist/{vue-ui-annotator-BEXLuscT.js → vue-ui-annotator-BsFyYQmg.js} +1 -1
- package/dist/{vue-ui-annotator-DQ7pecaC.cjs → vue-ui-annotator-DBsLmFva.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dabz9ByY.js → vue-ui-candlestick-BvObxrrO.js} +9 -9
- package/dist/{vue-ui-candlestick-DRWZ8tzV.cjs → vue-ui-candlestick-CuAxLf7q.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-lPXwP4FD.cjs → vue-ui-carousel-table-B8uXpuho.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-IfBqfJXl.js → vue-ui-carousel-table-D7VggXPa.js} +4 -4
- package/dist/{vue-ui-chestnut-UyMSd4I2.cjs → vue-ui-chestnut-DsDFUMa1.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DR8FQ_iP.js → vue-ui-chestnut-WVNJAAhE.js} +6 -6
- package/dist/{vue-ui-cursor-B8BmRnMz.js → vue-ui-cursor-BHDKuzwQ.js} +2 -2
- package/dist/{vue-ui-cursor-CqXcK21c.cjs → vue-ui-cursor-Dv2x-leV.cjs} +1 -1
- package/dist/{vue-ui-dashboard-D88IiJ08.js → vue-ui-dashboard-B7UJ5m3e.js} +2 -2
- package/dist/{vue-ui-dashboard-Ca7yuK9y.cjs → vue-ui-dashboard-CW2crD7k.cjs} +1 -1
- package/dist/{vue-ui-digits-uHan--u4.cjs → vue-ui-digits-DgAV9vHK.cjs} +1 -1
- package/dist/{vue-ui-digits-Bqvn_McM.js → vue-ui-digits-S4d-vjPw.js} +2 -2
- package/dist/{vue-ui-donut-CcAOPJ0r.cjs → vue-ui-donut-CXrbo2vS.cjs} +1 -1
- package/dist/{vue-ui-donut-CbO7lZOV.js → vue-ui-donut-D-Obra62.js} +9 -9
- package/dist/{vue-ui-donut-evolution-75NW6llE.js → vue-ui-donut-evolution-CPp91gGc.js} +9 -9
- package/dist/{vue-ui-donut-evolution-BUrGAB3_.cjs → vue-ui-donut-evolution-DMN5gqox.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CdTSX6zx.js → vue-ui-dumbbell-B6VqQ1kW.js} +8 -8
- package/dist/{vue-ui-dumbbell-Dw9PaP6W.cjs → vue-ui-dumbbell-C5QNKImY.cjs} +1 -1
- package/dist/{vue-ui-flow-BZANIyo0.cjs → vue-ui-flow-C265HMf-.cjs} +1 -1
- package/dist/{vue-ui-flow-j4-3z4Jh.js → vue-ui-flow-DxDFmEMo.js} +7 -7
- package/dist/{vue-ui-galaxy-Pvrqq4z8.js → vue-ui-galaxy-3W5_FamU.js} +9 -9
- package/dist/{vue-ui-galaxy-BFRY_qH_.cjs → vue-ui-galaxy-CE6eSTiR.cjs} +1 -1
- package/dist/{vue-ui-gauge-BP7VlzCy.cjs → vue-ui-gauge-Ct9Pm6Rr.cjs} +1 -1
- package/dist/{vue-ui-gauge-Y2d6m8F7.js → vue-ui-gauge-i_mEreL4.js} +5 -5
- package/dist/{vue-ui-gizmo-DPS6iKC7.js → vue-ui-gizmo-DjKx8zQ3.js} +2 -2
- package/dist/{vue-ui-gizmo-DtwUDdpP.cjs → vue-ui-gizmo-fpcEpQC_.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BdpzP1si.js → vue-ui-heatmap-BHVAAWge.js} +8 -8
- package/dist/{vue-ui-heatmap-zu_2wp75.cjs → vue-ui-heatmap-BJ5WgKkA.cjs} +1 -1
- package/dist/{vue-ui-kpi-D5EOkAjY.js → vue-ui-kpi-3vwX1pb-.js} +3 -3
- package/dist/{vue-ui-kpi-irPEkSLW.cjs → vue-ui-kpi-BJO4Si4A.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwdapIVe.js → vue-ui-mini-loader-BGNVjrVa.js} +2 -2
- package/dist/{vue-ui-mini-loader-Dj2j41sm.cjs → vue-ui-mini-loader-Bkz8xXIn.cjs} +1 -1
- package/dist/{vue-ui-molecule-C6X_fMKH.cjs → vue-ui-molecule-Be2hKLP4.cjs} +1 -1
- package/dist/{vue-ui-molecule-D2UUPg-q.js → vue-ui-molecule-DmcAp7Nw.js} +9 -9
- package/dist/{vue-ui-mood-radar-B8q5ERr1.cjs → vue-ui-mood-radar-DkhEq8kd.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Bu-AmoHP.js → vue-ui-mood-radar-mzy-m7VP.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Bk7pladW.cjs → vue-ui-nested-donuts-BiCvS_99.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DYsHFFGT.js → vue-ui-nested-donuts-CrZglRrG.js} +9 -9
- package/dist/{vue-ui-onion-ro--Z0zB.js → vue-ui-onion-BiM0osaA.js} +9 -9
- package/dist/{vue-ui-onion-BtPeuhpF.cjs → vue-ui-onion-Cvm8iYyA.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-C4Vyxlwp.js → vue-ui-parallel-coordinate-plot-B2F5TA1E.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-D9S1Kv00.cjs → vue-ui-parallel-coordinate-plot-CSKNUGrK.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Dvr2JM0s.cjs → vue-ui-quadrant-BMxBMaop.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BsoH0jZo.js → vue-ui-quadrant-DPqbsYX0.js} +10 -10
- package/dist/{vue-ui-quick-chart-CzF7ozoK.js → vue-ui-quick-chart-BsF68NGZ.js} +7 -7
- package/dist/{vue-ui-quick-chart-C55tphTV.cjs → vue-ui-quick-chart-CUFDSDf1.cjs} +1 -1
- package/dist/{vue-ui-radar-crl43r9e.js → vue-ui-radar-CP99GsF6.js} +10 -10
- package/dist/{vue-ui-radar-CYIJyf1C.cjs → vue-ui-radar-D85U18Fh.cjs} +1 -1
- package/dist/{vue-ui-rating-DKZTsN_i.js → vue-ui-rating-D2_B2CmO.js} +2 -2
- package/dist/{vue-ui-rating-CJdyLYDT.cjs → vue-ui-rating-fCVonNIH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-xTvwoYbf.cjs → vue-ui-relation-circle-BwhjRfE-.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-ClR9UbUG.js → vue-ui-relation-circle-CCw0p9C1.js} +5 -5
- package/dist/{vue-ui-rings-BfbNfcj0.js → vue-ui-rings-CP9xh0Jf.js} +9 -9
- package/dist/{vue-ui-rings-BMsZFOKI.cjs → vue-ui-rings-Cyb2-Fz9.cjs} +1 -1
- package/dist/{vue-ui-scatter-CnjbVRdT.cjs → vue-ui-scatter-C_7m-HWT.cjs} +1 -1
- package/dist/{vue-ui-scatter-DrEDT3ts.js → vue-ui-scatter-DahRqX0n.js} +10 -10
- package/dist/{vue-ui-screenshot-CR5PzE7H.js → vue-ui-screenshot-Bz8ypntU.js} +1 -1
- package/dist/{vue-ui-screenshot-jWM-jrvI.cjs → vue-ui-screenshot-kjxK6cGN.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BR5OmV8V.cjs → vue-ui-skeleton-DBlDHYe3.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dgvq-LKZ.js → vue-ui-skeleton-DY6dv9ms.js} +2 -2
- package/dist/{vue-ui-smiley-Bd79lUrX.cjs → vue-ui-smiley-D4LI_UP4.cjs} +1 -1
- package/dist/{vue-ui-smiley-CDviAtqz.js → vue-ui-smiley-QjSvhCpm.js} +2 -2
- package/dist/{vue-ui-spark-trend-DW2lDe5y.cjs → vue-ui-spark-trend-D2lgLtNe.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B2F0rkq9.js → vue-ui-spark-trend-sS5omLKN.js} +4 -4
- package/dist/{vue-ui-sparkbar-BkBDO4sR.cjs → vue-ui-sparkbar-BSa3E1PW.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CKcJgAar.js → vue-ui-sparkbar-D477mrPt.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DhYVUtMb.js → vue-ui-sparkgauge--a3JMX4H.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Bb5kLYcu.cjs → vue-ui-sparkgauge-CBdtHXSj.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CpeUlCj5.js → vue-ui-sparkhistogram-B7vG6DfM.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-W1a3DiWf.cjs → vue-ui-sparkhistogram-GY3NORZf.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BtsssjV-.cjs → vue-ui-sparkline-DGM2gvJO.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CSJuC8Zx.js → vue-ui-sparkline-DQv6RoBk.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-CXpx5fpg.js → vue-ui-sparkstackbar-CgCC9OyA.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-Xnsvvu3O.cjs → vue-ui-sparkstackbar-CwSD66G_.cjs} +1 -1
- package/dist/{vue-ui-stackbar-qlBdgGcF.js → vue-ui-stackbar-CYlI2qNa.js} +10 -10
- package/dist/{vue-ui-stackbar-D-zlJHc0.cjs → vue-ui-stackbar-DE06kEdr.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-ClCytS01.cjs → vue-ui-strip-plot-CTPE5LwY.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-XvcigaUj.js → vue-ui-strip-plot-cLATedZC.js} +9 -9
- package/dist/{vue-ui-table-DThijTG7.cjs → vue-ui-table-CYfUUquW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BRJAh82a.js → vue-ui-table-heatmap-DdEcsnYm.js} +4 -4
- package/dist/{vue-ui-table-heatmap-D2a2SQke.cjs → vue-ui-table-heatmap-tqdvfQH_.cjs} +1 -1
- package/dist/{vue-ui-table-ClarkcMT.js → vue-ui-table-isDxWkmA.js} +1 -1
- package/dist/{vue-ui-table-sparkline-C-ib3Gw1.js → vue-ui-table-sparkline-By0R0tDV.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CerH_6Uy.cjs → vue-ui-table-sparkline-D2Eyb3oO.cjs} +1 -1
- package/dist/{vue-ui-thermometer-B4XtAoUv.js → vue-ui-thermometer-CewCkrgl.js} +5 -5
- package/dist/{vue-ui-thermometer-B55takGw.cjs → vue-ui-thermometer-DT_17Yji.cjs} +1 -1
- package/dist/{vue-ui-timer-BsEp04PS.js → vue-ui-timer-VmBMBL_O.js} +4 -4
- package/dist/{vue-ui-timer-C_XNLsof.cjs → vue-ui-timer-aFikwHk0.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C9mto5xg.js → vue-ui-tiremarks-8YMG58Ot.js} +5 -5
- package/dist/{vue-ui-tiremarks-BJaxtZte.cjs → vue-ui-tiremarks-CyvUhC9g.cjs} +1 -1
- package/dist/{vue-ui-treemap-Bb8nVHbc.cjs → vue-ui-treemap-83V4TBu2.cjs} +1 -1
- package/dist/{vue-ui-treemap-Cnub2STE.js → vue-ui-treemap-DlU_2b5A.js} +9 -9
- package/dist/{vue-ui-vertical-bar-uMAW4lYM.js → vue-ui-vertical-bar-D8KpbB9m.js} +9 -9
- package/dist/{vue-ui-vertical-bar-BJRXcwVc.cjs → vue-ui-vertical-bar-DFlujd2F.cjs} +1 -1
- package/dist/{vue-ui-waffle-FODchV8Z.js → vue-ui-waffle-D5nczTQz.js} +9 -9
- package/dist/{vue-ui-waffle-CQRsRNOh.cjs → vue-ui-waffle-Dn1tci28.cjs} +1 -1
- package/dist/{vue-ui-wheel-DAHkOyha.js → vue-ui-wheel-D0B43FnX.js} +5 -5
- package/dist/{vue-ui-wheel-eKe3KJ5v.cjs → vue-ui-wheel-DWqZIkI0.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-D-805412.cjs → vue-ui-word-cloud-BEebLRtX.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CjVRqfF6.js → vue-ui-word-cloud-DXEW7oYX.js} +7 -7
- package/dist/vue-ui-xy-8508ou3J.cjs +3 -0
- package/dist/{vue-ui-xy-DaGih5B-.js → vue-ui-xy-O3zBtp22.js} +408 -408
- package/dist/{vue-ui-xy-canvas-iu96oJOi.js → vue-ui-xy-canvas-AMNGVzal.js} +10 -10
- package/dist/{vue-ui-xy-canvas-DGr5c46-.cjs → vue-ui-xy-canvas-CssfbLPK.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-xy-BeTe7akA.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsqP5b4f.cjs"),ne=require("./useResponsive-B3TrDDIG.cjs"),$e=require("./Title-96aF3-Z1.cjs"),ie=require("./usePrinter-CobCVhRp.cjs"),Le=require("./Tooltip-Bkzl1VQe.cjs"),ce=require("./Shape-BlFLyhaj.cjs"),Ce=require("./Legend-D_1fNWhT.cjs"),we=require("./DataTable-BTNru9rE.cjs"),Se=require("./vue-ui-skeleton-BR5OmV8V.cjs"),qe=require("./vue-ui-accordion-C1ybaK7v.cjs"),ve=require("./useNestedProp-DQ2DOe-8.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],ze=["xmlns","viewBox","id"],Ne=["id"],Ve=["stop-color"],Ee=["stop-color"],Te={key:0},We=["fill","x","y","height","width","stroke-width","stroke","rx"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:1},Pe=["points","fill"],Fe=["points","fill"],De=["points","fill"],Ae=["points","fill"],Re={key:2},He=["y","fill","font-size"],Oe=["x","y","fill","font-size"],Ie=["x","y","fill","font-size"],Ue=["y","fill","font-size"],Ge={key:3},Qe=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ze=["id","font-size","transform","fill"],Ke=["id","font-size","transform","fill"],et=["id","font-size","transform","fill"],tt={key:4},lt=["fill","points"],at=["x","y","width","height"],ot=["x","y","width","height"],ut=["x","y","width","height"],rt=["x","y","width","height"],st={key:0},nt=["x","y","font-size","fill"],it={key:0},ct=["x","y","onMouseover","onClick"],vt={key:7,class:"vue-ui-dna"},dt=["points","fill"],ht=["points","fill"],yt=["points","fill"],bt=["points","fill"],pt={key:8},mt=["x","y","font-size","fill","font-weight"],ft={key:9},gt=["x","y","fill"],xt=["x","y","fill"],kt=["x","y","fill"],$t=["x","y","fill"],Lt=["stroke","d"],Ct=["stroke","d"],wt={key:3,class:"vue-data-ui-watermark"},St=["onClick"],qt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Bt=["innerHTML"],_t={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(de,{expose:he,emit:M}){const k=de,{vue_ui_quadrant:ye}=n.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(n.createUid()),be=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),H=e.ref(null),l=e.computed(()=>{const a=ve.useNestedProp({userConfig:k.config,defaultConfig:ye});return a.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),T=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(k.dataset)?n.error({componentName:"VueUiQuadrant",type:"dataset"}):k.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=ne.throttle(()=>{const{width:u,height:o}=ne.useResponsive({chart:S.value,title:l.value.style.chart.title.text?R.value:null,legend:l.value.style.chart.legend.show?H.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.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:O,isImaging:I,generatePdf:U,generateImage:G}=ie.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),Q=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}}}),pe=e.ref(null),W=e.ref(!1);function q({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 x=0;function se(){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,x+=1,x<d?pe.value=requestAnimationFrame(se):W.value=!1}se()}function $(a){if(!W.value)if(h.value&&i.value===a)q({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":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default: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 me=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:n.opacity[Math.round((s+1)/a*20)]});return r}),m=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(()=>k.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:n.convertColorToHex(a.color)||Q.value[u]||n.palette[u]}))),fe=e.computed(()=>w.value.filter(a=>!L.value.includes(a.id))),ge=e.computed(()=>w.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:J(o.x),y:j(o.y),xValue:o.x,yValue:o.y,quadrantSide:K({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),f=e.computed(()=>(k.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})})}),fe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||Q.value[u]||n.palette[u],series:a.series.map(o=>({...o,x:J(o.x),y:j(o.y),xValue:o.x,yValue:o.y,quadrantSide:K({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:n.createUid()}))}))));function J(a){if(a>=0){const u=a/m.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(m.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function j(a){if(a>=0){const u=a/m.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(m.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=f.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],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=le();M("selectLegend",u)}const Z=e.computed(()=>ge.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)}))),xe=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 K(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 B=e.ref(null),_=e.ref(null),D=e.ref(null);function ee(a,u,o){B.value=u.uid,_.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:f.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:f.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:f.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 te(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=f.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 le(){return f.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 ae(){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 ke(a){N.value=a,A.value+=1}function oe(){p.value.showTable=!p.value.showTable}function ue(){p.value.plotLabels.show=!p.value.plotLabels.show}function re(){p.value.showTooltip=!p.value.showTooltip}return he({getData:le,generatePdf:U,generateCsv:ae,generateImage:G,toggleTable:oe,toggleLabels:ue,toggleTooltip:re}),(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.createVNode($e._sfc_main,{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(ie.UserOptions,{ref_key:"details",ref:be,key:`user_options_${A.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(O),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:ke,onGeneratePdf:e.unref(U),onGenerateCsv:ae,onGenerateImage:e.unref(G),onToggleTable:oe,onToggleLabels:ue,onToggleTooltip:re},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(f.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.shiftHue)(o.color,.05)}${e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":o.color+e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]},null,8,Ee)],8,Ne))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?`${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,We))),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,Xe),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,Ye),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Me,[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,Pe),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,Fe),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,De),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,Ae)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Re,[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,He)):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,Oe)):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,Ie)):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,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[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,m.value.y.max,e.unref(n.dataLabel)({v:m.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Qe),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,Je),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,m.value.y.min,e.unref(n.dataLabel)({v:m.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,je),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,m.value.x.min,e.unref(n.dataLabel)({v:m.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Ze),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,m.value.x.max,e.unref(n.dataLabel)({v:m.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Ke),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,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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})`:`${o.color}${e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]}`,points:e.unref(n.giftWrap)(o)},null,8,lt)):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,at),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,ot),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,ut),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,rt)]),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",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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=>ee(o,s,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,B.value=null,_.value=null}),onClick:v=>te(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,ct))),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(f.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(ce._sfc_main,{color:o.color,isSelected:B.value&&s.uid===B.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=>ee(o,s,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,B.value=null,_.value=null}),onClick:v=>te(o,s)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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,nt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",vt,[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,dt)):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,ht)):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,yt)):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,bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",pt,[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,mt)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",ft,[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,gt),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,xt),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,kt),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,$t),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,Lt),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,Ct)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.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:H},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ce.Legend,{key:0,legendSet:Z.value,config:xe.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,St)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),e.createVNode(Le._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",qt,[e.createVNode(ce._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(qe.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.createVNode(we.DataTable,{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,Bt)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},zt=Be._export_sfc(_t,[["__scopeId","data-v-7c808761"]]);exports.default=zt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cuc8JBQE.cjs"),ne=require("./useResponsive-B3TrDDIG.cjs"),$e=require("./Title-Du743m6e.cjs"),ie=require("./usePrinter-BaExNQdD.cjs"),Le=require("./Tooltip-B_WP5J9X.cjs"),ce=require("./Shape-DGhwVgQc.cjs"),Ce=require("./Legend-rxEBmJRW.cjs"),we=require("./DataTable-03mHwPdu.cjs"),Se=require("./vue-ui-skeleton-DBlDHYe3.cjs"),qe=require("./vue-ui-accordion-CX_qmhfk.cjs"),ve=require("./useNestedProp-DZwVoxS3.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],ze=["xmlns","viewBox","id"],Ne=["id"],Ve=["stop-color"],Ee=["stop-color"],Te={key:0},We=["fill","x","y","height","width","stroke-width","stroke","rx"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye=["x1","y1","x2","y2","stroke","stroke-width"],Me={key:1},Pe=["points","fill"],Fe=["points","fill"],De=["points","fill"],Ae=["points","fill"],Re={key:2},He=["y","fill","font-size"],Oe=["x","y","fill","font-size"],Ie=["x","y","fill","font-size"],Ue=["y","fill","font-size"],Ge={key:3},Qe=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],je=["x","y","font-size","fill"],Ze=["id","font-size","transform","fill"],Ke=["id","font-size","transform","fill"],et=["id","font-size","transform","fill"],tt={key:4},lt=["fill","points"],at=["x","y","width","height"],ot=["x","y","width","height"],ut=["x","y","width","height"],rt=["x","y","width","height"],st={key:0},nt=["x","y","font-size","fill"],it={key:0},ct=["x","y","onMouseover","onClick"],vt={key:7,class:"vue-ui-dna"},dt=["points","fill"],ht=["points","fill"],yt=["points","fill"],bt=["points","fill"],pt={key:8},mt=["x","y","font-size","fill","font-weight"],ft={key:9},gt=["x","y","fill"],xt=["x","y","fill"],kt=["x","y","fill"],$t=["x","y","fill"],Lt=["stroke","d"],Ct=["stroke","d"],wt={key:3,class:"vue-data-ui-watermark"},St=["onClick"],qt={key:0,height:"14",width:"14",viewBox:"0 0 20 20"},Bt=["innerHTML"],_t={__name:"vue-ui-quadrant",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectPlot","selectSide","selectLegend"],setup(de,{expose:he,emit:M}){const k=de,{vue_ui_quadrant:ye}=n.useConfig(),V=e.computed(()=>!!k.dataset&&k.dataset.length),g=e.ref(n.createUid()),be=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),H=e.ref(null),l=e.computed(()=>{const a=ve.useNestedProp({userConfig:k.config,defaultConfig:ye});return a.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_quadrant[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),T=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(k.dataset)?n.error({componentName:"VueUiQuadrant",type:"dataset"}):k.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=ne.throttle(()=>{const{width:u,height:o}=ne.useResponsive({chart:S.value,title:l.value.style.chart.title.text?R.value:null,legend:l.value.style.chart.legend.show?H.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.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});const{isPrinting:O,isImaging:I,generatePdf:U,generateImage:G}=ie.usePrinter({elementId:`vue-ui-quadrant_${g.value}`,fileName:l.value.style.chart.title.text||"vue-ui-quadrant"}),Q=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}}}),pe=e.ref(null),W=e.ref(!1);function q({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 x=0;function se(){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,x+=1,x<d?pe.value=requestAnimationFrame(se):W.value=!1}se()}function $(a){if(!W.value)if(h.value&&i.value===a)q({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":q({targetX:0,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tl"});break;case"TR":q({targetX:t.value.width/2-t.value.left,targetY:0,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"tr"});break;case"BR":q({targetX:t.value.width/2-t.value.left,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"br"});break;case"BL":q({targetX:0,targetY:t.value.height/2-t.value.top,targetW:t.value.width/2+t.value.left,targetH:t.value.height/2+t.value.top,side:"bl"});break;default: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 me=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:n.opacity[Math.round((s+1)/a*20)]});return r}),m=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(()=>k.dataset.map((a,u)=>({...a,id:`cat_${u}_${g.value}`,color:n.convertColorToHex(a.color)||Q.value[u]||n.palette[u]}))),fe=e.computed(()=>w.value.filter(a=>!L.value.includes(a.id))),ge=e.computed(()=>w.value.map((a,u)=>({...a,shape:a.shape||"circle",series:a.series.map(o=>({...o,x:J(o.x),y:j(o.y),xValue:o.x,yValue:o.y,quadrantSide:K({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color}))}))),f=e.computed(()=>(k.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})})}),fe.value.map((a,u)=>({...a,shape:a.shape||"circle",color:a.color||Q.value[u]||n.palette[u],series:a.series.map(o=>({...o,x:J(o.x),y:j(o.y),xValue:o.x,yValue:o.y,quadrantSide:K({x:o.x,y:o.y}),categoryName:a.name,shape:a.shape,color:a.color,uid:n.createUid()}))}))));function J(a){if(a>=0){const u=a/m.value.x.max;return t.value.centerX+t.value.usableWidth/2*u}else{const u=Math.abs(a)/Math.abs(m.value.x.min);return t.value.centerX-t.value.usableWidth/2*u}}function j(a){if(a>=0){const u=a/m.value.y.max;return t.value.centerY+(1-t.value.usableHeight/2*u)}else{const u=Math.abs(a)/Math.abs(m.value.y.min);return t.value.centerY-(1-t.value.usableHeight/2*u)}}const X=e.computed(()=>{const a=f.value.flatMap(d=>d.series.map(x=>({x:x.xValue,y:x.yValue,name:x.name,category:x.categoryName,quadrantSide:x.quadrantSide,sideName:l.value.style.chart.layout.labels.quadrantLabels[x.quadrantSide].text,color:d.color,shape:d.shape}))),u=l.value.style.chart.layout.grid.xAxis.name||"x",o=l.value.style.chart.layout.grid.yAxis.name||"y",r=[l.value.translations.category,l.value.translations.item,u,o,l.value.translations.side],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=le();M("selectLegend",u)}const Z=e.computed(()=>ge.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)}))),xe=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 K(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 B=e.ref(null),_=e.ref(null),D=e.ref(null);function ee(a,u,o){B.value=u.uid,_.value={color:a.color,shape:a.shape},D.value={datapoint:u,seriesIndex:o,series:f.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:f.value,config:l.value})))P.value=r({seriesIndex:o,datapoint:u,series:f.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 te(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=f.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 le(){return f.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 ae(){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 ke(a){N.value=a,A.value+=1}function oe(){p.value.showTable=!p.value.showTable}function ue(){p.value.plotLabels.show=!p.value.plotLabels.show}function re(){p.value.showTooltip=!p.value.showTooltip}return he({getData:le,generatePdf:U,generateCsv:ae,generateImage:G,toggleTable:oe,toggleLabels:ue,toggleTooltip:re}),(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.createVNode($e._sfc_main,{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(ie.UserOptions,{ref_key:"details",ref:be,key:`user_options_${A.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(O),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:ke,onGeneratePdf:e.unref(U),onGenerateCsv:ae,onGenerateImage:e.unref(G),onToggleTable:oe,onToggleLabels:ue,onToggleTooltip:re},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(f.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.shiftHue)(o.color,.05)}${e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":o.color+e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]},null,8,Ee)],8,Ne))),256))]),l.value.style.chart.layout.grid.graduations.show?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,o=>(e.openBlock(),e.createElementBlock("rect",{fill:l.value.style.chart.layout.grid.graduations.fill?`${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,We))),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,Xe),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,Ye),l.value.style.chart.layout.grid.showArrows?(e.openBlock(),e.createElementBlock("g",Me,[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,Pe),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,Fe),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,De),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,Ae)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.quadrantLabels.show&&!h.value?(e.openBlock(),e.createElementBlock("g",Re,[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,He)):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,Oe)):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,Ie)):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,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.chart.layout.labels.axisLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[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,m.value.y.max,e.unref(n.dataLabel)({v:m.value.y.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Qe),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,Je),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,m.value.y.min,e.unref(n.dataLabel)({v:m.value.y.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,je),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,m.value.x.min,e.unref(n.dataLabel)({v:m.value.x.min,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Ze),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,m.value.x.max,e.unref(n.dataLabel)({v:m.value.x.max,r:l.value.style.chart.layout.labels.plotLabels.rounding}))),9,Ke),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,et)])):e.createCommentVNode("",!0),l.value.style.chart.layout.areas.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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})`:`${o.color}${e.unref(n.opacity)[l.value.style.chart.layout.areas.opacity]}`,points:e.unref(n.giftWrap)(o)},null,8,lt)):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,at),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,ot),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,ut),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,rt)]),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",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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=>ee(o,s,r),onMouseleave:u[9]||(u[9]=v=>{E.value=!1,B.value=null,_.value=null}),onClick:v=>te(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,ct))),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(f.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(ce._sfc_main,{color:o.color,isSelected:B.value&&s.uid===B.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=>ee(o,s,r),onMouseleave:u[8]||(u[8]=v=>{E.value=!1,B.value=null,_.value=null}),onClick:v=>te(o,s)},null,8,["color","isSelected","plot","radius","shape","stroke","strokeWidth","onMouseover","onClick"]))),256))]))),256)),p.value.plotLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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,nt))),256))]))),256))])):e.createCommentVNode("",!0)],64)),h.value?(e.openBlock(),e.createElementBlock("g",vt,[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,dt)):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,ht)):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,yt)):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,bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),i.value&&!W.value?(e.openBlock(),e.createElementBlock("g",pt,[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,mt)])):e.createCommentVNode("",!0),h.value&&i.value?(e.openBlock(),e.createElementBlock("g",ft,[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,gt),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,xt),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,kt),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,$t),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,Lt),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,Ct)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",wt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.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:H},[l.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ce.Legend,{key:0,legendSet:Z.value,config:xe.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,St)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),e.createVNode(Le._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",qt,[e.createVNode(ce._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(qe.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.createVNode(we.DataTable,{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,Bt)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},zt=Be._export_sfc(_t,[["__scopeId","data-v-7c808761"]]);exports.default=zt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as m, ref as h, onMounted as He, onBeforeUnmount as Oe, watch as Ie, openBlock as s, createElementBlock as i, normalizeClass as T, normalizeStyle as L, createVNode as ee, createCommentVNode as c, createBlock as U, unref as y, createSlots as De, withCtx as k, renderSlot as _, normalizeProps as te, guardReactiveProps as le, createElementVNode as v, Fragment as S, renderList as X, toDisplayString as x, createTextVNode as Ee, nextTick as Ue } from "vue";
|
|
2
|
-
import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, w as ae, d as Ke, i as A, f as V, X as et, v as tt, R as lt, E as at, x as ut, y as ot, q as st, r as rt } from "./index
|
|
2
|
+
import { u as Ge, c as ze, t as Qe, a as Je, p as ie, o as je, e as R, b as Ze, w as ae, d as Ke, i as A, f as V, X as et, v as tt, R as lt, E as at, x as ut, y as ot, q as st, r as rt } from "./index-BYuu8ZDR.js";
|
|
3
3
|
import { t as it, u as nt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as vt } from "./Title-
|
|
5
|
-
import { u as dt, U as ct } from "./usePrinter-
|
|
6
|
-
import { _ as ht } from "./Tooltip-
|
|
7
|
-
import { _ as Te } from "./Shape-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import { D as bt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-skeleton-
|
|
11
|
-
import pt from "./vue-ui-accordion-
|
|
12
|
-
import { u as We } from "./useNestedProp-
|
|
4
|
+
import { _ as vt } from "./Title-B_AI8tEZ.js";
|
|
5
|
+
import { u as dt, U as ct } from "./usePrinter-DqIk1aRq.js";
|
|
6
|
+
import { _ as ht } from "./Tooltip-CPewpyRa.js";
|
|
7
|
+
import { _ as Te } from "./Shape-D95l9PFa.js";
|
|
8
|
+
import { L as yt } from "./Legend-VJiB_MLq.js";
|
|
9
|
+
import { D as bt } from "./DataTable-B9bLH4Tw.js";
|
|
10
|
+
import ft from "./vue-ui-skeleton-DY6dv9ms.js";
|
|
11
|
+
import pt from "./vue-ui-accordion-CW9p_36e.js";
|
|
12
|
+
import { u as We } from "./useNestedProp-DdJ6Grxg.js";
|
|
13
13
|
import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const mt = ["id"], xt = ["xmlns", "viewBox", "id"], $t = ["id"], kt = ["stop-color"], Lt = ["stop-color"], wt = { key: 0 }, qt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], _t = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = { key: 1 }, zt = ["points", "fill"], Tt = ["points", "fill"], Wt = ["points", "fill"], Xt = ["points", "fill"], Yt = { key: 2 }, Mt = ["y", "fill", "font-size"], Nt = ["x", "y", "fill", "font-size"], At = ["x", "y", "fill", "font-size"], Vt = ["y", "fill", "font-size"], Bt = { key: 3 }, Pt = ["x", "y", "font-size", "fill"], Rt = ["x", "y", "font-size", "fill"], Ft = ["x", "y", "font-size", "fill"], Ht = ["id", "font-size", "transform", "fill"], Ot = ["id", "font-size", "transform", "fill"], It = ["id", "font-size", "transform", "fill"], Dt = { key: 4 }, Et = ["fill", "points"], Ut = ["x", "y", "width", "height"], Gt = ["x", "y", "width", "height"], Qt = ["x", "y", "width", "height"], Jt = ["x", "y", "width", "height"], jt = { key: 0 }, Zt = ["x", "y", "font-size", "fill"], Kt = { key: 0 }, el = ["x", "y", "onMouseover", "onClick"], tl = {
|
|
15
15
|
key: 7,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as E, computed as W, watch as ot, onMounted as it, onBeforeUnmount as ut, openBlock as a, createElementBlock as l, normalizeClass as ne, normalizeStyle as F, createBlock as Pe, unref as f, createSlots as nt, withCtx as ae, renderSlot as D, normalizeProps as J, guardReactiveProps as fe, createCommentVNode as p, toDisplayString as T, createElementVNode as _, Fragment as m, renderList as L, mergeProps as Ie, createVNode as ge, pushScopeId as rt, popScopeId as st } from "vue";
|
|
2
|
-
import { u as vt, c as dt, t as ct, a as ht, p as U, b as ft, F as gt, e as mt, d as Ee, m as pt, B as qe, X as xt, j as yt, k as me, n as Te, i as H, f as O, P as We, s as X, x as _e, y as Re } from "./index
|
|
2
|
+
import { u as vt, c as dt, t as ct, a as ht, p as U, b as ft, F as gt, e as mt, d as Ee, m as pt, B as qe, X as xt, j as yt, k as me, n as Te, i as H, f as O, P as We, s as X, x as _e, y as Re } from "./index-BYuu8ZDR.js";
|
|
3
3
|
import { t as kt, u as bt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import Ae from "./BaseIcon-
|
|
5
|
-
import { _ as St } from "./Tooltip-
|
|
6
|
-
import { u as wt, U as _t } from "./usePrinter-
|
|
7
|
-
import { S as At } from "./Slicer-
|
|
8
|
-
import Lt from "./vue-ui-skeleton-
|
|
9
|
-
import { u as je } from "./useNestedProp-
|
|
4
|
+
import Ae from "./BaseIcon-CPk98Gv1.js";
|
|
5
|
+
import { _ as St } from "./Tooltip-CPewpyRa.js";
|
|
6
|
+
import { u as wt, U as _t } from "./usePrinter-DqIk1aRq.js";
|
|
7
|
+
import { S as At } from "./Slicer-DBgvUVRS.js";
|
|
8
|
+
import Lt from "./vue-ui-skeleton-DY6dv9ms.js";
|
|
9
|
+
import { u as je } from "./useNestedProp-DdJ6Grxg.js";
|
|
10
10
|
import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const A = {
|
|
12
12
|
LINE: "LINE",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CsqP5b4f.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./BaseIcon-DlKBf9ve.cjs"),Ve=require("./Tooltip-Bkzl1VQe.cjs"),ge=require("./usePrinter-CobCVhRp.cjs"),Fe=require("./Slicer-DfQWN_HX.cjs"),$e=require("./vue-ui-skeleton-BR5OmV8V.cjs"),ye=require("./useNestedProp-DQ2DOe-8.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Te=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Re({dataset:s,barLineSwitch:B=6}){let h=null,_=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),J(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,_=s,z=s.length),ne(s))){if(!Me(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Oe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;xe(j,E=>typeof E=="number")&&(h=S.DONUT,_=s),xe(j,E=>Array.isArray(E)&&P(E))&&(Se(s)>B?h=S.LINE:h=S.BAR,z=Se(s),_=s.map(E=>({...E,data:De(E,$=>P($))}))),s=s.map(E=>be(E)),_=_.map(E=>be(E))}return J(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:_,maxSeriesLength:z}}function Be(s){return!s||J(s)&&!s.length}function J(s){return Array.isArray(s)}function P(s){if(!J(s)||Be(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ne(s){return!J(s)||Be(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Ie(s,B){const h=Object.keys(s).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let z=0;z<h.length;z+=1){const F=h[z],D=_[z];if(F!==D||typeof s[F]!=typeof B[D])return!1}return!0}function Me(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Ie(s[B],s[h]))return!1;return!0}function Oe(s){return Te.includes(s.toUpperCase())}function xe(s,B){let h=[];for(let _=0;_<s.length;_+=1)h.push(B(s[_]));return h.includes(!0)}function Se(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function De(s,B){return Object.values(s).filter(h=>B(h))[0]}function be(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const we=s=>(e.pushScopeId("data-v-bf59d888"),s=s(),e.popScopeId(),s),Ue=["id"],qe=["xmlns","viewBox"],We=["id"],je=["id"],Ge=we(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],Xe=["flood-color"],Ye={key:0,class:"donut-label-connectors"},Ze=["d","stroke","stroke-width","filter"],Je=["cx","cy","r","fill"],Qe=["cx","cy","r","fill","filter"],Ke={class:"donut"},et=["d","fill","stroke","stroke-width","filter"],tt=["d","onMouseenter","onClick"],lt={key:1,class:"donut-labels quick-animation"},at=["cx","cy","fill","filter"],ot=["text-anchor","x","y","fill","font-size","filter"],nt=["text-anchor","x","y","fill","font-size","filter"],rt={key:2,class:"donut-hollow quick-animation"},it=["x","y","font-size","fill"],ut=["x","y","font-size","fill"],st={key:0,class:"line-grid"},ct=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt={key:1,class:"line-axis"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],ft={key:2,class:"yLabels"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x","y","font-size","fill"],gt={key:3,class:"periodLabels"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["font-size","text-anchor","fill","transform"],St={class:"plots"},bt={class:"line-plot-series"},Bt=["d","stroke","stroke-width"],wt=["d","stroke","stroke-width"],Et=["d","stroke","stroke-width"],Lt=["d","stroke","stroke-width"],_t=["cx","cy","fill","stroke"],At={key:4,class:"dataLabels"},Ct=["font-size","fill","x","y"],Nt={class:"tooltip-traps"},zt=["x","y","height","width","fill","onMouseenter","onClick"],Vt={key:0,class:"line-grid"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Pt={key:1,class:"line-axis"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x1","x2","y1","y2","stroke","stroke-width"],It={key:2,class:"yLabels"},Mt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x","y","font-size","fill"],Dt={key:3,class:"periodLabels"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["font-size","text-anchor","transform","fill"],Wt={class:"plots"},jt=["x","width","height","y","fill","stroke","stroke-width"],Gt=["to"],Ht=["from","to"],Xt={key:4,class:"dataLabels"},Yt=["x","y","font-size","fill"],Zt={class:"tooltip-traps"},Jt=["x","y","height","width","fill","onMouseenter","onClick"],Qt={key:3,class:"axis-labels"},Kt={key:0},el=["font-size","fill","x","y"],tl={key:1},ll=["font-size","fill","x","y"],al={key:2},ol=["font-size","fill","transform"],nl={key:3},rl=["font-size","fill","transform"],il={key:4,class:"vue-data-ui-watermark"},ul=["onClick"],sl=["onClick"],cl=["onClick"],dl={key:1,class:"vue-ui-quick-chart-not-processable"},vl=we(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),ml={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const _=s,{vue_ui_quick_chart:z}=u.useConfig(),F=e.ref(null),D=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),V=e.ref(null),x=e.ref([]),se=e.ref(0),re=e.ref(0),t=e.computed(()=>{const i=ye.useNestedProp({userConfig:_.config,defaultConfig:z});return i.theme?{...ye.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[i.theme]||_.config,defaultConfig:i}),customPalette:u.themePalettes[i.theme]||u.palette}:i}),H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Q=e.computed(()=>{const i=Re({dataset:u.sanitizeArray(_.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return i||console.error("VueUiQuickChart : Dataset is not processable"),i}),k=e.ref(Q.value),Ee=e.computed(()=>!!k.value),b=e.computed(()=>k.value?k.value.type:null);e.watch(()=>b.value,i=>{i||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:K,isImaging:ee,generatePdf:ce,generateImage:de}=ge.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),g=e.ref({width:t.value.width,height:t.value.height}),te=e.ref({showTooltip:t.value.showTooltip}),le=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const i=ke.throttle(()=>{const{width:v,height:l}=ke.useResponsive({chart:F.value,title:t.value.title?D.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?j.value:null});g.value.width=v,g.value.height=l});le.value=new ResizeObserver(i),le.value.observe(F.value.parentNode)}}),e.onBeforeUnmount(()=>{le.value&&le.value.disconnect()});const Le=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function ve(i){return[...i].map(v=>v.value).reduce((v,l)=>v+l,0)}function X(i){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==i?`url(#blur_${E.value})`:""}function me(i,v){x.value.includes(i)?x.value=x.value.filter(l=>l!==i):x.value.length<v&&x.value.push(i)}const he=e.ref(null),fe=e.ref(null),ae=e.ref(!1);function _e(i,v){ae.value=!0;let l=i.value;if(x.value.includes(i.id)){let r=function(){l>n?(ae.value=!1,cancelAnimationFrame(fe.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:n,VALUE:n}:m)}):(l+=n*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},fe.value=requestAnimationFrame(r))};x.value=x.value.filter(m=>m!==i.id);const n=Q.value.dataset.find((m,A)=>i.id===`donut_${A}`).VALUE;r()}else if(v.length>1){let n=function(){l<.1?(ae.value=!1,cancelAnimationFrame(he.value),x.value.push(i.id),k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:0,VALUE:0}:r)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:l,VALUE:l}:r)},he.value=requestAnimationFrame(n))};n()}}const T=e.ref(null);function Ae(i){T.value=i}const w=e.computed(()=>{if(b.value!==S.DONUT)return null;const i=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ve(o))?0:a.value/ve(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function n(a,o){const p=Q.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(p.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function r({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:i},V.value=a.id;const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:a,seriesIndex:o,series:i,config:t.value})))R.value=p({datapoint:a,seriesIndex:o,series:i,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<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="${a.color}"/></svg>`,f+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,T.value=null}const A={centerX:g.value.width/2,centerY:g.value.height/2},N=i.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=i.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:Q.value.dataset.find((p,f)=>`donut_${f}`===a.id).VALUE})),I=g.value.width/2,W=g.value.height/2,M=g.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:r,killTooltip:m,getSpaces:n,total:N,cx:I,cy:W,radius:M,chart:u.makeDonut({series:i.filter(a=>!x.value.includes(a.id))},I,W,M,M,1.99999,2,1,360,105.25,g.value.height*t.value.donutThicknessRatio)}}),y=e.ref({start:0,end:k.value.maxSeriesLength});function Ce(){y.value={start:0,end:k.value.maxSeriesLength},re.value+=1}const Ne=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let i=[];P(k.value.dataset)&&(i=k.value.dataset),ne(k.value.dataset)&&(i=k.value.dataset.map((r,m)=>({values:r.VALUE||r.DATA||r.SERIE||r.SERIES||r.VALUES||r.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(r=>!x.value.includes(r.id)));const v=P(i)?i.length:Math.max(...i.map(r=>r.values.length));let l=[];if(P(i))l=i;else for(let r=0;r<v;r+=1)l.push(i.map(m=>m.values[r]||0).reduce((m,A)=>(m||0)+(A||0),0));const n=Math.min(...l);return l.map(r=>r+(n<0?Math.abs(n):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(y.value.start,y.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ne(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(y.value.start,y.value.end),absoluteIndices:a.values.map((p,f)=>f).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},r=u.calculateNiceScale(n.min<0?n.min:0,n.max<0?0:n.max,t.value.xyScaleSegments),m=n.min<0?Math.abs(n.min):0,A=n.max<0?v.top:v.bottom-m/(r.max+m)*v.height,N=v.width/n.maxSeries,q=r.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(r.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((p,f)=>({x:v.left+N*(f+1)-N/2,y:v.bottom-(p+m)/(r.max+m)*v.height,value:p}))})).map(a=>{let o=[];return a.coordinates.forEach(p=>{o.push(`${p.x},${p.y} `)}),{...a,linePath:o.join(" ")}});function W(a){V.value=a,T.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=p({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,C)=>{f+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Cuc8JBQE.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./BaseIcon-CBTIJ_i3.cjs"),Ve=require("./Tooltip-B_WP5J9X.cjs"),ge=require("./usePrinter-BaExNQdD.cjs"),Fe=require("./Slicer-DUMKJ_f0.cjs"),$e=require("./vue-ui-skeleton-DBlDHYe3.cjs"),ye=require("./useNestedProp-DZwVoxS3.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Te=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Re({dataset:s,barLineSwitch:B=6}){let h=null,_=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),J(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,_=s,z=s.length),ne(s))){if(!Me(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Oe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;xe(j,E=>typeof E=="number")&&(h=S.DONUT,_=s),xe(j,E=>Array.isArray(E)&&P(E))&&(Se(s)>B?h=S.LINE:h=S.BAR,z=Se(s),_=s.map(E=>({...E,data:De(E,$=>P($))}))),s=s.map(E=>be(E)),_=_.map(E=>be(E))}return J(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:_,maxSeriesLength:z}}function Be(s){return!s||J(s)&&!s.length}function J(s){return Array.isArray(s)}function P(s){if(!J(s)||Be(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ne(s){return!J(s)||Be(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Ie(s,B){const h=Object.keys(s).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let z=0;z<h.length;z+=1){const F=h[z],D=_[z];if(F!==D||typeof s[F]!=typeof B[D])return!1}return!0}function Me(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Ie(s[B],s[h]))return!1;return!0}function Oe(s){return Te.includes(s.toUpperCase())}function xe(s,B){let h=[];for(let _=0;_<s.length;_+=1)h.push(B(s[_]));return h.includes(!0)}function Se(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function De(s,B){return Object.values(s).filter(h=>B(h))[0]}function be(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const we=s=>(e.pushScopeId("data-v-bf59d888"),s=s(),e.popScopeId(),s),Ue=["id"],qe=["xmlns","viewBox"],We=["id"],je=["id"],Ge=we(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],Xe=["flood-color"],Ye={key:0,class:"donut-label-connectors"},Ze=["d","stroke","stroke-width","filter"],Je=["cx","cy","r","fill"],Qe=["cx","cy","r","fill","filter"],Ke={class:"donut"},et=["d","fill","stroke","stroke-width","filter"],tt=["d","onMouseenter","onClick"],lt={key:1,class:"donut-labels quick-animation"},at=["cx","cy","fill","filter"],ot=["text-anchor","x","y","fill","font-size","filter"],nt=["text-anchor","x","y","fill","font-size","filter"],rt={key:2,class:"donut-hollow quick-animation"},it=["x","y","font-size","fill"],ut=["x","y","font-size","fill"],st={key:0,class:"line-grid"},ct=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt={key:1,class:"line-axis"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],ft={key:2,class:"yLabels"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x","y","font-size","fill"],gt={key:3,class:"periodLabels"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["font-size","text-anchor","fill","transform"],St={class:"plots"},bt={class:"line-plot-series"},Bt=["d","stroke","stroke-width"],wt=["d","stroke","stroke-width"],Et=["d","stroke","stroke-width"],Lt=["d","stroke","stroke-width"],_t=["cx","cy","fill","stroke"],At={key:4,class:"dataLabels"},Ct=["font-size","fill","x","y"],Nt={class:"tooltip-traps"},zt=["x","y","height","width","fill","onMouseenter","onClick"],Vt={key:0,class:"line-grid"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Pt={key:1,class:"line-axis"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x1","x2","y1","y2","stroke","stroke-width"],It={key:2,class:"yLabels"},Mt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x","y","font-size","fill"],Dt={key:3,class:"periodLabels"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["font-size","text-anchor","transform","fill"],Wt={class:"plots"},jt=["x","width","height","y","fill","stroke","stroke-width"],Gt=["to"],Ht=["from","to"],Xt={key:4,class:"dataLabels"},Yt=["x","y","font-size","fill"],Zt={class:"tooltip-traps"},Jt=["x","y","height","width","fill","onMouseenter","onClick"],Qt={key:3,class:"axis-labels"},Kt={key:0},el=["font-size","fill","x","y"],tl={key:1},ll=["font-size","fill","x","y"],al={key:2},ol=["font-size","fill","transform"],nl={key:3},rl=["font-size","fill","transform"],il={key:4,class:"vue-data-ui-watermark"},ul=["onClick"],sl=["onClick"],cl=["onClick"],dl={key:1,class:"vue-ui-quick-chart-not-processable"},vl=we(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),ml={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const _=s,{vue_ui_quick_chart:z}=u.useConfig(),F=e.ref(null),D=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),V=e.ref(null),x=e.ref([]),se=e.ref(0),re=e.ref(0),t=e.computed(()=>{const i=ye.useNestedProp({userConfig:_.config,defaultConfig:z});return i.theme?{...ye.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[i.theme]||_.config,defaultConfig:i}),customPalette:u.themePalettes[i.theme]||u.palette}:i}),H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Q=e.computed(()=>{const i=Re({dataset:u.sanitizeArray(_.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return i||console.error("VueUiQuickChart : Dataset is not processable"),i}),k=e.ref(Q.value),Ee=e.computed(()=>!!k.value),b=e.computed(()=>k.value?k.value.type:null);e.watch(()=>b.value,i=>{i||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:K,isImaging:ee,generatePdf:ce,generateImage:de}=ge.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),g=e.ref({width:t.value.width,height:t.value.height}),te=e.ref({showTooltip:t.value.showTooltip}),le=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const i=ke.throttle(()=>{const{width:v,height:l}=ke.useResponsive({chart:F.value,title:t.value.title?D.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?j.value:null});g.value.width=v,g.value.height=l});le.value=new ResizeObserver(i),le.value.observe(F.value.parentNode)}}),e.onBeforeUnmount(()=>{le.value&&le.value.disconnect()});const Le=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function ve(i){return[...i].map(v=>v.value).reduce((v,l)=>v+l,0)}function X(i){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==i?`url(#blur_${E.value})`:""}function me(i,v){x.value.includes(i)?x.value=x.value.filter(l=>l!==i):x.value.length<v&&x.value.push(i)}const he=e.ref(null),fe=e.ref(null),ae=e.ref(!1);function _e(i,v){ae.value=!0;let l=i.value;if(x.value.includes(i.id)){let r=function(){l>n?(ae.value=!1,cancelAnimationFrame(fe.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:n,VALUE:n}:m)}):(l+=n*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},fe.value=requestAnimationFrame(r))};x.value=x.value.filter(m=>m!==i.id);const n=Q.value.dataset.find((m,A)=>i.id===`donut_${A}`).VALUE;r()}else if(v.length>1){let n=function(){l<.1?(ae.value=!1,cancelAnimationFrame(he.value),x.value.push(i.id),k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:0,VALUE:0}:r)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:l,VALUE:l}:r)},he.value=requestAnimationFrame(n))};n()}}const T=e.ref(null);function Ae(i){T.value=i}const w=e.computed(()=>{if(b.value!==S.DONUT)return null;const i=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ve(o))?0:a.value/ve(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function n(a,o){const p=Q.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(p.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function r({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:i},V.value=a.id;const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:a,seriesIndex:o,series:i,config:t.value})))R.value=p({datapoint:a,seriesIndex:o,series:i,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<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="${a.color}"/></svg>`,f+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,T.value=null}const A={centerX:g.value.width/2,centerY:g.value.height/2},N=i.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=i.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:Q.value.dataset.find((p,f)=>`donut_${f}`===a.id).VALUE})),I=g.value.width/2,W=g.value.height/2,M=g.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:r,killTooltip:m,getSpaces:n,total:N,cx:I,cy:W,radius:M,chart:u.makeDonut({series:i.filter(a=>!x.value.includes(a.id))},I,W,M,M,1.99999,2,1,360,105.25,g.value.height*t.value.donutThicknessRatio)}}),y=e.ref({start:0,end:k.value.maxSeriesLength});function Ce(){y.value={start:0,end:k.value.maxSeriesLength},re.value+=1}const Ne=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let i=[];P(k.value.dataset)&&(i=k.value.dataset),ne(k.value.dataset)&&(i=k.value.dataset.map((r,m)=>({values:r.VALUE||r.DATA||r.SERIE||r.SERIES||r.VALUES||r.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(r=>!x.value.includes(r.id)));const v=P(i)?i.length:Math.max(...i.map(r=>r.values.length));let l=[];if(P(i))l=i;else for(let r=0;r<v;r+=1)l.push(i.map(m=>m.values[r]||0).reduce((m,A)=>(m||0)+(A||0),0));const n=Math.min(...l);return l.map(r=>r+(n<0?Math.abs(n):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(y.value.start,y.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ne(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(y.value.start,y.value.end),absoluteIndices:a.values.map((p,f)=>f).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},r=u.calculateNiceScale(n.min<0?n.min:0,n.max<0?0:n.max,t.value.xyScaleSegments),m=n.min<0?Math.abs(n.min):0,A=n.max<0?v.top:v.bottom-m/(r.max+m)*v.height,N=v.width/n.maxSeries,q=r.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(r.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((p,f)=>({x:v.left+N*(f+1)-N/2,y:v.bottom-(p+m)/(r.max+m)*v.height,value:p}))})).map(a=>{let o=[];return a.coordinates.forEach(p=>{o.push(`${p.x},${p.y} `)}),{...a,linePath:o.join(" ")}});function W(a){V.value=a,T.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=p({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,C)=>{f+=`
|
|
2
2
|
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
3
|
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.color}"/></svg>
|
|
4
4
|
<span>${L.name}:</span>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as v, ref as i, onMounted as Se, onBeforeUnmount as Le, openBlock as s, createElementBlock as n, normalizeClass as L, normalizeStyle as E, createVNode as B, createCommentVNode as f, createBlock as D, unref as h, createSlots as ze, withCtx as y, renderSlot as m, normalizeProps as G, guardReactiveProps as W, createElementVNode as w, Fragment as $, renderList as x, toDisplayString as z, createTextVNode as pe, nextTick as Re } from "vue";
|
|
2
|
-
import { u as Me, c as Ve, t as Ue, a as Ee, p as P, o as Be, e as F, b as De, g as ge, d as fe, M as ye, s as Ge, i as me, f as R, X as We, v as Xe, w as Q, N as be, x as Ye, y as je, q as qe, r as He } from "./index
|
|
2
|
+
import { u as Me, c as Ve, t as Ue, a as Ee, p as P, o as Be, e as F, b as De, g as ge, d as fe, M as ye, s as Ge, i as me, f as R, X as We, v as Xe, w as Q, N as be, x as Ye, y as je, q as qe, r as He } from "./index-BYuu8ZDR.js";
|
|
3
3
|
import { t as Je, u as Ke } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Qe } from "./Title-
|
|
5
|
-
import { u as Ze, U as et } from "./usePrinter-
|
|
6
|
-
import { _ as tt } from "./Tooltip-
|
|
7
|
-
import at from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as ot } from "./Legend-
|
|
9
|
-
import { D as lt } from "./DataTable-
|
|
10
|
-
import rt from "./vue-ui-skeleton-
|
|
11
|
-
import st from "./vue-ui-accordion-
|
|
12
|
-
import { u as ke } from "./useNestedProp-
|
|
4
|
+
import { _ as Qe } from "./Title-B_AI8tEZ.js";
|
|
5
|
+
import { u as Ze, U as et } from "./usePrinter-DqIk1aRq.js";
|
|
6
|
+
import { _ as tt } from "./Tooltip-CPewpyRa.js";
|
|
7
|
+
import at from "./vue-ui-sparkbar-D477mrPt.js";
|
|
8
|
+
import { L as ot } from "./Legend-VJiB_MLq.js";
|
|
9
|
+
import { D as lt } from "./DataTable-B9bLH4Tw.js";
|
|
10
|
+
import rt from "./vue-ui-skeleton-DY6dv9ms.js";
|
|
11
|
+
import st from "./vue-ui-accordion-CW9p_36e.js";
|
|
12
|
+
import { u as ke } from "./useNestedProp-DdJ6Grxg.js";
|
|
13
13
|
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const ut = ["id"], it = ["xmlns", "viewBox"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], ht = { key: 0 }, pt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], gt = { key: 0 }, ft = ["d", "stroke", "stroke-width"], yt = ["d", "stroke", "stroke-width"], mt = { key: 1 }, bt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], kt = ["points", "stroke", "stroke-width"], Ct = ["points", "stroke", "stroke-width", "fill"], _t = { key: 2 }, wt = ["cx", "cy", "fill", "r", "stroke"], $t = {
|
|
15
15
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsqP5b4f.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-96aF3-Z1.cjs"),Y=require("./usePrinter-CobCVhRp.cjs"),ce=require("./Tooltip-Bkzl1VQe.cjs"),de=require("./vue-ui-sparkbar-BkBDO4sR.cjs"),ve=require("./Legend-D_1fNWhT.cjs"),pe=require("./DataTable-BTNru9rE.cjs"),he=require("./vue-ui-skeleton-BR5OmV8V.cjs"),ge=require("./vue-ui-accordion-C1ybaK7v.cjs"),J=require("./useNestedProp-DQ2DOe-8.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,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.createVNode(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-11516433"]]);exports.default=Ae;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cuc8JBQE.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Du743m6e.cjs"),Y=require("./usePrinter-BaExNQdD.cjs"),ce=require("./Tooltip-B_WP5J9X.cjs"),de=require("./vue-ui-sparkbar-BSa3E1PW.cjs"),ve=require("./Legend-rxEBmJRW.cjs"),pe=require("./DataTable-03mHwPdu.cjs"),he=require("./vue-ui-skeleton-DBlDHYe3.cjs"),ge=require("./vue-ui-accordion-CX_qmhfk.cjs"),J=require("./useNestedProp-DZwVoxS3.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,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.createVNode(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-11516433"]]);exports.default=Ae;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as f, computed as $, onMounted as O, openBlock as l, createElementBlock as i, normalizeStyle as a, createElementVNode as n, toDisplayString as p, createCommentVNode as d, Fragment as E, renderList as L, unref as m, withKeys as U, createTextVNode as D } from "vue";
|
|
2
|
-
import { u as K, c as T, o as H, e as P, X as _, v as N, S as F } from "./index
|
|
3
|
-
import { u as W } from "./useNestedProp-
|
|
2
|
+
import { u as K, c as T, o as H, e as P, X as _, v as N, S as F } from "./index-BYuu8ZDR.js";
|
|
3
|
+
import { u as W } from "./useNestedProp-DdJ6Grxg.js";
|
|
4
4
|
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const J = {
|
|
6
6
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsqP5b4f.cjs"),C=require("./useNestedProp-DQ2DOe-8.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cuc8JBQE.cjs"),C=require("./useNestedProp-DZwVoxS3.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
|