vue-data-ui 2.3.84 → 2.3.86
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-CQ1ubni5.js → Arrow-CJ7hmWgf.js} +1 -1
- package/dist/{Arrow-Uk_vwKtL.cjs → Arrow-CebZn6E4.cjs} +1 -1
- package/dist/{BaseIcon-B9ZZ6wkT.js → BaseIcon-B9istAKo.js} +1 -1
- package/dist/{BaseIcon-CF1HQdM0.cjs → BaseIcon-DnG75_Ol.cjs} +1 -1
- package/dist/{DataTable-CEtr89Og.cjs → DataTable-BA_BCbHC.cjs} +1 -1
- package/dist/{DataTable-C-iU_7h7.js → DataTable-tSDSY14n.js} +2 -2
- package/dist/{Legend-D2ZBCCXe.cjs → Legend-BOY57qwA.cjs} +1 -1
- package/dist/{Legend-pU_BwhaW.js → Legend-D3hovFqM.js} +1 -1
- package/dist/{Shape-BO_KyCq8.cjs → Shape-D6jrLLku.cjs} +1 -1
- package/dist/{Shape-CyM44biU.js → Shape-XiTBfhJM.js} +1 -1
- package/dist/{Slicer-CZobytqL.js → Slicer-BMvzmCKt.js} +2 -2
- package/dist/{Slicer-BAMZ4wsl.cjs → Slicer-sZ-DArc4.cjs} +1 -1
- package/dist/{Title-B1_d29Eh.cjs → Title-Ahj4TYHa.cjs} +1 -1
- package/dist/{Title-Bk3h09h9.js → Title-DJ2FNrSN.js} +1 -1
- package/dist/{Tooltip-CdB80DsD.js → Tooltip-CQpXRqRC.js} +1 -1
- package/dist/{Tooltip-BU4cSEF0.cjs → Tooltip-XhevgJmm.cjs} +1 -1
- package/dist/index-CVgBMJU6.cjs +4 -0
- package/dist/{index-DI4DaxVG.js → index-D2epy0rJ.js} +4 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +3 -0
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useNestedProp-BdsfyHWU.cjs → useNestedProp-B-NmF2LO.cjs} +1 -1
- package/dist/{useNestedProp-COsQo-tX.js → useNestedProp-C_ZrJBd9.js} +1 -1
- package/dist/usePrinter-B6qtXaHk.js +527 -0
- package/dist/usePrinter-DN-6Hoh5.cjs +1 -0
- package/dist/{vue-data-ui-kGaLyV0o.cjs → vue-data-ui-DlNasA0G.cjs} +1 -1
- package/dist/{vue-data-ui-9nofTL7J.js → vue-data-ui-vegY0BJm.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-CqRRjlUU.cjs +19 -0
- package/dist/{vue-ui-3d-bar-lKgwKkVj.js → vue-ui-3d-bar-D-0SSMOt.js} +165 -164
- package/dist/{vue-ui-accordion-C8ka_Ot0.cjs → vue-ui-accordion-BaV9R6cy.cjs} +1 -1
- package/dist/{vue-ui-accordion-DsN9lxvc.js → vue-ui-accordion-DzTB2FL0.js} +3 -3
- package/dist/vue-ui-age-pyramid-Bx4BuL3K.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-D2lSXDX6.js → vue-ui-age-pyramid-_eo2DGen.js} +68 -67
- package/dist/{vue-ui-annotator-DoLG0N5e.js → vue-ui-annotator-8j2dJ0CU.js} +1 -1
- package/dist/{vue-ui-annotator-DmfAqbqB.cjs → vue-ui-annotator-CDZtr6tp.cjs} +1 -1
- package/dist/{vue-ui-candlestick-vhHV9d6O.js → vue-ui-candlestick-CsF7OSvJ.js} +83 -82
- package/dist/vue-ui-candlestick-NypxP0Uu.cjs +2 -0
- package/dist/{vue-ui-carousel-table-BmyArloA.js → vue-ui-carousel-table-CMHd2i-6.js} +7 -7
- package/dist/{vue-ui-carousel-table-DaQV2SlJ.cjs → vue-ui-carousel-table-CV0eVeRd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DvNW2Y0z.cjs → vue-ui-chestnut-B9miwyAN.cjs} +2 -2
- package/dist/{vue-ui-chestnut-DgbbDtL0.js → vue-ui-chestnut-CVftKftk.js} +11 -10
- package/dist/{vue-ui-cursor-zXDNHCZv.cjs → vue-ui-cursor-Bsrt107X.cjs} +1 -1
- package/dist/{vue-ui-cursor-7-jKCnOY.js → vue-ui-cursor-wujy8n_T.js} +2 -2
- package/dist/{vue-ui-dashboard-DMossMh1.cjs → vue-ui-dashboard-BCN0BhjL.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_pnIQ5P.js → vue-ui-dashboard-Cvy0gI52.js} +2 -2
- package/dist/{vue-ui-digits-BL8Vyod-.cjs → vue-ui-digits-CnHgzHPI.cjs} +1 -1
- package/dist/{vue-ui-digits-C-lpZ-rg.js → vue-ui-digits-J-WrKKHg.js} +2 -2
- package/dist/{vue-ui-donut-e-p-l-_7.js → vue-ui-donut-BOhWcHY_.js} +91 -90
- package/dist/vue-ui-donut-CZ1iKZq6.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Ol1YS2OF.js → vue-ui-donut-evolution-CSSYuoti.js} +83 -82
- package/dist/vue-ui-donut-evolution-DuY2883r.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BjTXdj83.js → vue-ui-dumbbell-Cm0Rp_6W.js} +23 -22
- package/dist/{vue-ui-dumbbell-CMFNfda1.cjs → vue-ui-dumbbell-i9QcsSVO.cjs} +2 -2
- package/dist/{vue-ui-flow-B4mdXrld.js → vue-ui-flow-0m7a1NP7.js} +54 -53
- package/dist/vue-ui-flow-DXCBGdQT.cjs +1 -0
- package/dist/vue-ui-galaxy-D6GyjAnX.cjs +1 -0
- package/dist/{vue-ui-galaxy-Eg1e5SG7.js → vue-ui-galaxy-DCHEdZAl.js} +87 -86
- package/dist/{vue-ui-gauge-BTt63SCn.js → vue-ui-gauge-HcM2JJpg.js} +78 -77
- package/dist/vue-ui-gauge-wbHQGQro.cjs +1 -0
- package/dist/{vue-ui-gizmo-bFlUFJa8.cjs → vue-ui-gizmo-B-zMyi1m.cjs} +1 -1
- package/dist/{vue-ui-gizmo-C0aF0qVF.js → vue-ui-gizmo-Bfo_nUnZ.js} +2 -2
- package/dist/{vue-ui-heatmap-kiVWYvjC.js → vue-ui-heatmap-CxIHmv0t.js} +170 -169
- package/dist/vue-ui-heatmap-Du2vI5Ae.cjs +1 -0
- package/dist/{vue-ui-kpi-qw5ofS-z.cjs → vue-ui-kpi-BOe7-M9V.cjs} +1 -1
- package/dist/{vue-ui-kpi-DdtZLwfi.js → vue-ui-kpi-DibULfkp.js} +3 -3
- package/dist/{vue-ui-mini-loader-B8YrB3X-.cjs → vue-ui-mini-loader-Bv7l-Kx3.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DcL5v-Tv.js → vue-ui-mini-loader-qFRhERid.js} +2 -2
- package/dist/{vue-ui-molecule-BpomHzqe.js → vue-ui-molecule-4cIGPnWg.js} +282 -278
- package/dist/vue-ui-molecule-eOj3ZjvT.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BV9xC9xF.js → vue-ui-mood-radar-BTe21WKk.js} +144 -143
- package/dist/vue-ui-mood-radar-tUFqqekd.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-D7D20nJu.js → vue-ui-nested-donuts-BVzabOga.js} +65 -64
- package/dist/vue-ui-nested-donuts-BigBLrFR.cjs +17 -0
- package/dist/{vue-ui-onion-4wR10l5H.js → vue-ui-onion-C3TAKqro.js} +90 -89
- package/dist/vue-ui-onion-_ZC3vbIS.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-BiXGkfj7.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-DA3byJV2.js → vue-ui-parallel-coordinate-plot-CKoCQXqj.js} +40 -39
- package/dist/vue-ui-quadrant-B67wGTic.cjs +1 -0
- package/dist/{vue-ui-quadrant-D5wvd5h3.js → vue-ui-quadrant-CKnyfJoi.js} +51 -50
- package/dist/vue-ui-quick-chart-DEjdx0AB.cjs +15 -0
- package/dist/{vue-ui-quick-chart-CTSq5JJE.js → vue-ui-quick-chart-DZDYYnsI.js} +63 -62
- package/dist/vue-ui-radar-Cm_QkYGb.cjs +1 -0
- package/dist/{vue-ui-radar-OW6awckj.js → vue-ui-radar-v9yayJxu.js} +44 -43
- package/dist/{vue-ui-rating-C6gyJWJF.js → vue-ui-rating-Cc_N7qbe.js} +2 -2
- package/dist/{vue-ui-rating-3ZVG38br.cjs → vue-ui-rating-DV4cCZbB.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Dr9-ozKG.js → vue-ui-relation-circle-Clqo4kkb.js} +74 -73
- package/dist/vue-ui-relation-circle-DcpIVbI6.cjs +1 -0
- package/dist/{vue-ui-rings-Ce6tFKrN.js → vue-ui-rings-D27xNq9q.js} +78 -77
- package/dist/vue-ui-rings-DTn3t8Ku.cjs +2 -0
- package/dist/{vue-ui-scatter-C_3WQPMf.js → vue-ui-scatter-C07Mon-6.js} +53 -52
- package/dist/vue-ui-scatter-CXbrqLFm.cjs +1 -0
- package/dist/{vue-ui-screenshot-BvE2dsvU.js → vue-ui-screenshot-CsxqbqlJ.js} +1 -1
- package/dist/{vue-ui-screenshot-D6N4GbAL.cjs → vue-ui-screenshot-D8TAvQYN.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DH4t1hrL.js → vue-ui-skeleton-BLiYyX95.js} +2 -2
- package/dist/{vue-ui-skeleton-CkSlhfsB.cjs → vue-ui-skeleton-Br1K3exH.cjs} +1 -1
- package/dist/{vue-ui-smiley-C-92SyPZ.js → vue-ui-smiley-BUHatT3Z.js} +2 -2
- package/dist/{vue-ui-smiley-CSA28QLT.cjs → vue-ui-smiley-CR_TkSYT.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CnUz6s1m.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CrElvUcG.js → vue-ui-spark-trend-GY2CfYRt.js} +29 -29
- package/dist/vue-ui-sparkbar-DaFwUA6Z.cjs +1 -0
- package/dist/{vue-ui-sparkbar-DrbkUcOX.js → vue-ui-sparkbar-tdgek1gv.js} +27 -27
- package/dist/{vue-ui-sparkgauge-PSRf_u0V.js → vue-ui-sparkgauge-1zu5KmTA.js} +22 -22
- package/dist/vue-ui-sparkgauge-D8P01Hem.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-pZslBri7.js → vue-ui-sparkhistogram-b68QStxA.js} +52 -52
- package/dist/vue-ui-sparkhistogram-mg6yuwLH.cjs +1 -0
- package/dist/{vue-ui-sparkline-CqgArzCs.cjs → vue-ui-sparkline-CAqav9Gn.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BPExupWx.js → vue-ui-sparkline-CMmtp8MK.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-i02y9FzO.js → vue-ui-sparkstackbar-Cz8tOM3m.js} +6 -6
- package/dist/vue-ui-sparkstackbar-DOrquZvw.cjs +1 -0
- package/dist/vue-ui-stackbar-DUa5F_Zl.cjs +6 -0
- package/dist/{vue-ui-stackbar-DfXxN_P3.js → vue-ui-stackbar-DeQkP1dj.js} +64 -63
- package/dist/vue-ui-strip-plot-KNL9ToYG.cjs +1 -0
- package/dist/{vue-ui-strip-plot-BZ-we0b1.js → vue-ui-strip-plot-vqOCzdFV.js} +73 -72
- package/dist/{vue-ui-table-Dy26T2oy.cjs → vue-ui-table-BCdHNku5.cjs} +1 -1
- package/dist/{vue-ui-table-BqLbMTHt.js → vue-ui-table-DDdVqdHt.js} +1 -1
- package/dist/vue-ui-table-heatmap-BJDnZMZN.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-KzoqT8nX.js → vue-ui-table-heatmap-DQg_jtYq.js} +27 -26
- package/dist/{vue-ui-table-sparkline-BakiSjV4.js → vue-ui-table-sparkline-Bg-VFq7X.js} +25 -24
- package/dist/{vue-ui-table-sparkline-BBEsDDnN.cjs → vue-ui-table-sparkline-D8DJxb5J.cjs} +1 -1
- package/dist/{vue-ui-thermometer-D7cgRJoy.js → vue-ui-thermometer-CajBbbYc.js} +60 -59
- package/dist/vue-ui-thermometer-eYM8DX7u.cjs +1 -0
- package/dist/{vue-ui-timer-r4VFny9D.js → vue-ui-timer-D3VRVK-8.js} +4 -4
- package/dist/{vue-ui-timer-COLXZ1J1.cjs → vue-ui-timer-RclP4Tql.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DNQpuz8A.js → vue-ui-tiremarks-BT0k_3xi.js} +93 -92
- package/dist/vue-ui-tiremarks-Bc8bBBAw.cjs +1 -0
- package/dist/{vue-ui-treemap-CsHaQjwu.cjs → vue-ui-treemap-BjWDt2b2.cjs} +1 -1
- package/dist/{vue-ui-treemap-CD5GoXrU.js → vue-ui-treemap-DMhe3zCm.js} +14 -13
- package/dist/vue-ui-vertical-bar-DWzafNBH.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-DRH98pOw.js → vue-ui-vertical-bar-hH9R9V-K.js} +180 -179
- package/dist/vue-ui-waffle-BvYE9hAY.cjs +1 -0
- package/dist/{vue-ui-waffle-l9NGD_0B.js → vue-ui-waffle-DnNd6Iba.js} +85 -84
- package/dist/{vue-ui-wheel-BpqWo_KY.js → vue-ui-wheel-Bx9_m-7W.js} +72 -71
- package/dist/vue-ui-wheel-CVBmY6h7.cjs +1 -0
- package/dist/vue-ui-word-cloud-3R-mYkIW.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DLaAm8t8.js → vue-ui-word-cloud-DUk0Xt8q.js} +109 -108
- package/dist/{vue-ui-xy-Ct-9OxiZ.js → vue-ui-xy-FtaqoNK8.js} +401 -405
- package/dist/{vue-ui-xy-canvas-BU3nj2M1.js → vue-ui-xy-canvas-Bp4PTl_E.js} +54 -53
- package/dist/{vue-ui-xy-canvas-Bub1qCm9.cjs → vue-ui-xy-canvas-Ctw_3PzN.cjs} +2 -2
- package/dist/vue-ui-xy-rX-aml0b.cjs +3 -0
- package/package.json +1 -1
- package/dist/index-Cx-40Fnz.cjs +0 -4
- package/dist/usePrinter-D9bNzUQP.js +0 -513
- package/dist/usePrinter-DbhL59iY.cjs +0 -1
- package/dist/vue-ui-3d-bar-1aTroDle.cjs +0 -19
- package/dist/vue-ui-age-pyramid-D8Tr8jvT.cjs +0 -1
- package/dist/vue-ui-candlestick-BAuWAMct.cjs +0 -2
- package/dist/vue-ui-donut-evolution-DsdzjA88.cjs +0 -1
- package/dist/vue-ui-donut-w1eqaTu0.cjs +0 -1
- package/dist/vue-ui-flow-oBnzNN4s.cjs +0 -1
- package/dist/vue-ui-galaxy-DgxKqf6u.cjs +0 -1
- package/dist/vue-ui-gauge-B64pcc54.cjs +0 -1
- package/dist/vue-ui-heatmap-cjY0mi4a.cjs +0 -1
- package/dist/vue-ui-molecule-B8cYtnHq.cjs +0 -1
- package/dist/vue-ui-mood-radar-BA2VVPO5.cjs +0 -1
- package/dist/vue-ui-nested-donuts-C3CMWjgk.cjs +0 -17
- package/dist/vue-ui-onion-CVp0g8MP.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CmaHQR6-.cjs +0 -8
- package/dist/vue-ui-quadrant-B8ffMNIS.cjs +0 -1
- package/dist/vue-ui-quick-chart-hnVT9GKL.cjs +0 -15
- package/dist/vue-ui-radar-ySl7KzoX.cjs +0 -1
- package/dist/vue-ui-relation-circle-CMW26dvv.cjs +0 -1
- package/dist/vue-ui-rings-CR1t6iss.cjs +0 -2
- package/dist/vue-ui-scatter-CKtgbptk.cjs +0 -1
- package/dist/vue-ui-spark-trend-D4d4Mr24.cjs +0 -1
- package/dist/vue-ui-sparkbar-DDqy0UBm.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D6cG2rb8.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B9sVdLfh.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-BbGJ75_9.cjs +0 -1
- package/dist/vue-ui-stackbar-CRbcnnwn.cjs +0 -6
- package/dist/vue-ui-strip-plot-oZBXDxc-.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BnwiB4id.cjs +0 -1
- package/dist/vue-ui-thermometer-E0mrvP4G.cjs +0 -1
- package/dist/vue-ui-tiremarks-C15sglnJ.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DucujxOR.cjs +0 -4
- package/dist/vue-ui-waffle-DhroAZB3.cjs +0 -1
- package/dist/vue-ui-wheel-Bd87HcGT.cjs +0 -1
- package/dist/vue-ui-word-cloud-D5JLdr9g.cjs +0 -1
- package/dist/vue-ui-xy-BHzOpYm9.cjs +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CVgBMJU6.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ae=require("./Title-Ahj4TYHa.cjs"),j=require("./usePrinter-DN-6Hoh5.cjs"),se=require("./vue-ui-skeleton-Br1K3exH.cjs"),q=require("./useNestedProp-B-NmF2LO.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],de=["cx","cy","r","stroke","stroke-width"],ve={key:0},fe=["stroke","d","stroke-width"],ge={key:1},me=["stroke","x1","x2","y1","y2"],ye=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],he=["cx","cy","fill","onClick","r"],ke={key:3,class:"vue-data-ui-watermark"},pe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(G,{expose:U}){const u=G;e.useCssVars(t=>({"34880b02":H.value,"4e5334de":Y.value,"79ad6840":J.value}));const{vue_ui_relation_circle:D}=o.useConfig(),p=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(o.createUid()),$=e.ref(0),y=e.ref(null),w=e.ref(null),B=e.ref(0),r=e.computed({get:()=>b(),set:t=>t});function b(){const t=q.useNestedProp({userConfig:u.config,defaultConfig:D});return t.theme?{...q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>u.config,t=>{r.value=b(),S(),B.value+=1},{deep:!0});const{isPrinting:P,isImaging:O,generatePdf:E,generateImage:A}=j.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),I=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),i=e.ref({}),c=e.ref([]),W=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),a=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),X=e.computed(()=>r.value.style.links.curved),Y=e.computed(()=>`${r.value.style.animation.speedMs}ms`),H=e.computed(()=>v.value*2),J=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{S(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",z)});function S(){if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(n,l),a.value.width=n,a.value.height=l,v.value=C.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],F(),N()});h.value=new ResizeObserver(t),h.value.observe(y.value.parentNode)}else d.value=[],f.value=[],F(),N()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",z),h.value&&h.value.disconnect()});function z(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},c.value=[])}function F(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((m,x)=>{const ne=v.value*Math.cos(l)+a.value.width/2,ie=v.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ne,y:ie,...m,color:m.color?m.color:I.value[x]?I.value[x]:o.palette[x],regAngle:s}),l+=t,s+=n})}function N(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{f.value.push({weight:t.weights&&t.weights[s]?t.weights[s]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const K=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function Q(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function L(t){return Object.hasOwn(i.value,"x")?t.colorTarget:t.colorSource}function R(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function Z(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ee(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function te(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function T(t){W.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},c.value=[]):(i.value=t,c.value=[...t.relations])}function M(t){return t.weight/K.value*r.value.style.links.maxWidth}const k=e.ref(!1);function re(t){k.value=t,$.value+=1}return U({generatePdf:E,generateImage:A}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${$.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(P),isImaging:e.unref(O),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,position:r.value.userOptions.position,onToggleFullscreen:re,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(A)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,de),X.value?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(R(l)),stroke:L(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":M(l),"stroke-linecap":"round"},null,14,fe))),128))])):(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:L(l),style:e.normalizeStyle(R(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,me))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":Z(l),transform:le(l),x:ee(l),y:l.y+5,onClick:m=>T(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${te(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,ye))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(Q(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>T(l),r:r.value.style.plot.radius},null,12,he))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ue))}},_e=oe._export_sfc(pe,[["__scopeId","data-v-03cfa819"]]);exports.default=_e;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ref as u, computed as d, watch as Fe, onMounted as Ie, onBeforeUnmount as Oe, openBlock as n, createElementBlock as m, normalizeClass as B, normalizeStyle as
|
|
2
|
-
import { u as Re, c as ge, t as Ve, a as Be, p as T, o as De, e as X, g as Ge, b as Ue, G as We, d as fe, f as _, X as Ee, s as He, w as Xe, v as j, i as ye, x as je, y as Ye, q as qe, r as Je } from "./index-
|
|
1
|
+
import { ref as u, computed as d, watch as Fe, onMounted as Ie, onBeforeUnmount as Oe, openBlock as n, createElementBlock as m, normalizeClass as B, normalizeStyle as O, createBlock as x, createCommentVNode as N, unref as i, createSlots as Me, withCtx as h, renderSlot as f, normalizeProps as D, guardReactiveProps as G, Fragment as de, renderList as pe, createElementVNode as w, createTextVNode as he, toDisplayString as U, createVNode as ze, nextTick as Ae } from "vue";
|
|
2
|
+
import { u as Re, c as ge, t as Ve, a as Be, p as T, o as De, e as X, g as Ge, b as Ue, G as We, d as fe, f as _, X as Ee, s as He, w as Xe, v as j, i as ye, x as je, y as Ye, q as qe, r as Je } from "./index-D2epy0rJ.js";
|
|
3
3
|
import { t as Ke, u as Qe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ze } from "./Title-
|
|
5
|
-
import { u as et, U as tt } from "./usePrinter-
|
|
6
|
-
import { _ as lt } from "./Tooltip-
|
|
7
|
-
import { D as at } from "./DataTable-
|
|
8
|
-
import { L as ot } from "./Legend-
|
|
9
|
-
import st from "./vue-ui-skeleton-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as me } from "./useNestedProp-
|
|
4
|
+
import { _ as Ze } from "./Title-DJ2FNrSN.js";
|
|
5
|
+
import { u as et, U as tt } from "./usePrinter-B6qtXaHk.js";
|
|
6
|
+
import { _ as lt } from "./Tooltip-CQpXRqRC.js";
|
|
7
|
+
import { D as at } from "./DataTable-tSDSY14n.js";
|
|
8
|
+
import { L as ot } from "./Legend-D3hovFqM.js";
|
|
9
|
+
import st from "./vue-ui-skeleton-BLiYyX95.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-DzTB2FL0.js";
|
|
11
|
+
import { u as me } from "./useNestedProp-C_ZrJBd9.js";
|
|
12
12
|
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
-
const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"], dt = ["stop-color"],
|
|
13
|
+
const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"], dt = ["stop-color"], pt = ["stroke", "cx", "cy", "r", "fill"], ht = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], gt = ["cx", "cy", "r", "onMouseenter"], ft = {
|
|
14
14
|
key: 3,
|
|
15
15
|
class: "vue-data-ui-watermark"
|
|
16
16
|
}, yt = ["onClick"], mt = { key: 0 }, bt = { key: 1 }, kt = ["innerHTML"], Ct = {
|
|
@@ -31,7 +31,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["selectLegend"],
|
|
33
33
|
setup(be, { expose: ke, emit: Ce }) {
|
|
34
|
-
const g = be, { vue_ui_rings: we } = Re(),
|
|
34
|
+
const g = be, { vue_ui_rings: we } = Re(), P = u(!1), M = d(() => !!g.dataset && g.dataset.length), L = u(ge()), $e = u(null), z = u(!1), W = u(""), $ = u(null), Y = u(0), S = u(null), q = u(null), J = u(null), K = u(0), Q = u(0), Z = u(0), e = d({
|
|
35
35
|
get: () => ee(),
|
|
36
36
|
set: (t) => t
|
|
37
37
|
});
|
|
@@ -77,23 +77,23 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
77
77
|
}), e.value.responsive) {
|
|
78
78
|
const t = Ke(() => {
|
|
79
79
|
const { width: a, height: l } = Qe({
|
|
80
|
-
chart:
|
|
80
|
+
chart: S.value,
|
|
81
81
|
title: e.value.style.chart.title.text ? q.value : null,
|
|
82
82
|
legend: e.value.style.chart.legend.show ? J.value : null
|
|
83
83
|
});
|
|
84
84
|
r.value.width = a, r.value.height = l;
|
|
85
85
|
});
|
|
86
|
-
A.value = new ResizeObserver(t), A.value.observe(
|
|
86
|
+
A.value = new ResizeObserver(t), A.value.observe(S.value.parentNode);
|
|
87
87
|
}
|
|
88
88
|
setTimeout(() => {
|
|
89
|
-
|
|
89
|
+
P.value = !0;
|
|
90
90
|
}, 600);
|
|
91
91
|
}
|
|
92
92
|
Oe(() => {
|
|
93
93
|
A.value && A.value.disconnect();
|
|
94
94
|
});
|
|
95
95
|
const { isPrinting: le, isImaging: ae, generatePdf: oe, generateImage: se } = et({
|
|
96
|
-
elementId: `rings_${
|
|
96
|
+
elementId: `rings_${L.value}`,
|
|
97
97
|
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
98
98
|
}), ue = d(() => Ue(e.value.customPalette)), k = u({
|
|
99
99
|
showTable: e.value.table.show,
|
|
@@ -116,12 +116,12 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
116
116
|
return t / _e.value;
|
|
117
117
|
}
|
|
118
118
|
const R = d(() => g.dataset.map(({ values: t, name: a, color: l = null }, o) => {
|
|
119
|
-
const s = We(t).reduce((b,
|
|
119
|
+
const s = We(t).reduce((b, I) => b + I, 0);
|
|
120
120
|
return {
|
|
121
121
|
name: a,
|
|
122
122
|
color: l || fe(l) || ue.value[o] || T[o] || T[o % T.length],
|
|
123
123
|
value: s,
|
|
124
|
-
proportion: s / g.dataset.map((b) => (b.values || []).reduce((
|
|
124
|
+
proportion: s / g.dataset.map((b) => (b.values || []).reduce((I, Se) => I + Se, 0)).reduce((b, I) => b + I, 0),
|
|
125
125
|
uid: ge()
|
|
126
126
|
};
|
|
127
127
|
})), ne = d(() => R.value.map((t) => ({
|
|
@@ -157,7 +157,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
157
157
|
})
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const p = d(() => Te.value - e.value.style.chart.layout.rings.strokeWidth * 2), H = u(null);
|
|
161
161
|
function Pe(t, a) {
|
|
162
162
|
if (v.value.length === g.dataset.length) return;
|
|
163
163
|
H.value = {
|
|
@@ -254,9 +254,9 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
254
254
|
Je({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const F = u(!1);
|
|
258
258
|
function Le(t) {
|
|
259
|
-
|
|
259
|
+
F.value = t, Y.value += 1;
|
|
260
260
|
}
|
|
261
261
|
function ve() {
|
|
262
262
|
k.value.showTable = !k.value.showTable;
|
|
@@ -273,10 +273,10 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
273
273
|
toggleTooltip: ce
|
|
274
274
|
}), (t, a) => (n(), m("div", {
|
|
275
275
|
ref_key: "ringsChart",
|
|
276
|
-
ref:
|
|
277
|
-
class: B(`vue-ui-rings ${
|
|
278
|
-
style:
|
|
279
|
-
id: `rings_${
|
|
276
|
+
ref: S,
|
|
277
|
+
class: B(`vue-ui-rings ${F.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
278
|
+
style: O(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
279
|
+
id: `rings_${L.value}`,
|
|
280
280
|
onMouseleave: a[3] || (a[3] = (l) => {
|
|
281
281
|
$.value = null, z.value = !1;
|
|
282
282
|
})
|
|
@@ -285,9 +285,9 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
285
285
|
key: 0,
|
|
286
286
|
ref_key: "chartTitle",
|
|
287
287
|
ref: q,
|
|
288
|
-
style:
|
|
288
|
+
style: "width:100%;background:transparent"
|
|
289
289
|
}, [
|
|
290
|
-
(n(),
|
|
290
|
+
(n(), x(Ze, {
|
|
291
291
|
key: `title_${K.value}`,
|
|
292
292
|
config: {
|
|
293
293
|
title: {
|
|
@@ -300,8 +300,8 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}, null, 8, ["config"]))
|
|
303
|
-
],
|
|
304
|
-
e.value.userOptions.show && M.value ? (n(),
|
|
303
|
+
], 512)) : N("", !0),
|
|
304
|
+
e.value.userOptions.show && M.value ? (n(), x(tt, {
|
|
305
305
|
ref_key: "details",
|
|
306
306
|
ref: $e,
|
|
307
307
|
key: `user_options_${Y.value}`,
|
|
@@ -309,7 +309,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
309
309
|
color: e.value.style.chart.color,
|
|
310
310
|
isPrinting: i(le),
|
|
311
311
|
isImaging: i(ae),
|
|
312
|
-
uid:
|
|
312
|
+
uid: L.value,
|
|
313
313
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
314
314
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
315
315
|
hasXls: e.value.userOptions.buttons.csv,
|
|
@@ -317,9 +317,10 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
317
317
|
hasTable: e.value.userOptions.buttons.table,
|
|
318
318
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
319
319
|
isTooltip: k.value.showTooltip,
|
|
320
|
-
isFullscreen:
|
|
320
|
+
isFullscreen: F.value,
|
|
321
321
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
322
|
-
chartElement:
|
|
322
|
+
chartElement: S.value,
|
|
323
|
+
position: e.value.userOptions.position,
|
|
323
324
|
onToggleFullscreen: Le,
|
|
324
325
|
onGeneratePdf: i(oe),
|
|
325
326
|
onGenerateCsv: ie,
|
|
@@ -329,61 +330,61 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
329
330
|
}, Me({ _: 2 }, [
|
|
330
331
|
t.$slots.optionTooltip ? {
|
|
331
332
|
name: "optionTooltip",
|
|
332
|
-
fn:
|
|
333
|
+
fn: h(() => [
|
|
333
334
|
f(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
334
335
|
]),
|
|
335
336
|
key: "0"
|
|
336
337
|
} : void 0,
|
|
337
338
|
t.$slots.optionPdf ? {
|
|
338
339
|
name: "optionPdf",
|
|
339
|
-
fn:
|
|
340
|
+
fn: h(() => [
|
|
340
341
|
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
341
342
|
]),
|
|
342
343
|
key: "1"
|
|
343
344
|
} : void 0,
|
|
344
345
|
t.$slots.optionCsv ? {
|
|
345
346
|
name: "optionCsv",
|
|
346
|
-
fn:
|
|
347
|
+
fn: h(() => [
|
|
347
348
|
f(t.$slots, "optionCsv", {}, void 0, !0)
|
|
348
349
|
]),
|
|
349
350
|
key: "2"
|
|
350
351
|
} : void 0,
|
|
351
352
|
t.$slots.optionImg ? {
|
|
352
353
|
name: "optionImg",
|
|
353
|
-
fn:
|
|
354
|
+
fn: h(() => [
|
|
354
355
|
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
355
356
|
]),
|
|
356
357
|
key: "3"
|
|
357
358
|
} : void 0,
|
|
358
359
|
t.$slots.optionTable ? {
|
|
359
360
|
name: "optionTable",
|
|
360
|
-
fn:
|
|
361
|
+
fn: h(() => [
|
|
361
362
|
f(t.$slots, "optionTable", {}, void 0, !0)
|
|
362
363
|
]),
|
|
363
364
|
key: "4"
|
|
364
365
|
} : void 0,
|
|
365
366
|
t.$slots.optionFullscreen ? {
|
|
366
367
|
name: "optionFullscreen",
|
|
367
|
-
fn:
|
|
368
|
+
fn: h(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
368
369
|
f(t.$slots, "optionFullscreen", D(G({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
369
370
|
]),
|
|
370
371
|
key: "5"
|
|
371
372
|
} : void 0
|
|
372
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) :
|
|
373
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : N("", !0),
|
|
373
374
|
M.value ? (n(), m("svg", {
|
|
374
375
|
key: 2,
|
|
375
376
|
xmlns: i(Ee),
|
|
376
|
-
class: B({ "vue-data-ui-fullscreen--on":
|
|
377
|
+
class: B({ "vue-data-ui-fullscreen--on": F.value, "vue-data-ui-fulscreen--off": !F.value }),
|
|
377
378
|
viewBox: `0 0 ${r.value.width <= 0 ? 10 : r.value.width} ${r.value.height <= 0 ? 10 : r.value.height}`,
|
|
378
|
-
style:
|
|
379
|
+
style: O(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
379
380
|
}, [
|
|
380
|
-
(n(!0), m(de, null,
|
|
381
|
+
(n(!0), m(de, null, pe(c.value, (l, o) => (n(), m("radialGradient", {
|
|
381
382
|
cx: "50%",
|
|
382
383
|
cy: "30%",
|
|
383
384
|
r: "50%",
|
|
384
385
|
fx: "50%",
|
|
385
386
|
fy: "50%",
|
|
386
|
-
id: `gradient_${
|
|
387
|
+
id: `gradient_${L.value}_${o}`
|
|
387
388
|
}, [
|
|
388
389
|
w("stop", {
|
|
389
390
|
offset: "0%",
|
|
@@ -394,41 +395,41 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
394
395
|
"stop-color": l.color
|
|
395
396
|
}, null, 8, dt)
|
|
396
397
|
], 8, vt))), 256)),
|
|
397
|
-
(n(!0), m(de, null,
|
|
398
|
+
(n(!0), m(de, null, pe(c.value, (l, o) => (n(), m("g", null, [
|
|
398
399
|
w("circle", {
|
|
399
400
|
class: B({
|
|
400
|
-
"vue-ui-rings-item":
|
|
401
|
-
"vue-rings-item-onload": !
|
|
401
|
+
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
402
|
+
"vue-rings-item-onload": !P.value && e.value.useCssAnimation,
|
|
402
403
|
"vue-ui-rings-opacity": $.value !== null && $.value !== o
|
|
403
404
|
}),
|
|
404
|
-
style:
|
|
405
|
+
style: O(`animation-delay:${o * 100}ms`),
|
|
405
406
|
stroke: e.value.style.chart.layout.rings.stroke,
|
|
406
407
|
cx: r.value.width / 2,
|
|
407
|
-
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 +
|
|
408
|
-
r: i(j)(
|
|
408
|
+
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
409
|
+
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
409
410
|
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
410
|
-
}, null, 14,
|
|
411
|
+
}, null, 14, pt),
|
|
411
412
|
w("circle", {
|
|
412
413
|
class: B({
|
|
413
|
-
"vue-ui-rings-item":
|
|
414
|
-
"vue-rings-item-onload": !
|
|
414
|
+
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
415
|
+
"vue-rings-item-onload": !P.value && e.value.useCssAnimation,
|
|
415
416
|
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
416
417
|
"vue-ui-rings-blur": $.value !== null && $.value !== o
|
|
417
418
|
}),
|
|
418
|
-
style:
|
|
419
|
+
style: O(`animation-delay:${o * 100}ms`),
|
|
419
420
|
stroke: e.value.style.chart.layout.rings.stroke,
|
|
420
421
|
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
421
422
|
cx: r.value.width / 2,
|
|
422
|
-
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 +
|
|
423
|
-
r: i(j)(
|
|
424
|
-
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${
|
|
425
|
-
}, null, 14,
|
|
423
|
+
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
424
|
+
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
425
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${L.value}_${o})` : l.color
|
|
426
|
+
}, null, 14, ht),
|
|
426
427
|
w("circle", {
|
|
427
428
|
"data-cy-trap": "",
|
|
428
429
|
stroke: "none",
|
|
429
430
|
cx: r.value.width / 2,
|
|
430
|
-
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 +
|
|
431
|
-
r: i(j)(
|
|
431
|
+
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
432
|
+
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
432
433
|
fill: "transparent",
|
|
433
434
|
onMouseenter: (s) => Pe(o, l),
|
|
434
435
|
onMouseleave: a[0] || (a[0] = (s) => {
|
|
@@ -437,11 +438,11 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
437
438
|
}, null, 40, gt)
|
|
438
439
|
]))), 256)),
|
|
439
440
|
f(t.$slots, "svg", { svg: r.value }, void 0, !0)
|
|
440
|
-
], 14, it)) :
|
|
441
|
+
], 14, it)) : N("", !0),
|
|
441
442
|
t.$slots.watermark ? (n(), m("div", ft, [
|
|
442
443
|
f(t.$slots, "watermark", D(G({ isPrinting: i(le) || i(ae) })), void 0, !0)
|
|
443
|
-
])) :
|
|
444
|
-
M.value ?
|
|
444
|
+
])) : N("", !0),
|
|
445
|
+
M.value ? N("", !0) : (n(), x(st, {
|
|
445
446
|
key: 4,
|
|
446
447
|
config: {
|
|
447
448
|
type: "rings",
|
|
@@ -457,19 +458,19 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
457
458
|
ref_key: "chartLegend",
|
|
458
459
|
ref: J
|
|
459
460
|
}, [
|
|
460
|
-
e.value.style.chart.legend.show ? (n(),
|
|
461
|
+
e.value.style.chart.legend.show ? (n(), x(ot, {
|
|
461
462
|
key: `legend_${Z.value}`,
|
|
462
463
|
legendSet: ne.value,
|
|
463
464
|
config: xe.value,
|
|
464
465
|
onClickMarker: a[1] || (a[1] = ({ legend: l }) => E(l.uid))
|
|
465
466
|
}, {
|
|
466
|
-
item:
|
|
467
|
+
item: h(({ legend: l, index: o }) => [
|
|
467
468
|
w("div", {
|
|
468
469
|
"data-cy-legend-item": "",
|
|
469
470
|
onClick: (s) => E(l.uid),
|
|
470
|
-
style:
|
|
471
|
+
style: O(`opacity:${v.value.includes(l.uid) ? 0.5 : 1}`)
|
|
471
472
|
}, [
|
|
472
|
-
|
|
473
|
+
he(U(l.name) + ": " + U(i(ye)(
|
|
473
474
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
474
475
|
l.value,
|
|
475
476
|
i(_)({
|
|
@@ -504,19 +505,19 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
504
505
|
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
505
506
|
position: e.value.style.chart.tooltip.position,
|
|
506
507
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
507
|
-
parent:
|
|
508
|
+
parent: S.value,
|
|
508
509
|
content: W.value,
|
|
509
510
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
510
511
|
}, {
|
|
511
|
-
"tooltip-before":
|
|
512
|
+
"tooltip-before": h(() => [
|
|
512
513
|
f(t.$slots, "tooltip-before", D(G({ ...H.value })), void 0, !0)
|
|
513
514
|
]),
|
|
514
|
-
"tooltip-after":
|
|
515
|
+
"tooltip-after": h(() => [
|
|
515
516
|
f(t.$slots, "tooltip-after", D(G({ ...H.value })), void 0, !0)
|
|
516
517
|
]),
|
|
517
518
|
_: 3
|
|
518
519
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
519
|
-
M.value ? (n(),
|
|
520
|
+
M.value ? (n(), x(ut, {
|
|
520
521
|
key: 5,
|
|
521
522
|
hideDetails: "",
|
|
522
523
|
config: {
|
|
@@ -532,8 +533,8 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
}, {
|
|
535
|
-
content:
|
|
536
|
-
(n(),
|
|
536
|
+
content: h(() => [
|
|
537
|
+
(n(), x(at, {
|
|
537
538
|
key: `table_${Q.value}`,
|
|
538
539
|
colNames: V.value.colNames,
|
|
539
540
|
head: V.value.head,
|
|
@@ -542,23 +543,23 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
542
543
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
543
544
|
onClose: a[2] || (a[2] = (l) => k.value.showTable = !1)
|
|
544
545
|
}, {
|
|
545
|
-
th:
|
|
546
|
+
th: h(({ th: l }) => [
|
|
546
547
|
w("div", {
|
|
547
548
|
innerHTML: l,
|
|
548
549
|
style: { display: "flex", "align-items": "center" }
|
|
549
550
|
}, null, 8, kt)
|
|
550
551
|
]),
|
|
551
|
-
td:
|
|
552
|
-
|
|
552
|
+
td: h(({ td: l }) => [
|
|
553
|
+
he(U(l.name || l), 1)
|
|
553
554
|
]),
|
|
554
555
|
_: 1
|
|
555
556
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
556
557
|
]),
|
|
557
558
|
_: 1
|
|
558
|
-
}, 8, ["config"])) :
|
|
559
|
+
}, 8, ["config"])) : N("", !0)
|
|
559
560
|
], 46, nt));
|
|
560
561
|
}
|
|
561
|
-
}, Mt = /* @__PURE__ */ rt(Ct, [["__scopeId", "data-v-
|
|
562
|
+
}, Mt = /* @__PURE__ */ rt(Ct, [["__scopeId", "data-v-1e4b06ff"]]);
|
|
562
563
|
export {
|
|
563
564
|
Mt as default
|
|
564
565
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CVgBMJU6.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),ce=require("./Title-Ahj4TYHa.cjs"),J=require("./usePrinter-DN-6Hoh5.cjs"),de=require("./Tooltip-XhevgJmm.cjs"),ve=require("./DataTable-BA_BCbHC.cjs"),pe=require("./Legend-BOY57qwA.cjs"),he=require("./vue-ui-skeleton-Br1K3exH.cjs"),ge=require("./vue-ui-accordion-BaV9R6cy.cjs"),K=require("./useNestedProp-B-NmF2LO.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"],Ne={key:3,class:"vue-data-ui-watermark"},$e=["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),E=e.ref(null),z=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(),z.value+=1,F.value+=1,I.value+=1},{deep:!0});const N=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?E.value:null});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.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(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function H(l){return l/ae.value}const $=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(()=>$.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(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.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:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${z.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"]))],512)):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,position:t.value.userOptions.position,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","position","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:transparent;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.setOpacity)(e.unref(r.shiftHue)(o.color,.05),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",Ne,[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:E},[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,$e)]),_: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-1e4b06ff"]]);exports.default=Le;
|