vue-data-ui 2.4.13 → 2.4.14
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-D-arGVx0.cjs → Arrow-B0eMJ0vD.cjs} +1 -1
- package/dist/{Arrow-Bj-fZHYt.js → Arrow-CcRzwcZw.js} +1 -1
- package/dist/{BaseIcon-bxNR7IJr.cjs → BaseIcon-BaBTKzCc.cjs} +1 -1
- package/dist/{BaseIcon-CJw1rm7G.js → BaseIcon-f-0QUq0v.js} +1 -1
- package/dist/{DataTable-DPFAxETx.cjs → DataTable-CHfZ1IEy.cjs} +1 -1
- package/dist/{DataTable-DSmlK27d.js → DataTable-aYqFUYEK.js} +2 -2
- package/dist/{Legend-CjRX0KB0.js → Legend-B_Euf5BX.js} +1 -1
- package/dist/{Legend-pFwNBjPs.cjs → Legend-BmTkHhIn.cjs} +1 -1
- package/dist/{PackageVersion-Bdfz6JAs.cjs → PackageVersion-D6vG-BXj.cjs} +1 -1
- package/dist/{PackageVersion-6g32vfzE.js → PackageVersion-DFaMeCN6.js} +1 -1
- package/dist/{PenAndPaper-Bxz6JnY-.js → PenAndPaper-DxGFlSh0.js} +2 -2
- package/dist/{PenAndPaper-qO8pMTxM.cjs → PenAndPaper-i3jYHWwR.cjs} +1 -1
- package/dist/{Shape-B9d1hhZS.js → Shape-BBk-Sd19.js} +1 -1
- package/dist/{Shape-tOhcWMkG.cjs → Shape-DFFQ_70v.cjs} +1 -1
- package/dist/{Slicer-CiHJ4t5H.cjs → Slicer-CPM6S6sp.cjs} +1 -1
- package/dist/{Slicer-BzuIYjHU.js → Slicer-D8UYq3Jo.js} +2 -2
- package/dist/{Title-DPx1SQ60.cjs → Title-4bXfWbx8.cjs} +1 -1
- package/dist/{Title-CFHy9-HZ.js → Title-JeqRfl2Z.js} +1 -1
- package/dist/{Tooltip-BxmlUqdH.cjs → Tooltip-BheHY6dV.cjs} +1 -1
- package/dist/{Tooltip-DLCVqP66.js → Tooltip-DKlw-Q8v.js} +1 -1
- package/dist/{index-YfDOzIGL.cjs → index-BUVOYVSk.cjs} +1 -1
- package/dist/{index-DwLdoaoI.js → index-Dy5GrFF-.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BE-9rWPi.js → useNestedProp-Be6ZIo5i.js} +1 -1
- package/dist/{useNestedProp-WJ8kD00a.cjs → useNestedProp-nko1Exy-.cjs} +1 -1
- package/dist/{usePrinter-BfKKkLev.cjs → usePrinter-BGq-7Twb.cjs} +1 -1
- package/dist/{usePrinter-QQ8sIBRI.js → usePrinter-B_9DGtW7.js} +1 -1
- package/dist/{vue-data-ui-B8pOC7vP.cjs → vue-data-ui-Dis9z9dY.cjs} +1 -1
- package/dist/{vue-data-ui-a0ppZO9B.js → vue-data-ui-Tfs27uUn.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BLM0gdFx.cjs → vue-ui-3d-bar-6TQgQ-xc.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-cP2pNaKD.js → vue-ui-3d-bar-BOeqtR4u.js} +9 -9
- package/dist/{vue-ui-accordion-BCbBgQnM.js → vue-ui-accordion-BmJX_0Fc.js} +3 -3
- package/dist/{vue-ui-accordion-BDO_Zh68.cjs → vue-ui-accordion-r9LcXEYX.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-D83sx902.cjs → vue-ui-age-pyramid-D8mGzhwL.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CrCircJT.js → vue-ui-age-pyramid-DyK3oWOz.js} +10 -10
- package/dist/{vue-ui-annotator-Bsxswk9y.js → vue-ui-annotator-Df4RXblk.js} +1 -1
- package/dist/{vue-ui-annotator-CPc0zP6z.cjs → vue-ui-annotator-xLgkrAm4.cjs} +1 -1
- package/dist/{vue-ui-bullet-Y-4z-p0q.js → vue-ui-bullet--e2coNbi.js} +8 -8
- package/dist/{vue-ui-bullet-0uF7uLzI.cjs → vue-ui-bullet-3DwuVRD1.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DEf62bqT.cjs → vue-ui-candlestick-CGwBj_6g.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DgcbuAOG.js → vue-ui-candlestick-Dy3B4hIY.js} +11 -11
- package/dist/{vue-ui-carousel-table-JVCaW1uQ.js → vue-ui-carousel-table-UJGXkosj.js} +4 -4
- package/dist/{vue-ui-carousel-table-D5mhqTJP.cjs → vue-ui-carousel-table-kSl_zPtP.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Bf-i3FaN.js → vue-ui-chestnut-Cgge1SHL.js} +8 -8
- package/dist/{vue-ui-chestnut-BzIsyDCJ.cjs → vue-ui-chestnut-DPLH4IcL.cjs} +1 -1
- package/dist/{vue-ui-cursor-QzjfpeEf.js → vue-ui-cursor-BHTLqu0Q.js} +2 -2
- package/dist/{vue-ui-cursor-BbkGAq5Z.cjs → vue-ui-cursor-CwgV2VNu.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BRi99J78.js → vue-ui-dashboard-CuToI1bg.js} +2 -2
- package/dist/{vue-ui-dashboard-DCU5dw0v.cjs → vue-ui-dashboard-Dt4CAeDS.cjs} +1 -1
- package/dist/{vue-ui-digits-C2fR0QCG.js → vue-ui-digits-DNO1xW8o.js} +2 -2
- package/dist/{vue-ui-digits-RFS4E6dl.cjs → vue-ui-digits-DpN3MjGn.cjs} +1 -1
- package/dist/{vue-ui-donut-BC07kmTG.js → vue-ui-donut-3FqWxnwU.js} +11 -11
- package/dist/{vue-ui-donut-C2yuDXOJ.cjs → vue-ui-donut-DjyG3UJn.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DxdShz3M.js → vue-ui-donut-evolution-9op89n1-.js} +11 -11
- package/dist/{vue-ui-donut-evolution-D0aPzssn.cjs → vue-ui-donut-evolution-BwzFYxmq.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DQq-pgEi.cjs → vue-ui-dumbbell-CoU7gUYz.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-5moTjRU_.js → vue-ui-dumbbell-CvTxJMMn.js} +10 -10
- package/dist/{vue-ui-flow-EMWBDlYH.cjs → vue-ui-flow-CEsZ6xBD.cjs} +1 -1
- package/dist/{vue-ui-flow-CJVI2R0U.js → vue-ui-flow-DrlNzFnu.js} +9 -9
- package/dist/{vue-ui-galaxy-xrPaGHQg.js → vue-ui-galaxy-BznpNqKq.js} +11 -11
- package/dist/{vue-ui-galaxy-0PGxS1cN.cjs → vue-ui-galaxy-D11bLkvz.cjs} +1 -1
- package/dist/{vue-ui-gauge-UDtF52j4.js → vue-ui-gauge-Bjpv4Zbc.js} +7 -7
- package/dist/{vue-ui-gauge-CS3jqlat.cjs → vue-ui-gauge-DE4v6VPS.cjs} +1 -1
- package/dist/{vue-ui-gizmo-1NLXOp5J.js → vue-ui-gizmo-CwDzD-hB.js} +3 -3
- package/dist/{vue-ui-gizmo-BvSR_xyA.cjs → vue-ui-gizmo-fuA0CL_d.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Dm0WDiz1.js → vue-ui-heatmap-D-gVcVE2.js} +10 -10
- package/dist/{vue-ui-heatmap-DyDsLNJO.cjs → vue-ui-heatmap-m2eoABMv.cjs} +1 -1
- package/dist/{vue-ui-kpi-DJjEfWZh.js → vue-ui-kpi-B5I-d56Y.js} +3 -3
- package/dist/{vue-ui-kpi-DX6XNFXG.cjs → vue-ui-kpi-BqwS47tL.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-izD98Oto.js → vue-ui-mini-loader-DqgYZ3Bz.js} +2 -2
- package/dist/{vue-ui-mini-loader-CILHcM-o.cjs → vue-ui-mini-loader-kIT0EOzC.cjs} +1 -1
- package/dist/{vue-ui-molecule-D8tlnNvH.cjs → vue-ui-molecule-0eEs_27v.cjs} +1 -1
- package/dist/{vue-ui-molecule-BwmpBwnD.js → vue-ui-molecule-C2XfrRB0.js} +11 -11
- package/dist/{vue-ui-mood-radar-iFQR2rec.cjs → vue-ui-mood-radar-D7nKWrqV.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CorAQOLG.js → vue-ui-mood-radar-ZOTBgqgJ.js} +11 -11
- package/dist/{vue-ui-nested-donuts-3tDIUZ4K.cjs → vue-ui-nested-donuts-BlHdXm6g.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DmHkGxsD.js → vue-ui-nested-donuts-CAnsSM44.js} +11 -11
- package/dist/{vue-ui-onion-vTqEZNQz.js → vue-ui-onion-BM--M0jY.js} +11 -11
- package/dist/{vue-ui-onion-CqdVnbs9.cjs → vue-ui-onion-CWfQ992Z.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BgOxX64T.js → vue-ui-parallel-coordinate-plot-DwLQh4tP.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DfMN7jaW.cjs → vue-ui-parallel-coordinate-plot-WM9uQd0M.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BI_7I8Yj.cjs → vue-ui-quadrant-BjHHETMe.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BWQq4PHY.js → vue-ui-quadrant-Bux3R-Q7.js} +12 -12
- package/dist/{vue-ui-quick-chart-N-1EOfxf.cjs → vue-ui-quick-chart-G702BvIJ.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CqHSqq5T.js → vue-ui-quick-chart-szGxcS9d.js} +9 -9
- package/dist/{vue-ui-radar-B-jTKgCL.cjs → vue-ui-radar-BQ05ebSC.cjs} +1 -1
- package/dist/{vue-ui-radar-DXS1Am0r.js → vue-ui-radar-CNlzEasE.js} +12 -12
- package/dist/{vue-ui-rating-DjuCoq0M.js → vue-ui-rating-CPEoJems.js} +2 -2
- package/dist/{vue-ui-rating-CWLJYf2s.cjs → vue-ui-rating-Csfmwywp.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Ql6ZFkYK.cjs → vue-ui-relation-circle-CFiSQjx9.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-AK--8JLM.js → vue-ui-relation-circle-D7NR9tCd.js} +7 -7
- package/dist/{vue-ui-rings-DlszOdMT.cjs → vue-ui-rings-DsWRI78a.cjs} +1 -1
- package/dist/{vue-ui-rings-lOFH_to8.js → vue-ui-rings-o45LQxbP.js} +11 -11
- package/dist/{vue-ui-scatter-DldUTIFq.cjs → vue-ui-scatter-0KfyPHGN.cjs} +1 -1
- package/dist/{vue-ui-scatter-l-l8Cllm.js → vue-ui-scatter-ByFq8cqv.js} +12 -12
- package/dist/{vue-ui-screenshot-CrvTcVxC.cjs → vue-ui-screenshot-C36MC7_n.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BiVtkpB9.js → vue-ui-screenshot-CBlmxSOB.js} +1 -1
- package/dist/{vue-ui-skeleton-BypGpnGR.cjs → vue-ui-skeleton-B_yz8Eus.cjs} +1 -1
- package/dist/{vue-ui-skeleton-C7cQjNuh.js → vue-ui-skeleton-lqzNF24A.js} +3 -3
- package/dist/{vue-ui-smiley-BBUWMyj5.cjs → vue-ui-smiley-D8zEHTsC.cjs} +1 -1
- package/dist/{vue-ui-smiley-C0P-U_YM.js → vue-ui-smiley-axWZn-Gd.js} +2 -2
- package/dist/{vue-ui-spark-trend-Pohir-w4.cjs → vue-ui-spark-trend-B64f8Bya.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-jPUjOnKd.js → vue-ui-spark-trend-BusH1eOa.js} +5 -5
- package/dist/{vue-ui-sparkbar-DRGrJShZ.js → vue-ui-sparkbar-C5nkxRVH.js} +4 -4
- package/dist/{vue-ui-sparkbar-DSIgmn4z.cjs → vue-ui-sparkbar-CHBoXEkG.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Bb_GeFli.cjs → vue-ui-sparkgauge-8yhMTt_s.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-KMNHHr4A.js → vue-ui-sparkgauge-Nchun2dD.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BqwrB7j-.cjs → vue-ui-sparkhistogram-Dl6nxv92.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CMvUAyiv.js → vue-ui-sparkhistogram-tfNSyoTE.js} +5 -5
- package/dist/{vue-ui-sparkline-BGV0iTE1.cjs → vue-ui-sparkline-CLUA9qSQ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-ptuGTvxy.js → vue-ui-sparkline-DXoZ-AXQ.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-B0yQaDMk.cjs → vue-ui-sparkstackbar-B-ZG07ak.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Bg-rRMOG.js → vue-ui-sparkstackbar-C-3aj0Qg.js} +5 -5
- package/dist/{vue-ui-stackbar-BhcvcsKz.cjs → vue-ui-stackbar-CeyMa7nJ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-B4iWyEBr.js → vue-ui-stackbar-IKAkG9EJ.js} +12 -12
- package/dist/{vue-ui-strip-plot-CteBC2Pl.cjs → vue-ui-strip-plot-EeDRRLyD.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BEj83Tgt.js → vue-ui-strip-plot-f8gQv1R9.js} +11 -11
- package/dist/{vue-ui-table-CVvMDfob.cjs → vue-ui-table-BMjDumNw.cjs} +1 -1
- package/dist/{vue-ui-table-BUeJnxZj.js → vue-ui-table-Ci87YIZ1.js} +1 -1
- package/dist/{vue-ui-table-heatmap-B49k29Rh.js → vue-ui-table-heatmap-DBAAR6Yq.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CBbrj4Q-.cjs → vue-ui-table-heatmap-_zvyT-r9.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-ycJMm1Hk.cjs → vue-ui-table-sparkline-C4_6lbC0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Dvbvgw65.js → vue-ui-table-sparkline-ZMfDRnFs.js} +5 -5
- package/dist/{vue-ui-thermometer-CkRdpjaQ.cjs → vue-ui-thermometer-CRDENrkH.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CV1MMj-E.js → vue-ui-thermometer-CrAi04Vr.js} +7 -7
- package/dist/{vue-ui-timer-DaBdNn36.cjs → vue-ui-timer-D3PdDbak.cjs} +1 -1
- package/dist/{vue-ui-timer-BN12JB4S.js → vue-ui-timer-DgBKV7nS.js} +5 -5
- package/dist/{vue-ui-tiremarks-DHXn5sWw.cjs → vue-ui-tiremarks-Cf89IkXU.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-ClWPLlir.js → vue-ui-tiremarks-DJNcDzAu.js} +7 -7
- package/dist/{vue-ui-treemap-DWq5_ImB.cjs → vue-ui-treemap-D_foZr6d.cjs} +1 -1
- package/dist/{vue-ui-treemap-1uBqR8E7.js → vue-ui-treemap-wKiju8mu.js} +11 -11
- package/dist/{vue-ui-vertical-bar-DV8c2BrB.js → vue-ui-vertical-bar-BBPnVcf4.js} +11 -11
- package/dist/{vue-ui-vertical-bar-CTEo3CxB.cjs → vue-ui-vertical-bar-DL52aOVH.cjs} +1 -1
- package/dist/{vue-ui-waffle-fXL2N03M.js → vue-ui-waffle-B5RuBnB5.js} +11 -11
- package/dist/{vue-ui-waffle-CuA3KaoT.cjs → vue-ui-waffle-Cl6_0xMB.cjs} +1 -1
- package/dist/{vue-ui-wheel-D3l8Zj6H.cjs → vue-ui-wheel-CBTReC9o.cjs} +1 -1
- package/dist/{vue-ui-wheel-Buw3ZXPa.js → vue-ui-wheel-hrqzLHBL.js} +7 -7
- package/dist/{vue-ui-word-cloud-Xqjh9Q30.js → vue-ui-word-cloud-Beq0Ncwv.js} +10 -10
- package/dist/{vue-ui-word-cloud-B8VMBqal.cjs → vue-ui-word-cloud-DN3j2VVh.cjs} +1 -1
- package/dist/{vue-ui-xy-Cr_UmMcD.js → vue-ui-xy-4Cn2wWE-.js} +868 -868
- package/dist/vue-ui-xy-87QC07_q.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-CBxPjJOJ.cjs → vue-ui-xy-canvas-BzTohtt-.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-B82jCvbc.js → vue-ui-xy-canvas-DNrAqCNu.js} +11 -11
- package/package.json +1 -1
- package/dist/vue-ui-xy-BSvt9roY.cjs +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-YfDOzIGL.cjs"),Q=require("./Title-DPx1SQ60.cjs"),L=require("./usePrinter-BfKKkLev.cjs"),Z=require("./Legend-pFwNBjPs.cjs"),f=require("./BaseIcon-bxNR7IJr.cjs"),ee=require("./DataTable-DPFAxETx.cjs"),te=require("./vue-ui-skeleton-BypGpnGR.cjs"),oe=require("./vue-ui-accordion-BDO_Zh68.cjs"),O=require("./useNestedProp-WJ8kD00a.cjs"),le=require("./PackageVersion-Bdfz6JAs.cjs"),ae=require("./PenAndPaper-qO8pMTxM.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.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,ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.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(ee.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BUVOYVSk.cjs"),Q=require("./Title-4bXfWbx8.cjs"),L=require("./usePrinter-BGq-7Twb.cjs"),Z=require("./Legend-BmTkHhIn.cjs"),f=require("./BaseIcon-BaBTKzCc.cjs"),ee=require("./DataTable-CHfZ1IEy.cjs"),te=require("./vue-ui-skeleton-B_yz8Eus.cjs"),oe=require("./vue-ui-accordion-r9LcXEYX.cjs"),O=require("./useNestedProp-nko1Exy-.cjs"),le=require("./PackageVersion-D6vG-BXj.cjs"),ae=require("./PenAndPaper-i3jYHWwR.cjs"),re=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],se={key:2,style:"width:100%;background:transparent"},ue=["xmlns","viewBox"],ie=["id"],ce=["stop-color"],de=["stop-color"],ye=["x1","y1","x2","y2","stroke","stroke-width"],ve=["d","stroke","stroke-width"],me=["stroke"],he=["fill"],pe=["stroke"],fe=["fill"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["d","stroke","stroke-width","fill"],_e=["x1","y1","stroke"],Ve=["cx","cy","fill","stroke"],Pe=["fill","stroke"],Be=["y","fill","font-weight"],$e=["y","fill"],Me={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={style:{"font-weight":"bold"}},Se={key:8,ref:"source",dir:"auto"},Te=["innerHTML"],Le={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:F}){const s=I,{vue_ui_mood_radar:D}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),q=e.ref(null),n=e.ref(null),z=e.ref(null),j=e.ref(0),W=e.ref(0),V=e.ref(0),t=e.computed({get:()=>P(),set:l=>l});function P(){const l=O.useNestedProp({userConfig:s.config,defaultConfig:D});return l.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=P(),_(),j.value+=1,W.value+=1,V.value+=1},{deep:!0});const{isPrinting:B,isImaging:$,generatePdf:M,generateImage:E}=L.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),G=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function R({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:J}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:J}}const U=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),A=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=R({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/U.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),H=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function X(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function S(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,p)=>[{color:c.color,name:c.name},y.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[p]/v.value)?"-":(y.value.body[p]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function K(){return i.value}function T(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Y(l){b.value=l}const C=e.ref(!1);function w(){C.value=!C.value}return F({getData:K,generatePdf:M,generateCsv:S,generateImage:E,toggleTable:T,toggleAnnotator:w}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:w},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),G.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(Q._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(L.UserOptions,{key:3,ref_key:"details",ref:q,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(B),isImaging:e.unref($),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(M),onGenerateCsv:S,onGenerateImage:e.unref(E),onToggleTable:T,onToggleAnnotator:w},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(le._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,de)],8,ie)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ye))),256)),e.createElementVNode("path",{d:x.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,ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,me),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,he),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,fe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,ge),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ce),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,xe),e.createElementVNode("path",{d:e.unref(r.makePath)(A.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,we),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,_e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ve),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Pe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Be),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,$e)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ue)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(B)||e.unref($)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Z.Legend,{legendSet:i.value,config:H.value,key:`legend_${V.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>X(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(f.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(f.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(f.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(f.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(f.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ae,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ee)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(oe.default,{key:9,hideDetails:"",config:{open:k.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(ee.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Oe=re._export_sfc(Le,[["__scopeId","data-v-80a971b6"]]);exports.default=Oe;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as c, onMounted as ge, ref as v, watch as ke, openBlock as r, createElementBlock as y, normalizeClass as Y, normalizeStyle as V, createBlock as h, createCommentVNode as u, createVNode as j, unref as s, createSlots as be, withCtx as f, renderSlot as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as a, Fragment as J, renderList as Q, toDisplayString as M, createTextVNode as Z, nextTick as Ce } from "vue";
|
|
2
|
-
import { u as _e, o as xe, e as ee, c as we, t as $e, O as Me, X as Pe, s as C, w as Ne, P as Ae, i as te, f as O, q as Te, r as Le } from "./index-
|
|
3
|
-
import { _ as Oe } from "./Title-
|
|
4
|
-
import { u as Ie, U as Fe } from "./usePrinter-
|
|
5
|
-
import { L as Se } from "./Legend-
|
|
6
|
-
import P from "./BaseIcon-
|
|
7
|
-
import { D as Ve } from "./DataTable-
|
|
8
|
-
import je from "./vue-ui-skeleton-
|
|
9
|
-
import Be from "./vue-ui-accordion-
|
|
10
|
-
import { u as oe } from "./useNestedProp-
|
|
11
|
-
import { _ as De } from "./PackageVersion-
|
|
12
|
-
import { P as We } from "./PenAndPaper-
|
|
2
|
+
import { u as _e, o as xe, e as ee, c as we, t as $e, O as Me, X as Pe, s as C, w as Ne, P as Ae, i as te, f as O, q as Te, r as Le } from "./index-Dy5GrFF-.js";
|
|
3
|
+
import { _ as Oe } from "./Title-JeqRfl2Z.js";
|
|
4
|
+
import { u as Ie, U as Fe } from "./usePrinter-B_9DGtW7.js";
|
|
5
|
+
import { L as Se } from "./Legend-B_Euf5BX.js";
|
|
6
|
+
import P from "./BaseIcon-f-0QUq0v.js";
|
|
7
|
+
import { D as Ve } from "./DataTable-aYqFUYEK.js";
|
|
8
|
+
import je from "./vue-ui-skeleton-lqzNF24A.js";
|
|
9
|
+
import Be from "./vue-ui-accordion-BmJX_0Fc.js";
|
|
10
|
+
import { u as oe } from "./useNestedProp-Be6ZIo5i.js";
|
|
11
|
+
import { _ as De } from "./PackageVersion-DFaMeCN6.js";
|
|
12
|
+
import { P as We } from "./PenAndPaper-DxGFlSh0.js";
|
|
13
13
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Ge = ["id"], Ee = {
|
|
15
15
|
key: 2,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BUVOYVSk.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),Ne=require("./Title-4bXfWbx8.cjs"),he=require("./usePrinter-BGq-7Twb.cjs"),Se=require("./DataTable-CHfZ1IEy.cjs"),Ee=require("./Tooltip-BheHY6dV.cjs"),Ve=require("./Legend-BmTkHhIn.cjs"),Fe=require("./vue-ui-skeleton-B_yz8Eus.cjs"),Te=require("./vue-ui-accordion-r9LcXEYX.cjs"),ye=require("./useNestedProp-nko1Exy-.cjs"),Pe=require("./PackageVersion-D6vG-BXj.cjs"),De=require("./PenAndPaper-i3jYHWwR.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=B=>(e.pushScopeId("data-v-038450b3"),B=B(),e.popScopeId(),B),Oe=["id"],Ie=["xmlns","viewBox"],Ae=["id"],Me=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Re=["offset","stop-color"],qe=["offset","stop-opacity"],Ue=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ye=["id"],Xe=["id"],Ge=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],We=["flood-color"],Je=["d","fill","stroke","stroke-width","filter"],Ke={key:0},Qe=["d","fill"],Ze={key:1},je=["x","y","font-size","font-weight","fill"],et={key:2},tt=["filter"],lt=["text-anchor","x","y","fill","font-size","font-weight"],at=["text-anchor","x","y","fill","font-size","font-weight"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["d","fill","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},st={key:0,class:"vue-ui-nested-donuts-legend-title"},ut=["onClick"],it=["innerHTML"],ct={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:me,emit:U}){const k=B,{vue_ui_nested_donuts:be}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),P=e.ref(""),ge=e.ref(null),Y=e.ref(0),w=e.ref(null),X=e.ref(null),D=e.ref(null),G=e.ref(null),H=e.ref(null),W=e.ref(0),J=e.ref(0),K=e.ref(0),x=e.ref(!1);function ke(l){x.value=l,Y.value+=1}const t=e.computed({get:()=>Q(),set:l=>l});function Q(){const l=ye.useNestedProp({userConfig:k.config,defaultConfig:be});return l.theme?{...ye.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),Z(),W.value+=1,J.value+=1,K.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=pe.throttle(()=>{const{width:s,height:o}=pe.useResponsive({chart:w.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:G.value,noTitle:H.value});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=he.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Le=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function we({datapoint:l,index:s}){U("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||Le.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Be(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(ae.value);e.watch(()=>ae.value,l=>c.value=l);const oe=e.ref(null),ne=e.ref(null);function z(l){U("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Be(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(oe.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),oe.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ne.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ne.value=requestAnimationFrame(i))};i()}}const O=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),re=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,O.value)}})),se=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ue=e.ref(null),S=e.ref(null),E=e.ref(null),I=e.ref(null);function xe({datapoint:l,_relativeIndex:s,seriesIndex:o}){ue.value=l.arcOfId,S.value=l.id,E.value=o,I.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as g, ref as i, watch as ze, onMounted as et, onBeforeUnmount as tt, openBlock as s, createElementBlock as n, normalizeClass as P, normalizeStyle as re, createBlock as D, createCommentVNode as v, unref as r, createSlots as lt, withCtx as m, renderSlot as k, normalizeProps as R, guardReactiveProps as E, createVNode as Ve, createElementVNode as p, Fragment as L, renderList as F, toDisplayString as N, createTextVNode as Q, nextTick as at, pushScopeId as ot, popScopeId as st } from "vue";
|
|
2
|
-
import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as V, b as ct, I as Me, d as vt, m as Be, f as x, X as ft, s as Ue, K as ht, k as M, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-
|
|
2
|
+
import { u as ut, c as nt, t as rt, a as it, p as Z, o as dt, e as V, b as ct, I as Me, d as vt, m as Be, f as x, X as ft, s as Ue, K as ht, k as M, n as ie, i as G, x as Re, y as yt, q as pt, r as bt } from "./index-Dy5GrFF-.js";
|
|
3
3
|
import { t as gt, u as mt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as kt } from "./Title-
|
|
5
|
-
import { u as wt, U as _t } from "./usePrinter-
|
|
6
|
-
import { D as $t } from "./DataTable-
|
|
7
|
-
import { _ as Lt } from "./Tooltip-
|
|
8
|
-
import { L as xt } from "./Legend-
|
|
9
|
-
import Ct from "./vue-ui-skeleton-
|
|
10
|
-
import Tt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ee } from "./useNestedProp-
|
|
12
|
-
import { _ as Ft } from "./PackageVersion-
|
|
13
|
-
import { P as St } from "./PenAndPaper-
|
|
4
|
+
import { _ as kt } from "./Title-JeqRfl2Z.js";
|
|
5
|
+
import { u as wt, U as _t } from "./usePrinter-B_9DGtW7.js";
|
|
6
|
+
import { D as $t } from "./DataTable-aYqFUYEK.js";
|
|
7
|
+
import { _ as Lt } from "./Tooltip-DKlw-Q8v.js";
|
|
8
|
+
import { L as xt } from "./Legend-B_Euf5BX.js";
|
|
9
|
+
import Ct from "./vue-ui-skeleton-lqzNF24A.js";
|
|
10
|
+
import Tt from "./vue-ui-accordion-BmJX_0Fc.js";
|
|
11
|
+
import { u as Ee } from "./useNestedProp-Be6ZIo5i.js";
|
|
12
|
+
import { _ as Ft } from "./PackageVersion-DFaMeCN6.js";
|
|
13
|
+
import { P as St } from "./PenAndPaper-DxGFlSh0.js";
|
|
14
14
|
import { _ as Nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const de = (B) => (ot("data-v-038450b3"), B = B(), st(), B), It = ["id"], At = ["xmlns", "viewBox"], Ot = ["id"], Pt = /* @__PURE__ */ de(() => /* @__PURE__ */ p("stop", {
|
|
16
16
|
offset: "0%",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as d, ref as s, watch as ye, onMounted as ze, onBeforeUnmount as Ye, openBlock as n, createElementBlock as u, normalizeClass as V, normalizeStyle as q, createBlock as C, createCommentVNode as g, unref as v, createSlots as Be, withCtx as h, renderSlot as f, normalizeProps as S, guardReactiveProps as M, createVNode as me, Fragment as F, renderList as N, createElementVNode as _, toDisplayString as O, createTextVNode as Ve, nextTick as Xe } from "vue";
|
|
2
|
-
import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-
|
|
2
|
+
import { u as Ge, c as Ue, t as Ee, a as He, p as be, b as We, o as je, e as J, d as qe, X as Je, f as R, i as K, x as ke, q as Ke, r as Qe, y as Ze } from "./index-Dy5GrFF-.js";
|
|
3
3
|
import { t as et, u as tt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as lt, U as ot } from "./usePrinter-
|
|
6
|
-
import { L as rt } from "./Legend-
|
|
7
|
-
import { D as nt } from "./DataTable-
|
|
8
|
-
import { _ as st } from "./Tooltip-
|
|
9
|
-
import ut from "./vue-ui-skeleton-
|
|
10
|
-
import it from "./vue-ui-accordion-
|
|
11
|
-
import { u as $e } from "./useNestedProp-
|
|
12
|
-
import { _ as ct } from "./PackageVersion-
|
|
13
|
-
import { P as dt } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-JeqRfl2Z.js";
|
|
5
|
+
import { u as lt, U as ot } from "./usePrinter-B_9DGtW7.js";
|
|
6
|
+
import { L as rt } from "./Legend-B_Euf5BX.js";
|
|
7
|
+
import { D as nt } from "./DataTable-aYqFUYEK.js";
|
|
8
|
+
import { _ as st } from "./Tooltip-DKlw-Q8v.js";
|
|
9
|
+
import ut from "./vue-ui-skeleton-lqzNF24A.js";
|
|
10
|
+
import it from "./vue-ui-accordion-BmJX_0Fc.js";
|
|
11
|
+
import { u as $e } from "./useNestedProp-Be6ZIo5i.js";
|
|
12
|
+
import { _ as ct } from "./PackageVersion-DFaMeCN6.js";
|
|
13
|
+
import { P as dt } from "./PenAndPaper-DxGFlSh0.js";
|
|
14
14
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const ht = ["id"], ft = ["xmlns", "viewBox"], gt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], pt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], yt = ["id"], mt = ["stdDeviation"], bt = ["filter"], kt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], wt = { key: 1 }, Ct = ["onMouseenter"], xt = ["x", "y", "font-size", "fill", "font-weight"], Tt = {
|
|
16
16
|
key: 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BUVOYVSk.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ye=require("./Title-4bXfWbx8.cjs"),ee=require("./usePrinter-BGq-7Twb.cjs"),ke=require("./Legend-BmTkHhIn.cjs"),be=require("./DataTable-CHfZ1IEy.cjs"),Ce=require("./Tooltip-BheHY6dV.cjs"),we=require("./vue-ui-skeleton-B_yz8Eus.cjs"),$e=require("./vue-ui-accordion-r9LcXEYX.cjs"),te=require("./useNestedProp-nko1Exy-.cjs"),xe=require("./PackageVersion-D6vG-BXj.cjs"),Be=require("./PenAndPaper-i3jYHWwR.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Se=["xmlns","viewBox"],_e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ne=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Oe=["id"],Ve=["stdDeviation"],Ae=["filter"],Ee=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Fe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ie={key:1},Le=["onMouseenter"],Me=["x","y","font-size","fill","font-weight"],Re={key:5,class:"vue-data-ui-watermark"},De=["onClick"],ze=["innerHTML"],qe={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ae,{expose:le,emit:oe}){const p=ae,{vue_ui_onion:re}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ne=e.ref(null),E=e.ref(0),$=e.ref(!1),P=e.ref(""),d=e.ref([]),y=e.ref(null),F=e.ref(null),I=e.ref(null),L=e.ref(null),M=e.ref(null),R=e.ref(0),D=e.ref(0),z=e.ref(0),t=e.computed({get:()=>q(),set:a=>a});function q(){const a=te.useNestedProp({userConfig:p.config,defaultConfig:re});return a.theme?{...te.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}e.watch(()=>p.config,a=>{t.value=q(),H(),R.value+=1,D.value+=1,z.value+=1},{deep:!0});const{isPrinting:Y,isImaging:X,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),se=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{H()});function H(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=Z.throttle(()=>{const{width:l,height:o}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:L.value,noTitle:M.value});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((a,r)=>{[null,void 0].includes(a.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(a.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((a,r)=>{const l=`onion_serie_${r}_${m.value}`;return{...a,percentage:a.percentage||0,targetPercentage:a.percentage||0,color:u.convertColorToHex(a.color)||se.value[r]||u.palette[r],id:l,shape:"circle",opacity:d.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>W(l),isSegregated:d.value.includes(l)}}))),k=e.ref(i.value),ie=e.computed(()=>t.value.useStartAnimation),ce=e.ref(null),de=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),S=e.ref(!1);e.watch(()=>i.value,ve,{immediate:!0});function ve(){if(ie.value&&!S.value){let r=function(){a>=de.value?(cancelAnimationFrame(ce.value),k.value=i.value,S.value=!0):(k.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),S.value=!0)};k.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else k.value=i.value}const he=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),pe=e.computed(()=>i.value.filter(a=>!d.value.includes(a.id)).length),g=e.computed(()=>{const a=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.gutter.width,track:(a>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:a)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>k.value.filter(a=>!d.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/pe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:fe(l,a.percentage||0)}}));function fe(a,r){const l=2*Math.PI*a,o=l*.75,c=`${o} ${l}`,C=o*(1-r/100);return{bgDashArray:`${o} ${l}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-a}
|
|
3
3
|
A ${a},${a} 0 1 1
|
|
4
4
|
${s.value.centerX+a*Math.cos(Math.PI*3/4)},${s.value.centerY+a*Math.sin(Math.PI*3/4)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as f, ref as c, watch as je, onMounted as Ue, onBeforeUnmount as Ve, openBlock as u, createElementBlock as r, normalizeClass as U, normalizeStyle as T, createBlock as z, createCommentVNode as m, unref as M, createSlots as Ge, withCtx as x, renderSlot as b, normalizeProps as W, guardReactiveProps as E, createVNode as $e, Fragment as C, renderList as I, createElementVNode as P, toDisplayString as L, createTextVNode as He } from "vue";
|
|
2
|
-
import { u as Xe, c as Z, t as Ye, a as qe, p as V, o as Qe, e as Ae, g as Je, b as Ke, d as Ze, C as et, Q as tt, R as at, S as lt, X as ot, x as _e, i as Te, f as ze, y as st, q as nt, r as ut, E as G } from "./index-
|
|
2
|
+
import { u as Xe, c as Z, t as Ye, a as qe, p as V, o as Qe, e as Ae, g as Je, b as Ke, d as Ze, C as et, Q as tt, R as at, S as lt, X as ot, x as _e, i as Te, f as ze, y as st, q as nt, r as ut, E as G } from "./index-Dy5GrFF-.js";
|
|
3
3
|
import { t as rt, u as it } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as ct } from "./Title-
|
|
5
|
-
import { L as vt } from "./Legend-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import { _ as ht } from "./Shape-
|
|
8
|
-
import { u as pt, U as mt } from "./usePrinter-
|
|
9
|
-
import { D as yt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import gt from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Me } from "./useNestedProp-
|
|
13
|
-
import { _ as bt } from "./PackageVersion-
|
|
14
|
-
import { P as xt } from "./PenAndPaper-
|
|
4
|
+
import { _ as ct } from "./Title-JeqRfl2Z.js";
|
|
5
|
+
import { L as vt } from "./Legend-B_Euf5BX.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-DKlw-Q8v.js";
|
|
7
|
+
import { _ as ht } from "./Shape-BBk-Sd19.js";
|
|
8
|
+
import { u as pt, U as mt } from "./usePrinter-B_9DGtW7.js";
|
|
9
|
+
import { D as yt } from "./DataTable-aYqFUYEK.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-BmJX_0Fc.js";
|
|
11
|
+
import gt from "./vue-ui-skeleton-lqzNF24A.js";
|
|
12
|
+
import { u as Me } from "./useNestedProp-Be6ZIo5i.js";
|
|
13
|
+
import { _ as bt } from "./PackageVersion-DFaMeCN6.js";
|
|
14
|
+
import { P as xt } from "./PenAndPaper-DxGFlSh0.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Ct = ["id"], wt = ["xmlns", "viewBox"], $t = { style: { "pointer-events": "none" } }, At = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "fill", "font-size", "font-weight"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zt = ["x", "y", "fill", "font-size", "font-weight"], Mt = { key: 0 }, It = ["x", "y", "font-size", "fill"], Pt = ["width", "x", "y"], Ft = { style: { width: "100%" } }, Nt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], St = ["d", "stroke", "stroke-width", "onMouseenter"], Lt = {
|
|
17
17
|
key: 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BUVOYVSk.cjs"),se=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-4bXfWbx8.cjs"),Ce=require("./Legend-BmTkHhIn.cjs"),we=require("./Tooltip-BheHY6dV.cjs"),Be=require("./Shape-DFFQ_70v.cjs"),re=require("./usePrinter-BGq-7Twb.cjs"),$e=require("./DataTable-CHfZ1IEy.cjs"),Se=require("./vue-ui-accordion-r9LcXEYX.cjs"),ze=require("./vue-ui-skeleton-B_yz8Eus.cjs"),ie=require("./useNestedProp-nko1Exy-.cjs"),Ne=require("./PackageVersion-D6vG-BXj.cjs"),Ae=require("./PenAndPaper-i3jYHWwR.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],_e=["xmlns","viewBox"],Fe={style:{"pointer-events":"none"}},Me=["x1","x2","y1","y2","stroke","stroke-width"],Ee=["x","y","fill","font-size","font-weight"],Le=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","fill","font-size","font-weight"],Ve={key:0},Oe=["x","y","font-size","fill"],De=["width","x","y"],qe={style:{width:"100%"}},Re=["x","y","fill","font-weight","font-size","onMouseenter"],Ue=["d","stroke","stroke-width","onMouseenter"],We={key:5,class:"vue-data-ui-watermark"},je=["onClick"],He=["innerHTML"],Ge={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ue,{expose:ce,emit:L}){const b=ue,{vue_ui_parallel_coordinate_plot:de}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),I=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),R=e.ref(0),U=e.ref(0),W=e.ref(0),A=e.ref(i.createUid()),B=e.ref(!1);function ve(l){B.value=l,I.value+=1}const t=e.computed({get:()=>j(),set:l=>l});function j(){const l=ie.useNestedProp({userConfig:b.config,defaultConfig:de});return l.theme?{...ie.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=j(),H(),R.value+=1,W.value+=1,U.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{H()});function H(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=se.throttle(()=>{const{width:o,height:a}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});c.value.width=o,c.value.height=a,c.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(l),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:G,isImaging:Y,generatePdf:X,generateImage:J}=re.usePrinter({elementId:`pcp_${A.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),he=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function K(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||he.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),me=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>K(l.id),isSegregated:f.value.includes(l.id)}))),ye=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),Q=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/Q.value),T=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),h=e.computed(()=>{let l=[];for(let o=0;o<Q.value;o+=1){const a=Math.min(...T.value.flatMap(v=>v.series.map(N=>N.values[o]||0)||0)),n=Math.max(...T.value.flatMap(v=>v.series.map(N=>N.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,N)=>{const be=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ke=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(be/ke),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),P=e.computed(()=>T.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function Z({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const p=e.ref(null),_=e.ref(null),$=e.ref(!1),F=e.ref("");function M({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},$.value=!0,p.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}))?F.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|