vue-data-ui 2.3.60 → 2.3.62
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-BJ47KXjY.js → Arrow-Dho8ylDy.js} +1 -1
- package/dist/{Arrow-VxZlHkwt.cjs → Arrow-ov-EIAPu.cjs} +1 -1
- package/dist/{BaseIcon-Bv5uh10R.cjs → BaseIcon-B6v-Txn-.cjs} +1 -1
- package/dist/{BaseIcon-Fm7sUbd2.js → BaseIcon-BNStcP8c.js} +1 -1
- package/dist/{DataTable-1VV0us-8.js → DataTable-luIjNnne.js} +2 -2
- package/dist/{DataTable-CPAt686N.cjs → DataTable-yf_eyv8c.cjs} +1 -1
- package/dist/{Legend-BJ2Mynop.cjs → Legend-6JY5pUsT.cjs} +1 -1
- package/dist/{Legend-DB6v_LvZ.js → Legend-B9dawQa7.js} +1 -1
- package/dist/{Shape-DWZSJJ6-.cjs → Shape-BoXM3HKY.cjs} +1 -1
- package/dist/{Shape-B_f1_6Ob.js → Shape-BsAETTif.js} +1 -1
- package/dist/Slicer-DoMAeSUY.cjs +1 -0
- package/dist/{Slicer-CHiUxRAh.js → Slicer-iGmqxtRQ.js} +51 -54
- package/dist/{Title-CR-JDJwq.cjs → Title-CBcoQe02.cjs} +1 -1
- package/dist/{Title-xP0rAF4q.js → Title-fb3BzoXj.js} +1 -1
- package/dist/{Tooltip-B4DNihSF.cjs → Tooltip-BhuD1Kc5.cjs} +1 -1
- package/dist/{Tooltip-DfBa_7Ur.js → Tooltip-CBugtvWB.js} +5 -5
- package/dist/{index-CpHoINpJ.js → index-BshV7sX1.js} +538 -515
- package/dist/{index-CDK3omwG.cjs → index-D2ZScauW.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BOjw3Yqn.js → useNestedProp-B235bkr5.js} +1 -1
- package/dist/{useNestedProp-CaaW8JIS.cjs → useNestedProp-BU7yyXFA.cjs} +1 -1
- package/dist/{usePrinter-BHy-mfVg.js → usePrinter-Culo-aKo.js} +1 -1
- package/dist/{usePrinter-vQu-8tRD.cjs → usePrinter-eqT4IYET.cjs} +1 -1
- package/dist/{vue-data-ui-Ccdrn4OV.cjs → vue-data-ui-B7ebF4_E.cjs} +1 -1
- package/dist/{vue-data-ui-Dcg7DPMn.js → vue-data-ui-aJ6K70wA.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BqtnNU7h.js → vue-ui-3d-bar-BYgxIW27.js} +7 -7
- package/dist/{vue-ui-3d-bar-DdBlV5AX.cjs → vue-ui-3d-bar-DFv8qpsI.cjs} +1 -1
- package/dist/{vue-ui-accordion-BZloYo0L.js → vue-ui-accordion-B6AxEnAr.js} +3 -3
- package/dist/{vue-ui-accordion-EVAolVkD.cjs → vue-ui-accordion-BhCJcWDd.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BBRjCRtS.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CTxkOn4v.js → vue-ui-age-pyramid-yZrvdnPP.js} +226 -226
- package/dist/{vue-ui-annotator-D_AK0JCi.cjs → vue-ui-annotator-CEVmAufb.cjs} +1 -1
- package/dist/{vue-ui-annotator-BDWKiQ6S.js → vue-ui-annotator-ZKUlOqUq.js} +1 -1
- package/dist/{vue-ui-candlestick-CIKgu0F2.cjs → vue-ui-candlestick-CUNLZRIM.cjs} +2 -2
- package/dist/{vue-ui-candlestick-ByA9FGZb.js → vue-ui-candlestick-De4WgpPk.js} +158 -158
- package/dist/{vue-ui-carousel-table-ez9gbOZ7.cjs → vue-ui-carousel-table-C968uL6J.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnYxbq5A.js → vue-ui-carousel-table-DJ0AWPea.js} +4 -4
- package/dist/{vue-ui-chestnut-BumsSmCv.js → vue-ui-chestnut-Cl0UKWsI.js} +65 -64
- package/dist/{vue-ui-chestnut-CnYqa2Fx.cjs → vue-ui-chestnut-DmjmL02K.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-4-MMw7.js → vue-ui-cursor-BWyE3tgm.js} +2 -2
- package/dist/{vue-ui-cursor-Drl8jibt.cjs → vue-ui-cursor-D5XEblLW.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CX0jA181.cjs → vue-ui-dashboard-BJLi81kg.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_iV-3hq.js → vue-ui-dashboard-D9dQIIti.js} +2 -2
- package/dist/{vue-ui-digits-DMhl9plv.js → vue-ui-digits-DkYpomD9.js} +2 -2
- package/dist/{vue-ui-digits-RAZl_4Kb.cjs → vue-ui-digits-IIiSTczs.cjs} +1 -1
- package/dist/{vue-ui-donut-BG28U01c.cjs → vue-ui-donut-Bq66xmG0.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DPU-Nd8y.js → vue-ui-donut-evolution-Bto1ZaWx.js} +95 -95
- package/dist/vue-ui-donut-evolution-CNVUtEEk.cjs +1 -0
- package/dist/{vue-ui-donut-BpQC9-Uz.js → vue-ui-donut-uujhj36t.js} +42 -42
- package/dist/vue-ui-dumbbell-CLNVYG0j.cjs +9 -0
- package/dist/{vue-ui-dumbbell-C4JnuC1b.js → vue-ui-dumbbell-D6Xyfvff.js} +72 -72
- package/dist/vue-ui-flow-BwrqexSU.cjs +1 -0
- package/dist/vue-ui-flow-Cg4oKZz8.js +469 -0
- package/dist/{vue-ui-galaxy-148JtEdK.js → vue-ui-galaxy-D_s9dfYN.js} +91 -91
- package/dist/vue-ui-galaxy-DixlciaO.cjs +1 -0
- package/dist/{vue-ui-gauge-DOJ98R_N.js → vue-ui-gauge-DGQVW6UO.js} +84 -84
- package/dist/vue-ui-gauge-Jse5ZYyj.cjs +1 -0
- package/dist/{vue-ui-gizmo-KeWvd226.js → vue-ui-gizmo-DDTaLaSI.js} +2 -2
- package/dist/{vue-ui-gizmo-a6WNWyf7.cjs → vue-ui-gizmo-sgq75uBG.cjs} +1 -1
- package/dist/vue-ui-heatmap-4-gnNgQ_.cjs +1 -0
- package/dist/{vue-ui-heatmap-BGsSOTPJ.js → vue-ui-heatmap-Dvd5ZGVw.js} +257 -239
- package/dist/{vue-ui-kpi-Dhah6Fgx.cjs → vue-ui-kpi-Co1WqN3k.cjs} +1 -1
- package/dist/{vue-ui-kpi-Leb1rK38.js → vue-ui-kpi-aLwUkIjv.js} +3 -3
- package/dist/{vue-ui-mini-loader-BLH4ncUB.js → vue-ui-mini-loader-Bm2xpTIh.js} +2 -2
- package/dist/{vue-ui-mini-loader-Dpa9uYkn.cjs → vue-ui-mini-loader-D98KCpoT.cjs} +1 -1
- package/dist/{vue-ui-molecule-DjvOvDUa.cjs → vue-ui-molecule-C3-9ojnv.cjs} +1 -1
- package/dist/{vue-ui-molecule-DuPAOQcj.js → vue-ui-molecule-Dv4hYPVd.js} +20 -20
- package/dist/{vue-ui-mood-radar-AOHK6R10.cjs → vue-ui-mood-radar-Dh3Q2NiI.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BmcIz0JR.js → vue-ui-mood-radar-DsIPsXTh.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CMmcmAd9.cjs → vue-ui-nested-donuts-CFC8tyGY.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-BYLc86qs.js → vue-ui-nested-donuts-CZ9vcclX.js} +120 -120
- package/dist/{vue-ui-onion-BjG8xbMh.cjs → vue-ui-onion-BLV33CBr.cjs} +1 -1
- package/dist/{vue-ui-onion-shZ4g9mJ.js → vue-ui-onion-CI9ARfRM.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-O7lS6u2q.cjs → vue-ui-parallel-coordinate-plot-CIhpHeCI.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-wv0O9t7U.js → vue-ui-parallel-coordinate-plot-CxzFJuza.js} +69 -69
- package/dist/{vue-ui-quadrant-CuB8sYgF.cjs → vue-ui-quadrant-CS3LAiCu.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BRF5Czj4.js → vue-ui-quadrant-DenUcNcS.js} +36 -36
- package/dist/{vue-ui-quick-chart-BQdUHrm2.js → vue-ui-quick-chart-BdpKv0ES.js} +549 -515
- package/dist/vue-ui-quick-chart-UxaO0jzI.cjs +15 -0
- package/dist/vue-ui-radar-CQ-LymAS.cjs +1 -0
- package/dist/{vue-ui-radar-CLUs0tD9.js → vue-ui-radar-Dd24aGwh.js} +59 -59
- package/dist/{vue-ui-rating-Dcy1l1PB.js → vue-ui-rating-CQWK2lk1.js} +9 -9
- package/dist/{vue-ui-rating-CA25nHJe.cjs → vue-ui-rating-DTuDjrt8.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DC-RFa9X.js → vue-ui-relation-circle-BcOzK8Iz.js} +5 -5
- package/dist/{vue-ui-relation-circle-Drr6Gdnq.cjs → vue-ui-relation-circle-DMhNCwpg.cjs} +1 -1
- package/dist/vue-ui-rings--pu1fIcl.cjs +2 -0
- package/dist/{vue-ui-rings-DbPbelCU.js → vue-ui-rings-yyFx2W1b.js} +188 -185
- package/dist/{vue-ui-scatter-D2jYZ4Wu.js → vue-ui-scatter-BV4sXNqz.js} +378 -375
- package/dist/{vue-ui-scatter-xyLvaw0d.cjs → vue-ui-scatter-CrmsJjjl.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DXCBzrPZ.js → vue-ui-screenshot-C6wYv3cc.js} +6 -6
- package/dist/{vue-ui-screenshot-DGqjaE1x.cjs → vue-ui-screenshot-eoAWixSo.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DuM6yey6.js → vue-ui-skeleton-7qakoAGH.js} +23 -23
- package/dist/{vue-ui-skeleton-DRDC3yxK.cjs → vue-ui-skeleton-BLhbQje-.cjs} +1 -1
- package/dist/{vue-ui-smiley-DQrvx_S9.js → vue-ui-smiley-DG3_ORXA.js} +2 -2
- package/dist/{vue-ui-smiley-BCmY1siL.cjs → vue-ui-smiley-sS92V85O.cjs} +1 -1
- package/dist/vue-ui-spark-trend-C9Ii4Ue5.cjs +1 -0
- package/dist/vue-ui-spark-trend-D8_rEspZ.js +251 -0
- package/dist/{vue-ui-sparkbar-C_vNsxM_.cjs → vue-ui-sparkbar-CQz9GWxh.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DiU5Yt-V.js → vue-ui-sparkbar-DuNNnbs9.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BnF9Vbs0.js → vue-ui-sparkgauge-Buo2ms6b.js} +64 -64
- package/dist/vue-ui-sparkgauge-Dxsnkehz.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-BUBwn9A4.cjs → vue-ui-sparkhistogram-Cw-w_Rhv.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CsOfCo_3.js → vue-ui-sparkhistogram-edeeQ1HN.js} +4 -4
- package/dist/{vue-ui-sparkline-CoUeD8Np.cjs → vue-ui-sparkline-Cyddej9t.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B628G3Nl.js → vue-ui-sparkline-DGIqGoR2.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cr-Q7uDo.cjs → vue-ui-sparkstackbar-DN0XiDpQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DIHGbrF5.js → vue-ui-sparkstackbar-G7Ojd39B.js} +3 -3
- package/dist/{vue-ui-stackbar-DCbJhdZy.js → vue-ui-stackbar-CfK9lv_E.js} +35 -35
- package/dist/{vue-ui-stackbar-DMyP3IRK.cjs → vue-ui-stackbar-kiZ9J1eh.cjs} +1 -1
- package/dist/vue-ui-strip-plot-Bd4NwUia.cjs +1 -0
- package/dist/{vue-ui-strip-plot-CNb3VtYF.js → vue-ui-strip-plot-d-bNHZDG.js} +64 -64
- package/dist/{vue-ui-table-CjuXpy2d.cjs → vue-ui-table-ChORiy2h.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D6px_Z1a.cjs → vue-ui-table-heatmap-BcA1TmV1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-nbBDuSiw.js → vue-ui-table-heatmap-BcPqaYXz.js} +26 -26
- package/dist/{vue-ui-table-BqcI8E7E.js → vue-ui-table-ipCsGZPx.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Blbaz2zX.js → vue-ui-table-sparkline-BwwiWOX_.js} +13 -13
- package/dist/{vue-ui-table-sparkline-CqNPx5Zw.cjs → vue-ui-table-sparkline-dXyBTv6X.cjs} +1 -1
- package/dist/vue-ui-thermometer-DpWtOskJ.cjs +1 -0
- package/dist/{vue-ui-thermometer-BCGHbgj9.js → vue-ui-thermometer-U5IIot6j.js} +116 -116
- package/dist/{vue-ui-timer-BjqbxjQO.cjs → vue-ui-timer-DqVQjRdU.cjs} +1 -1
- package/dist/{vue-ui-timer-DhpBvc_5.js → vue-ui-timer-cCfNkOpe.js} +4 -4
- package/dist/{vue-ui-tiremarks-CNhB7Iqe.js → vue-ui-tiremarks-BcXrnO0N.js} +71 -71
- package/dist/vue-ui-tiremarks-C8pNPR_E.cjs +1 -0
- package/dist/vue-ui-treemap-24TuOX-H.cjs +1 -0
- package/dist/{vue-ui-treemap-C4memkYu.js → vue-ui-treemap-CVCaxcwW.js} +89 -82
- package/dist/{vue-ui-vertical-bar-LZ-GMZ2T.js → vue-ui-vertical-bar-Cuz2Qxi6.js} +246 -242
- package/dist/vue-ui-vertical-bar-kZxc3vG5.cjs +4 -0
- package/dist/{vue-ui-waffle-Cd4IU62n.js → vue-ui-waffle-BVFZf7mm.js} +44 -44
- package/dist/{vue-ui-waffle-CtY5CSX9.cjs → vue-ui-waffle-X-mNfs6F.cjs} +1 -1
- package/dist/{vue-ui-wheel-Do3pWPFB.cjs → vue-ui-wheel-CWOh-9CT.cjs} +1 -1
- package/dist/{vue-ui-wheel-CaEAQhJt.js → vue-ui-wheel-SUtbKs4l.js} +5 -5
- package/dist/vue-ui-word-cloud-BE_jkp2h.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BSalPYqO.js → vue-ui-word-cloud-DAa0far7.js} +68 -65
- package/dist/vue-ui-xy-BTocPMsA.cjs +3 -0
- package/dist/{vue-ui-xy-C7tpVpGu.js → vue-ui-xy-B_dmMYPU.js} +82 -82
- package/dist/vue-ui-xy-canvas-BtuD8xjy.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-rHcYmvec.js → vue-ui-xy-canvas-jq1j84oA.js} +122 -121
- package/package.json +1 -1
- package/dist/Slicer-PPS43jOo.cjs +0 -1
- package/dist/vue-ui-age-pyramid-Ce3DbeqC.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BWvrYKlH.cjs +0 -1
- package/dist/vue-ui-dumbbell-2Lsks-8o.cjs +0 -9
- package/dist/vue-ui-flow-DBhdVKxF.cjs +0 -1
- package/dist/vue-ui-flow-DSdWqWgh.js +0 -465
- package/dist/vue-ui-galaxy-BMsdd9Rh.cjs +0 -1
- package/dist/vue-ui-gauge-fVk9B_1W.cjs +0 -1
- package/dist/vue-ui-heatmap-DFpSo2gr.cjs +0 -1
- package/dist/vue-ui-quick-chart-DsVFRO68.cjs +0 -15
- package/dist/vue-ui-radar-lcS6n5TC.cjs +0 -1
- package/dist/vue-ui-rings-DxqSAs9h.cjs +0 -2
- package/dist/vue-ui-spark-trend-B9PR0wxN.js +0 -251
- package/dist/vue-ui-spark-trend-Kj1bJmBL.cjs +0 -1
- package/dist/vue-ui-sparkgauge-SlYA1lqc.cjs +0 -1
- package/dist/vue-ui-strip-plot-Da_TQpOq.cjs +0 -1
- package/dist/vue-ui-thermometer-coTC0T6k.cjs +0 -1
- package/dist/vue-ui-tiremarks-DgbTo_Cb.cjs +0 -1
- package/dist/vue-ui-treemap-B5moKzuO.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DtkGW5Tk.cjs +0 -4
- package/dist/vue-ui-word-cloud-pzaBe3Et.cjs +0 -1
- package/dist/vue-ui-xy-BgLF5ZNP.cjs +0 -3
- package/dist/vue-ui-xy-canvas-OuDGiOOW.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CDK3omwG.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-CR-JDJwq.cjs"),X=require("./usePrinter-vQu-8tRD.cjs"),ie=require("./Legend-BJ2Mynop.cjs"),ce=require("./DataTable-CPAt686N.cjs"),de=require("./Tooltip-B4DNihSF.cjs"),ve=require("./vue-ui-skeleton-DRDC3yxK.cjs"),he=require("./vue-ui-accordion-EVAolVkD.cjs"),G=require("./useNestedProp-CaaW8JIS.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=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(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.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})}),f.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)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=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":""})),oe=e.computed(()=>i.value.filter(a=>!c.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}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:a,body:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;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><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.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:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-D2ZScauW.cjs"),U=require("./useResponsive-B3TrDDIG.cjs"),se=require("./Title-CBcoQe02.cjs"),X=require("./usePrinter-eqT4IYET.cjs"),ie=require("./Legend-6JY5pUsT.cjs"),ce=require("./DataTable-yf_eyv8c.cjs"),de=require("./Tooltip-BhuD1Kc5.cjs"),ve=require("./vue-ui-skeleton-BLhbQje-.cjs"),he=require("./vue-ui-accordion-BhCJcWDd.cjs"),G=require("./useNestedProp-BU7yyXFA.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ge=["xmlns","viewBox"],me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],ye=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],be=["id"],ke=["stdDeviation"],we=["filter"],Ce=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],xe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],$e={key:1},Be=["onMouseenter"],Te=["x","y","font-size","fill","font-weight"],Se={key:3,class:"vue-data-ui-watermark"},Pe=["onClick"],_e=["innerHTML"],Ne={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(H,{expose:W,emit:j}){const f=H,{vue_ui_onion:J}=u.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),K=e.ref(null),F=e.ref(0),C=e.ref(!1),B=e.ref(""),c=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),t=e.computed(()=>{const a=G.useNestedProp({userConfig:f.config,defaultConfig:J});return a.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_onion[a.theme]||f.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}),{isPrinting:E,isImaging:L,generatePdf:D,generateImage:M}=X.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),Q=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),p=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(()=>{if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=U.throttle(()=>{const{width:l,height:o}=U.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});n.value.width=l,n.value.height=o,n.value.padding.top=Math.max(l,o)*.125,n.value.padding.right=Math.max(l,o)*.125,n.value.padding.bottom=Math.max(l,o)*.125,n.value.padding.left=Math.max(l,o)*.125,n.value.minRadius=Math.min(l,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.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})}),f.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)||Q.value[r]||u.palette[r],id:l,shape:"circle",opacity:c.value.includes(l)?.5:1,absoluteIndex:r,segregate:()=>R(l),isSegregated:c.value.includes(l)}}))),b=e.ref(i.value),Z=e.computed(()=>t.value.useStartAnimation),ee=e.ref(null),te=e.computed(()=>Math.max(...i.value.map(a=>a.percentage))),T=e.ref(!1);e.watch(()=>i.value,le,{immediate:!0});function le(){if(Z.value&&!T.value){let r=function(){a>=te.value?(cancelAnimationFrame(ee.value),b.value=i.value,T.value=!0):(b.value=i.value.map(l=>({...l,percentage:a<l.targetPercentage?a:l.targetPercentage})),a+=1,requestAnimationFrame(r),T.value=!0)};b.value=i.value.map(l=>({...l,percentage:0}));let a=0;r()}else b.value=i.value}const ae=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":""})),oe=e.computed(()=>i.value.filter(a=>!c.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}}),d=e.computed(()=>b.value.filter(a=>!c.value.includes(a.id)).map((a,r)=>{const l=(s.value.maxRadius-g.value.track)/oe.value/2*(1+r),o=s.value.centerY-l;return{percentage:a.percentage||0,...a,labelY:o,radius:l,path:re(l,a.percentage||0)}}));function re(a,r){const l=a*(1.5+(r/100>.3333333333333333?0:1-r/100))*Math.PI,o=a*1.5*Math.PI;return{bgDashArray:`${o} ${o}`,bgDashOffset:o-r/100*o,dashArray:`${l} ${l}`,dashOffset:l-r/100*l,fullOffset:0,active:`M${s.value.centerX},${s.value.centerY} A ${a},${a} 0 0 0 ${s.value.right},${s.value.top}`}}function R(a){c.value.includes(a)?c.value=c.value.filter(r=>r!==a):c.value.push(a),j("selectLegend",d.value)}function ne(){return d.value}const S=e.computed(()=>{const a=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=d.value.map(l=>[l.name,l.percentage,l.value]);return{head:a,body:r}}),$=e.computed(()=>{const a=S.value.head,r=d.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),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:a,body:r,config:l,colNames:a}});function z(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=S.value.head,l=S.value.body,o=a.concat([r]).concat(l),h=u.createCsvContent(o);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const v=e.ref(void 0),k=e.ref(!1);function ue(a){k.value=a,F.value+=1}const P=e.ref(null);function A({datapoint:a,seriesIndex:r,show:l=!0}){const o=a.absoluteIndex;v.value=r,P.value={datapoint:a,seriesIndex:o,series:i.value,config:t.value},C.value=l;let h="";const _=t.value.style.chart.tooltip.customFormat;if(u.isFunction(_)&&u.functionReturnsString(()=>_({seriesIndex:o,datapoint:a,series:i.value,config:t.value})))B.value=_({seriesIndex:o,datapoint:a,series:i.value,config:t.value});else{const N=t.value.style.chart.tooltip.showPercentage,O=t.value.style.chart.tooltip.showValue;h+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;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><span></span>${a.name}</span></div>`,h+=`<div style="width:100%;text-align:left;"><b>${N?u.dataLabel({p:"",v:a.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${N&&O?"(":""}${O?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,u.dataLabel({p:a.prefix||"",v:a.value,s:a.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:r}):""}${N&&O?")":""}</div>`,B.value=`<div>${h}</div>`}}function q(){p.value.showTable=!p.value.showTable}function Y(){p.value.showTooltip=!p.value.showTooltip}return W({getData:ne,generatePdf:D,generateCsv:z,generateImage:M,toggleTable:q,toggleTooltip:Y}),(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:y,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(se._sfc_main,{config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(E),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:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateCsv:z,onGenerateImage:e.unref(M),onToggleTable:q,onToggleTooltip:Y},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${n.value.width<=0?1e-4:n.value.width} ${n.value.height<=0?1e-4:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<0?1e-4:l.radius,stroke:`${l.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,ye))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ke)],8,be)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:0,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":l.path.dashArray,"stroke-dashoffset":l.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,Ce))),256))],8,we)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{"data-cy-trap":"",cx:s.value.centerX,cy:s.value.centerY,r:l.radius<=0?1e-4:l.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":l.path.bgDashArray,"stroke-dashoffset":l.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=h=>{v.value=void 0,C.value=!1})},null,40,xe))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:h=>A({datapoint:l,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=h=>{v.value=void 0,C.value=!1})},[c.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:l.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(v.value)&&v.value===o?l.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:l.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&l.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(u.dataLabel)({p:l.prefix||"",v:l.value||0,s:l.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:l,seriesIndex:o})})`:""}`),9,Te))],40,Be))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ie.Legend,{key:0,legendSet:i.value,config:ae.value,onClickMarker:r[2]||(r[2]=({legend:l})=>R(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>l.segregate(),style:e.normalizeStyle(`opacity:${c.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name?l.name+": ":"")+" "+e.toDisplayString((l.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Pe)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:p.value.showTooltip&&C.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:B.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(he.default,{key:5,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ce.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:r[3]||(r[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,_e)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Oe=pe._export_sfc(Ne,[["__scopeId","data-v-92cdbc16"]]);exports.default=Oe;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as d, ref as u, onMounted as Pe, onBeforeUnmount as Oe, watch as Ie, openBlock as s, createElementBlock as n, normalizeClass as D, normalizeStyle as L, createVNode as j, createCommentVNode as b, createBlock as z, unref as v, createSlots as Fe, withCtx as h, renderSlot as f, normalizeProps as B, guardReactiveProps as V, Fragment as I, renderList as F, createElementVNode as C, toDisplayString as T, createTextVNode as Se, nextTick as Me } from "vue";
|
|
2
|
-
import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J,
|
|
2
|
+
import { u as Ne, c as Re, t as Ae, a as De, p as ie, b as Le, o as ze, e as q, d as Be, X as Ve, f as S, i as J, x as ce, q as Ye, r as Xe, y as Ge } from "./index-BshV7sX1.js";
|
|
3
3
|
import { t as Ue, u as Ee } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as He } from "./Title-
|
|
5
|
-
import { u as We, U as je } from "./usePrinter-
|
|
6
|
-
import { L as qe } from "./Legend-
|
|
7
|
-
import { D as Je } from "./DataTable-
|
|
8
|
-
import { _ as Ke } from "./Tooltip-
|
|
9
|
-
import Qe from "./vue-ui-skeleton-
|
|
10
|
-
import Ze from "./vue-ui-accordion-
|
|
11
|
-
import { u as de } from "./useNestedProp-
|
|
4
|
+
import { _ as He } from "./Title-fb3BzoXj.js";
|
|
5
|
+
import { u as We, U as je } from "./usePrinter-Culo-aKo.js";
|
|
6
|
+
import { L as qe } from "./Legend-B9dawQa7.js";
|
|
7
|
+
import { D as Je } from "./DataTable-luIjNnne.js";
|
|
8
|
+
import { _ as Ke } from "./Tooltip-CBugtvWB.js";
|
|
9
|
+
import Qe from "./vue-ui-skeleton-7qakoAGH.js";
|
|
10
|
+
import Ze from "./vue-ui-accordion-B6AxEnAr.js";
|
|
11
|
+
import { u as de } from "./useNestedProp-B235bkr5.js";
|
|
12
12
|
import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const tt = ["id"], at = ["xmlns", "viewBox"], lt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ot = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], rt = ["id"], st = ["stdDeviation"], ut = ["filter"], nt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], it = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], ct = { key: 1 }, dt = ["onMouseenter"], vt = ["x", "y", "font-size", "fill", "font-weight"], ht = {
|
|
14
14
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-D2ZScauW.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),de=require("./Title-CBcoQe02.cjs"),ve=require("./Legend-6JY5pUsT.cjs"),he=require("./Tooltip-BhuD1Kc5.cjs"),pe=require("./Shape-BoXM3HKY.cjs"),Q=require("./usePrinter-eqT4IYET.cjs"),me=require("./DataTable-yf_eyv8c.cjs"),ye=require("./vue-ui-accordion-BhCJcWDd.cjs"),fe=require("./vue-ui-skeleton-BLhbQje-.cjs"),Z=require("./useNestedProp-BU7yyXFA.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],ke=["xmlns","viewBox"],xe={style:{"pointer-events":"none"}},Ce=["x1","x2","y1","y2","stroke","stroke-width"],we=["x","y","fill","font-size","font-weight"],Be=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","fill","font-size","font-weight"],$e={key:0},Se=["x","y","font-size","fill"],Ne=["width","x","y"],Te={style:{width:"100%"}},Fe=["x","y","fill","font-weight","font-size","onMouseenter"],_e=["d","stroke","stroke-width","onMouseenter"],Pe={key:3,class:"vue-data-ui-watermark"},Ae=["onClick"],Me=["innerHTML"],Le={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ee,{expose:te,emit:M}){const k=ee,{vue_ui_parallel_coordinate_plot:le}=i.useConfig(),x=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),N=e.ref(i.createUid()),B=e.ref(!1);function ae(a){B.value=a,L.value+=1}const t=e.computed(()=>{const a=Z.useNestedProp({userConfig:k.config,defaultConfig:le});return a.theme?{...Z.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[a.theme]||k.config,defaultConfig:a}),customPalette:i.themePalettes[a.theme]||i.palette}:a}),$=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(k.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):k.dataset.forEach((a,o)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","series"]}).forEach(l=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.responsive){const a=K.throttle(()=>{const{width:o,height:l}=K.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=l,c.value.plotSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,l),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(a),$.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:V,isImaging:D,generatePdf:O,generateImage:q}=Q.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:a,right:o,bottom:l,left:s}=t.value.style.chart.padding,r=c.value.height,n=c.value.width;return{chartHeight:r,chartWidth:n,height:r-a-l,width:n-s-o,top:a,left:s,right:n-o,bottom:r-l}}),oe=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 R(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a)}const b=e.computed(()=>k.dataset.map((a,o)=>{const l=i.convertColorToHex(a.color)||oe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...a,series:a.series.map(s=>({...s,id:i.createUid(),color:l})),seriesIndex:o,color:l,id:i.createUid(),shape:a.shape||"circle"}})),se=e.computed(()=>b.value.map(a=>({...a,opacity:f.value.includes(a.id)?.5:1,segregate:()=>R(a.id),isSegregated:f.value.includes(a.id)}))),ne=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":""})),U=e.computed(()=>Math.max(...b.value.filter(a=>!f.value.includes(a.id)).map(a=>Math.max(...a.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/U.value),T=e.computed(()=>b.value.filter(a=>!f.value.includes(a.id))),p=e.computed(()=>{let a=[];for(let o=0;o<U.value;o+=1){const l=Math.min(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),s=Math.max(...T.value.flatMap(v=>v.series.map(S=>S.values[o]||0)||0)),r=s===l?l/4:l,n=s===l?s*2:s,u=i.calculateNiceScale(r,n,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,S)=>{const ue=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),ce=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(ue/ce),x:d.value.left+y.value*o+y.value/2,value:v}});a.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return a}),F=e.computed(()=>T.value.map((a,o)=>({...a,series:a.series.map((l,s)=>({...l,datapoints:l.values.map((r,n)=>{const u=p.value[n].scale.min<0?(r||0)+Math.abs(p.value[n].scale.min):(r||0)-Math.abs(p.value[n].scale.min),g=p.value[n].scale.min<0?p.value[n].scale.max+Math.abs(p.value[n].scale.min):p.value[n].scale.max-Math.abs(p.value[n].scale.min);return{name:l.name,seriesName:a.name,axisIndex:n,datapointIndex:s,seriesIndex:o,value:r||0,x:d.value.left+y.value*n+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:l.comments&&l.comments[n]||""}})}))})).map(a=>({...a,series:a.series.map(o=>{const l=i.createStraightPath(o.datapoints),s=i.createSmoothPath(o.datapoints,.12),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${s}`:`M ${l}`);return{...o,smoothPath:s,straightPath:l,pathLength:r}})})));function W({value:a,index:o,datapoint:l}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,a,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:a,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:l,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),z=e.ref(!1),P=e.ref("");function A({shape:a,serieName:o,serie:l,relativeIndex:s,seriesIndex:r}){_.value={serie:l,relativeIndex:s,seriesIndex:r,series:b.value,scales:p.value},z.value=!0,h.value=l.id;let n="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}))?P.value=u({serie:l,seriesIndex:l.seriesIndex,series:b.value,config:t.value,scales:p.value}):(n+=`<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+" - ":""}${l.name}</div>`,p.value.map(g=>g.name).forEach((g,v)=>{n+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { computed as y, ref as f, onMounted as
|
|
2
|
-
import { u as Oe, c as
|
|
3
|
-
import { t as
|
|
4
|
-
import { _ as Ze } from "./Title-
|
|
5
|
-
import { L as et } from "./Legend-
|
|
6
|
-
import { _ as tt } from "./Tooltip-
|
|
7
|
-
import { _ as at } from "./Shape-
|
|
8
|
-
import { u as lt, U as ot } from "./usePrinter-
|
|
9
|
-
import { D as st } from "./DataTable-
|
|
10
|
-
import nt from "./vue-ui-accordion-
|
|
11
|
-
import ut from "./vue-ui-skeleton-
|
|
12
|
-
import { u as xe } from "./useNestedProp-
|
|
1
|
+
import { computed as y, ref as f, onMounted as Pe, onBeforeUnmount as Ne, openBlock as u, createElementBlock as i, normalizeClass as E, normalizeStyle as _, createVNode as J, createCommentVNode as g, createBlock as D, unref as z, createSlots as Le, withCtx as b, renderSlot as x, normalizeProps as j, guardReactiveProps as R, Fragment as C, renderList as A, createElementVNode as I, toDisplayString as N, createTextVNode as Se } from "vue";
|
|
2
|
+
import { u as Oe, c as K, t as De, a as We, p as U, o as Be, e as ye, g as Ee, b as je, d as Re, B as Ue, O as Ve, P as Ge, Q as He, X as Xe, x as fe, i as ge, f as be, y as Ye, q as qe, r as Qe, D as V } from "./index-BshV7sX1.js";
|
|
3
|
+
import { t as Je, u as Ke } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Ze } from "./Title-fb3BzoXj.js";
|
|
5
|
+
import { L as et } from "./Legend-B9dawQa7.js";
|
|
6
|
+
import { _ as tt } from "./Tooltip-CBugtvWB.js";
|
|
7
|
+
import { _ as at } from "./Shape-BsAETTif.js";
|
|
8
|
+
import { u as lt, U as ot } from "./usePrinter-Culo-aKo.js";
|
|
9
|
+
import { D as st } from "./DataTable-luIjNnne.js";
|
|
10
|
+
import nt from "./vue-ui-accordion-B6AxEnAr.js";
|
|
11
|
+
import ut from "./vue-ui-skeleton-7qakoAGH.js";
|
|
12
|
+
import { u as xe } from "./useNestedProp-B235bkr5.js";
|
|
13
13
|
import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events": "none" } }, dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ht = ["x", "y", "fill", "font-size", "font-weight"], pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "fill", "font-size", "font-weight"], yt = { key: 0 }, ft = ["x", "y", "font-size", "fill"], gt = ["width", "x", "y"], bt = { style: { width: "100%" } }, xt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], kt = ["d", "stroke", "stroke-width", "onMouseenter"], Ct = {
|
|
15
15
|
key: 3,
|
|
@@ -39,7 +39,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
39
39
|
set(a) {
|
|
40
40
|
return a;
|
|
41
41
|
}
|
|
42
|
-
}), ee = f(0), L = f(null), te = f(null), ae = f(null), G = f(
|
|
42
|
+
}), ee = f(0), L = f(null), te = f(null), ae = f(null), G = f(K()), S = f(!1);
|
|
43
43
|
function $e(a) {
|
|
44
44
|
S.value = a, ee.value += 1;
|
|
45
45
|
}
|
|
@@ -56,7 +56,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
56
56
|
customPalette: We[a.theme] || U
|
|
57
57
|
} : a;
|
|
58
58
|
}), W = f(null);
|
|
59
|
-
|
|
59
|
+
Pe(() => {
|
|
60
60
|
if (Be(M.dataset) ? ye({
|
|
61
61
|
componentName: "VueUiParallelCoordinatePlot",
|
|
62
62
|
type: "dataset"
|
|
@@ -73,8 +73,8 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
}), e.value.responsive) {
|
|
76
|
-
const a =
|
|
77
|
-
const { width: l, height: t } =
|
|
76
|
+
const a = Je(() => {
|
|
77
|
+
const { width: l, height: t } = Ke({
|
|
78
78
|
chart: L.value,
|
|
79
79
|
title: e.value.style.chart.title.text ? te.value : null,
|
|
80
80
|
legend: e.value.style.chart.legend.show ? ae.value : null
|
|
@@ -107,7 +107,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
107
107
|
});
|
|
108
108
|
W.value = new ResizeObserver(a), W.value.observe(L.value.parentNode);
|
|
109
109
|
}
|
|
110
|
-
}),
|
|
110
|
+
}), Ne(() => {
|
|
111
111
|
W.value && W.value.disconnect();
|
|
112
112
|
});
|
|
113
113
|
const { isPrinting: le, isImaging: oe, generatePdf: se, generateImage: ne } = lt({
|
|
@@ -144,26 +144,26 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
144
144
|
function ue(a) {
|
|
145
145
|
w.value.includes(a) ? w.value = w.value.filter((l) => l !== a) : w.value.push(a);
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const T = y(() => M.dataset.map((a, l) => {
|
|
148
148
|
const t = Re(a.color) || _e.value[l] || U[l] || U[l % U.length];
|
|
149
149
|
return {
|
|
150
150
|
...a,
|
|
151
151
|
series: a.series.map((o) => ({
|
|
152
152
|
...o,
|
|
153
|
-
id:
|
|
153
|
+
id: K(),
|
|
154
154
|
color: t
|
|
155
155
|
})),
|
|
156
156
|
seriesIndex: l,
|
|
157
157
|
color: t,
|
|
158
|
-
id:
|
|
158
|
+
id: K(),
|
|
159
159
|
shape: a.shape || "circle"
|
|
160
160
|
};
|
|
161
|
-
})),
|
|
161
|
+
})), Te = y(() => T.value.map((a) => ({
|
|
162
162
|
...a,
|
|
163
163
|
opacity: w.value.includes(a.id) ? 0.5 : 1,
|
|
164
164
|
segregate: () => ue(a.id),
|
|
165
165
|
isSegregated: w.value.includes(a.id)
|
|
166
|
-
}))),
|
|
166
|
+
}))), ze = y(() => ({
|
|
167
167
|
cy: "pcp-div-legend",
|
|
168
168
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
169
169
|
color: e.value.style.chart.legend.color,
|
|
@@ -171,8 +171,8 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
171
171
|
paddingBottom: 12,
|
|
172
172
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
173
173
|
})), ie = y(() => Math.max(
|
|
174
|
-
...
|
|
175
|
-
)), k = y(() => v.value.width / ie.value), H = y(() =>
|
|
174
|
+
...T.value.filter((a) => !w.value.includes(a.id)).map((a) => Math.max(...a.series.flatMap((l) => l.values.length)))
|
|
175
|
+
)), k = y(() => v.value.width / ie.value), H = y(() => T.value.filter((a) => !w.value.includes(a.id))), p = y(() => {
|
|
176
176
|
let a = [];
|
|
177
177
|
for (let l = 0; l < ie.value; l += 1) {
|
|
178
178
|
const t = Math.min(...H.value.flatMap((d) => d.series.map((B) => B.values[l] || 0) || 0)), o = Math.max(...H.value.flatMap((d) => d.series.map((B) => B.values[l] || 0) || 0)), n = o === t ? t / 4 : t, s = o === t ? o * 2 : o, r = Ue(n, s, e.value.style.chart.yAxis.scaleTicks), $ = r.ticks.map((d, B) => {
|
|
@@ -235,20 +235,20 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
const h = f(null), Y = f(null), O = f(!1), q = f("");
|
|
238
|
-
function
|
|
239
|
-
Y.value = { serie: t, relativeIndex: o, seriesIndex: n, series:
|
|
238
|
+
function Q({ shape: a, serieName: l, serie: t, relativeIndex: o, seriesIndex: n }) {
|
|
239
|
+
Y.value = { serie: t, relativeIndex: o, seriesIndex: n, series: T.value, scales: p.value }, O.value = !0, h.value = t.id;
|
|
240
240
|
let s = "";
|
|
241
241
|
const r = e.value.style.chart.tooltip.customFormat;
|
|
242
242
|
fe(r) && Ye(() => r({
|
|
243
243
|
serie: t,
|
|
244
244
|
seriesIndex: t.seriesIndex,
|
|
245
|
-
series:
|
|
245
|
+
series: T.value,
|
|
246
246
|
config: e.value,
|
|
247
247
|
scales: p.value
|
|
248
248
|
})) ? q.value = r({
|
|
249
249
|
serie: t,
|
|
250
250
|
seriesIndex: t.seriesIndex,
|
|
251
|
-
series:
|
|
251
|
+
series: T.value,
|
|
252
252
|
config: e.value,
|
|
253
253
|
scales: p.value
|
|
254
254
|
}) : (s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l ? l + " - " : ""}${t.name}</div>`, p.value.map(($) => $.name).forEach(($, d) => {
|
|
@@ -272,10 +272,10 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
272
272
|
`, e.value.style.chart.comments.showInTooltip && t.datapoints[d].comment && (s += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${t.color}">${t.datapoints[d].comment}</div>`);
|
|
273
273
|
}), q.value = `<div>${s}</div>`);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
return
|
|
275
|
+
function Ae() {
|
|
276
|
+
return T.value;
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const P = y(() => {
|
|
279
279
|
const a = [e.value.table.columnNames.series].concat([e.value.table.columnNames.item]).concat(p.value.map((n) => n.name)), l = X.value.flatMap((n, s) => n.series.map((r) => [n.name].concat([r.name]).concat(r.values))), t = {
|
|
280
280
|
th: {
|
|
281
281
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
@@ -296,12 +296,12 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
296
296
|
colNames: o
|
|
297
297
|
};
|
|
298
298
|
}), ce = y(() => X.value.length === 0 ? { head: [], body: [], config: {}, columnNames: [] } : {
|
|
299
|
-
head:
|
|
300
|
-
body:
|
|
299
|
+
head: P.value.head,
|
|
300
|
+
body: P.value.body
|
|
301
301
|
});
|
|
302
302
|
function ve() {
|
|
303
303
|
const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = ce.value.head, t = ce.value.body, o = a.concat([l]).concat(t), n = qe(o);
|
|
304
|
-
|
|
304
|
+
Qe({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-parallel-coordinate-plot" });
|
|
305
305
|
}
|
|
306
306
|
function Me(a) {
|
|
307
307
|
Z("selectDatapoint", a);
|
|
@@ -323,7 +323,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
323
323
|
m.value.showTooltip = !m.value.showTooltip;
|
|
324
324
|
}
|
|
325
325
|
return Ce({
|
|
326
|
-
getData:
|
|
326
|
+
getData: Ae,
|
|
327
327
|
generateCsv: ve,
|
|
328
328
|
generatePdf: se,
|
|
329
329
|
generateImage: ne,
|
|
@@ -343,7 +343,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
343
343
|
ref: te,
|
|
344
344
|
style: _(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
345
345
|
}, [
|
|
346
|
-
|
|
346
|
+
J(Ze, {
|
|
347
347
|
config: {
|
|
348
348
|
title: {
|
|
349
349
|
cy: "pcp-div-title",
|
|
@@ -361,8 +361,8 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
361
361
|
key: `user_options_${ee.value}`,
|
|
362
362
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
363
363
|
color: e.value.style.chart.color,
|
|
364
|
-
isPrinting:
|
|
365
|
-
isImaging:
|
|
364
|
+
isPrinting: z(le),
|
|
365
|
+
isImaging: z(oe),
|
|
366
366
|
uid: G.value,
|
|
367
367
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
368
368
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
@@ -376,9 +376,9 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
376
376
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
377
377
|
chartElement: L.value,
|
|
378
378
|
onToggleFullscreen: $e,
|
|
379
|
-
onGeneratePdf:
|
|
379
|
+
onGeneratePdf: z(se),
|
|
380
380
|
onGenerateCsv: ve,
|
|
381
|
-
onGenerateImage:
|
|
381
|
+
onGenerateImage: z(ne),
|
|
382
382
|
onToggleTable: he,
|
|
383
383
|
onToggleLabels: pe,
|
|
384
384
|
onToggleTooltip: me
|
|
@@ -428,12 +428,12 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
428
428
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : g("", !0),
|
|
429
429
|
F.value ? (u(), i("svg", {
|
|
430
430
|
key: 2,
|
|
431
|
-
xmlns:
|
|
431
|
+
xmlns: z(Xe),
|
|
432
432
|
class: E({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
|
|
433
433
|
viewBox: `0 0 ${v.value.chartWidth <= 0 ? 10 : v.value.chartWidth} ${v.value.chartHeight <= 0 ? 10 : v.value.chartHeight}`,
|
|
434
434
|
style: _(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
435
435
|
}, [
|
|
436
|
-
(u(!0), i(C, null,
|
|
436
|
+
(u(!0), i(C, null, A(p.value, (t, o) => (u(), i("g", vt, [
|
|
437
437
|
I("line", {
|
|
438
438
|
x1: v.value.left + k.value * o + k.value / 2,
|
|
439
439
|
x2: v.value.left + k.value * o + k.value / 2,
|
|
@@ -449,9 +449,9 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
449
449
|
"font-size": c.value.axisNameFontSize,
|
|
450
450
|
"font-weight": e.value.style.chart.yAxis.labels.axisNamesBold ? "bold" : "",
|
|
451
451
|
"text-anchor": "middle"
|
|
452
|
-
},
|
|
452
|
+
}, N(t.name), 9, ht),
|
|
453
453
|
e.value.style.chart.yAxis.labels.ticks.show ? (u(), i(C, { key: 0 }, [
|
|
454
|
-
(u(!0), i(C, null,
|
|
454
|
+
(u(!0), i(C, null, A(t.ticks, (n) => (u(), i("line", {
|
|
455
455
|
x1: n.x,
|
|
456
456
|
x2: n.x - 10,
|
|
457
457
|
y1: n.y,
|
|
@@ -460,7 +460,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
460
460
|
"stroke-width": e.value.style.chart.yAxis.strokeWidth,
|
|
461
461
|
style: _(`opacity:${h.value && !m.value.showTooltip ? 0.2 : 1}`)
|
|
462
462
|
}, null, 12, pt))), 256)),
|
|
463
|
-
(u(!0), i(C, null,
|
|
463
|
+
(u(!0), i(C, null, A(t.ticks, (n) => (u(), i("text", {
|
|
464
464
|
x: n.x - 12 + e.value.style.chart.yAxis.labels.ticks.offsetX,
|
|
465
465
|
y: n.y + e.value.style.chart.yAxis.labels.ticks.offsetY + c.value.ticksFontSize / 3,
|
|
466
466
|
fill: e.value.style.chart.yAxis.labels.ticks.color,
|
|
@@ -468,20 +468,20 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
468
468
|
"font-size": c.value.ticksFontSize,
|
|
469
469
|
"font-weight": e.value.style.chart.yAxis.labels.ticks.bold ? "bold" : "normal",
|
|
470
470
|
style: _(`opacity:${h.value && !m.value.showTooltip ? 0.2 : 1}`)
|
|
471
|
-
},
|
|
471
|
+
}, N(re({ value: n.value, index: o, datapoint: n })), 13, mt))), 256))
|
|
472
472
|
], 64)) : g("", !0)
|
|
473
473
|
]))), 256)),
|
|
474
|
-
(u(!0), i(C, null,
|
|
475
|
-
(u(!0), i(C, null,
|
|
474
|
+
(u(!0), i(C, null, A(X.value, (t) => (u(), i("g", null, [
|
|
475
|
+
(u(!0), i(C, null, A(t.series, (o, n) => (u(), i("g", null, [
|
|
476
476
|
e.value.style.chart.plots.show ? (u(), i("g", yt, [
|
|
477
|
-
(u(!0), i(C, null,
|
|
477
|
+
(u(!0), i(C, null, A(o.datapoints, (s) => (u(), D(at, {
|
|
478
478
|
plot: { x: s.x, y: s.y },
|
|
479
479
|
color: t.color,
|
|
480
480
|
shape: t.shape,
|
|
481
481
|
radius: t.shape === "triangle" ? c.value.plotSize * 1.2 : c.value.plotSize,
|
|
482
482
|
stroke: e.value.style.chart.backgroundColor,
|
|
483
483
|
strokeWidth: 0.5,
|
|
484
|
-
onMouseenter: (r) =>
|
|
484
|
+
onMouseenter: (r) => Q({
|
|
485
485
|
shape: t.shape,
|
|
486
486
|
serieName: t.name,
|
|
487
487
|
serie: o,
|
|
@@ -503,9 +503,9 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
503
503
|
"font-size": c.value.ticksFontSize,
|
|
504
504
|
fill: t.color,
|
|
505
505
|
"font-weight": "bold"
|
|
506
|
-
},
|
|
506
|
+
}, N(o.name), 9, ft)) : g("", !0)
|
|
507
507
|
], 64)),
|
|
508
|
-
e.value.style.chart.comments.show ? (u(!0), i(C, { key: 1 },
|
|
508
|
+
e.value.style.chart.comments.show ? (u(!0), i(C, { key: 1 }, A(o.datapoints, (s) => (u(), i("g", null, [
|
|
509
509
|
s.comment ? (u(), i("foreignObject", {
|
|
510
510
|
key: 0,
|
|
511
511
|
style: { overflow: "visible" },
|
|
@@ -522,7 +522,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
522
522
|
], 8, gt)) : g("", !0)
|
|
523
523
|
]))), 256)) : g("", !0)
|
|
524
524
|
])) : g("", !0),
|
|
525
|
-
m.value.dataLabels.show || h.value && h.value === o.id ? (u(!0), i(C, { key: 1 },
|
|
525
|
+
m.value.dataLabels.show || h.value && h.value === o.id ? (u(!0), i(C, { key: 1 }, A(o.datapoints, (s, r) => (u(), i("text", {
|
|
526
526
|
x: s.x + 12 + e.value.style.chart.yAxis.labels.datapoints.offsetX,
|
|
527
527
|
y: s.y + e.value.style.chart.yAxis.labels.datapoints.offsetY + c.value.datapointFontSize / 3,
|
|
528
528
|
fill: e.value.style.chart.yAxis.labels.datapoints.useSerieColor ? t.color : e.value.style.chart.yAxis.labels.datapoints.color,
|
|
@@ -530,7 +530,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
530
530
|
"font-weight": e.value.style.chart.yAxis.labels.datapoints.bold ? "bold" : "normal",
|
|
531
531
|
class: E({ "vue-ui-pcp-animated": !1, "vue-ui-pcp-transition": !0 }),
|
|
532
532
|
"font-size": c.value.datapointFontSize,
|
|
533
|
-
onMouseenter: ($) =>
|
|
533
|
+
onMouseenter: ($) => Q({
|
|
534
534
|
shape: t.shape,
|
|
535
535
|
serieName: t.name,
|
|
536
536
|
serie: o,
|
|
@@ -541,14 +541,14 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
541
541
|
h.value = null, O.value = !1;
|
|
542
542
|
}),
|
|
543
543
|
style: _(`opacity:${h.value ? h.value === o.id ? 1 : 0.2 : 1}`)
|
|
544
|
-
},
|
|
544
|
+
}, N(re({ value: s.value, index: r, datapoint: s })), 45, xt))), 256)) : g("", !0),
|
|
545
545
|
I("path", {
|
|
546
546
|
d: `M${e.value.style.chart.lines.smooth ? o.smoothPath : o.straightPath}`,
|
|
547
547
|
stroke: t.color,
|
|
548
548
|
"stroke-width": e.value.style.chart.lines.strokeWidth,
|
|
549
549
|
fill: "none",
|
|
550
550
|
class: E({ "vue-ui-pcp-animated vue-data-ui-line-animated": e.value.useCssAnimation, "vue-ui-pcp-transition": !0 }),
|
|
551
|
-
onMouseenter: (s) =>
|
|
551
|
+
onMouseenter: (s) => Q({
|
|
552
552
|
shape: t.shape,
|
|
553
553
|
serieName: t.name,
|
|
554
554
|
serie: o,
|
|
@@ -565,7 +565,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
565
565
|
x(a.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
566
566
|
], 14, ct)) : g("", !0),
|
|
567
567
|
a.$slots.watermark ? (u(), i("div", Ct, [
|
|
568
|
-
x(a.$slots, "watermark", j(R({ isPrinting:
|
|
568
|
+
x(a.$slots, "watermark", j(R({ isPrinting: z(le) || z(oe) })), void 0, !0)
|
|
569
569
|
])) : g("", !0),
|
|
570
570
|
F.value ? g("", !0) : (u(), D(ut, {
|
|
571
571
|
key: 4,
|
|
@@ -582,8 +582,8 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
582
582
|
}, [
|
|
583
583
|
e.value.style.chart.legend.show && F.value ? (u(), D(et, {
|
|
584
584
|
key: 0,
|
|
585
|
-
legendSet:
|
|
586
|
-
config:
|
|
585
|
+
legendSet: Te.value,
|
|
586
|
+
config: ze.value,
|
|
587
587
|
onClickMarker: l[3] || (l[3] = ({ legend: t }) => {
|
|
588
588
|
ue(t.id), de(t);
|
|
589
589
|
})
|
|
@@ -594,15 +594,15 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
594
594
|
t.segregate(), de(t);
|
|
595
595
|
},
|
|
596
596
|
style: _(`opacity:${w.value.includes(t.id) ? 0.5 : 1}`)
|
|
597
|
-
},
|
|
597
|
+
}, N(t.name), 13, wt)
|
|
598
598
|
]),
|
|
599
599
|
_: 1
|
|
600
600
|
}, 8, ["legendSet", "config"])) : x(a.$slots, "legend", {
|
|
601
601
|
key: 1,
|
|
602
|
-
legend:
|
|
602
|
+
legend: T.value
|
|
603
603
|
}, void 0, !0)
|
|
604
604
|
], 512),
|
|
605
|
-
|
|
605
|
+
J(tt, {
|
|
606
606
|
show: m.value.showTooltip && O.value,
|
|
607
607
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
608
608
|
color: e.value.style.chart.tooltip.color,
|
|
@@ -615,7 +615,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
615
615
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
616
616
|
parent: L.value,
|
|
617
617
|
content: q.value,
|
|
618
|
-
isCustom:
|
|
618
|
+
isCustom: z(fe)(e.value.style.chart.tooltip.customFormat)
|
|
619
619
|
}, {
|
|
620
620
|
"tooltip-before": b(() => [
|
|
621
621
|
x(a.$slots, "tooltip-before", j(R({ ...Y.value })), void 0, !0)
|
|
@@ -642,11 +642,11 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
642
642
|
}
|
|
643
643
|
}, {
|
|
644
644
|
content: b(() => [
|
|
645
|
-
|
|
646
|
-
colNames:
|
|
647
|
-
head:
|
|
648
|
-
body:
|
|
649
|
-
config:
|
|
645
|
+
J(st, {
|
|
646
|
+
colNames: P.value.colNames,
|
|
647
|
+
head: P.value.head,
|
|
648
|
+
body: P.value.body,
|
|
649
|
+
config: P.value.config,
|
|
650
650
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
651
651
|
onClose: l[4] || (l[4] = (t) => m.value.showTable = !1)
|
|
652
652
|
}, {
|
|
@@ -654,7 +654,7 @@ const rt = ["id"], ct = ["xmlns", "viewBox"], vt = { style: { "pointer-events":
|
|
|
654
654
|
I("div", { innerHTML: t }, null, 8, $t)
|
|
655
655
|
]),
|
|
656
656
|
td: b(({ td: t }) => [
|
|
657
|
-
Se(
|
|
657
|
+
Se(N(t), 1)
|
|
658
658
|
]),
|
|
659
659
|
_: 1
|
|
660
660
|
}, 8, ["colNames", "head", "body", "config", "title"])
|