vue-data-ui 2.3.28 → 2.3.30
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/README.md +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +66 -0
- package/dist/types/vue-data-ui.d.ts +66 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-hKWfT7Wa.cjs"),ke=require("./Title-BU6E8Xld.cjs"),re=require("./usePrinter-DoYKBzst.cjs"),Ce=require("./Tooltip-Oicp_EIo.cjs"),we=require("./Legend-B20rRwGi.cjs"),xe=require("./vue-ui-skeleton-j-IOiy5w.cjs"),Te=require("./DataTable-Doh_4M84.cjs"),$e=require("./vue-ui-accordion-CTYvdLLH.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-Cggpoz7e.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-7028d693"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],De={key:0},Ie=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:U,generatePdf:G,generateImage:j}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),D=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function X(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||D.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),X(a.children))})}const O=e.ref(u.dataset),I=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),X(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});I.value=new ResizeObserver(l),I.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Y=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function Z(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-Z(a,o);return r.lightenHexColor(l,c<0?0:c)}function J(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||D.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=Z(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?J(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Y.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?J(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function K({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function Q({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function ee(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=ee(l,o.children);if(c)return c}}return null}function fe(l){$.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",l),H.value=[ee(l.parentId)]),$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-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":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Y.value)}const M=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,M.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:j,generatePdf:G,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(U),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(G),onGenerateCsv:oe,onGenerateImage:e.unref(j),onToggleTable:ae,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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",De,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,Ie)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:K(o),width:Q(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:K(o),width:Q(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.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:m.value,content:C.value,isCustom:e.unref(r.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"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.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(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-7028d693"]]);exports.default=Ke;
|
|
@@ -0,0 +1,4 @@
|
|
|
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;
|