vue-data-ui 2.3.30 → 2.3.32
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-B8z06v67.cjs → Arrow-C46rqWDg.cjs} +1 -1
- package/dist/{Arrow-Bh7WeO_g.js → Arrow-f_7ZlBit.js} +1 -1
- package/dist/{BaseIcon-BG_bJS3R.js → BaseIcon-CejyHIZM.js} +1 -1
- package/dist/{BaseIcon-DDCJA3rm.cjs → BaseIcon-ChS1Bl3C.cjs} +1 -1
- package/dist/{DataTable-Doh_4M84.cjs → DataTable-BShm3pg0.cjs} +1 -1
- package/dist/{DataTable-CsPidn0_.js → DataTable-Rb6wEqzD.js} +2 -2
- package/dist/{Legend-B20rRwGi.cjs → Legend-DUjHDr5A.cjs} +1 -1
- package/dist/{Legend-CkQ_zypV.js → Legend-O1l-qwSU.js} +1 -1
- package/dist/{Shape-B8O8_E6l.cjs → Shape-DrbNfL39.cjs} +1 -1
- package/dist/{Shape-B4gGeBLI.js → Shape-jOLEEcCT.js} +1 -1
- package/dist/{Slicer-DaEfxscP.js → Slicer-BtErYU-m.js} +1 -1
- package/dist/{Slicer-BXveU40S.cjs → Slicer-DMZ03tYD.cjs} +1 -1
- package/dist/{Title-eBTH8iGJ.js → Title-B9DAMnKW.js} +1 -1
- package/dist/{Title-BU6E8Xld.cjs → Title-C6kjiyFi.cjs} +1 -1
- package/dist/{Tooltip-B11OahTD.js → Tooltip-B7LZQUXr.js} +1 -1
- package/dist/{Tooltip-Oicp_EIo.cjs → Tooltip-Dc_Vk9k7.cjs} +1 -1
- package/dist/index-D5gus_lg.cjs +4 -0
- package/dist/{index-BlXzlBwZ.js → index-DyzpYx72.js} +2 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-BoNl5H_z.js → useNestedProp-DGjp6yqE.js} +1 -1
- package/dist/{useNestedProp-Cggpoz7e.cjs → useNestedProp-dfy-beYA.cjs} +1 -1
- package/dist/{usePrinter-DoYKBzst.cjs → usePrinter-D9HscgWK.cjs} +1 -1
- package/dist/{usePrinter-CZ8F5Cth.js → usePrinter-_HAcfIJq.js} +1 -1
- package/dist/{vue-data-ui-BOqzG_nZ.js → vue-data-ui-BYwT-L-y.js} +57 -57
- package/dist/{vue-data-ui-CGgiWEo3.cjs → vue-data-ui-w642Au96.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CjnVg4YI.js → vue-ui-3d-bar-_idrDcTt.js} +7 -7
- package/dist/{vue-ui-3d-bar-CpntMt7p.cjs → vue-ui-3d-bar-uIw4YyRe.cjs} +1 -1
- package/dist/{vue-ui-accordion-wHRG3nXl.js → vue-ui-accordion-CQLN2WYC.js} +3 -3
- package/dist/{vue-ui-accordion-CTYvdLLH.cjs → vue-ui-accordion-QESF0r0U.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-vmCwgRy9.js → vue-ui-age-pyramid-Bj_3AooT.js} +8 -8
- package/dist/{vue-ui-age-pyramid-DDiL1Zje.cjs → vue-ui-age-pyramid-BqIkETbo.cjs} +1 -1
- package/dist/{vue-ui-annotator-DQ3wKf9n.cjs → vue-ui-annotator-CLCPtXoo.cjs} +1 -1
- package/dist/{vue-ui-annotator-9FGJdNLY.js → vue-ui-annotator-D0iuqAb9.js} +1 -1
- package/dist/{vue-ui-candlestick-6joQ9JKQ.cjs → vue-ui-candlestick-BBnC2umf.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DpMr2r0i.js → vue-ui-candlestick-D8AnaGwt.js} +9 -9
- package/dist/{vue-ui-carousel-table-CgR4ADOz.js → vue-ui-carousel-table-CV4YRYfq.js} +4 -4
- package/dist/{vue-ui-carousel-table-BV0EOLqU.cjs → vue-ui-carousel-table-DJtlOVqJ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CxoCcw_B.cjs → vue-ui-chestnut-CRkC7aeK.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Ca2878kV.js → vue-ui-chestnut-DxRF0eGJ.js} +6 -6
- package/dist/{vue-ui-cursor-BW8C6oUc.js → vue-ui-cursor-7KMholmU.js} +2 -2
- package/dist/{vue-ui-cursor-DxF_gXQf.cjs → vue-ui-cursor-DxDaK5kl.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DN4nErBZ.js → vue-ui-dashboard-BMEkgCKF.js} +2 -2
- package/dist/{vue-ui-dashboard-BGrVyITN.cjs → vue-ui-dashboard-CjmpoQWU.cjs} +1 -1
- package/dist/{vue-ui-digits-CpSKBG2c.cjs → vue-ui-digits-KxGiWJBe.cjs} +1 -1
- package/dist/{vue-ui-digits-CmSFSs5S.js → vue-ui-digits-slk9W4ek.js} +2 -2
- package/dist/{vue-ui-donut-BqfRwAIM.js → vue-ui-donut-CB3SfpSC.js} +9 -9
- package/dist/{vue-ui-donut-C29yXH3H.cjs → vue-ui-donut-CtkZaRur.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DIR7yBUC.js → vue-ui-donut-evolution-292a6FEA.js} +9 -9
- package/dist/{vue-ui-donut-evolution-COFG73Xl.cjs → vue-ui-donut-evolution-CptrmAtk.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BASuPAvI.js → vue-ui-dumbbell-BQrhfMqP.js} +8 -8
- package/dist/{vue-ui-dumbbell-1NA60u3h.cjs → vue-ui-dumbbell-Dx_-QB5p.cjs} +1 -1
- package/dist/{vue-ui-flow-DBK7d0DQ.cjs → vue-ui-flow-C12EMKoJ.cjs} +1 -1
- package/dist/{vue-ui-flow-wq0aqc5r.js → vue-ui-flow-CcCeNf_k.js} +7 -7
- package/dist/{vue-ui-galaxy-CFQ2hQAl.js → vue-ui-galaxy-BAIRiq85.js} +9 -9
- package/dist/{vue-ui-galaxy-BgdVvk4N.cjs → vue-ui-galaxy-CLVcP5Qh.cjs} +1 -1
- package/dist/{vue-ui-gauge-C4_kEbgg.cjs → vue-ui-gauge-eMLSa5k6.cjs} +1 -1
- package/dist/{vue-ui-gauge-CIN265dN.js → vue-ui-gauge-uFn_PRBN.js} +5 -5
- package/dist/{vue-ui-gizmo-BpT3iwC9.cjs → vue-ui-gizmo-C5hlmv34.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DRXWEpqU.js → vue-ui-gizmo-CkmuI8hn.js} +2 -2
- package/dist/{vue-ui-heatmap-Dc0ft_Ga.js → vue-ui-heatmap-C3oS64to.js} +8 -8
- package/dist/{vue-ui-heatmap-CVD7FVfk.cjs → vue-ui-heatmap-mnnjTuAS.cjs} +1 -1
- package/dist/{vue-ui-kpi-DDL1TvBP.js → vue-ui-kpi-CMn14HGk.js} +2 -2
- package/dist/{vue-ui-kpi-WDZIt76s.cjs → vue-ui-kpi-CpFr6mya.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-B2C5U55l.js → vue-ui-mini-loader-CxhRP0o3.js} +2 -2
- package/dist/{vue-ui-mini-loader-BcGSpUfg.cjs → vue-ui-mini-loader-DAE2b1aK.cjs} +1 -1
- package/dist/{vue-ui-molecule-C5BmRi2R.cjs → vue-ui-molecule-BMtrEZXu.cjs} +1 -1
- package/dist/{vue-ui-molecule-CD3cPNOq.js → vue-ui-molecule-Chxy44E1.js} +9 -9
- package/dist/{vue-ui-mood-radar-D0KbeV5j.js → vue-ui-mood-radar-B0944MVq.js} +9 -9
- package/dist/{vue-ui-mood-radar-afS64zg-.cjs → vue-ui-mood-radar-D70upaRv.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D-TeyOtL.cjs → vue-ui-nested-donuts-C8U02J9G.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BGoc1RFX.js → vue-ui-nested-donuts-Ct26fYcZ.js} +9 -9
- package/dist/{vue-ui-onion-B_khL0Kv.js → vue-ui-onion-BuAA53Z4.js} +9 -9
- package/dist/{vue-ui-onion-CFdbWLu3.cjs → vue-ui-onion-D7jdX-jE.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CP4V0K8m.js → vue-ui-parallel-coordinate-plot-DR7GBD64.js} +247 -237
- package/dist/vue-ui-parallel-coordinate-plot-DTXr6rYS.cjs +8 -0
- package/dist/{vue-ui-quadrant-C1YbjeI7.js → vue-ui-quadrant-D6XUNhwO.js} +10 -10
- package/dist/{vue-ui-quadrant-C6-A8Gx_.cjs → vue-ui-quadrant-DjY4UFmX.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CtWhs_2c.js → vue-ui-quick-chart-CHWpjYVZ.js} +6 -6
- package/dist/{vue-ui-quick-chart-ConXdEsU.cjs → vue-ui-quick-chart-a7twDc_t.cjs} +1 -1
- package/dist/{vue-ui-radar-DMJLLVWb.cjs → vue-ui-radar-BPH8c93c.cjs} +1 -1
- package/dist/{vue-ui-radar-B2vAPYa7.js → vue-ui-radar-w8--R-ur.js} +10 -10
- package/dist/{vue-ui-rating-DhZ0tltR.cjs → vue-ui-rating-Dfk9Umrh.cjs} +1 -1
- package/dist/{vue-ui-rating-xGz4av68.js → vue-ui-rating-DyAunqH4.js} +2 -2
- package/dist/{vue-ui-relation-circle-BQK8wMQE.js → vue-ui-relation-circle-BCCHpnpL.js} +5 -5
- package/dist/{vue-ui-relation-circle-hb4Q051h.cjs → vue-ui-relation-circle-COsMXD8M.cjs} +1 -1
- package/dist/{vue-ui-rings-ZKjhNx5K.js → vue-ui-rings-COm1RO2W.js} +9 -9
- package/dist/{vue-ui-rings-D1EW3d4M.cjs → vue-ui-rings-DrrT1cJn.cjs} +1 -1
- package/dist/{vue-ui-scatter-CMRe2b2K.cjs → vue-ui-scatter-BwlMCoqN.cjs} +1 -1
- package/dist/{vue-ui-scatter-CHONk8k0.js → vue-ui-scatter-ZjouDP_2.js} +10 -10
- package/dist/{vue-ui-screenshot-DmGe5ptH.js → vue-ui-screenshot-D0E4gBJg.js} +1 -1
- package/dist/{vue-ui-screenshot-DcKhT745.cjs → vue-ui-screenshot-DCAQ7EZR.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CJ2R5R6u.js → vue-ui-skeleton-HxNUOQim.js} +2 -2
- package/dist/{vue-ui-skeleton-j-IOiy5w.cjs → vue-ui-skeleton-lzhZVBa5.cjs} +1 -1
- package/dist/{vue-ui-smiley-D5Jn6d5f.cjs → vue-ui-smiley-BNglGFZl.cjs} +1 -1
- package/dist/{vue-ui-smiley-DXVcosKR.js → vue-ui-smiley-xoGBumeP.js} +2 -2
- package/dist/{vue-ui-spark-trend-CWH3W7h3.cjs → vue-ui-spark-trend-9z2-nnDf.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Gg6TxR4m.js → vue-ui-spark-trend-BP91Hhbk.js} +4 -4
- package/dist/{vue-ui-sparkbar-DUx1qVzQ.js → vue-ui-sparkbar-BV7lv1Mc.js} +3 -3
- package/dist/{vue-ui-sparkbar-BsoKTXr2.cjs → vue-ui-sparkbar-CBwEk4Sp.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-xrvp9g87.js → vue-ui-sparkgauge-DAcXHJe3.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DPusPoRv.cjs → vue-ui-sparkgauge-mf9TWCfM.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram---JRg2R1.cjs → vue-ui-sparkhistogram-BLG-wdNd.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DzYXMNj8.js → vue-ui-sparkhistogram-Cw8kAsVJ.js} +4 -4
- package/dist/{vue-ui-sparkline-1Z6GnwoN.cjs → vue-ui-sparkline-BIxUq0a0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CGWePkVI.js → vue-ui-sparkline-DtMX5BBW.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DFgeRAbQ.js → vue-ui-sparkstackbar-Boz0na6c.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DCc68t8g.cjs → vue-ui-sparkstackbar-CcNK8jkC.cjs} +1 -1
- package/dist/vue-ui-stackbar-DFK6zb17.cjs +6 -0
- package/dist/vue-ui-stackbar-Yj49aOwn.js +786 -0
- package/dist/{vue-ui-strip-plot-DZt1Wq20.cjs → vue-ui-strip-plot-BUpDy3ST.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BFqd-S7c.js → vue-ui-strip-plot-CTVAbRx1.js} +9 -9
- package/dist/{vue-ui-table-CMvyMuc4.cjs → vue-ui-table-Bn0Sh_ll.cjs} +1 -1
- package/dist/{vue-ui-table-DtwEoIzI.js → vue-ui-table-JW8Ddbcv.js} +1 -1
- package/dist/{vue-ui-table-heatmap-3RSMOHkc.cjs → vue-ui-table-heatmap-CBt2T6Fi.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-C8b3pE04.js → vue-ui-table-heatmap-D_hgGOnV.js} +4 -4
- package/dist/{vue-ui-table-sparkline-BKOaVFtt.cjs → vue-ui-table-sparkline-CE15fs3Z.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BrqhBv29.js → vue-ui-table-sparkline-lTi-b4a9.js} +5 -5
- package/dist/{vue-ui-thermometer-CKgIqM5y.cjs → vue-ui-thermometer-CnOa_c88.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DMkLvJgE.js → vue-ui-thermometer-DDaejskt.js} +5 -5
- package/dist/{vue-ui-timer-RA9yfgBk.js → vue-ui-timer-BTkcHF3d.js} +4 -4
- package/dist/{vue-ui-timer-D7fvoR77.cjs → vue-ui-timer-DFN5EbaX.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C7y6Mbxe.cjs → vue-ui-tiremarks-CHMhRw0X.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-B_EncUi6.js → vue-ui-tiremarks-CaCbMety.js} +5 -5
- package/dist/{vue-ui-treemap-CfngjVUS.cjs → vue-ui-treemap-BKRQnqlg.cjs} +1 -1
- package/dist/{vue-ui-treemap-BuGZgQsr.js → vue-ui-treemap-CRGZXH3Z.js} +9 -9
- package/dist/vue-ui-vertical-bar-DppxsDym.cjs +4 -0
- package/dist/vue-ui-vertical-bar-OiHb4ABm.js +805 -0
- package/dist/{vue-ui-waffle-BJFbhWnA.cjs → vue-ui-waffle-CIoGXtZP.cjs} +1 -1
- package/dist/{vue-ui-waffle-CrxmrYsV.js → vue-ui-waffle-ChcZm0_Q.js} +55 -55
- package/dist/{vue-ui-wheel-BDRvKR1Z.cjs → vue-ui-wheel-BVDHANbp.cjs} +1 -1
- package/dist/{vue-ui-wheel-DOyC7NgR.js → vue-ui-wheel-DRgqt22e.js} +5 -5
- package/dist/{vue-ui-word-cloud-DBxVNlJ3.js → vue-ui-word-cloud-B2OjEeWK.js} +7 -7
- package/dist/{vue-ui-word-cloud-Dmcelg3z.cjs → vue-ui-word-cloud-BbAFa1J5.cjs} +1 -1
- package/dist/{vue-ui-xy-CVKaR90p.cjs → vue-ui-xy-6Qnf5k-u.cjs} +1 -1
- package/dist/{vue-ui-xy-BIbvJSh2.js → vue-ui-xy-Cf3D_9Em.js} +12 -12
- package/dist/{vue-ui-xy-canvas-2AaNivzI.cjs → vue-ui-xy-canvas-ZvG2lyjk.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CXVni3kC.js → vue-ui-xy-canvas-ihJeRvA1.js} +10 -10
- package/package.json +1 -1
- package/dist/index-hKWfT7Wa.cjs +0 -4
- package/dist/vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs +0 -8
- package/dist/vue-ui-stackbar-B0dWToaf.js +0 -765
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +0 -15
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +0 -4
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +0 -792
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-hKWfT7Wa.cjs"),ae=require("./useNestedProp-Cggpoz7e.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./usePrinter-DoYKBzst.cjs"),be=require("./Slicer-BXveU40S.cjs"),pe=require("./Tooltip-Oicp_EIo.cjs"),fe=require("./Title-BU6E8Xld.cjs"),ke=require("./Legend-B20rRwGi.cjs"),xe=require("./vue-ui-accordion-CTYvdLLH.cjs"),Ce=require("./DataTable-Doh_4M84.cjs"),we=require("./vue-ui-skeleton-j-IOiy5w.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],Se=["xmlns","viewBox"],$e={key:0},Ne=["id"],ze=["stop-color"],_e=["stop-color"],Te=["stop-color"],Ee=["x1","x2","y1","y2","stroke"],Ve=["x1","x2","y1","y2","stroke"],Re=["d","fill","stroke","stroke-width"],Pe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],De=["x","y","font-size","fill","font-weight"],Me=["transform","font-size","fill","font-weight"],Oe=["x","y","font-size","fill","font-weight"],Ie={key:0},qe=["x","y","font-size","font-weight","fill"],Ae=["x1","x2","y1","y2","stroke"],He=["x","y","font-size","font-weight","fill"],Ue=["text-anchor","font-size","font-weight","fill","transform"],We=["x","y","width","height","onClick","onMouseenter","fill"],Ge={key:3,class:"vue-data-ui-watermark"},Ye=["onClick"],Xe=["innerHTML"],Je={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(F,{expose:re,emit:D}){const p=F,{vue_ui_stackbar:se}=i.useConfig(),C=e.computed({get(){return!!p.dataset&&p.dataset.length},set(l){return l}}),B=e.ref(null),_=e.ref(i.createUid()),T=e.ref(!1),M=e.ref(null),E=e.ref(""),b=e.ref([]),O=e.ref(0),I=e.ref(null),q=e.ref(null),A=e.ref(null),H=e.ref(0),V=e.ref(!1),R=e.ref(null);e.onMounted(()=>{i.objectIsEmpty(p.dataset)?i.error({componentName:"VueUiStackbar",type:"dataset"}):p.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{C.value=!1,i.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:o})})})});const t=e.computed(()=>{const l=ae.useNestedProp({userConfig:p.config,defaultConfig:se});return l.theme?{...ae.useNestedProp({userConfig:i.themes.vue_ui_stackbar[l.theme]||p.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}),m=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:U,isImaging:W,generatePdf:G,generateImage:Y}=oe.usePrinter({elementId:`stackbar_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),S=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),ne=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),X=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=le.throttle(()=>{const{width:o,height:a}=le.useResponsive({chart:B.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?q.value:null,slicer:t.value.style.chart.zoom.show&&$.value>1?A.value:null});S.value.width=o,S.value.height=a});X.value=new ResizeObserver(l),X.value.observe(B.value.parentNode)}});const n=e.computed(()=>{const{height:l,width:o}=S.value,{right:a}=S.value.paddingRatio,r=t.value.style.chart.padding.top,s=o-o*a,u=l-t.value.style.chart.padding.bottom,v=t.value.style.chart.padding.left,g=o-v-o*a,y=l-r-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:o,top:r,right:s,bottom:u,left:v,width:g,height:y}}),w=e.computed(()=>p.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ne.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,absoluteIndex:o,id:i.createUid(),color:a}})),$=e.computed(()=>Math.max(...w.value.filter(l=>!b.value.includes(l.id)).map(l=>l.series.length))),c=e.ref({start:0,end:Math.max(...p.dataset.map(l=>l.series.length))});function ue(){c.value={start:0,end:Math.max(...p.dataset.map(l=>l.series.length))},H.value+=1}const h=e.computed(()=>{const l=n.value.width/(c.value.end-c.value.start);return l<=0?0:l}),x=e.computed(()=>i.sumSeries(w.value.filter(l=>!b.value.includes(l.id))).slice(c.value.start,c.value.end)),P=e.computed(()=>{const l=Math.max(...x.value),o=i.calculateNiceScale(0,l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(a=>({y:n.value.bottom-n.value.height*(a/o.max),x:n.value.left-8,value:a}))}),N=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(c.value.start,c.value.end)),d=e.computed(()=>{if(!C.value)return[];let l=Array($.value).fill(0);const o=n.value.height,a=Math.max(...x.value),s=i.calculateNiceScale(0,a,t.value.style.chart.grid.scale.ticks).max;return w.value.filter(u=>!b.value.includes(u.id)).map(u=>{const v=u.series.slice(c.value.start,c.value.end);return{...u,proportions:v.map((g,y)=>t.value.style.chart.bars.distributed?(g||0)/x.value[y]:(g||0)/s),series:v,x:v.map((g,y)=>n.value.left+h.value*y+h.value*t.value.style.chart.bars.gapRatio/4),y:v.map((g,y)=>{const f=t.value.style.chart.bars.distributed?(g||0)/x.value[y]:(g||0)/s,L=o*f,k=o-L-l[y];return l[y]+=L,k+n.value.top}),height:v.map((g,y)=>{const f=t.value.style.chart.bars.distributed?(g||0)/x.value[y]:(g||0)/s;return o*f<=0?0:o*f})}})}),ie=e.computed(()=>{const l=Math.max(...x.value),a=i.calculateNiceScale(0,l,t.value.style.chart.grid.scale.ticks).max;return x.value.map((r,s)=>({value:r,y:(1-r/a)*n.value.height}))});function J(l,o,a,r){return i.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:l,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:o,seriesIndex:a,datapointIndex:r})}function ce(l,o,a,r){return i.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,i.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:o,seriesIndex:a,datapointIndex:r})}function de(l){const o=JSON.parse(JSON.stringify(d.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));D("selectDatapoint",{datapoint:o,period:N.value[l]})}function ve(l){R.value=l,T.value=!0;const o=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(d.value)).map(s=>({name:s.name,value:s.series[l]===0?0:s.series[l]||null,proportion:s.proportions[l]||null,color:s.color,id:s.id})),r=a.map(s=>s.value).reduce((s,u)=>s+u,0);if(i.isFunction(o)&&i.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:d.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:d.value,config:t.value});else{const{showValue:s,showPercentage:u,borderColor:v,roundingValue:g,roundingPercentage:y}=t.value.style.chart.tooltip;let f="";N.value[l]&&(f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${v};padding-bottom:6px;margin-bottom:3px;">${N.value[l]}</div>`);const L=[s&&u?"(":"",s&&u?")":""];a.reverse().forEach(k=>{f+=`
|
|
2
|
-
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
3
|
-
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${k.id})`:k.color}"/></svg>
|
|
4
|
-
${k.name}${s||u?":":""} ${s?i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:k.value,s:t.value.style.chart.bars.dataLabels.suffix,r:g}):""} ${L[0]}${u?i.dataLabel({v:isNaN(k.value/r)?0:k.value/r*100,s:"%",r:y}):""}${L[1]}
|
|
5
|
-
</div>
|
|
6
|
-
`}),E.value=`<div>${f}</div>`}}function he(l){V.value=l,O.value+=1}function K(){m.value.showTable=!m.value.showTable}function Q(){m.value.dataLabels.show=!m.value.dataLabels.show}function Z(){m.value.showTooltip=!m.value.showTooltip}function ge(){return d.value}const j=e.computed(()=>{if(d.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=d.value.map(({name:a,color:r})=>({label:a,color:r})),o=[];for(let a=c.value.start;a<c.value.end;a+=1){const r=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];w.value.forEach(s=>{r.push(Number((s.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),o.push(r)}return{head:l,body:o}});function ee(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...j.value.head.map(u=>u.label)],a=j.value.body,r=l.concat([o]).concat(a),s=i.createCsvContent(r);i.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const z=e.computed(()=>{const l=[""].concat(d.value.map(s=>s.name)).concat(' <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>');let o=[];for(let s=0;s<$.value;s+=1){const u=d.value.map(v=>v.series[s]??0).reduce((v,g)=>v+g,0);o.push([t.value.style.chart.grid.x.timeLabels.values.slice(c.value.start,c.value.end)[s]??s+1].concat(d.value.map(v=>(v.series[s]??0).toFixed(t.value.table.td.roundingValue))).concat((u??0).toFixed(t.value.table.td.roundingValue)))}const a={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},r=[t.value.table.columnNames.period].concat(d.value.map(s=>s.name)).concat(t.value.table.columnNames.total);return{head:l,body:o.slice(0,c.value.end-c.value.start),config:a,colNames:r}});function ye(l,o){if(D("selectLegend",d.value.find(a=>a.absoluteIndex===l)),b.value.includes(o.id))b.value=b.value.filter(a=>a!==o.id);else{if(b.value.length===w.value.length-1)return;b.value.push(o.id)}}const te=e.computed(()=>w.value.map((l,o)=>({...l,shape:"square"})).map(l=>({...l,opacity:b.value.includes(l.id)?.5:1,segregate:()=>ye(l.absoluteIndex,l),isSegregated:b.value.includes(l.id)}))),me=e.computed(()=>({cy:"stackbar-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":""}));return re({getData:ge,generatePdf:G,generateCsv:ee,generateImage:Y,toggleTable:K,toggleLabels:Q,toggleTooltip:Z}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${_.value}`,ref_key:"stackbarChart",ref:B,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":V.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),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};padding-bottom:24px`)},[e.createVNode(fe._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(W),uid:_.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,chartElement:B.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:he,onGeneratePdf:e.unref(G),onGenerateCsv:ee,onGenerateImage:e.unref(Y),onToggleTable:K,onToggleLabels:Q,onToggleTooltip:Z},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${n.value.chartWidth<=0?10:n.value.chartWidth} ${n.value.chartHeight<=0?10:n.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,ze),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(i.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,_e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left,x2:n.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,Ee))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.end-c.value.start+1,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left+h.value*r,x2:n.value.left+h.value*r,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1},null,8,Ve))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(s,u)=>(e.openBlock(),e.createElementBlock("path",{d:r===d.value.length-1&&d.value.at(-1).series[u]||!d.value.at(-1).series[u]&&r<d.value.length-1&&d.value[r].series[u]&&!d.value[r+1].series[u]?`M ${s},${a.y[u]}
|
|
7
|
-
h ${h.value*(1-t.value.style.chart.bars.gapRatio/2)-t.value.style.chart.bars.borderRadius}
|
|
8
|
-
a ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius} 0 0 1 ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius}
|
|
9
|
-
v ${a.height[u]-t.value.style.chart.bars.borderRadius<0?0:a.height[u]-t.value.style.chart.bars.borderRadius}
|
|
10
|
-
h -${h.value*(1-t.value.style.chart.bars.gapRatio/2)}
|
|
11
|
-
v -${a.height[u]-t.value.style.chart.bars.borderRadius<0?0:a.height[u]-t.value.style.chart.bars.borderRadius}
|
|
12
|
-
a ${t.value.style.chart.bars.borderRadius},${t.value.style.chart.bars.borderRadius} 0 0 1 ${t.value.style.chart.bars.borderRadius},-${t.value.style.chart.bars.borderRadius} z`:`M ${s},${a.y[u]}
|
|
13
|
-
h ${h.value*(1-t.value.style.chart.bars.gapRatio/2)}
|
|
14
|
-
v ${a.height[u]<0?0:a.height[u]}
|
|
15
|
-
h -${h.value*(1-t.value.style.chart.bars.gapRatio/2)} z`,fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation})},null,10,Re))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:3,x1:n.value.left,x2:n.value.right,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:4,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Fe)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:5,x:n.value.left+n.value.width/2,y:n.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,De)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:6,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${n.value.top+n.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,Me)):e.createCommentVNode("",!0),m.value.dataLabels.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s+h.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[u]+a.proportions[u]*n.value.height/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(i.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?ce(a.proportions[u]*100,a,r,u):J(a.series[u],a,r,u)),9,Oe))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&d.value.length>1?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(a,r)=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+h.value*r+h.value/2,y:(t.value.style.chart.bars.distributed?n.value.top-t.value.style.chart.bars.totalValues.fontSize/3:a.y)+t.value.style.chart.bars.totalValues.offsetY,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(J(a.value,a,r)),9,qe))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left,x2:n.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,r)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,He))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:9},e.renderList(N.value,(a,r)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${n.value.left+h.value*r+h.value/2}, ${n.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,Ue))),256)):e.createCommentVNode("",!0),m.value.showTooltip?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:10},e.renderList(c.value.end-c.value.start,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{x:n.value.left+r*h.value,y:n.value.top,width:h.value,height:n.value.height,onClick:s=>de(r),onMouseenter:s=>ve(r),onMouseleave:o[0]||(o[0]=s=>{R.value=null,T.value=!1}),fill:r===R.value?t.value.style.chart.highlighter.color+e.unref(i.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,We))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...n.value})),void 0,!0)],12,Se)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&$.value>1?(e.openBlock(),e.createBlock(be.Slicer,{key:`slicer_${H.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[c.value.start]?t.value.style.chart.grid.x.timeLabels.values[c.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[c.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...F.dataset.map(a=>a.series.length)),min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":o[1]||(o[1]=a=>c.value.start=a),end:c.value.end,"onUpdate:end":o[2]||(o[2]=a=>c.value.end=a),onReset:ue},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(pe._sfc_main,{show:m.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:E.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show&&C.value?(e.openBlock(),e.createBlock(ke.Legend,{key:0,legendSet:te.value,config:me.value,onClickMarker:o[3]||(o[3]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${b.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Ye)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),c.value.end-c.value.start<200?(e.openBlock(),e.createBlock(xe.default,{key:5,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,Xe)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(i.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Le))}},Ke=Be._export_sfc(Je,[["__scopeId","data-v-63fd67c1"]]);exports.default=Ke;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-hKWfT7Wa.cjs"),ee=require("./useResponsive-B3TrDDIG.cjs"),be=require("./Title-BU6E8Xld.cjs"),te=require("./usePrinter-DoYKBzst.cjs"),me=require("./Tooltip-Oicp_EIo.cjs"),le=require("./Legend-B20rRwGi.cjs"),ke=require("./vue-ui-skeleton-j-IOiy5w.cjs"),Ce=require("./BaseIcon-DDCJA3rm.cjs"),xe=require("./vue-ui-accordion-CTYvdLLH.cjs"),ae=require("./useNestedProp-Cggpoz7e.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],we=["onClick"],Ne=["xmlns","viewBox"],Se=["id"],Ve=["stop-color"],Te=["stop-color"],Ee=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx","stroke","stroke-width"],Le=["x2","y1","y2","stroke","stroke-width"],ze=["x","y","font-size","fill","font-weight"],Pe=["x","y","font-size","fill","font-weight"],De=["x","y","font-size","fill","font-weight"],Fe=["x","y","font-size","fill","font-weight"],Ie=["y","width","height","fill","onMouseenter"],Oe={key:4,class:"vue-data-ui-watermark"},Re=["onClick"],Me={style:"width:100%;padding-top: 36px;position:relative"},qe={class:"vue-ui-data-table"},He={key:0},Ue={style:{width:"100%"}},Ae=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe=["data-cell"],je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},We=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ze={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(oe,{expose:ne,emit:re}){const f=oe;e.useCssVars(l=>({"7e8202ad":l.tdo}));const{vue_ui_vertical_bar:ue}=r.useConfig(),S=e.computed(()=>!!f.dataset&&f.dataset.length),b=e.ref(r.createUid()),ie=e.ref(null),E=e.ref(!1),B=e.ref(""),V=e.ref(0),se=e.ref(null),F=e.ref(0),C=e.ref(null),I=e.ref(null),L=e.ref(null),t=e.computed(()=>{const l=ae.useNestedProp({userConfig:f.config,defaultConfig:ue});return l.theme?{...ae.useNestedProp({userConfig:r.themes.vue_ui_vertical_bar[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:O,isImaging:R,generatePdf:M,generateImage:q}=te.usePrinter({elementId:`vue-ui-vertical-bar_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),H=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),U=e.ref(null),A=e.ref(!1),ce=e.computed(()=>t.value.table.responsiveBreakpoint),T=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiVerticalBar",type:"dataset"}),V.value=f.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),de(),t.value.responsive){const l=ee.throttle(()=>{const{width:o,height:a}=ee.useResponsive({chart:C.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?L.value:null});j.value=o,s.value=a/V.value-d.value*2});T.value=new ResizeObserver(l),T.value.observe(C.value.parentNode)}}),e.onBeforeUnmount(()=>{T.value&&T.value.disconnect()});function de(){new ResizeObserver(o=>{o.forEach(a=>{A.value=a.contentRect.width<ce.value})}).observe(U.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),G=e.computed(()=>h.value.sortDesc),m=e.computed(()=>(f.dataset.forEach((l,o)=>{l.children&&(r.objectIsEmpty(l.children)?r.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,n)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:n})}))}),f.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${b.value}`,n=!!l.children&&l.children.length>0;return![null,void 0].includes(l.value)&&l.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${l.name||"serie at index"+o} has the following value: ${l.value}`),{...l,id:a,shape:"square",opacity:y.value.includes(a)?.5:1,value:n?l.children.map(u=>u.value||0).reduce((u,i)=>u+i,0):l.value||0,hasChildren:n,isChild:!1,segregate:()=>x(a),isSegregated:y.value.includes(a),color:r.convertColorToHex(l.color)||H.value[o]||r.palette[o]||r.palette[o%r.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((u,i)=>G.value?i.value-u.value:u.value-i.value).map((u,i)=>(![null,void 0].includes(u.value)&&u.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${u.name+" child serie"||"child serie at index"+o+", "+i} has the following value: ${u.value}`),{...u,value:u.value||0,isChild:!0,parentId:a,parentName:l.name,parentValue:l.value,id:`vertical_child_${o}_${i}_${b.value}`,childIndex:i,color:r.convertColorToHex(u.color)||r.convertColorToHex(l.color)||H.value[o]||r.palette[o]||r.palette[o%r.palette.length]})).map((u,i)=>({...u,isFirstChild:i===0,isLastChild:i===l.children.length-1}))}}).toSorted((l,o)=>G.value?o.value-l.value:l.value-o.value))),X=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),d=e.ref(t.value.style.chart.layout.bars.gap),ve=e.computed(()=>(s.value+d.value)*V.value),j=e.ref(512),c=e.computed(()=>({width:j.value,height:ve.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),v=e.computed(()=>({fullHeight:c.value.padding.top+c.value.padding.bottom+c.value.height,top:c.value.padding.top,left:c.value.padding.left,right:c.value.width-c.value.padding.right,bottom:c.value.padding.top+c.value.height,width:c.value.width-(c.value.padding.left+c.value.padding.right)}));function z(){V.value=k.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const y=e.ref([]);function x(l){y.value.includes(l)?y.value=y.value.filter(o=>o!==l):y.value.push(l),z(),re("selectLegend",k.value)}const k=e.computed(()=>m.value.filter(l=>!y.value.includes(l.id))),g=e.computed(()=>k.value.map(l=>l.value).reduce((l,o)=>l+o));function W(l,o=!1,a=0){return o?r.dataLabel({v:l/g.value*100,s:"%",r:a}):l/g.value}const _=e.computed(()=>k.value.flatMap(l=>l.hasChildren?l.children:l)),he=e.computed(()=>Math.max(...k.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function $(l){const o=l/he.value;return v.value.width*o}function pe(l){return $(l)+v.value.left}function w(l,o){const a=k.value.find(i=>i.id===l.parentId),n=v.value.top+(d.value+s.value)*o,u=a.children.length*(d.value+s.value);return{y:n+u/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.value.toFixed(t.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(a.value/g.value)?"":W(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function ye(){return k.value}const P=e.ref(null),D=e.ref(null);function ge(l,o){D.value={datapoint:l,seriesIndex:o,series:m.value,config:t.value},E.value=!0,P.value=l.id;let a="";const n=l.isChild?l.parentName:l.name,u=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;r.isFunction(i)&&r.functionReturnsString(()=>i({datapoint:l,series:m.value,config:t.value,seriesIndex:o}))?B.value=i({datapoint:l,series:m.value,config:t.value,seriesIndex:o}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
|
-
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${l.color}"/></svg> ${n}</div>
|
|
3
|
-
${u?`<div>${u}</div>`:""}
|
|
4
|
-
</div>`,t.value.style.chart.tooltip.showValue&&(a+=`<div>${t.value.translations.value}: <b>${r.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,r.dataLabel({p:t.value.style.chart.tooltip.prefix,v:l.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(a+=`<div>${t.value.translations.percentageToTotal} : <b>${r.dataLabel({v:l.value/g.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,l.isChild&&(a+=`<div>${t.value.translations.percentageToSerie}: <b>${r.dataLabel({v:l.value/l.parentValue*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),B.value=`<div style="text-align:left">${a}</div>`)}function Y(l,o,a){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const n=r.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,l,r.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:l,s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:a}),u=`(${W(l,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${n}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${u}`:""}`}const p=e.computed(()=>{const l=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=_.value.map(a=>a.isChild?a.isFirstChild?{color:a.color,parentName:a.parentName,parentValue:a.parentValue,percentageToTotal:a.parentValue/g.value,childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/g.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/g.value}:{color:a.color,parentName:a.name,parentValue:a.value,percentageToTotal:a.value/g.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:l,body:o}});function K(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=p.value.head,a=p.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),n=l.concat([o]).concat(a),u=r.createCsvContent(n);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const N=e.ref(!1);function fe(l){N.value=l,F.value+=1}function J(){h.value.showTable=!h.value.showTable}function Q(){h.value.sortDesc=!h.value.sortDesc,z()}function Z(){h.value.showTooltip=!h.value.showTooltip}return ne({getData:ye,recalculateHeight:z,generatePdf:M,generateCsv:K,generateImage:q,toggleTable:J,toggleSort:Q,toggleTooltip:Z}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:C,id:`vue-ui-vertical-bar_${b.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[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};padding-bottom:12px`)},[e.createVNode(be._sfc_main,{config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(te.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(O),uid:b.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,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(M),onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleTable:J,onToggleSort:Q,onToggleTooltip:Z},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartLegend",ref:L},[e.createVNode(le.Legend,{legendSet:m.value,config:X.value,onClickMarker:o[0]||(o[0]=({legend:a})=>x(a.id))},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>x(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix,v:a.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:n})),13,we)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${c.value.width<=0?10:c.value.width} ${v.value.fullHeight<=0?10:v.value.fullHeight}`,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(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(a.color,.03)}${e.unref(r.opacity)[100-t.value.style.chart.layout.bars.gradientIntensity]}`},null,8,Te)],8,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ee)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${b.value}_${n})`:`${a.color}${e.unref(r.opacity)[t.value.style.chart.layout.bars.fillOpacity]}`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?a.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Be),(!a.isChild||a.isLastChild)&&t.value.style.chart.layout.separators.show&&n!==_.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:v.value.left,y1:s.value+d.value/2+v.value.top+(d.value+s.value)*n,y2:s.value+d.value/2+v.value.top+(d.value+s.value)*n,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,Le)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:pe(a.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(Y(a.value,a,n)),9,ze),(a.isChild||!a.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"end",x:v.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(a.name),9,Pe)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:w(a,n).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(w(a,n).name),9,De)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:w(a,n).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(Y(w(a,n).value),w(a,n),n),9,Fe)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:v.value.top+(d.value+s.value)*n-d.value/2,width:c.value.width<=0?1e-4:c.value.width,height:s.value+d.value<=0?1e-4:s.value+d.value,fill:P.value===a.id?`${t.value.style.chart.layout.highlighter.color}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:u=>ge(a,n),onMouseleave:o[1]||(o[1]=u=>{se.value=null,E.value=!1,P.value=null})},null,40,Ie)]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:5,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:L},[e.createVNode(le.Legend,{legendSet:m.value,config:X.value,onClickMarker:o[2]||(o[2]=({legend:a})=>x(a.id))},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:u=>x(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.legend.prefix,v:a.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:n})),13,Re)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:m.value},void 0,!0),e.createVNode(me._sfc_main,{show:h.value.showTooltip&&E.value&&y.value.length<f.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:C.value,content:B.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({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(xe.default,{key:7,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Me,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=a=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(a=>h.value.showTable=!1,["enter"]))},[e.createVNode(Ce.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":A.value})},[e.createElementVNode("table",qe,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.head,a=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",Ue,e.toDisplayString(a),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(g.value)?"":g.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.body,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":p.value.head[0]??""},[e.createElementVNode("div",Ge,[a.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.parentName),1)])],12,Ae),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[1]??""},[e.createElementVNode("div",je,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.parentValue)?"":a.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Xe),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[2]??""},[e.createElementVNode("div",Ye,e.toDisplayString(["",NaN,void 0].includes(a.percentageToTotal)?"":`${(a.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,We),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[3]??""},[e.createElementVNode("div",Je,e.toDisplayString(a.childName),1)],12,Ke),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[4]??""},[e.createElementVNode("div",Ze,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.childValue)?"":a.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Qe),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[5]??""},[e.createElementVNode("div",tt,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToParent)?"":`${(a.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[6]??""},[e.createElementVNode("div",at,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToTotal)?"":`${(a.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,lt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,$e))}},nt=_e._export_sfc(ot,[["__scopeId","data-v-85b13f41"]]);exports.default=nt;
|