vue-data-ui 2.3.90 → 2.3.92
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 +3 -2
- package/dist/{Arrow-C_Fnn6al.js → Arrow-16rQhq4i.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-CdJD01md.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-CAmYNoaf.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-dYWMubrH.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BXnbua0J.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-oa0Srfuc.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-Cr1hulgT.js} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-Dhm9_peB.cjs} +1 -1
- package/dist/PackageVersion-BVZfgDqm.js +10 -0
- package/dist/PackageVersion-BkgJVmj1.cjs +1 -0
- package/dist/{Shape-BNocET8E.js → Shape-D75m5xWM.js} +1 -1
- package/dist/{Shape-B51JGReT.cjs → Shape-hGbEoQOv.cjs} +1 -1
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-B7ya0m2Q.cjs} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-Bx8AozB8.js} +2 -2
- package/dist/{Title-DlBwa3-X.js → Title-1Sw6EmHy.js} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bjrh7khe.cjs} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-CPATjuur.cjs} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-EJf3VBPR.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/index-D09qCApg.cjs +4 -0
- package/dist/{index-DQl1TFXa.js → index-DhJby8wL.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +16 -0
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-Bwd7mK1Z.cjs} +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-CrHvyupb.js} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Bwm8J3RQ.js} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-DdsPm5a4.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-CLxne31S.js} +57 -57
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-ZitCqVgG.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-DAv5cYGJ.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Dg87_AAm.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-BAHX7KzB.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-Cn5Jbplg.js} +3 -3
- package/dist/vue-ui-age-pyramid-GzHwQzsH.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-PlamQWqC.js} +83 -81
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-DGgQwl-K.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-Dd5KF_cy.js} +1 -1
- package/dist/vue-ui-candlestick-BIEB2J1w.cjs +2 -0
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-DTzwPhV5.js} +113 -111
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-HNTf5AYY.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-YEfvPESA.js} +4 -4
- package/dist/vue-ui-chestnut-DzjdAYsT.cjs +6 -0
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-PzMOM7mp.js} +161 -159
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-C5rsiCdn.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-DWea2yXV.js} +2 -2
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-BqXhoS8m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CVespiTo.js} +2 -2
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-gNKgZqYU.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-wmDN7Vkf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-Ch6HH0ja.js} +102 -100
- package/dist/vue-ui-donut-evolution-DhDxLZ1J.cjs +1 -0
- package/dist/vue-ui-donut-n37BZPxr.cjs +1 -0
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-sQunZI1L.js} +118 -116
- package/dist/vue-ui-dumbbell-B9Z_pjnG.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-lFlZX8Yi.js} +88 -86
- package/dist/vue-ui-flow-BaFpUJg-.cjs +1 -0
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CSIOC-JR.js} +65 -63
- package/dist/vue-ui-galaxy-BIR5GxIc.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-DL2mnel_.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BMq7KT3t.js} +56 -54
- package/dist/vue-ui-gauge-r_qvpwE7.cjs +1 -0
- package/dist/vue-ui-gizmo-DBas_Sw_.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-Dj7zvNI1.js} +32 -30
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-pqBYIrxm.js} +99 -97
- package/dist/vue-ui-heatmap-qPgEhAzc.cjs +1 -0
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-Cmo9J7wp.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-ZPBinMiF.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-Ce-jbgMT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-DOTWhLi9.js} +2 -2
- package/dist/vue-ui-molecule-D429iwPP.cjs +1 -0
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-RDpgNrHQ.js} +77 -75
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CD5L8WCU.js} +76 -74
- package/dist/vue-ui-mood-radar-CdLJxrkT.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-A-tid5cQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-DyM3uc7x.cjs +17 -0
- package/dist/vue-ui-onion-BKql8oal.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-Cap01Ehu.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-CcDKe4L0.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-BDEfAeyJ.js} +141 -139
- package/dist/vue-ui-quadrant-CZzdpeQ2.cjs +1 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-DlAUYg5u.js} +166 -164
- package/dist/vue-ui-quick-chart-DpGYUyhq.cjs +15 -0
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CbTln7gs.js} +89 -87
- package/dist/vue-ui-radar-oBeaHlpT.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-BU7-F3_e.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-BkDncqow.js} +2 -2
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-C5B6UNGd.js} +54 -52
- package/dist/vue-ui-relation-circle-IWiJWgcB.cjs +1 -0
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-BujVUJ90.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-Df2cRgD8.cjs} +2 -2
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-D6yqZJ7s.js} +132 -130
- package/dist/vue-ui-scatter-jFTeM2hW.cjs +1 -0
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-CHAySwpv.js} +1 -1
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-CVu8IM33.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-ASX40MGk.js} +423 -388
- package/dist/vue-ui-skeleton-CAlTn_Cg.cjs +41 -0
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-DGVzhza2.js} +2 -2
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-dwCqhB0r.cjs} +1 -1
- package/dist/vue-ui-spark-trend-A1EHFK_r.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-B7XhDvTj.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-BuNcvi66.js} +53 -51
- package/dist/vue-ui-sparkbar-CwNjHOjD.cjs +1 -0
- package/dist/vue-ui-sparkgauge-ISu154lS.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-JY2kB9WX.js} +31 -29
- package/dist/vue-ui-sparkhistogram-C8zyC-ii.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-DyEPWxkP.js} +69 -67
- package/dist/vue-ui-sparkline-DL3Thtc4.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-DYC3sdvQ.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-7TmtP3WR.js} +46 -44
- package/dist/vue-ui-sparkstackbar-ChIM9bn2.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-CP5C6Gb_.js} +128 -126
- package/dist/vue-ui-stackbar-DrtiSaNc.cjs +6 -0
- package/dist/vue-ui-strip-plot-BMYMIHGu.cjs +1 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-DJQCq_KE.js} +78 -76
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-D6hvgMif.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-IJi0xaVg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-BZNKXZNs.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-Ls8_xq0D.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BQFK30H1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeuvdssX.js} +5 -5
- package/dist/vue-ui-thermometer-DKm8SXlE.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-DPWIvG92.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-CEzDvZf7.js} +62 -60
- package/dist/vue-ui-timer-n6lv7oTx.cjs +64 -0
- package/dist/vue-ui-tiremarks-B33mHXZN.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-BUGoY22W.js} +51 -49
- package/dist/vue-ui-treemap-DPxBZUUr.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-DmOYjJ_F.js} +93 -91
- package/dist/vue-ui-vertical-bar-BJMYX8t4.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BpVKdSY5.js} +110 -108
- package/dist/vue-ui-waffle-DGcueccy.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-ULg6SwPx.js} +72 -70
- package/dist/vue-ui-wheel-CWKq-CFW.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-DlmgZd-_.js} +43 -41
- package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +1 -0
- package/dist/vue-ui-word-cloud-DWyboczt.js +574 -0
- package/dist/vue-ui-xy-Cz81fw_E.cjs +3 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-V13Ns1gv.js} +507 -504
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-B9cRe5gT.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-GiuHOyj5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B8EMsnjU.cjs +0 -4
- package/dist/vue-ui-3d-bar-Ce-Re50D.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C08rTXJn.cjs +0 -1
- package/dist/vue-ui-candlestick-m8fjxbj-.cjs +0 -2
- package/dist/vue-ui-chestnut-Y0gQvbbf.cjs +0 -6
- package/dist/vue-ui-donut-CCm7GJsm.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DiN8Jm0n.cjs +0 -1
- package/dist/vue-ui-dumbbell-lb72j7bY.cjs +0 -9
- package/dist/vue-ui-flow-B5Gxaqvl.cjs +0 -1
- package/dist/vue-ui-galaxy-Ck5cPkrh.cjs +0 -1
- package/dist/vue-ui-gauge-BwIhwSUw.cjs +0 -1
- package/dist/vue-ui-gizmo-DrGaoiM_.cjs +0 -1
- package/dist/vue-ui-heatmap-BLc6thGZ.cjs +0 -1
- package/dist/vue-ui-molecule-CAj1HFit.cjs +0 -1
- package/dist/vue-ui-mood-radar-CV2in2wO.cjs +0 -1
- package/dist/vue-ui-nested-donuts-4vO23n9z.cjs +0 -17
- package/dist/vue-ui-onion-B3mtn6xf.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs +0 -8
- package/dist/vue-ui-quadrant-CpJX1Jwa.cjs +0 -1
- package/dist/vue-ui-quick-chart-CTxsI2tk.cjs +0 -15
- package/dist/vue-ui-radar-DFjsXmJ3.cjs +0 -1
- package/dist/vue-ui-relation-circle-DXuKdCih.cjs +0 -1
- package/dist/vue-ui-scatter-DPByFMNL.cjs +0 -1
- package/dist/vue-ui-skeleton-Bli7jLZ7.cjs +0 -41
- package/dist/vue-ui-spark-trend-sfgUJ32Q.cjs +0 -1
- package/dist/vue-ui-sparkbar-CKWYzriN.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D0q9F9Nz.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CywhBkm2.cjs +0 -1
- package/dist/vue-ui-sparkline-Besp8Ffy.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +0 -1
- package/dist/vue-ui-stackbar-D0fGVkCR.cjs +0 -6
- package/dist/vue-ui-strip-plot-XDj8rL9m.cjs +0 -1
- package/dist/vue-ui-thermometer-C3T56ras.cjs +0 -1
- package/dist/vue-ui-timer-B_ZvV1ON.cjs +0 -64
- package/dist/vue-ui-tiremarks-DRbSpTgq.cjs +0 -1
- package/dist/vue-ui-treemap-CtKUTs2G.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BBIWdeXH.cjs +0 -4
- package/dist/vue-ui-waffle-9a3C4Nj-.cjs +0 -1
- package/dist/vue-ui-wheel-CErxlmqw.cjs +0 -1
- package/dist/vue-ui-word-cloud-dMBTVGVk.js +0 -513
- package/dist/vue-ui-word-cloud-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D09qCApg.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-Bjrh7khe.cjs"),W=require("./usePrinter-DdsPm5a4.cjs"),ae=require("./DataTable-oa0Srfuc.cjs"),oe=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),re=require("./Legend-Dhm9_peB.cjs"),se=require("./vue-ui-accordion-BAHX7KzB.cjs"),U=require("./useNestedProp-Bwd7mK1Z.cjs"),ne=require("./PackageVersion-BkgJVmj1.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],ie=["xmlns","viewBox"],de={key:0},ve=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],he={key:1},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:2},be=["x","y","font-size","fill","font-weight"],ge=["x","y","font-size","fill"],pe={key:3},ke=["x","y","font-size","fill","font-weight"],_e=["id"],xe=["stop-color"],Ce=["stop-color"],we=["stop-color"],Be=["id"],Ne=["stop-color"],Ee=["stop-color"],Le=["stop-color"],$e=["id"],Ve=["stop-color"],Se=["stop-color"],ze=["id"],Xe=["stop-color"],Pe=["stop-color"],Ae={key:0},Te=["d","fill"],De={key:1},Fe=["x","y","height","width","fill"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge=["cx","cy","r","fill","stroke","stroke-width"],Ie={key:2},Oe=["x","y","fill","font-size"],He={key:3},qe=["x","y","fill","font-size"],Re={key:3,class:"vue-data-ui-watermark"},We=["xmlns","height","width"],Ue=["fill"],je=["innerHTML"],Ye={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Je}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),V=e.ref(null),S=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>P(),set:a=>a});function P(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=P(),A(),S.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{A()});function A(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?V.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const O=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),K=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),l={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.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function H(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:H,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),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%":""}`),id:`dumbbell_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.value,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:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:H,onGenerateImage:e.unref(M),onToggleTable:q},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,ve))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*i.value,y2:o.value.top+r*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ye))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,me)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,be))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,ge))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,ke))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,xe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,we)],8,_e),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ne),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ee),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Le)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,$e),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Pe)],8,ze)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
|
|
2
|
+
${l.startX},${l.y+t.value.style.chart.plots.radius/2}
|
|
3
|
+
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
4
|
+
${l.endX},${l.y+t.value.style.chart.plots.radius/2}
|
|
5
|
+
L ${l.endX},${l.y-t.value.style.chart.plots.radius/2}
|
|
6
|
+
C ${l.centerX},${l.y} ${l.centerX},${l.y}
|
|
7
|
+
${l.startX},${l.y-t.value.style.chart.plots.radius/2}
|
|
8
|
+
Z
|
|
9
|
+
`,fill:l.endX>l.startX?`url(#grad_positive_${d.value})`:`url(#grad_negative_${d.value})`},null,8,Te)])):(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("rect",{x:l.endX>l.startX?l.startX:l.endX,y:l.y-t.value.style.chart.plots.link.strokeWidth/2,height:t.value.style.chart.plots.link.strokeWidth,width:Math.abs(l.endX-l.startX),fill:l.endX>l.startX?`url(#grad_positive_${d.value})`:`url(#grad_negative_${d.value})`},null,8,Fe)])),e.createElementVNode("circle",{cx:l.startX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,Me),e.createElementVNode("circle",{cx:l.endX,cy:l.y,r:t.value.style.chart.plots.radius,fill:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth},null,8,Ge),t.value.style.chart.labels.startLabels.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(u,h)=>(e.openBlock(),e.createElementBlock("text",{x:u.startX,y:o.value.top+(h+1)*i.value-t.value.style.chart.labels.startLabels.fontSize/3+t.value.style.chart.labels.startLabels.offsetY,fill:t.value.style.chart.labels.startLabels.useStartColor?t.value.style.chart.plots.startColor:t.value.style.chart.labels.startLabels.color,"font-size":t.value.style.chart.labels.startLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,u.start,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:u.start,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.startLabels.rounding}),{datapoint:u,seriesIndex:h})),9,Oe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.labels.endLabels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(u,h)=>(e.openBlock(),e.createElementBlock("text",{x:u.endX,y:o.value.top+h*i.value+t.value.style.chart.labels.endLabels.fontSize+t.value.style.chart.labels.endLabels.offsetY,fill:t.value.style.chart.labels.endLabels.useEndColor?t.value.style.chart.plots.endColor:t.value.style.chart.labels.endLabels.color,"font-size":t.value.style.chart.labels.endLabels.fontSize,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,u.end,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:u.end,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.endLabels.rounding}),{datapoint:u,seriesIndex:h})),9,qe))),256))])):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,ie)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:4,config:{type:"dumbbell",style:{backgroundColor:t.value.style.chart.backgroundColor,dumbbell:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:V},[t.value.style.chart.legend.show&&b.value?(e.openBlock(),e.createBlock(re.Legend,{key:`legend_${X.value}`,legendSet:O.value,config:K.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:4px;font-size:${t.value.style.chart.legend.fontSize}px`)},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:"0 0 20 20",height:t.value.style.chart.legend.fontSize,width:t.value.style.chart.legend.fontSize},[e.createElementVNode("circle",{cx:10,cy:10,r:9,fill:l.color},null,8,Ue)],8,We)),e.createTextVNode(" "+e.toDisplayString(l.name),1)],4)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:O.value},void 0,!0)],512),b.value?(e.openBlock(),e.createBlock(se.default,{key:5,hideDetails:"",config:{open:x.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ae.DataTable,{key:`table_${z.value}`,colNames:w.value.colNames,head:w.value.head,body:w.value.body,config:w.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[0]||(n[0]=l=>x.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,je)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ce))}},Ze=ue._export_sfc(Ye,[["__scopeId","data-v-2df541ce"]]);exports.default=Ze;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { computed as p, ref as y, watch as oe, onMounted as re, onBeforeUnmount as Le, openBlock as o, createElementBlock as r, normalizeClass as ne, normalizeStyle as
|
|
2
|
-
import { u as
|
|
3
|
-
import { t as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as
|
|
7
|
-
import
|
|
8
|
-
import { L as
|
|
9
|
-
import
|
|
10
|
-
import { u as ge } from "./useNestedProp-
|
|
11
|
-
import { _ as
|
|
12
|
-
|
|
1
|
+
import { computed as p, ref as y, watch as oe, onMounted as re, onBeforeUnmount as Le, openBlock as o, createElementBlock as r, normalizeClass as ne, normalizeStyle as V, createBlock as S, createCommentVNode as g, unref as d, createSlots as ze, withCtx as _, renderSlot as C, normalizeProps as ue, guardReactiveProps as ie, createVNode as Xe, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ce, nextTick as Se } from "vue";
|
|
2
|
+
import { u as Ne, c as de, t as Ae, o as Te, e as ve, g as Pe, v as he, C as Ge, f as z, X as ye, i as E, l as be, h as fe, q as De, r as Ie } from "./index-DhJby8wL.js";
|
|
3
|
+
import { t as Me, u as Fe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Oe } from "./Title-1Sw6EmHy.js";
|
|
5
|
+
import { u as Ve, U as Ee } from "./usePrinter-Bwm8J3RQ.js";
|
|
6
|
+
import { D as He } from "./DataTable-BXnbua0J.js";
|
|
7
|
+
import We from "./vue-ui-skeleton-ASX40MGk.js";
|
|
8
|
+
import { L as Re } from "./Legend-Cr1hulgT.js";
|
|
9
|
+
import Be from "./vue-ui-accordion-Cn5Jbplg.js";
|
|
10
|
+
import { u as ge } from "./useNestedProp-CrHvyupb.js";
|
|
11
|
+
import { _ as Ue } from "./PackageVersion-BVZfgDqm.js";
|
|
12
|
+
import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const qe = ["id"], Ye = ["xmlns", "viewBox"], Ze = { key: 0 }, Je = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ke = { key: 1 }, Qe = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], et = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], tt = { key: 2 }, lt = ["x", "y", "font-size", "fill", "font-weight"], at = ["x", "y", "font-size", "fill"], st = { key: 3 }, ot = ["x", "y", "font-size", "fill", "font-weight"], rt = ["id"], nt = ["stop-color"], ut = ["stop-color"], it = ["stop-color"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], ht = ["stop-color"], yt = ["id"], bt = ["stop-color"], ft = ["stop-color"], gt = ["id"], mt = ["stop-color"], pt = ["stop-color"], _t = { key: 0 }, xt = ["d", "fill"], kt = { key: 1 }, Ct = ["x", "y", "height", "width", "fill"], wt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], $t = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Lt = { key: 2 }, zt = ["x", "y", "fill", "font-size"], Xt = { key: 3 }, St = ["x", "y", "fill", "font-size"], Nt = {
|
|
13
14
|
key: 3,
|
|
14
15
|
class: "vue-data-ui-watermark"
|
|
15
|
-
},
|
|
16
|
+
}, At = ["xmlns", "height", "width"], Tt = ["fill"], Pt = ["innerHTML"], Gt = {
|
|
16
17
|
__name: "vue-ui-dumbbell",
|
|
17
18
|
props: {
|
|
18
19
|
config: {
|
|
@@ -29,8 +30,8 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
emits: ["selectDatapoint"],
|
|
32
|
-
setup(me, { expose: pe, emit:
|
|
33
|
-
const m = me, { vue_ui_dumbbell: _e } =
|
|
33
|
+
setup(me, { expose: pe, emit: Dt }) {
|
|
34
|
+
const m = me, { vue_ui_dumbbell: _e } = Ne(), X = p({
|
|
34
35
|
get() {
|
|
35
36
|
return !!m.dataset && m.dataset.length;
|
|
36
37
|
},
|
|
@@ -54,7 +55,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
54
55
|
} : l;
|
|
55
56
|
}
|
|
56
57
|
oe(() => m.config, (l) => {
|
|
57
|
-
e.value = q(), Y(), B.value += 1, U.value += 1, j.value += 1, v.value = e.value.style.chart.rowHeight,
|
|
58
|
+
e.value = q(), Y(), B.value += 1, U.value += 1, j.value += 1, v.value = e.value.style.chart.rowHeight, N.value = e.value.style.chart.width;
|
|
58
59
|
}, { deep: !0 }), oe(() => m.dataset, (l) => {
|
|
59
60
|
te();
|
|
60
61
|
}, { deep: !0 });
|
|
@@ -63,11 +64,11 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
63
64
|
Y();
|
|
64
65
|
});
|
|
65
66
|
function Y() {
|
|
66
|
-
if (
|
|
67
|
+
if (Te(m.dataset) ? ve({
|
|
67
68
|
componentName: "VueUiDumbbell",
|
|
68
69
|
type: "dataset"
|
|
69
70
|
}) : m.dataset.forEach((l, u) => {
|
|
70
|
-
|
|
71
|
+
Pe({
|
|
71
72
|
datasetObject: l,
|
|
72
73
|
requiredAttributes: ["name", "start", "end"]
|
|
73
74
|
}).forEach((t) => {
|
|
@@ -79,13 +80,13 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
79
80
|
});
|
|
80
81
|
});
|
|
81
82
|
}), e.value.responsive) {
|
|
82
|
-
const l =
|
|
83
|
-
const { width: u, height: t } =
|
|
83
|
+
const l = Me(() => {
|
|
84
|
+
const { width: u, height: t } = Fe({
|
|
84
85
|
chart: T.value,
|
|
85
86
|
title: e.value.style.chart.title.text ? W.value : null,
|
|
86
87
|
legend: e.value.style.chart.legend.show ? R.value : null
|
|
87
88
|
});
|
|
88
|
-
|
|
89
|
+
N.value = u, v.value = t / m.dataset.length, b.value = D();
|
|
89
90
|
});
|
|
90
91
|
P.value = new ResizeObserver(l), P.value.observe(T.value.parentNode);
|
|
91
92
|
}
|
|
@@ -93,7 +94,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
93
94
|
Le(() => {
|
|
94
95
|
P.value && P.value.disconnect();
|
|
95
96
|
});
|
|
96
|
-
const { isPrinting: Z, isImaging: J, generatePdf: K, generateImage: Q } =
|
|
97
|
+
const { isPrinting: Z, isImaging: J, generatePdf: K, generateImage: Q } = Ve({
|
|
97
98
|
elementId: `dumbbell_${h.value}`,
|
|
98
99
|
fileName: e.value.style.chart.title.text || "vue-ui-dumbbell"
|
|
99
100
|
}), G = y({
|
|
@@ -106,14 +107,14 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
106
107
|
}))), F = p(() => ({
|
|
107
108
|
max: Math.max(...x.value.flatMap((l) => [l.start, l.end])),
|
|
108
109
|
min: Math.min(...x.value.flatMap((l) => [l.start, l.end]))
|
|
109
|
-
})), c = p(() =>
|
|
110
|
-
const l = v.value, u = e.value.style.chart.padding.left + e.value.style.chart.padding.right +
|
|
110
|
+
})), c = p(() => Ge(F.value.min < 0 ? F.value.min : 0, F.value.max, e.value.style.chart.grid.scaleSteps)), v = y(e.value.style.chart.rowHeight), N = y(e.value.style.chart.width), a = p(() => {
|
|
111
|
+
const l = v.value, u = e.value.style.chart.padding.left + e.value.style.chart.padding.right + N.value, t = e.value.style.chart.padding.top + e.value.style.chart.padding.bottom + l * m.dataset.length, s = c.value.ticks.length * (N.value / c.value.ticks.length);
|
|
111
112
|
return {
|
|
112
113
|
left: e.value.style.chart.padding.left,
|
|
113
114
|
right: u - e.value.style.chart.padding.right,
|
|
114
115
|
top: e.value.style.chart.padding.top,
|
|
115
116
|
bottom: t - e.value.style.chart.padding.bottom,
|
|
116
|
-
width:
|
|
117
|
+
width: N.value,
|
|
117
118
|
height: l * m.dataset.length,
|
|
118
119
|
rowHeight: l,
|
|
119
120
|
absoluteHeight: t,
|
|
@@ -231,16 +232,16 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
231
232
|
};
|
|
232
233
|
});
|
|
233
234
|
function ae() {
|
|
234
|
-
|
|
235
|
+
Se(() => {
|
|
235
236
|
const l = k.value.head.map((s, i) => [[
|
|
236
237
|
s.name
|
|
237
|
-
], [k.value.body[i].start], [k.value.body[i].end]]), u = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.start], [e.value.table.columnNames.end]]].concat(l), t =
|
|
238
|
-
|
|
238
|
+
], [k.value.body[i].start], [k.value.body[i].end]]), u = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.start], [e.value.table.columnNames.end]]].concat(l), t = De(u);
|
|
239
|
+
Ie({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-dumbbell" });
|
|
239
240
|
});
|
|
240
241
|
}
|
|
241
|
-
const
|
|
242
|
+
const A = y(!1);
|
|
242
243
|
function Ce(l) {
|
|
243
|
-
|
|
244
|
+
A.value = l, H.value += 1;
|
|
244
245
|
}
|
|
245
246
|
function we() {
|
|
246
247
|
return b.value;
|
|
@@ -257,8 +258,8 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
257
258
|
}), (l, u) => (o(), r("div", {
|
|
258
259
|
ref_key: "dumbbellChart",
|
|
259
260
|
ref: T,
|
|
260
|
-
class: ne(`vue-ui-dumbbell ${
|
|
261
|
-
style:
|
|
261
|
+
class: ne(`vue-ui-dumbbell ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
262
|
+
style: V(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
262
263
|
id: `dumbbell_${h.value}`
|
|
263
264
|
}, [
|
|
264
265
|
e.value.style.chart.title.text ? (o(), r("div", {
|
|
@@ -267,7 +268,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
267
268
|
ref: W,
|
|
268
269
|
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
269
270
|
}, [
|
|
270
|
-
(o(), S(
|
|
271
|
+
(o(), S(Oe, {
|
|
271
272
|
key: `title_${B.value}`,
|
|
272
273
|
config: {
|
|
273
274
|
title: {
|
|
@@ -294,7 +295,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
294
295
|
hasImg: e.value.userOptions.buttons.img,
|
|
295
296
|
hasTable: e.value.userOptions.buttons.table,
|
|
296
297
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
297
|
-
isFullscreen:
|
|
298
|
+
isFullscreen: A.value,
|
|
298
299
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
299
300
|
chartElement: T.value,
|
|
300
301
|
position: e.value.userOptions.position,
|
|
@@ -343,11 +344,12 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
343
344
|
X.value ? (o(), r("svg", {
|
|
344
345
|
key: 2,
|
|
345
346
|
xmlns: d(ye),
|
|
346
|
-
class: ne({ "vue-data-ui-fullscreen--on":
|
|
347
|
+
class: ne({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
347
348
|
viewBox: `0 0 ${a.value.absoluteWidth <= 0 ? 10 : a.value.absoluteWidth} ${a.value.absoluteHeight <= 0 ? 10 : a.value.absoluteHeight}`,
|
|
348
|
-
style:
|
|
349
|
+
style: V(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
349
350
|
}, [
|
|
350
|
-
|
|
351
|
+
Xe(Ue),
|
|
352
|
+
e.value.style.chart.grid.verticalGrid.show ? (o(), r("g", Ze, [
|
|
351
353
|
(o(!0), r(w, null, $(c.value.ticks, (t, s) => (o(), r("line", {
|
|
352
354
|
x1: a.value.left + s * a.value.width / (c.value.ticks.length - 1),
|
|
353
355
|
x2: a.value.left + s * a.value.width / (c.value.ticks.length - 1),
|
|
@@ -356,9 +358,9 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
356
358
|
stroke: e.value.style.chart.grid.verticalGrid.stroke,
|
|
357
359
|
"stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
|
|
358
360
|
"stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray
|
|
359
|
-
}, null, 8,
|
|
361
|
+
}, null, 8, Je))), 256))
|
|
360
362
|
])) : g("", !0),
|
|
361
|
-
e.value.style.chart.grid.horizontalGrid.show ? (o(), r("g",
|
|
363
|
+
e.value.style.chart.grid.horizontalGrid.show ? (o(), r("g", Ke, [
|
|
362
364
|
(o(!0), r(w, null, $(x.value, (t, s) => (o(), r("line", {
|
|
363
365
|
x1: a.value.left,
|
|
364
366
|
x2: a.value.right,
|
|
@@ -367,7 +369,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
367
369
|
stroke: e.value.style.chart.grid.horizontalGrid.stroke,
|
|
368
370
|
"stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
|
|
369
371
|
"stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray
|
|
370
|
-
}, null, 8,
|
|
372
|
+
}, null, 8, Qe))), 256)),
|
|
371
373
|
n("line", {
|
|
372
374
|
x1: a.value.left,
|
|
373
375
|
x2: a.value.right,
|
|
@@ -376,9 +378,9 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
376
378
|
stroke: e.value.style.chart.grid.horizontalGrid.stroke,
|
|
377
379
|
"stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
|
|
378
380
|
"stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray
|
|
379
|
-
}, null, 8,
|
|
381
|
+
}, null, 8, et)
|
|
380
382
|
])) : g("", !0),
|
|
381
|
-
e.value.style.chart.labels.yAxisLabels.show ? (o(), r("g",
|
|
383
|
+
e.value.style.chart.labels.yAxisLabels.show ? (o(), r("g", tt, [
|
|
382
384
|
(o(!0), r(w, null, $(x.value, (t, s) => (o(), r("text", {
|
|
383
385
|
x: a.value.left - 6 + e.value.style.chart.labels.yAxisLabels.offsetX,
|
|
384
386
|
y: a.value.top + s * v.value + (e.value.style.chart.labels.yAxisLabels.showProgression ? v.value / 3 : v.value / 2) + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
|
|
@@ -386,7 +388,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
386
388
|
fill: e.value.style.chart.labels.yAxisLabels.color,
|
|
387
389
|
"font-weight": e.value.style.chart.labels.yAxisLabels.bold ? "bold" : "normal",
|
|
388
390
|
"text-anchor": "end"
|
|
389
|
-
}, L(t.name), 9,
|
|
391
|
+
}, L(t.name), 9, lt))), 256)),
|
|
390
392
|
e.value.style.chart.labels.yAxisLabels.showProgression ? (o(!0), r(w, { key: 0 }, $(x.value, (t, s) => (o(), r("text", {
|
|
391
393
|
x: a.value.left - 6 + e.value.style.chart.labels.yAxisLabels.offsetX,
|
|
392
394
|
y: a.value.top + s * v.value + v.value / 1.3 + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
|
|
@@ -397,9 +399,9 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
397
399
|
v: 100 * (t.end / t.start - 1),
|
|
398
400
|
s: "%",
|
|
399
401
|
r: e.value.style.chart.labels.yAxisLabels.rounding
|
|
400
|
-
})), 9,
|
|
402
|
+
})), 9, at))), 256)) : g("", !0)
|
|
401
403
|
])) : g("", !0),
|
|
402
|
-
e.value.style.chart.labels.xAxisLabels.show ? (o(), r("g",
|
|
404
|
+
e.value.style.chart.labels.xAxisLabels.show ? (o(), r("g", st, [
|
|
403
405
|
(o(!0), r(w, null, $(c.value.ticks, (t, s) => (o(), r("text", {
|
|
404
406
|
x: a.value.left + s * (a.value.width / (c.value.ticks.length - 1)),
|
|
405
407
|
y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize + e.value.style.chart.labels.xAxisLabels.offsetY,
|
|
@@ -407,7 +409,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
407
409
|
fill: e.value.style.chart.labels.xAxisLabels.color,
|
|
408
410
|
"font-weight": e.value.style.chart.labels.xAxisLabels.bold ? "bold" : "normal",
|
|
409
411
|
"text-anchor": "middle"
|
|
410
|
-
}, L(d(
|
|
412
|
+
}, L(d(E)(
|
|
411
413
|
e.value.style.chart.labels.formatter,
|
|
412
414
|
t,
|
|
413
415
|
d(z)({
|
|
@@ -417,7 +419,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
417
419
|
r: e.value.style.chart.labels.xAxisLabels.rounding
|
|
418
420
|
}),
|
|
419
421
|
{ datapoint: t, seriesIndex: s }
|
|
420
|
-
)), 9,
|
|
422
|
+
)), 9, ot))), 256))
|
|
421
423
|
])) : g("", !0),
|
|
422
424
|
n("defs", null, [
|
|
423
425
|
n("radialGradient", {
|
|
@@ -427,16 +429,16 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
427
429
|
n("stop", {
|
|
428
430
|
offset: "10%",
|
|
429
431
|
"stop-color": d(be)(e.value.style.chart.plots.startColor, e.value.style.chart.plots.gradient.intensity / 100)
|
|
430
|
-
}, null, 8,
|
|
432
|
+
}, null, 8, nt),
|
|
431
433
|
n("stop", {
|
|
432
434
|
offset: "90%",
|
|
433
435
|
"stop-color": d(fe)(e.value.style.chart.plots.startColor, 0.1)
|
|
434
|
-
}, null, 8,
|
|
436
|
+
}, null, 8, ut),
|
|
435
437
|
n("stop", {
|
|
436
438
|
offset: "100%",
|
|
437
439
|
"stop-color": e.value.style.chart.plots.startColor
|
|
438
|
-
}, null, 8,
|
|
439
|
-
], 8,
|
|
440
|
+
}, null, 8, it)
|
|
441
|
+
], 8, rt),
|
|
440
442
|
n("radialGradient", {
|
|
441
443
|
id: `end_grad_${h.value}`,
|
|
442
444
|
fy: "30%"
|
|
@@ -444,16 +446,16 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
444
446
|
n("stop", {
|
|
445
447
|
offset: "10%",
|
|
446
448
|
"stop-color": d(be)(e.value.style.chart.plots.endColor, e.value.style.chart.plots.gradient.intensity / 100)
|
|
447
|
-
}, null, 8,
|
|
449
|
+
}, null, 8, dt),
|
|
448
450
|
n("stop", {
|
|
449
451
|
offset: "90%",
|
|
450
452
|
"stop-color": d(fe)(e.value.style.chart.plots.endColor, 0.1)
|
|
451
|
-
}, null, 8,
|
|
453
|
+
}, null, 8, vt),
|
|
452
454
|
n("stop", {
|
|
453
455
|
offset: "100%",
|
|
454
456
|
"stop-color": e.value.style.chart.plots.endColor
|
|
455
|
-
}, null, 8,
|
|
456
|
-
], 8,
|
|
457
|
+
}, null, 8, ht)
|
|
458
|
+
], 8, ct)
|
|
457
459
|
]),
|
|
458
460
|
(o(!0), r(w, null, $(b.value, (t, s) => (o(), r("g", null, [
|
|
459
461
|
n("defs", null, [
|
|
@@ -467,12 +469,12 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
467
469
|
n("stop", {
|
|
468
470
|
offset: "0%",
|
|
469
471
|
"stop-color": e.value.style.chart.plots.startColor
|
|
470
|
-
}, null, 8,
|
|
472
|
+
}, null, 8, bt),
|
|
471
473
|
n("stop", {
|
|
472
474
|
offset: "100%",
|
|
473
475
|
"stop-color": e.value.style.chart.plots.endColor
|
|
474
|
-
}, null, 8,
|
|
475
|
-
], 8,
|
|
476
|
+
}, null, 8, ft)
|
|
477
|
+
], 8, yt),
|
|
476
478
|
n("linearGradient", {
|
|
477
479
|
id: `grad_negative_${h.value}`,
|
|
478
480
|
x1: "0%",
|
|
@@ -483,14 +485,14 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
483
485
|
n("stop", {
|
|
484
486
|
offset: "0%",
|
|
485
487
|
"stop-color": e.value.style.chart.plots.endColor
|
|
486
|
-
}, null, 8,
|
|
488
|
+
}, null, 8, mt),
|
|
487
489
|
n("stop", {
|
|
488
490
|
offset: "100%",
|
|
489
491
|
"stop-color": e.value.style.chart.plots.startColor
|
|
490
|
-
}, null, 8,
|
|
491
|
-
], 8,
|
|
492
|
+
}, null, 8, pt)
|
|
493
|
+
], 8, gt)
|
|
492
494
|
]),
|
|
493
|
-
e.value.style.chart.plots.link.type === "curved" ? (o(), r("g",
|
|
495
|
+
e.value.style.chart.plots.link.type === "curved" ? (o(), r("g", _t, [
|
|
494
496
|
n("path", {
|
|
495
497
|
d: `M
|
|
496
498
|
${t.startX},${t.y + e.value.style.chart.plots.radius / 2}
|
|
@@ -502,15 +504,15 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
502
504
|
Z
|
|
503
505
|
`,
|
|
504
506
|
fill: t.endX > t.startX ? `url(#grad_positive_${h.value})` : `url(#grad_negative_${h.value})`
|
|
505
|
-
}, null, 8,
|
|
506
|
-
])) : (o(), r("g",
|
|
507
|
+
}, null, 8, xt)
|
|
508
|
+
])) : (o(), r("g", kt, [
|
|
507
509
|
n("rect", {
|
|
508
510
|
x: t.endX > t.startX ? t.startX : t.endX,
|
|
509
511
|
y: t.y - e.value.style.chart.plots.link.strokeWidth / 2,
|
|
510
512
|
height: e.value.style.chart.plots.link.strokeWidth,
|
|
511
513
|
width: Math.abs(t.endX - t.startX),
|
|
512
514
|
fill: t.endX > t.startX ? `url(#grad_positive_${h.value})` : `url(#grad_negative_${h.value})`
|
|
513
|
-
}, null, 8,
|
|
515
|
+
}, null, 8, Ct)
|
|
514
516
|
])),
|
|
515
517
|
n("circle", {
|
|
516
518
|
cx: t.startX,
|
|
@@ -519,7 +521,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
519
521
|
fill: e.value.style.chart.plots.gradient.show ? `url(#start_grad_${h.value})` : e.value.style.chart.plots.startColor,
|
|
520
522
|
stroke: e.value.style.chart.plots.stroke,
|
|
521
523
|
"stroke-width": e.value.style.chart.plots.strokeWidth
|
|
522
|
-
}, null, 8,
|
|
524
|
+
}, null, 8, wt),
|
|
523
525
|
n("circle", {
|
|
524
526
|
cx: t.endX,
|
|
525
527
|
cy: t.y,
|
|
@@ -527,15 +529,15 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
527
529
|
fill: e.value.style.chart.plots.gradient.show ? `url(#end_grad_${h.value})` : e.value.style.chart.plots.endColor,
|
|
528
530
|
stroke: e.value.style.chart.plots.stroke,
|
|
529
531
|
"stroke-width": e.value.style.chart.plots.strokeWidth
|
|
530
|
-
}, null, 8,
|
|
531
|
-
e.value.style.chart.labels.startLabels.show ? (o(), r("g",
|
|
532
|
+
}, null, 8, $t),
|
|
533
|
+
e.value.style.chart.labels.startLabels.show ? (o(), r("g", Lt, [
|
|
532
534
|
(o(!0), r(w, null, $(b.value, (i, f) => (o(), r("text", {
|
|
533
535
|
x: i.startX,
|
|
534
536
|
y: a.value.top + (f + 1) * v.value - e.value.style.chart.labels.startLabels.fontSize / 3 + e.value.style.chart.labels.startLabels.offsetY,
|
|
535
537
|
fill: e.value.style.chart.labels.startLabels.useStartColor ? e.value.style.chart.plots.startColor : e.value.style.chart.labels.startLabels.color,
|
|
536
538
|
"font-size": e.value.style.chart.labels.startLabels.fontSize,
|
|
537
539
|
"text-anchor": "middle"
|
|
538
|
-
}, L(d(
|
|
540
|
+
}, L(d(E)(
|
|
539
541
|
e.value.style.chart.labels.formatter,
|
|
540
542
|
i.start,
|
|
541
543
|
d(z)({
|
|
@@ -545,16 +547,16 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
545
547
|
r: e.value.style.chart.labels.startLabels.rounding
|
|
546
548
|
}),
|
|
547
549
|
{ datapoint: i, seriesIndex: f }
|
|
548
|
-
)), 9,
|
|
550
|
+
)), 9, zt))), 256))
|
|
549
551
|
])) : g("", !0),
|
|
550
|
-
e.value.style.chart.labels.endLabels.show ? (o(), r("g",
|
|
552
|
+
e.value.style.chart.labels.endLabels.show ? (o(), r("g", Xt, [
|
|
551
553
|
(o(!0), r(w, null, $(b.value, (i, f) => (o(), r("text", {
|
|
552
554
|
x: i.endX,
|
|
553
555
|
y: a.value.top + f * v.value + e.value.style.chart.labels.endLabels.fontSize + e.value.style.chart.labels.endLabels.offsetY,
|
|
554
556
|
fill: e.value.style.chart.labels.endLabels.useEndColor ? e.value.style.chart.plots.endColor : e.value.style.chart.labels.endLabels.color,
|
|
555
557
|
"font-size": e.value.style.chart.labels.endLabels.fontSize,
|
|
556
558
|
"text-anchor": "middle"
|
|
557
|
-
}, L(d(
|
|
559
|
+
}, L(d(E)(
|
|
558
560
|
e.value.style.chart.labels.formatter,
|
|
559
561
|
i.end,
|
|
560
562
|
d(z)({
|
|
@@ -564,15 +566,15 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
564
566
|
r: e.value.style.chart.labels.endLabels.rounding
|
|
565
567
|
}),
|
|
566
568
|
{ datapoint: i, seriesIndex: f }
|
|
567
|
-
)), 9,
|
|
569
|
+
)), 9, St))), 256))
|
|
568
570
|
])) : g("", !0)
|
|
569
571
|
]))), 256)),
|
|
570
572
|
C(l.$slots, "svg", { svg: a.value }, void 0, !0)
|
|
571
|
-
], 14,
|
|
572
|
-
l.$slots.watermark ? (o(), r("div",
|
|
573
|
+
], 14, Ye)) : g("", !0),
|
|
574
|
+
l.$slots.watermark ? (o(), r("div", Nt, [
|
|
573
575
|
C(l.$slots, "watermark", ue(ie({ isPrinting: d(Z) || d(J) })), void 0, !0)
|
|
574
576
|
])) : g("", !0),
|
|
575
|
-
X.value ? g("", !0) : (o(), S(
|
|
577
|
+
X.value ? g("", !0) : (o(), S(We, {
|
|
576
578
|
key: 4,
|
|
577
579
|
config: {
|
|
578
580
|
type: "dumbbell",
|
|
@@ -588,14 +590,14 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
588
590
|
ref_key: "chartLegend",
|
|
589
591
|
ref: R
|
|
590
592
|
}, [
|
|
591
|
-
e.value.style.chart.legend.show && X.value ? (o(), S(
|
|
593
|
+
e.value.style.chart.legend.show && X.value ? (o(), S(Re, {
|
|
592
594
|
key: `legend_${j.value}`,
|
|
593
595
|
legendSet: le.value,
|
|
594
596
|
config: ke.value
|
|
595
597
|
}, {
|
|
596
598
|
item: _(({ legend: t }) => [
|
|
597
599
|
n("div", {
|
|
598
|
-
style:
|
|
600
|
+
style: V(`display:flex;align-items:center;gap:4px;font-size:${e.value.style.chart.legend.fontSize}px`)
|
|
599
601
|
}, [
|
|
600
602
|
(o(), r("svg", {
|
|
601
603
|
xmlns: d(ye),
|
|
@@ -608,8 +610,8 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
608
610
|
cy: 10,
|
|
609
611
|
r: 9,
|
|
610
612
|
fill: t.color
|
|
611
|
-
}, null, 8,
|
|
612
|
-
], 8,
|
|
613
|
+
}, null, 8, Tt)
|
|
614
|
+
], 8, At)),
|
|
613
615
|
ce(" " + L(t.name), 1)
|
|
614
616
|
], 4)
|
|
615
617
|
]),
|
|
@@ -619,7 +621,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
619
621
|
legend: le.value
|
|
620
622
|
}, void 0, !0)
|
|
621
623
|
], 512),
|
|
622
|
-
X.value ? (o(), S(
|
|
624
|
+
X.value ? (o(), S(Be, {
|
|
623
625
|
key: 5,
|
|
624
626
|
hideDetails: "",
|
|
625
627
|
config: {
|
|
@@ -636,7 +638,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
636
638
|
}
|
|
637
639
|
}, {
|
|
638
640
|
content: _(() => [
|
|
639
|
-
(o(), S(
|
|
641
|
+
(o(), S(He, {
|
|
640
642
|
key: `table_${U.value}`,
|
|
641
643
|
colNames: I.value.colNames,
|
|
642
644
|
head: I.value.head,
|
|
@@ -649,7 +651,7 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
649
651
|
n("div", {
|
|
650
652
|
innerHTML: t,
|
|
651
653
|
style: { display: "flex", "align-items": "center" }
|
|
652
|
-
}, null, 8,
|
|
654
|
+
}, null, 8, Pt)
|
|
653
655
|
]),
|
|
654
656
|
td: _(({ td: t }) => [
|
|
655
657
|
ce(L(t.name || t), 1)
|
|
@@ -659,9 +661,9 @@ const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2",
|
|
|
659
661
|
]),
|
|
660
662
|
_: 1
|
|
661
663
|
}, 8, ["config"])) : g("", !0)
|
|
662
|
-
], 14,
|
|
664
|
+
], 14, qe));
|
|
663
665
|
}
|
|
664
|
-
},
|
|
666
|
+
}, qt = /* @__PURE__ */ je(Gt, [["__scopeId", "data-v-2df541ce"]]);
|
|
665
667
|
export {
|
|
666
|
-
|
|
668
|
+
qt as default
|
|
667
669
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D09qCApg.cjs"),fe=require("./Title-Bjrh7khe.cjs"),Z=require("./usePrinter-DdsPm5a4.cjs"),he=require("./DataTable-oa0Srfuc.cjs"),ve=require("./vue-ui-accordion-BAHX7KzB.cjs"),me=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),J=require("./useNestedProp-Bwd7mK1Z.cjs"),pe=require("./PackageVersion-BkgJVmj1.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ye={key:0,style:"width:100%;background:transparent;padding-bottom:24px"},be=["xmlns","viewBox"],we=["id"],Ce=["stop-color"],Ne=["stop-color"],xe=["d","fill","stroke","stroke-width"],_e=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],$e=["x","y","font-size","fill"],Be=["x","y","font-size","fill"],Ee={key:2,class:"vue-data-ui-watermark"},Se=["innerHTML"],Pe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const h=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{T()});function T(){r.objectIsEmpty(h.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const _=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:h.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||h.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>h.config,l=>{t.value=I(),T(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:V,generateImage:M}=Z.usePrinter({elementId:`flow_${_.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),$=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),B=e.computed(()=>!h.dataset||!h.dataset.length?[]:h.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}B.value.forEach(([s,a,c])=>{n(s),n(a),l[s].outflow+=c,l[a].inflow+=c});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,i){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=i),o[i]||(o[i]=[]),o[i].includes(u)||o[i].push(u)}l.forEach(([u,i,f],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(i,N),n[u].children||(n[u].children=[]),n[u].children.push({target:i,value:f}),n[u].outflow+=f,n[i].inflow+=f}),Object.keys(n).forEach((u,i)=>{n[u].color=$.value[i]||$.value[i%$.value.length]||r.palette[i]||r.palette[i%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let i=0;o[u].forEach((f,k)=>{const p=n[f].height;a[f]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:i,absoluteY:i,height:p,i:k,color:n[f].color,value:oe(p)},i+=p+D.value})}const c=[];for(const u in n){let i=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:f,value:k},p)=>{const N=a[f].y,S=a[u],P=a[f],A=r.checkNaN(i),W=r.checkNaN(i+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[f].inflow*P.height),de={id:r.createUid(),source:u,target:f,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(P.x)} ${R} L ${r.checkNaN(P.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[f].color};c.push(de),i+=W-A,a[f].y+=R-X})}return{nodeCoordinates:a,links:c}}const v=e.computed(()=>{const l=ne(h.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:c}=l[s];n[a]||(n[a]=0),n[a]+=c+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=B.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(c=>c.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return B.value.forEach(([a,c,u])=>{n[a]||(n[a]=[]),o[c]||(o[c]=[]),n[a].push(c),o[c].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ie(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),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.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ce(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ce,generateCsv:U,generateImage:M,generatePdf:V,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),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}`),id:`flow_${_.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(fe._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:_.value,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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,onToggleFullscreen:te,onGeneratePdf:e.unref(V),onGenerateCsv:U,onGenerateImage:e.unref(M),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(pe._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,Ne)],8,we))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ie()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,_e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,Be))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,be)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ee,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,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(he.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Se)]),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,ke))}},Te=ge._export_sfc(Pe,[["__scopeId","data-v-53bf76e7"]]);exports.default=Te;
|