vue-data-ui 2.3.73 → 2.3.75
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-B9ZuNkP-.js → Arrow-BTG7M25z.js} +1 -1
- package/dist/{Arrow-B8nZeqNJ.cjs → Arrow-CZK77NmC.cjs} +1 -1
- package/dist/{BaseIcon-CXbZK6D-.cjs → BaseIcon--PMhZ3f-.cjs} +1 -1
- package/dist/{BaseIcon-_V_BEdy8.js → BaseIcon-BAOfPaXs.js} +1 -1
- package/dist/{DataTable-BOdJVZzF.js → DataTable-CQANRZju.js} +2 -2
- package/dist/{DataTable-wmKwMbsJ.cjs → DataTable-DjQzrklZ.cjs} +1 -1
- package/dist/{Legend-DdndVhHV.cjs → Legend-CtbPB0Bo.cjs} +1 -1
- package/dist/{Legend-CHd5QFPM.js → Legend-DX1kv21U.js} +1 -1
- package/dist/{Shape-CLRxBhyM.cjs → Shape-CadGs1Am.cjs} +1 -1
- package/dist/{Shape-DNbJlwSU.js → Shape-kqcyauhC.js} +1 -1
- package/dist/{Slicer-Dts-BToH.cjs → Slicer-i_oECHxH.cjs} +1 -1
- package/dist/{Slicer-8Gg45iGX.js → Slicer-yaJs-izT.js} +2 -2
- package/dist/{Title-Ngy9HNqO.js → Title-C26I_HC3.js} +1 -1
- package/dist/{Title-CujodUjt.cjs → Title-XBiDFYKD.cjs} +1 -1
- package/dist/{Tooltip-BCtg7xYX.js → Tooltip-CH8GmDCG.js} +1 -1
- package/dist/{Tooltip-DsmWz8gF.cjs → Tooltip-DxtWkIt5.cjs} +1 -1
- package/dist/{index-Dvs5Ra-u.js → index-Cm4Iry5c.js} +1 -1
- package/dist/{index-sFjJ2dIj.cjs → index-DYUBiaGS.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-UohhCyBz.js → useNestedProp-CurQIHTa.js} +1 -1
- package/dist/{useNestedProp-ir0jEo5M.cjs → useNestedProp-w7AMWWmz.cjs} +1 -1
- package/dist/{usePrinter-B8-keRMa.js → usePrinter-B8RnF8_q.js} +1 -1
- package/dist/{usePrinter-DSMMs1w9.cjs → usePrinter-ZlHxdaEz.cjs} +1 -1
- package/dist/{vue-data-ui-NvV5qa--.cjs → vue-data-ui-B7amrpT-.cjs} +1 -1
- package/dist/{vue-data-ui-Bgo6YUhl.js → vue-data-ui-Bj6kEIpq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +19 -0
- package/dist/{vue-ui-3d-bar-DckNIYgA.js → vue-ui-3d-bar-Bg9IgVVc.js} +499 -486
- package/dist/{vue-ui-accordion-RuCkf_li.cjs → vue-ui-accordion-1WxrfiCH.cjs} +1 -1
- package/dist/{vue-ui-accordion-C-qAry7P.js → vue-ui-accordion-Cb6XBCbu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CamjaXUw.js → vue-ui-age-pyramid-BhwmnQru.js} +182 -169
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +1 -0
- package/dist/{vue-ui-annotator-D0kYZ56C.cjs → vue-ui-annotator-B22cdlhA.cjs} +1 -1
- package/dist/{vue-ui-annotator-DMmdqorj.js → vue-ui-annotator-BiHQvMdW.js} +1 -1
- package/dist/{vue-ui-candlestick-DRi8lDTn.js → vue-ui-candlestick-Cl9dyh4l.js} +295 -279
- package/dist/vue-ui-candlestick-D7DjdYyw.cjs +2 -0
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +1 -0
- package/dist/{vue-ui-carousel-table-u5OoOMr1.js → vue-ui-carousel-table-QsONwqNz.js} +106 -91
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +6 -0
- package/dist/{vue-ui-chestnut-D5a4OH1D.js → vue-ui-chestnut-Drb01WMC.js} +215 -204
- package/dist/{vue-ui-cursor-Bp_PHbz4.js → vue-ui-cursor-BP04_XbB.js} +2 -2
- package/dist/{vue-ui-cursor-DpBsZNEE.cjs → vue-ui-cursor-DZeTQBKz.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BwBYH8V_.js → vue-ui-dashboard-BWdx5gjZ.js} +2 -2
- package/dist/{vue-ui-dashboard--kjU0uMc.cjs → vue-ui-dashboard-Z63RE1XS.cjs} +1 -1
- package/dist/{vue-ui-digits-CIV9J3SW.cjs → vue-ui-digits-CBQaHW6a.cjs} +1 -1
- package/dist/{vue-ui-digits-t2G4B6uD.js → vue-ui-digits-DUhkLcmd.js} +2 -2
- package/dist/vue-ui-donut-D2YJYgOB.cjs +1 -0
- package/dist/{vue-ui-donut-BTug2gsP.js → vue-ui-donut-DRPSwmGr.js} +376 -362
- package/dist/{vue-ui-donut-evolution-DTD0Hfgh.js → vue-ui-donut-evolution-gRXAyxq8.js} +270 -255
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BZw7lntE.js → vue-ui-dumbbell-CQo5jqSK.js} +232 -213
- package/dist/vue-ui-dumbbell-DLfZcrXq.cjs +9 -0
- package/dist/vue-ui-flow-BQ3UbMUb.js +481 -0
- package/dist/vue-ui-flow-BlX2-eEC.cjs +1 -0
- package/dist/{vue-ui-galaxy-Bjlm3WtB.js → vue-ui-galaxy-BHWugUKG.js} +175 -162
- package/dist/vue-ui-galaxy-Cax5o6Yl.cjs +1 -0
- package/dist/vue-ui-gauge-DG6_kvKh.js +500 -0
- package/dist/vue-ui-gauge-DpGcv_00.cjs +1 -0
- package/dist/vue-ui-gizmo-D9Vh9Rmr.cjs +1 -0
- package/dist/{vue-ui-gizmo-CiutQM-A.js → vue-ui-gizmo-bV148qAf.js} +66 -53
- package/dist/{vue-ui-heatmap-C933pQPU.js → vue-ui-heatmap-BZZUvnMa.js} +157 -143
- package/dist/vue-ui-heatmap-B_ELXKKV.cjs +1 -0
- package/dist/vue-ui-kpi-C5v7qQvZ.js +98 -0
- package/dist/vue-ui-kpi-CwVAvTB2.cjs +1 -0
- package/dist/{vue-ui-mini-loader-B5XG2gKd.js → vue-ui-mini-loader-BdKizX_J.js} +2 -2
- package/dist/{vue-ui-mini-loader-C67Z1C6r.cjs → vue-ui-mini-loader-DZNY-3rr.cjs} +1 -1
- package/dist/{vue-ui-molecule-DzIeuL8t.js → vue-ui-molecule-MKyrhqqm.js} +177 -167
- package/dist/vue-ui-molecule-bva6OvPc.cjs +1 -0
- package/dist/{vue-ui-mood-radar-02L4M-n_.js → vue-ui-mood-radar-BNIFFvq0.js} +172 -161
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BY50trfJ.js → vue-ui-nested-donuts-BDAlZrMF.js} +377 -364
- package/dist/vue-ui-nested-donuts-CxdZC6JF.cjs +17 -0
- package/dist/{vue-ui-onion-BmQ7B9xY.js → vue-ui-onion-CFa4VD-w.js} +191 -177
- package/dist/vue-ui-onion-Df7YcsVR.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BdfcqlfT.js → vue-ui-parallel-coordinate-plot-DmqYXT-U.js} +298 -284
- package/dist/{vue-ui-quadrant-CLimyRoA.js → vue-ui-quadrant-D5jHkq9g.js} +347 -334
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CX8Kas-o.js → vue-ui-quick-chart-BjXXSx7V.js} +483 -469
- package/dist/vue-ui-quick-chart-Dt9AsEU6.cjs +15 -0
- package/dist/vue-ui-radar-2EuZr7i2.cjs +1 -0
- package/dist/{vue-ui-radar-CK0PB5oY.js → vue-ui-radar-CW8EKW4o.js} +202 -189
- package/dist/{vue-ui-rating-Ceu3pXmF.cjs → vue-ui-rating-DrtLvVA0.cjs} +1 -1
- package/dist/{vue-ui-rating-BnqWN2ui.js → vue-ui-rating-eSWsmJUU.js} +2 -2
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +1 -0
- package/dist/vue-ui-relation-circle-DiUCpEqa.js +322 -0
- package/dist/{vue-ui-rings-CYthauSM.js → vue-ui-rings-BxhLbyG0.js} +203 -189
- package/dist/vue-ui-rings-CHq-a5ZS.cjs +2 -0
- package/dist/{vue-ui-scatter-Cxr9eymz.js → vue-ui-scatter-DQchX_mM.js} +284 -270
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +1 -0
- package/dist/{vue-ui-screenshot-CVWC5rbJ.js → vue-ui-screenshot-CLa9vMzM.js} +1 -1
- package/dist/{vue-ui-screenshot-sBd8-Oyh.cjs → vue-ui-screenshot-SLSIpqx2.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CAvlIcgk.js → vue-ui-skeleton-C1oUnz7R.js} +2 -2
- package/dist/{vue-ui-skeleton-CqF0NJ4g.cjs → vue-ui-skeleton-ClpTCY1x.cjs} +1 -1
- package/dist/{vue-ui-smiley-CXbipVsb.js → vue-ui-smiley-CmWHSt1S.js} +2 -2
- package/dist/{vue-ui-smiley-c_I60YOy.cjs → vue-ui-smiley-Daw8fPDy.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CO69Dg31.js +263 -0
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +1 -0
- package/dist/{vue-ui-sparkbar-Dm-2_5Ef.js → vue-ui-sparkbar-BRlqpe4e.js} +95 -87
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CCxKzDjT.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CbuFESsM.js +178 -0
- package/dist/{vue-ui-sparkhistogram-qf87TXA-.js → vue-ui-sparkhistogram-B4-hrDHz.js} +79 -68
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +1 -0
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +1 -0
- package/dist/{vue-ui-sparkline-CZBgvY1A.js → vue-ui-sparkline-DlXNmG6M.js} +142 -123
- package/dist/vue-ui-sparkstackbar-CDmZeXnq.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-GtkDZDXZ.js → vue-ui-sparkstackbar-J1YowQmP.js} +120 -104
- package/dist/{vue-ui-stackbar-D_Ui7xec.js → vue-ui-stackbar-CKIDqkkY.js} +235 -222
- package/dist/vue-ui-stackbar-CXGWukoJ.cjs +6 -0
- package/dist/vue-ui-strip-plot-CvmoRcYN.cjs +1 -0
- package/dist/{vue-ui-strip-plot--VJ3f5UV.js → vue-ui-strip-plot-JVLwIy0j.js} +246 -232
- package/dist/{vue-ui-table-BCQ7voEV.js → vue-ui-table-BSi_cHh7.js} +1 -1
- package/dist/{vue-ui-table-B_6N0VOD.cjs → vue-ui-table-Dqi64VE7.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-BwghEh5t.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-UwpQQMHB.js → vue-ui-table-heatmap-CfvW3rcm.js} +106 -95
- package/dist/{vue-ui-table-sparkline-Bzqs2Hcp.js → vue-ui-table-sparkline-Y6Lrrzxy.js} +151 -138
- package/dist/vue-ui-table-sparkline-bIy3kkHB.cjs +1 -0
- package/dist/{vue-ui-thermometer-BQbYzsSV.js → vue-ui-thermometer-BPTs7Nxc.js} +116 -104
- package/dist/vue-ui-thermometer-DDtxYr7w.cjs +1 -0
- package/dist/{vue-ui-timer-KGEswANF.js → vue-ui-timer-CkB7eZaE.js} +191 -176
- package/dist/vue-ui-timer-DRSSYxOX.cjs +64 -0
- package/dist/{vue-ui-tiremarks-BSkMCIu1.js → vue-ui-tiremarks-BbOaoY8S.js} +115 -103
- package/dist/vue-ui-tiremarks-Bttwg3-p.cjs +1 -0
- package/dist/vue-ui-treemap-Chq0WQPe.cjs +1 -0
- package/dist/{vue-ui-treemap-DIWveOrq.js → vue-ui-treemap-CoaK3wBl.js} +251 -237
- package/dist/{vue-ui-vertical-bar-Dx6wReOw.js → vue-ui-vertical-bar-BA43_uHV.js} +374 -358
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +4 -0
- package/dist/{vue-ui-waffle-D3jMPOd3.js → vue-ui-waffle-BoEf8CcG.js} +285 -265
- package/dist/vue-ui-waffle-NBjY0mko.cjs +1 -0
- package/dist/vue-ui-wheel-Bgo2jpj0.js +255 -0
- package/dist/vue-ui-wheel-t5bI4a-P.cjs +1 -0
- package/dist/vue-ui-word-cloud-DPW_-Hzz.cjs +1 -0
- package/dist/vue-ui-word-cloud-Jd9_JUyi.js +512 -0
- package/dist/{vue-ui-xy-9_2IHEOX.js → vue-ui-xy-BMBYAC4z.js} +300 -274
- package/dist/vue-ui-xy-CBHEBcZK.cjs +3 -0
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DGuGy69l.js → vue-ui-xy-canvas-LOsQ_DM-.js} +345 -327
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-DhzN0gd4.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CfUUEeKt.cjs +0 -1
- package/dist/vue-ui-candlestick-DJIJnnI_.cjs +0 -2
- package/dist/vue-ui-carousel-table-uYt1zVjx.cjs +0 -1
- package/dist/vue-ui-chestnut-CG5krVO-.cjs +0 -6
- package/dist/vue-ui-donut-D6SrEIEJ.cjs +0 -1
- package/dist/vue-ui-donut-evolution-Cb45erSA.cjs +0 -1
- package/dist/vue-ui-dumbbell-DVabaAYH.cjs +0 -9
- package/dist/vue-ui-flow-Bn1EP9Z1.cjs +0 -1
- package/dist/vue-ui-flow-Cz_xaLAs.js +0 -469
- package/dist/vue-ui-galaxy-Drnhlmmw.cjs +0 -1
- package/dist/vue-ui-gauge-CxIVYnG2.js +0 -488
- package/dist/vue-ui-gauge-D2reVZ-b.cjs +0 -1
- package/dist/vue-ui-gizmo-B6ZwXwFY.cjs +0 -1
- package/dist/vue-ui-heatmap-ClFm7qUu.cjs +0 -1
- package/dist/vue-ui-kpi-CdPFWSHA.cjs +0 -1
- package/dist/vue-ui-kpi-ClreiT4V.js +0 -84
- package/dist/vue-ui-molecule-JJQ3af-R.cjs +0 -1
- package/dist/vue-ui-mood-radar-DT4JU_6B.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D6Dihmne.cjs +0 -17
- package/dist/vue-ui-onion-DoNDCpth.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CJMjEDXR.cjs +0 -8
- package/dist/vue-ui-quadrant-DWqmU3-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-CB5VelG0.cjs +0 -15
- package/dist/vue-ui-radar-aTceo-HQ.cjs +0 -1
- package/dist/vue-ui-relation-circle-D1z8MBVH.js +0 -310
- package/dist/vue-ui-relation-circle-DWGtziD_.cjs +0 -1
- package/dist/vue-ui-rings-gp0sEMy6.cjs +0 -2
- package/dist/vue-ui-scatter-BKl2fUIR.cjs +0 -1
- package/dist/vue-ui-spark-trend-C3sBXu8D.js +0 -251
- package/dist/vue-ui-spark-trend-CXkkMK6N.cjs +0 -1
- package/dist/vue-ui-sparkbar-BkN5iTUq.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D4EqU3x3.cjs +0 -1
- package/dist/vue-ui-sparkgauge-FKTXvE7e.js +0 -167
- package/dist/vue-ui-sparkhistogram-BkJz2dBD.cjs +0 -1
- package/dist/vue-ui-sparkline-TPkuvKtA.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-CzzfnPDS.cjs +0 -1
- package/dist/vue-ui-stackbar-NHgsl2-Z.cjs +0 -6
- package/dist/vue-ui-strip-plot-CU6OtKt7.cjs +0 -1
- package/dist/vue-ui-table-heatmap-DFMF1RZ0.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DWvOKdPb.cjs +0 -1
- package/dist/vue-ui-thermometer-BOuuVWuf.cjs +0 -1
- package/dist/vue-ui-timer-BCiMjXdm.cjs +0 -64
- package/dist/vue-ui-tiremarks-DuEz8cO5.cjs +0 -1
- package/dist/vue-ui-treemap-BO8gKQ4O.cjs +0 -1
- package/dist/vue-ui-vertical-bar-Dpzyha_P.cjs +0 -4
- package/dist/vue-ui-waffle-C0-IVDjk.cjs +0 -1
- package/dist/vue-ui-wheel-B10kCoLD.js +0 -242
- package/dist/vue-ui-wheel-mWdIHlXV.cjs +0 -1
- package/dist/vue-ui-word-cloud-CYtRxpdV.cjs +0 -1
- package/dist/vue-ui-word-cloud-rhrsHes4.js +0 -498
- package/dist/vue-ui-xy-CFqs5rtd.cjs +0 -3
- package/dist/vue-ui-xy-canvas-sLH0pM-i.cjs +0 -9
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DYUBiaGS.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),ce=require("./Title-XBiDFYKD.cjs"),J=require("./usePrinter-ZlHxdaEz.cjs"),de=require("./Tooltip-DxtWkIt5.cjs"),ve=require("./DataTable-DjQzrklZ.cjs"),pe=require("./Legend-CtbPB0Bo.cjs"),he=require("./vue-ui-skeleton-ClpTCY1x.cjs"),ge=require("./vue-ui-accordion-1WxrfiCH.cjs"),K=require("./useNestedProp-w7AMWWmz.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],ye=["xmlns","viewBox"],be=["id"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","cx","cy","r","fill"],xe=["stroke","stroke-width","cx","cy","r","fill"],Te=["cx","cy","r","onMouseenter"],$e={key:3,class:"vue-data-ui-watermark"},Ne=["onClick"],Se={key:0},_e={key:1},Be=["innerHTML"],Pe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const v=Q,{vue_ui_rings:te}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),le=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),z=e.ref(null),E=e.ref(0),F=e.ref(0),I=e.ref(0),t=e.computed({get:()=>O(),set:l=>l});function O(){const l=K.useNestedProp({userConfig:v.config,defaultConfig:te});return l.theme?{...K.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=O(),R(),E.value+=1,F.value+=1,I.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{R()});function R(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=Y.throttle(()=>{const{width:a,height:o}=Y.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:M,isImaging:D,generatePdf:q,generateImage:A}=J.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),U=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),oe=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),ee("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ae=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function H(l){return l/ae.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||U.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ie)=>w+ie,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),W=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>B(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),re=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||U.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:H(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*H(a)})).toSorted((l,a)=>a.value-l.value));function ne(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>oe.value-t.value.style.chart.layout.rings.strokeWidth*2),P=e.ref(null);function ue(l,a){if(i.value.length===v.dataset.length)return;P.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
+
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=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>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function G(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.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-rings"})})}const C=e.ref(!1);function se(l){C.value=l,L.value+=1}function j(){g.value.showTable=!g.value.showTable}function X(){g.value.showTooltip=!g.value.showTooltip}return Z({getData:ne,generatePdf:q,generateCsv:G,generateImage:A,toggleTable:j,toggleTooltip:X}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:le,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(D),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(A),onToggleTable:j,onToggleTooltip:X},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Ce)],8,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,we),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,xe),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ue(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,Te)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(pe.Legend,{key:`legend_${I.value}`,legendSet:W.value,config:re.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>B(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Se," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:W.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,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:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ve.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Be)]),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)],46,me))}},Le=fe._export_sfc(Pe,[["__scopeId","data-v-2d607318"]]);exports.default=Le;
|