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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D5gus_lg.cjs"),C=require("./useNestedProp-dfy-beYA.cjs"),E=require("./vue-ui-skeleton-lzhZVBa5.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,H)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-D5gus_lg.cjs"),de=require("./useNestedProp-dfy-beYA.cjs"),ve=require("./useResponsive-B3TrDDIG.cjs"),he=require("./usePrinter-D9HscgWK.cjs"),_e=require("./Slicer-DMZ03tYD.cjs"),Ee=require("./Tooltip-Dc_Vk9k7.cjs"),Ve=require("./Title-C6kjiyFi.cjs"),Pe=require("./Legend-DUjHDr5A.cjs"),Me=require("./vue-ui-accordion-QESF0r0U.cjs"),Fe=require("./DataTable-BShm3pg0.cjs"),Re=require("./vue-ui-skeleton-lzhZVBa5.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ie=["id"],De=["xmlns","viewBox"],Ae={key:0},qe=["id"],He=["stop-color"],Ue=["stop-color"],We=["stop-color"],Ge=["x1","x2","y1","y2","stroke"],Ye=["x1","x2","y1","y2","stroke"],Xe=["x","y","height","rx","width","fill","stroke","stroke-width"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x","y","font-size","fill","font-weight"],Qe=["transform","font-size","fill","font-weight"],je=["x","y","font-size","fill","font-weight"],et={key:0},tt=["x","y","font-size","font-weight","fill"],at=["x1","x2","y1","y2","stroke"],lt=["x","y","font-size","font-weight","fill"],ot=["text-anchor","font-size","font-weight","fill","transform"],rt=["x","y","width","height","onClick","onMouseenter","fill"],st={key:3,class:"vue-data-ui-watermark"},nt=["onClick"],it=["innerHTML"],ut={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(U,{expose:ge,emit:W}){const f=U,{vue_ui_stackbar:me}=i.useConfig(),S=e.computed({get(){return!!f.dataset&&f.dataset.length},set(l){return l}}),L=e.ref(null),O=e.ref(i.createUid()),I=e.ref(!1),G=e.ref(null),D=e.ref(""),m=e.ref([]),Y=e.ref(0),X=e.ref(null),J=e.ref(null),Z=e.ref(null),K=e.ref(0),A=e.ref(!1),q=e.ref(null),V=e.ref(!1);e.onMounted(()=>{i.objectIsEmpty(f.dataset)?i.error({componentName:"VueUiStackbar",type:"dataset"}):f.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{S.value=!1,i.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:o})})}),setTimeout(()=>{V.value=!0},10)});const t=e.computed(()=>{const l=de.useNestedProp({userConfig:f.config,defaultConfig:me});return l.theme?{...de.useNestedProp({userConfig:i.themes.vue_ui_stackbar[l.theme]||f.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}),y=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:Q,isImaging:j,generatePdf:ee,generateImage:te}=he.usePrinter({elementId:`stackbar_${O.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),P=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}}),ye=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),ae=e.ref(null),le=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const l=ve.throttle(()=>{V.value=!1;const{width:o,height:a}=ve.useResponsive({chart:L.value,title:t.value.style.chart.title.text?X.value:null,legend:t.value.style.chart.legend.show?J.value:null,slicer:t.value.style.chart.zoom.show&&N.value>1?Z.value:null});P.value.width=o,P.value.height=a,clearTimeout(le.value),le.value=setTimeout(()=>{V.value=!0},10)});ae.value=new ResizeObserver(l),ae.value.observe(L.value.parentNode)}});const n=e.computed(()=>{const{height:l,width:o}=P.value,{right:a}=P.value.paddingRatio,r=t.value.style.chart.padding.top,s=o-o*a,c=l-t.value.style.chart.padding.bottom,h=t.value.style.chart.padding.left,C=o-h-o*a,w=l-r-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:o,top:r,right:s,bottom:c,left:h,width:C,height:w<0?0:w}}),x=e.computed(()=>f.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||ye.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(r=>t.value.style.chart.bars.distributed?Math.abs(r):r),signedSeries:l.series.map(r=>r>=0?1:-1),absoluteIndex:o,id:i.createUid(),color:a}})),N=e.computed(()=>Math.max(...x.value.filter(l=>!m.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...f.dataset.map(l=>l.series.length))});function pe(){u.value={start:0,end:Math.max(...f.dataset.map(l=>l.series.length))},K.value+=1}const p=e.computed(()=>{const l=n.value.width/(u.value.end-u.value.start);return l<=0?0:l}),$=e.computed(()=>i.sumSeries(x.value.filter(l=>!m.value.includes(l.id))).slice(u.value.start,u.value.end)),M=e.computed(()=>{const l=x.value.filter(o=>!m.value.includes(o.id));return{positive:i.sumSeries(l.map(o=>({...o,series:o.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:i.sumSeries(l.map(o=>({...o,series:o.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),T=e.computed(()=>{const l=Math.max(...M.value.positive),o=Math.min(...M.value.negative),a=[-1/0,1/0,NaN,void 0,null].includes(o)?0:o,r=i.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return r.ticks.map(s=>({zero:n.value.bottom-n.value.height*(Math.abs(r.min)/(r.max+Math.abs(r.min))),y:n.value.bottom-n.value.height*((s+Math.abs(r.min))/(r.max+Math.abs(r.min))),x:n.value.left-8,value:s}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),d=e.computed(()=>{if(!S.value)return[];let l=Array(N.value).fill(0),o=Array(N.value).fill(0);const a=Math.max(...M.value.positive)||0,r=Math.min(...M.value.negative),s=[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,c=i.calculateNiceScale(s>0?0:s,a<0?0:a,t.value.style.chart.grid.scale.ticks),{min:h,max:C}=c,w=C+(h>=0?0:Math.abs(h))||1,k=n.value.height,z=T.value[0]?T.value[0].zero:n.value.bottom;return x.value.filter(b=>!m.value.includes(b.id)).map(b=>{const B=b.series.slice(u.value.start,u.value.end),Le=b.signedSeries.slice(u.value.start,u.value.end),Ne=B.map((v,g)=>n.value.left+p.value*g+p.value*t.value.style.chart.bars.gapRatio/4),$e=B.map((v,g)=>{const _=t.value.style.chart.bars.distributed?(v||0)/$.value[g]:(v||0)/w;let H,E;return v>0?(E=k*_,H=z-E-l[g],l[g]+=E):(E=k*_,H=z+o[g],o[g]+=Math.abs(E)),H}),Te=B.map((v,g)=>{const _=t.value.style.chart.bars.distributed?(v||0)/$.value[g]:(v||0)/w;return v>0?k*_:k*Math.abs(_)}),ze=B.map(v=>Math.abs(v)).reduce((v,g)=>v+g,0);return{...b,proportions:B.map((v,g)=>t.value.style.chart.bars.distributed?(v||0)/$.value[g]:(v||0)/ze),series:B,signedSeries:Le,x:Ne,y:$e,height:Te}})}),be=e.computed(()=>{const l=Math.max(...$.value),a=i.calculateNiceScale(0,l,t.value.style.chart.grid.scale.ticks).max;return $.value.map((r,s)=>({value:r,y:(1-r/a)*n.value.height}))});function oe(l,o,a,r,s){const c=t.value.style.chart.bars.distributed?s===1?l:-l:l;return i.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,c,i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:c,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:o,seriesIndex:a,datapointIndex:r})}function fe(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 ke(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}));W("selectDatapoint",{datapoint:o,period:F.value[l]})}function xe(l){q.value=l,I.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=>Math.abs(s.value)).reduce((s,c)=>s+c,0);if(i.isFunction(o)&&i.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:d.value,config:t.value})))D.value=o({seriesIndex:l,datapoint:a,series:d.value,config:t.value});else{const{showValue:s,showPercentage:c,borderColor:h,roundingValue:C,roundingPercentage:w}=t.value.style.chart.tooltip;let k="";F.value[l]&&(k+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${h};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const z=[s&&c?"(":"",s&&c?")":""];a.reverse().forEach(b=>{k+=`
|
|
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_${b.id})`:b.color}"/></svg>
|
|
4
|
+
${b.name}${s||c?":":""} ${s?i.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:b.value,s:t.value.style.chart.bars.dataLabels.suffix,r:C}):""} ${z[0]}${c?i.dataLabel({v:isNaN(b.value/r)?0:Math.abs(b.value)/r*100,s:"%",r:w}):""}${z[1]}
|
|
5
|
+
</div>
|
|
6
|
+
`}),D.value=`<div>${k}</div>`}}function Ce(l){A.value=l,Y.value+=1}function re(){y.value.showTable=!y.value.showTable}function se(){y.value.dataLabels.show=!y.value.dataLabels.show}function ne(){y.value.showTooltip=!y.value.showTooltip}function we(){return d.value}const ie=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=u.value.start;a<u.value.end;a+=1){const r=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];x.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 ue(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...ie.value.head.map(c=>c.label)],a=ie.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 R=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<N.value;s+=1){const c=d.value.map(h=>h.series[s]??0).reduce((h,C)=>h+C,0);o.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[s]??s+1].concat(d.value.map(h=>(h.series[s]??0).toFixed(t.value.table.td.roundingValue))).concat((c??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,u.value.end-u.value.start),config:a,colNames:r}});function Se(l,o){if(W("selectLegend",d.value.find(a=>a.absoluteIndex===l)),m.value.includes(o.id))m.value=m.value.filter(a=>a!==o.id);else{if(m.value.length===x.value.length-1)return;m.value.push(o.id)}}const ce=e.computed(()=>x.value.map((l,o)=>({...l,shape:"square"})).map(l=>({...l,opacity:m.value.includes(l.id)?.5:1,segregate:()=>Se(l.absoluteIndex,l),isSegregated:m.value.includes(l.id)}))),Be=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 ge({getData:we,generatePdf:ee,generateCsv:ue,generateImage:te,toggleTable:re,toggleLabels:se,toggleTooltip:ne}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${O.value}`,ref_key:"stackbarChart",ref:L,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":A.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:X,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Ve._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&&S.value?(e.openBlock(),e.createBlock(he.UserOptions,{ref:"details",key:`user_option_${Y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Q),isImaging:e.unref(j),uid:O.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:A.value,chartElement:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:Ce,onGeneratePdf:e.unref(ee),onGenerateCsv:ue,onGenerateImage:e.unref(te),onToggleTable:re,onToggleLabels:se,onToggleTooltip:ne},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),S.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",Ae,[(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,He),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(i.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,We)],8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(T.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,Ge))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:n.value.left+p.value*r,x2:n.value.left+p.value*r,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1},null,8,Ye))),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,c)=>(e.openBlock(),e.createElementBlock("rect",{x:s,y:a.y[c]<0?0:a.y[c],height:a.height[c]<0?1e-4:a.height[c],rx:t.value.style.chart.bars.borderRadius>a.height[c]/2?(a.height[c]<0?0:a.height[c])/2:t.value.style.chart.bars.borderRadius,width:p.value*(1-t.value.style.chart.bars.gapRatio/2),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,"vue-data-ui-bar-transition":V.value})},null,10,Xe))),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,Je)):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,Ze)):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,Ke)):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,Qe)):e.createCommentVNode("",!0),y.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,c)=>(e.openBlock(),e.createElementBlock("text",{x:s+p.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[c]+a.height[c]/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?fe(a.proportions[c]*100,a,r,c):oe(a.series[c],a,r,c,a.signedSeries[c])),9,je))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&d.value.length>1?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,(a,r)=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+p.value*r+p.value/2,y:n.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"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(oe(a.value,a,r)),9,tt))),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(T.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,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,lt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:9},e.renderList(F.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+p.value*r+p.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,ot))),256)):e.createCommentVNode("",!0),y.value.showTooltip?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:10},e.renderList(u.value.end-u.value.start,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{x:n.value.left+r*p.value,y:n.value.top,width:p.value,height:n.value.height<0?0:n.value.height,onClick:s=>ke(r),onMouseenter:s=>xe(r),onMouseleave:o[0]||(o[0]=s=>{q.value=null,I.value=!1}),fill:r===q.value?t.value.style.chart.highlighter.color+e.unref(i.opacity)[t.value.style.chart.highlighter.opacity]:"transparent"},null,40,rt))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...n.value})),void 0,!0)],12,De)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.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:Z,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&N.value>1?(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${K.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[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.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(...U.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":o[1]||(o[1]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":o[2]||(o[2]=a=>u.value.end=a),onReset:pe},{"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(Ee._sfc_main,{show:y.value.showTooltip&&I.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:L.value,content:D.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({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.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:J},[t.value.style.chart.legend.show&&S.value?(e.openBlock(),e.createBlock(Pe.Legend,{key:0,legendSet:ce.value,config:Be.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:${m.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,nt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(Me.default,{key:5,hideDetails:"",config:{open:y.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(Fe.DataTable,{colNames:R.value.colNames,head:R.value.head,body:R.value.body,config:R.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=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,it)]),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,Ie))}},ct=Oe._export_sfc(ut,[["__scopeId","data-v-308041b6"]]);exports.default=ct;
|