vue-data-ui 2.3.90 → 2.3.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-C_Fnn6al.js → Arrow-CHTslrAF.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-DpuaFuue.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-DfaCNBgc.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-JWGtHqTA.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BKc3r3k3.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-CnkdsvIo.cjs} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-BQJV6Xk4.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-WNL92WSx.js} +1 -1
- package/dist/PackageVersion-D9PU8glB.js +10 -0
- package/dist/PackageVersion-LdLhc8hQ.cjs +1 -0
- package/dist/{Shape-B51JGReT.cjs → Shape-CgW0V2Og.cjs} +1 -1
- package/dist/{Shape-BNocET8E.js → Shape-DPvoEBm9.js} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-DE9nFM_c.js} +2 -2
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-Dma3nlzi.cjs} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bg_BK11V.cjs} +1 -1
- package/dist/{Title-DlBwa3-X.js → Title-CECK1w9L.js} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-Ci3AprCm.js} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-lM1Jzkza.cjs} +1 -1
- package/dist/{index-B8EMsnjU.cjs → index-BhH89oF0.cjs} +1 -1
- package/dist/{index-DQl1TFXa.js → index-mBy4elhB.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-BrIRtQj1.js} +1 -1
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-m8IH8hWW.cjs} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-B8jr_V3b.cjs} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Ck-yukK2.js} +1 -1
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-BgaY7Noy.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-BuL-2aYA.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-C9a-AsIX.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Cv-56A3m.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-Bzq1iTL2.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-dyF20BlD.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-BqsDR6uw.js} +83 -81
- package/dist/vue-ui-age-pyramid-DDPU8QV8.cjs +1 -0
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-B9HxrEVE.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-CkJsRR0r.js} +1 -1
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-B8eYA2g0.js} +113 -111
- package/dist/vue-ui-candlestick-DbbbJa-d.cjs +2 -0
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-BCiTg3Ok.js} +4 -4
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-CCWGcKb7.cjs} +1 -1
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-DI-N69Ad.js} +161 -159
- package/dist/vue-ui-chestnut-rsWP_sXY.cjs +6 -0
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-BUzJk1oC.js} +2 -2
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-wY14Z-Vd.cjs} +1 -1
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-Cf8TYbAr.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CiG3kXLl.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-BBho1-xO.cjs} +1 -1
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-DZJI0YuX.js} +2 -2
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-CBG9ECp8.js} +118 -116
- package/dist/vue-ui-donut-D4WpeX9W.cjs +1 -0
- package/dist/vue-ui-donut-evolution-BVnSrr-b.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-BtTiBfLb.js} +102 -100
- package/dist/vue-ui-dumbbell-BQKiB9yH.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-DlEN2c_X.js} +88 -86
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CXqGztWj.js} +65 -63
- package/dist/vue-ui-flow-DfMNmttZ.cjs +1 -0
- package/dist/vue-ui-galaxy-CGn5nkD5.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-xI38Kf-S.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BEludqYn.js} +56 -54
- package/dist/vue-ui-gauge-Bz-OSNOJ.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-BB28OTr1.js} +32 -30
- package/dist/vue-ui-gizmo-CZZB7YgY.cjs +1 -0
- package/dist/vue-ui-heatmap-BtUvE7rK.cjs +1 -0
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-mywZXUV8.js} +99 -97
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-CEAGjnkj.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-zr721ux9.js} +3 -3
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-9zyuKIpT.js} +2 -2
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-DBFAzGb2.cjs} +1 -1
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-Bv_ppQig.js} +77 -75
- package/dist/vue-ui-molecule-DltNL0kV.cjs +1 -0
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CIK2Xohn.js} +76 -74
- package/dist/vue-ui-mood-radar-CQkF2Rp1.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-f-cMx3iQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-vHr23QlH.cjs +17 -0
- package/dist/vue-ui-onion-B6ZrryDW.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-CmUXelhy.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-BU0yoxD9.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-h9dS2u_k.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-DNT_0fTL.js} +141 -139
- package/dist/vue-ui-quadrant-DPPXilUd.cjs +1 -0
- package/dist/vue-ui-quick-chart-1gG267X0.cjs +15 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-T6C0BTyw.js} +166 -164
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CfCHXIYJ.js} +89 -87
- package/dist/vue-ui-radar-DpzjMFZD.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-DYcT_LS-.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-DuRLpMwk.js} +2 -2
- package/dist/vue-ui-relation-circle-BMrPtD2n.cjs +1 -0
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-WmZMKqHL.js} +54 -52
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-Ce0Z_osd.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-CkYl3uce.cjs} +2 -2
- package/dist/vue-ui-scatter-Cjie2D-t.cjs +1 -0
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-DY9EpoGP.js} +132 -130
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-BCFym6go.cjs} +1 -1
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-lQLJHBQ2.js} +1 -1
- package/dist/vue-ui-skeleton-Cf89QIhl.cjs +41 -0
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-DDhwPZd_.js} +423 -388
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-DMA6fgGr.cjs} +1 -1
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-xxMwBT9c.js} +2 -2
- package/dist/vue-ui-spark-trend-Btj_H6fa.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-CLHTqp94.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-Btk6snt4.js} +53 -51
- package/dist/vue-ui-sparkbar-CKrbBVKQ.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-DKJtFTSv.js} +31 -29
- package/dist/vue-ui-sparkgauge-DfWLtFYS.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-JRLlw9EX.js} +69 -67
- package/dist/vue-ui-sparkhistogram-wHJ-8zVV.cjs +1 -0
- package/dist/vue-ui-sparkline-DElVaalm.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-tBF9iaNm.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-BS9I8en7.js} +46 -44
- package/dist/vue-ui-sparkstackbar-tZa2IYHP.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-UiX8q4yL.js} +128 -126
- package/dist/vue-ui-stackbar-rOa0atA9.cjs +6 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-BOkfg5vB.js} +78 -76
- package/dist/vue-ui-strip-plot-hRy6QRHK.cjs +1 -0
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-B9dc0l0k.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-Dtfv71zG.js} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-BMl-sP5Q.js} +4 -4
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-DUQEHohs.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BVnGb-lu.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeunspIj.js} +5 -5
- package/dist/vue-ui-thermometer-A3Xxn5Ly.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-Cb9ALBj_.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-2PRDq1w6.js} +62 -60
- package/dist/vue-ui-timer-DltmIdrq.cjs +64 -0
- package/dist/vue-ui-tiremarks-BTlJcW4v.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-Bse3PMGV.js} +51 -49
- package/dist/vue-ui-treemap-Cv_mHK8H.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-D8fjVYq0.js} +93 -91
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BVldPT8k.js} +110 -108
- package/dist/vue-ui-vertical-bar-ZgJq3_CI.cjs +4 -0
- package/dist/vue-ui-waffle-BpeGEjCl.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-wikAjwZY.js} +72 -70
- package/dist/vue-ui-wheel-BlgfdULS.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-D5qyBs0Y.js} +43 -41
- package/dist/{vue-ui-word-cloud-dMBTVGVk.js → vue-ui-word-cloud-Bcdl2iE-.js} +60 -58
- package/dist/vue-ui-word-cloud-sNzfl_Tq.cjs +1 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-CUjllUSv.js} +507 -504
- package/dist/vue-ui-xy-FHLTc7xG.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-BJUnRVuf.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-BkOlPU8e.js} +10 -10
- package/package.json +1 -1
- 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-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BhH89oF0.cjs"),we=require("./useNestedProp-m8IH8hWW.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-B8jr_V3b.cjs"),We=require("./Slicer-Dma3nlzi.cjs"),Ue=require("./Tooltip-lM1Jzkza.cjs"),Xe=require("./Title-Bg_BK11V.cjs"),Ye=require("./Legend-BQJV6Xk4.cjs"),Ge=require("./vue-ui-accordion-Bzq1iTL2.cjs"),Je=require("./DataTable-CnkdsvIo.cjs"),Ze=require("./vue-ui-skeleton-Cf89QIhl.cjs"),Ke=require("./PackageVersion-LdLhc8hQ.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=["id"],et=["xmlns","viewBox"],tt={key:0},at=["id"],lt=["stop-color"],ot=["stop-color"],rt=["stop-color"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x1","x2","y1","y2","stroke"],ct=["x","y","height","rx","width","fill","stroke","stroke-width"],dt=["x","y","width","rx","height","fill","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],gt=["x","y","font-size","fill","font-weight"],yt=["transform","font-size","fill","font-weight"],mt=["x","y","font-size","fill","font-weight"],bt={key:0},pt=["x","y","font-size","font-weight","fill"],ft=["x","y","font-size","fill","font-weight"],kt={key:0},xt=["x","y","font-size","font-weight","fill"],wt=["x1","x2","y1","y2","stroke"],Ct=["x","y","font-size","font-weight","fill"],Bt=["x1","x2","y1","y2","stroke"],Lt=["font-size","font-weight","fill","text-anchor","transform"],St=["text-anchor","font-size","font-weight","fill","transform"],zt=["font-size","font-weight","fill","x","y"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt=["x","y","width","height","onClick","onMouseenter","fill"],Et={key:3,class:"vue-data-ui-watermark"},Mt=["onClick"],$t=["innerHTML"],Tt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
|
|
2
|
+
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
3
|
+
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${f.id})`:f.color}"/></svg>
|
|
4
|
+
${f.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:f.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(f.value/o)?0:Math.abs(f.value)/o*100,s:"%",r:z}):""}${_[1]}
|
|
5
|
+
</div>
|
|
6
|
+
`}),U.value=`<div>${P}</div>`}}function $e(l){X.value=l,K.value+=1}function ge(){b.value.showTable=!b.value.showTable}function ye(){b.value.dataLabels.show=!b.value.dataLabels.show}function me(){b.value.showTooltip=!b.value.showTooltip}function Te(){return g.value}const be=e.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=g.value.map(({name:a,color:o})=>({label:a,color:o})),r=[];for(let a=u.value.start;a<u.value.end;a+=1){const o=[t.value.style.chart.grid.x.timeLabels.values[a]||a+1];B.value.forEach(n=>{o.push(Number((n.series[a]||0).toFixed(t.value.table.td.roundingValue)))}),r.push(o)}return{head:l,body:r}});function pe(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=["",...be.value.head.map(i=>i.label)],a=be.value.body,o=l.concat([r]).concat(a),n=c.createCsvContent(o);c.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-stackbar"})}const H=e.computed(()=>{const l=[""].concat(g.value.map(n=>n.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let r=[];for(let n=0;n<L.value;n+=1){const i=g.value.map(m=>m.series[n]??0).reduce((m,S)=>m+S,0);r.push([t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)[n]??n+1].concat(g.value.map(m=>(m.series[n]??0).toFixed(t.value.table.td.roundingValue))).concat((i??0).toFixed(t.value.table.td.roundingValue)))}const a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.period].concat(g.value.map(n=>n.name)).concat(t.value.table.columnNames.total);return{head:l,body:r.slice(0,u.value.end-u.value.start),config:a,colNames:o}});function Ve(l,r){if(J("selectLegend",g.value.find(a=>a.absoluteIndex===l)),p.value.includes(r.id))p.value=p.value.filter(a=>a!==r.id);else{if(p.value.length===B.value.length-1)return;p.value.push(r.id)}}const fe=e.computed(()=>B.value.map((l,r)=>({...l,shape:"square"})).map(l=>({...l,opacity:p.value.includes(l.id)?.5:1,segregate:()=>Ve(l.absoluteIndex,l),isSegregated:p.value.includes(l.id)}))),Fe=e.computed(()=>({cy:"stackbar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));return Le({getData:Te,generatePdf:re,generateCsv:pe,generateImage:se,toggleTable:ge,toggleLabels:ye,toggleTooltip:me}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{id:`stackbar_${W.value}`,ref_key:"stackbarChart",ref:M,class:e.normalizeClass({"vue-ui-stackbar":!0,"vue-data-ui-wrapper-fullscreen":X.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent;padding-bottom:24px"},[e.createVNode(Xe._sfc_main,{config:{title:{cy:"stackbar-title",...t.value.style.chart.title},subtitle:{cy:"stackbar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${K.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(oe),uid:W.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,chartElement:M.value,position:t.value.userOptions.position,isTooltip:b.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:$e,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(se),onToggleTable:ge,onToggleLabels:ye,onToggleTooltip:me},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),viewBox:`0 0 ${s.value.chartWidth<=0?10:s.value.chartWidth} ${s.value.chartHeight<=0?10:s.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ke._sfc_main),t.value.style.chart.bars.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient_${a.id}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,lt),e.createElementVNode("stop",{offset:"61.8%","stop-color":e.unref(c.lightenHexColor)(a.color,t.value.style.chart.bars.gradient.intensity/100)},null,8,ot),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,rt)],8,at))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,st))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.right,y1:s.value.top+d.value*o,y2:s.value.top+d.value*o,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,nt))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showVerticalLines&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(u.value.end-u.value.start+1,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left+d.value*o,x2:s.value.left+d.value*o,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,it))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.showHorizontalLines&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:4},e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,ut))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.y[i]<0?0:a.y[i],height:a.height[i]<0?1e-4:a.height[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,width:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,ct))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("rect",{x:n,y:a.horizontal_y[i]<0?0:a.horizontal_y[i],width:a.horizontal_width[i]<0?1e-4:a.horizontal_width[i],rx:t.value.style.chart.bars.borderRadius>a.height[i]/2?(a.height[i]<0?0:a.height[i])/2:t.value.style.chart.bars.borderRadius,height:d.value*(1-t.value.style.chart.bars.gapRatio/2),fill:t.value.style.chart.bars.gradient.show?`url(#gradient_${a.id})`:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.bars.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.useCssAnimation,"vue-data-ui-bar-transition":T.value})},null,10,dt))),256))]))),256)),t.value.style.chart.grid.x.showAxis?(e.openBlock(),e.createElementBlock("line",{key:5,x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":t.value.style.chart.grid.x.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,vt)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.showAxis&&!t.value.style.chart.bars.distributed?(e.openBlock(),e.createElementBlock("line",{key:6,x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.chart.grid.y.axisColor,"stroke-width":t.value.style.chart.grid.y.axisThickness,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ht)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.axisName.show&&t.value.style.chart.grid.x.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:s.value.left+s.value.width/2,y:s.value.chartHeight+t.value.style.chart.grid.x.axisName.offsetY,"font-size":t.value.style.chart.grid.x.axisName.fontSize,fill:t.value.style.chart.grid.x.axisName.color,"font-weight":t.value.style.chart.grid.x.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.x.axisName.text),9,gt)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisName.show&&t.value.style.chart.grid.y.axisName.text?(e.openBlock(),e.createElementBlock("text",{key:8,transform:`translate(${t.value.style.chart.grid.y.axisName.fontSize+t.value.style.chart.grid.y.axisName.offsetX}, ${s.value.top+s.value.height/2}) rotate(-90)`,"font-size":t.value.style.chart.grid.y.axisName.fontSize,fill:t.value.style.chart.grid.y.axisName.color,"font-weight":t.value.style.chart.grid.y.axisName.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.grid.y.axisName.text),9,yt)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2,y:a.y[i]+a.height[i]/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?de(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,mt))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.left+d.value*o+d.value/2,y:s.value.top-t.value.style.chart.bars.totalValues.fontSize/3,"text-anchor":"middle","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,pt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value.dataLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.horizontal_x,(n,i)=>(e.openBlock(),e.createElementBlock("text",{x:n+(a.horizontal_width[i]<0?1e-4:a.horizontal_width[i])/2,y:a.horizontal_y[i]+d.value*(1-t.value.style.chart.bars.gapRatio/2)/2+t.value.style.chart.bars.dataLabels.fontSize/3,"font-size":t.value.style.chart.bars.dataLabels.fontSize,fill:t.value.style.chart.bars.dataLabels.adaptColorToBackground?e.unref(c.adaptColorToBackground)(a.color):t.value.style.chart.bars.dataLabels.color,"font-weight":t.value.style.chart.bars.dataLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.bars.showDistributedPercentage&&t.value.style.chart.bars.distributed?de(a.proportions[i]*100,a,o,i):A(a.series[i],a,o,i,a.signedSeries[i])),9,ft))),256))]))),256)),t.value.style.chart.bars.totalValues.show&&g.value.length>1?(e.openBlock(),e.createElementBlock("g",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:s.value.right+t.value.style.chart.bars.totalValues.fontSize/3,y:s.value.top+d.value*o+d.value/2,"text-anchor":"start","font-size":t.value.style.chart.bars.totalValues.fontSize,"font-weight":t.value.style.chart.bars.totalValues.bold?"bold":"normal",fill:t.value.style.chart.bars.totalValues.color},e.toDisplayString(A(a.value,a,o,a.sign)),9,xt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:11},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.left,x2:s.value.left-6,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1},null,8,wt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{x:a.x,y:a.y+t.value.style.chart.grid.y.axisLabels.fontSize/3,"font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Ct))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.y.axisLabels.show&&!t.value.style.chart.bars.distributed&&t.value.orientation==="horizontal"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("line",{x1:a.horizontal_x,x2:a.horizontal_x,y1:s.value.bottom,y2:s.value.bottom+6,stroke:t.value.style.chart.grid.x.axisColor,"stroke-width":1,"stroke-linecap":"round"},null,8,Bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle",transform:`translate(${a.horizontal_x}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a.value,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.grid.y.axisLabels.rounding})),9,Lt))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:13},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":t.value.style.chart.grid.x.timeLabels.rotation>0?"start":t.value.style.chart.grid.x.timeLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.grid.x.timeLabels.fontSize,"font-weight":t.value.style.chart.grid.x.timeLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.x.timeLabels.color,transform:`translate(${s.value.left+d.value*o+d.value/2}, ${s.value.bottom+t.value.style.chart.grid.x.timeLabels.fontSize*1.3+t.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${t.value.style.chart.grid.x.timeLabels.rotation})`},e.toDisplayString(a),9,St))),256)):e.createCommentVNode("",!0),t.value.style.chart.grid.x.timeLabels.show&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:14},e.renderList(F.value,(a,o)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"end","font-size":t.value.style.chart.grid.y.axisLabels.fontSize,"font-weight":t.value.style.chart.grid.y.axisLabels.bold?"bold":"normal",fill:t.value.style.chart.grid.y.axisLabels.color,x:s.value.left-8,y:s.value.top+d.value*o+d.value/2+t.value.style.chart.grid.y.axisLabels.fontSize/3},e.toDisplayString(a),9,zt))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="vertical"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:15},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+o*d.value,y:s.value.top,width:d.value,height:s.value.height<0?0:s.value.height,onClick:n=>ve(o),onMouseenter:n=>he(o),onMouseleave:r[0]||(r[0]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,_t))),256)):e.createCommentVNode("",!0),b.value.showTooltip&&t.value.orientation==="horizontal"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:16},e.renderList(u.value.end-u.value.start,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left,y:s.value.top+o*d.value,width:s.value.width<0?0:s.value.width,height:d.value,onClick:n=>ve(o),onMouseenter:n=>he(o),onMouseleave:r[1]||(r[1]=n=>{$.value=null,O.value=!1}),fill:o===$.value?t.value.style.chart.highlighter.color:"transparent",style:e.normalizeStyle({opacity:t.value.style.chart.highlighter.opacity/100})},null,44,Nt))),256)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({...s.value})),void 0,!0)],12,et)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ze.default,{key:4,config:{type:"bar",style:{backgroundColor:t.value.style.chart.backgroundColor,bar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartSlicer",ref:ee,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&L.value>1?(e.openBlock(),e.createBlock(We.Slicer,{key:`slicer_${te.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.x.timeLabels.values[u.value.start]?t.value.style.chart.grid.x.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.x.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:Math.max(...G.dataset.map(a=>a.series.length)),min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":r[2]||(r[2]=a=>u.value.start=a),end:u.value.end,"onUpdate:end":r[3]||(r[3]=a=>u.value.end=a),onReset:ue},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0)],4),e.createVNode(Ue._sfc_main,{show:b.value.showTooltip&&O.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:U.value,isCustom:e.unref(c.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartLegend",ref:j},[t.value.style.chart.legend.show&&E.value?(e.openBlock(),e.createBlock(Ye.Legend,{key:0,legendSet:fe.value,config:Fe.value,onClickMarker:r[4]||(r[4]=({legend:a})=>a.segregate())},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,Mt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:fe.value},void 0,!0)],512),u.value.end-u.value.start<200?(e.openBlock(),e.createBlock(Ge.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(Je.DataTable,{colNames:H.value.colNames,head:H.value.head,body:H.value.body,config:H.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[5]||(r[5]=a=>b.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,$t)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:e.unref(c.dataLabel)({p:t.value.style.chart.bars.dataLabels.prefix,v:a,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,je))}},Vt=Qe._export_sfc(Tt,[["__scopeId","data-v-a4f47dd7"]]);exports.default=Vt;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { computed as p, ref as n, watch as
|
|
2
|
-
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as
|
|
1
|
+
import { computed as p, ref as n, watch as Ne, onMounted as Ae, onBeforeUnmount as Oe, openBlock as s, createElementBlock as i, normalizeClass as F, normalizeStyle as q, createBlock as P, createCommentVNode as c, unref as h, createSlots as Fe, withCtx as b, renderSlot as m, normalizeProps as H, guardReactiveProps as R, createVNode as be, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as We, createTextVNode as Ie, nextTick as Me } from "vue";
|
|
2
|
+
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-mBy4elhB.js";
|
|
3
3
|
import { t as Qe, u as Ze } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as et } from "./Title-
|
|
5
|
-
import { u as tt, U as lt } from "./usePrinter-
|
|
6
|
-
import { _ as at } from "./Tooltip-
|
|
7
|
-
import { D as ot } from "./DataTable-
|
|
8
|
-
import st from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as rt } from "./Shape-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as it } from "./
|
|
13
|
-
|
|
4
|
+
import { _ as et } from "./Title-CECK1w9L.js";
|
|
5
|
+
import { u as tt, U as lt } from "./usePrinter-Ck-yukK2.js";
|
|
6
|
+
import { _ as at } from "./Tooltip-Ci3AprCm.js";
|
|
7
|
+
import { D as ot } from "./DataTable-BKc3r3k3.js";
|
|
8
|
+
import st from "./vue-ui-skeleton-DDhwPZd_.js";
|
|
9
|
+
import { _ as rt } from "./Shape-DPvoEBm9.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-dyF20BlD.js";
|
|
11
|
+
import { u as ke } from "./useNestedProp-BrIRtQj1.js";
|
|
12
|
+
import { _ as it } from "./PackageVersion-D9PU8glB.js";
|
|
13
|
+
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const vt = ["id"], ct = ["xmlns", "viewBox"], ht = { key: 0 }, dt = { key: 0 }, pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], yt = { key: 1 }, ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gt = ["x", "y", "fill", "font-size"], xt = ["x", "y", "font-size", "fill"], kt = ["fill", "font-size", "transform"], Ct = ["fill", "font-size", "x", "y"], _t = ["x1", "x2", "y1", "y2", "stroke"], wt = ["cx", "cy", "fill"], $t = ["cx", "cy", "fill"], Tt = ["id"], Lt = ["stop-color"], St = ["stop-color"], Pt = ["stop-color"], zt = { key: 0 }, Nt = ["x", "y", "font-size", "fill"], At = {
|
|
14
15
|
key: 3,
|
|
15
16
|
class: "vue-data-ui-watermark"
|
|
16
|
-
},
|
|
17
|
+
}, Ot = ["innerHTML"], Ft = {
|
|
17
18
|
__name: "vue-ui-strip-plot",
|
|
18
19
|
props: {
|
|
19
20
|
config: {
|
|
@@ -30,8 +31,8 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
emits: ["selectDatapoint"],
|
|
33
|
-
setup(
|
|
34
|
-
const y =
|
|
34
|
+
setup(Ce, { expose: _e, emit: we }) {
|
|
35
|
+
const y = Ce, { vue_ui_strip_plot: $e } = De(), _ = p({
|
|
35
36
|
get() {
|
|
36
37
|
return !!y.dataset && y.dataset.length;
|
|
37
38
|
},
|
|
@@ -43,23 +44,23 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
43
44
|
set: (t) => t
|
|
44
45
|
});
|
|
45
46
|
function se() {
|
|
46
|
-
const t =
|
|
47
|
+
const t = ke({
|
|
47
48
|
userConfig: y.config,
|
|
48
|
-
defaultConfig:
|
|
49
|
+
defaultConfig: $e
|
|
49
50
|
});
|
|
50
51
|
return t.theme ? {
|
|
51
|
-
...
|
|
52
|
+
...ke({
|
|
52
53
|
userConfig: Ge.vue_ui_strip_plot[t.theme] || y.config,
|
|
53
54
|
defaultConfig: t
|
|
54
55
|
}),
|
|
55
56
|
customPalette: Ee[t.theme] || L
|
|
56
57
|
} : t;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
Ne(() => y.config, (t) => {
|
|
59
60
|
e.value = se(), re(), ae.value += 1, oe.value += 1;
|
|
60
61
|
}, { deep: !0 });
|
|
61
62
|
const W = n(null);
|
|
62
|
-
|
|
63
|
+
Ae(() => {
|
|
63
64
|
re();
|
|
64
65
|
});
|
|
65
66
|
function re() {
|
|
@@ -67,22 +68,22 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
67
68
|
componentName: "VueUiStripPlot",
|
|
68
69
|
type: "dataset"
|
|
69
70
|
}) : y.dataset.forEach((t, o) => {
|
|
70
|
-
|
|
71
|
+
me({
|
|
71
72
|
datasetObject: t,
|
|
72
73
|
requiredAttributes: ["name", "plots"]
|
|
73
74
|
}).forEach((l) => {
|
|
74
|
-
|
|
75
|
+
_.value = !1, Q({
|
|
75
76
|
componentName: "VueUiStripPlot",
|
|
76
77
|
type: "datasetSerieAttribute",
|
|
77
78
|
property: l,
|
|
78
79
|
index: o
|
|
79
80
|
});
|
|
80
81
|
}), t.plots && t.plots.forEach((l, r) => {
|
|
81
|
-
|
|
82
|
+
me({
|
|
82
83
|
datasetObject: l,
|
|
83
84
|
requiredAttributes: ["name", "value"]
|
|
84
85
|
}).forEach((u) => {
|
|
85
|
-
|
|
86
|
+
_.value = !1, Q({
|
|
86
87
|
componentName: "VueUiStripPlot",
|
|
87
88
|
type: "datasetSerieAttribute",
|
|
88
89
|
property: u,
|
|
@@ -108,9 +109,9 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
108
109
|
}
|
|
109
110
|
le.value = !0, setTimeout(() => {
|
|
110
111
|
N.value = !1;
|
|
111
|
-
},
|
|
112
|
+
}, Te.value * 50);
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
+
Oe(() => {
|
|
114
115
|
W.value && W.value.disconnect();
|
|
115
116
|
});
|
|
116
117
|
const { isPrinting: ue, isImaging: ie, generatePdf: ne, generateImage: ve } = tt({
|
|
@@ -143,17 +144,17 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
143
144
|
absoluteHeight: I.value,
|
|
144
145
|
absoluteWidth: t
|
|
145
146
|
};
|
|
146
|
-
}), D = p(() =>
|
|
147
|
+
}), D = p(() => _.value ? y.dataset.map((t, o) => {
|
|
147
148
|
const l = K();
|
|
148
149
|
return {
|
|
149
150
|
...t,
|
|
150
151
|
id: l,
|
|
151
|
-
color: t.color ?
|
|
152
|
+
color: t.color ? ge(t.color) : ce.value[o] || L[o] || L[o % L.length],
|
|
152
153
|
plots: t.plots.map((r) => ({
|
|
153
154
|
...r,
|
|
154
155
|
value: Re(r.value),
|
|
155
156
|
parentId: l,
|
|
156
|
-
color: t.color ?
|
|
157
|
+
color: t.color ? ge(t.color) : ce.value[o] || L[o] || L[o % L.length],
|
|
157
158
|
id: K()
|
|
158
159
|
})).sort((r, u) => r.value - u.value)
|
|
159
160
|
};
|
|
@@ -163,28 +164,28 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
163
164
|
...l,
|
|
164
165
|
x: a.value.left + (o + 1) * a.value.stripWidth - a.value.stripWidth / 2
|
|
165
166
|
}))
|
|
166
|
-
}))),
|
|
167
|
+
}))), Te = p(() => Math.max(...k.value.map((t) => t.plots.length))), Y = p(() => {
|
|
167
168
|
const t = k.value.flatMap((o) => o.plots.map((l) => l.value));
|
|
168
169
|
return {
|
|
169
170
|
max: Math.max(...t),
|
|
170
171
|
min: Math.min(...t)
|
|
171
172
|
};
|
|
172
|
-
}),
|
|
173
|
+
}), w = p(() => Ue(Y.value.min < 0 ? Y.value.min : 0, Y.value.max, e.value.style.chart.grid.scaleSteps)), Le = p(() => (k.value || []).map((t, o) => ({
|
|
173
174
|
...t,
|
|
174
175
|
plots: t.plots.map((l) => ({
|
|
175
176
|
...l,
|
|
176
|
-
y: a.value.bottom - (l.value + Math.abs(
|
|
177
|
+
y: a.value.bottom - (l.value + Math.abs(w.value.min)) / (w.value.max + Math.abs(w.value.min)) * a.value.height
|
|
177
178
|
}))
|
|
178
|
-
}))), he = p(() =>
|
|
179
|
-
y: a.value.bottom - a.value.height * ((t + Math.abs(
|
|
179
|
+
}))), he = p(() => w.value.ticks.map((t) => ({
|
|
180
|
+
y: a.value.bottom - a.value.height * ((t + Math.abs(w.value.min)) / (w.value.max + Math.abs(w.value.min))),
|
|
180
181
|
x1: a.value.left,
|
|
181
182
|
x2: a.value.right,
|
|
182
183
|
value: t
|
|
183
184
|
}))), J = n(null), v = n(null);
|
|
184
|
-
function
|
|
185
|
+
function Se({ datapoint: t, seriesIndex: o }) {
|
|
185
186
|
J.value = { datapoint: t, seriesIndex: o, config: e.value, series: D.value }, X.value = !0, v.value = t;
|
|
186
187
|
const l = e.value.style.chart.tooltip.customFormat;
|
|
187
|
-
if (
|
|
188
|
+
if (xe(l) && Ye(() => l({
|
|
188
189
|
seriesIndex: o,
|
|
189
190
|
datapoint: t,
|
|
190
191
|
series: D.value,
|
|
@@ -267,10 +268,10 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
267
268
|
config: l
|
|
268
269
|
};
|
|
269
270
|
}), O = n(!1);
|
|
270
|
-
function
|
|
271
|
+
function Pe(t) {
|
|
271
272
|
O.value = t, ee.value += 1;
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function ze() {
|
|
274
275
|
return k.value;
|
|
275
276
|
}
|
|
276
277
|
function pe() {
|
|
@@ -282,8 +283,8 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
282
283
|
function fe() {
|
|
283
284
|
d.value.showTooltip = !d.value.showTooltip;
|
|
284
285
|
}
|
|
285
|
-
return
|
|
286
|
-
getData:
|
|
286
|
+
return _e({
|
|
287
|
+
getData: ze,
|
|
287
288
|
generatePdf: ne,
|
|
288
289
|
generateCsv: de,
|
|
289
290
|
generateImage: ve,
|
|
@@ -317,7 +318,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
317
318
|
}
|
|
318
319
|
}, null, 8, ["config"]))
|
|
319
320
|
], 512)) : c("", !0),
|
|
320
|
-
e.value.userOptions.show &&
|
|
321
|
+
e.value.userOptions.show && _.value ? (s(), P(lt, {
|
|
321
322
|
ref: "details",
|
|
322
323
|
key: `user_option_${ee.value}`,
|
|
323
324
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -337,14 +338,14 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
337
338
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
338
339
|
chartElement: z.value,
|
|
339
340
|
position: e.value.userOptions.position,
|
|
340
|
-
onToggleFullscreen:
|
|
341
|
+
onToggleFullscreen: Pe,
|
|
341
342
|
onGeneratePdf: h(ne),
|
|
342
343
|
onGenerateCsv: de,
|
|
343
344
|
onGenerateImage: h(ve),
|
|
344
345
|
onToggleTable: pe,
|
|
345
346
|
onToggleLabels: ye,
|
|
346
347
|
onToggleTooltip: fe
|
|
347
|
-
},
|
|
348
|
+
}, Fe({ _: 2 }, [
|
|
348
349
|
t.$slots.optionTooltip ? {
|
|
349
350
|
name: "optionTooltip",
|
|
350
351
|
fn: b(() => [
|
|
@@ -395,15 +396,16 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
395
396
|
key: "6"
|
|
396
397
|
} : void 0
|
|
397
398
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : c("", !0),
|
|
398
|
-
|
|
399
|
+
_.value ? (s(), i("svg", {
|
|
399
400
|
key: 2,
|
|
400
401
|
xmlns: h(Be),
|
|
401
402
|
class: F({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
|
|
402
403
|
viewBox: `0 0 ${S.value.width <= 0 ? 10 : S.value.width} ${S.value.height <= 0 ? 10 : S.value.height}`,
|
|
403
404
|
style: q(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
|
|
404
405
|
}, [
|
|
405
|
-
|
|
406
|
-
|
|
406
|
+
be(it),
|
|
407
|
+
e.value.style.chart.grid.show ? (s(), i("g", ht, [
|
|
408
|
+
e.value.style.chart.grid.horizontalGrid.show ? (s(), i("g", dt, [
|
|
407
409
|
(s(!0), i(g, null, C(he.value, (l) => (s(), i("line", {
|
|
408
410
|
x1: l.x1,
|
|
409
411
|
x2: l.x2,
|
|
@@ -413,9 +415,9 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
413
415
|
"stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
|
|
414
416
|
"stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray,
|
|
415
417
|
"stroke-linecap": "round"
|
|
416
|
-
}, null, 8,
|
|
418
|
+
}, null, 8, pt))), 256))
|
|
417
419
|
])) : c("", !0),
|
|
418
|
-
e.value.style.chart.grid.verticalGrid.show ? (s(), i("g",
|
|
420
|
+
e.value.style.chart.grid.verticalGrid.show ? (s(), i("g", yt, [
|
|
419
421
|
(s(!0), i(g, null, C(k.value, (l, r) => (s(), i("line", {
|
|
420
422
|
x1: a.value.left + (r + 1) * a.value.stripWidth,
|
|
421
423
|
x2: a.value.left + (r + 1) * a.value.stripWidth,
|
|
@@ -425,7 +427,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
425
427
|
"stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
|
|
426
428
|
"stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray,
|
|
427
429
|
"stroke-linecap": "round"
|
|
428
|
-
}, null, 8,
|
|
430
|
+
}, null, 8, ft))), 256))
|
|
429
431
|
])) : c("", !0),
|
|
430
432
|
x("line", {
|
|
431
433
|
x1: a.value.left,
|
|
@@ -435,7 +437,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
435
437
|
stroke: e.value.style.chart.grid.stroke,
|
|
436
438
|
"stroke-width": e.value.style.chart.grid.strokeWidth,
|
|
437
439
|
"stroke-linecap": "round"
|
|
438
|
-
}, null, 8,
|
|
440
|
+
}, null, 8, bt),
|
|
439
441
|
x("line", {
|
|
440
442
|
x1: a.value.left,
|
|
441
443
|
x2: a.value.right,
|
|
@@ -444,7 +446,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
444
446
|
stroke: e.value.style.chart.grid.stroke,
|
|
445
447
|
"stroke-width": e.value.style.chart.grid.strokeWidth,
|
|
446
448
|
"stroke-linecap": "round"
|
|
447
|
-
}, null, 8,
|
|
449
|
+
}, null, 8, mt)
|
|
448
450
|
])) : c("", !0),
|
|
449
451
|
e.value.style.chart.labels.yAxisLabels.show ? (s(!0), i(g, { key: 1 }, C(he.value, (l, r) => (s(), i("text", {
|
|
450
452
|
x: l.x1 - e.value.style.chart.labels.yAxisLabels.fontSize / 2 + e.value.style.chart.labels.yAxisLabels.offsetX,
|
|
@@ -462,21 +464,21 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
462
464
|
r: e.value.style.chart.labels.yAxisLabels.rounding
|
|
463
465
|
}),
|
|
464
466
|
{ datapoint: l, seriesIndex: r }
|
|
465
|
-
)), 9,
|
|
467
|
+
)), 9, gt))), 256)) : c("", !0),
|
|
466
468
|
e.value.style.chart.labels.xAxisLabels.show ? (s(!0), i(g, { key: 2 }, C(k.value, (l, r) => (s(), i("text", {
|
|
467
469
|
x: a.value.left + (r + 1) * a.value.stripWidth - a.value.stripWidth / 2,
|
|
468
470
|
y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize * 2 + e.value.style.chart.labels.xAxisLabels.offsetY,
|
|
469
471
|
"font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
|
|
470
472
|
fill: e.value.style.chart.labels.xAxisLabels.color,
|
|
471
473
|
"text-anchor": "middle"
|
|
472
|
-
}, T(l.name), 9,
|
|
474
|
+
}, T(l.name), 9, xt))), 256)) : c("", !0),
|
|
473
475
|
e.value.style.chart.labels.axis.yLabel ? (s(), i("text", {
|
|
474
476
|
key: 3,
|
|
475
477
|
fill: e.value.style.chart.labels.axis.color,
|
|
476
478
|
"font-size": e.value.style.chart.labels.axis.fontSize,
|
|
477
479
|
transform: `translate(${e.value.style.chart.labels.axis.fontSize + e.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top + a.value.height / 2}) rotate(-90)`,
|
|
478
480
|
"text-anchor": "middle"
|
|
479
|
-
}, T(e.value.style.chart.labels.axis.yLabel), 9,
|
|
481
|
+
}, T(e.value.style.chart.labels.axis.yLabel), 9, kt)) : c("", !0),
|
|
480
482
|
e.value.style.chart.labels.axis.xLabel ? (s(), i("text", {
|
|
481
483
|
key: 4,
|
|
482
484
|
fill: e.value.style.chart.labels.axis.color,
|
|
@@ -484,7 +486,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
484
486
|
x: a.value.left + a.value.width / 2,
|
|
485
487
|
y: a.value.absoluteHeight,
|
|
486
488
|
"text-anchor": "middle"
|
|
487
|
-
}, T(e.value.style.chart.labels.axis.xLabel), 9,
|
|
489
|
+
}, T(e.value.style.chart.labels.axis.xLabel), 9, Ct)) : c("", !0),
|
|
488
490
|
v.value ? (s(), i(g, { key: 5 }, [
|
|
489
491
|
x("line", {
|
|
490
492
|
x1: a.value.left,
|
|
@@ -494,7 +496,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
494
496
|
stroke: v.value.color,
|
|
495
497
|
"stroke-width": 1,
|
|
496
498
|
class: F({ "select-circle": e.value.useCssAnimation })
|
|
497
|
-
}, null, 10,
|
|
499
|
+
}, null, 10, _t),
|
|
498
500
|
x("circle", {
|
|
499
501
|
cx: a.value.left,
|
|
500
502
|
cy: v.value.y,
|
|
@@ -508,7 +510,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
508
510
|
r: 3,
|
|
509
511
|
fill: v.value.color,
|
|
510
512
|
class: F({ "select-circle": e.value.useCssAnimation })
|
|
511
|
-
}, null, 10,
|
|
513
|
+
}, null, 10, $t)
|
|
512
514
|
], 64)) : c("", !0),
|
|
513
515
|
x("defs", null, [
|
|
514
516
|
(s(!0), i(g, null, C(k.value, (l) => (s(), i("radialGradient", {
|
|
@@ -518,26 +520,26 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
518
520
|
x("stop", {
|
|
519
521
|
offset: "10%",
|
|
520
522
|
"stop-color": h(Xe)(l.color, e.value.style.chart.plots.gradient.intensity / 100)
|
|
521
|
-
}, null, 8,
|
|
523
|
+
}, null, 8, Lt),
|
|
522
524
|
x("stop", {
|
|
523
525
|
offset: "90%",
|
|
524
526
|
"stop-color": h(je)(l.color, 0.1)
|
|
525
|
-
}, null, 8,
|
|
527
|
+
}, null, 8, St),
|
|
526
528
|
x("stop", {
|
|
527
529
|
offset: "100%",
|
|
528
530
|
"stop-color": l.color
|
|
529
|
-
}, null, 8,
|
|
530
|
-
], 8,
|
|
531
|
+
}, null, 8, Pt)
|
|
532
|
+
], 8, Tt))), 256))
|
|
531
533
|
]),
|
|
532
|
-
(s(!0), i(g, null, C(
|
|
533
|
-
(s(!0), i(g, null, C(l.plots, (u, $) => (s(), P(rt,
|
|
534
|
+
(s(!0), i(g, null, C(Le.value, (l, r) => (s(), i(g, null, [
|
|
535
|
+
(s(!0), i(g, null, C(l.plots, (u, $) => (s(), P(rt, We({
|
|
534
536
|
plot: { x: u.x, y: le.value ? u.y : a.value.top },
|
|
535
537
|
radius: v.value && v.value.id === u.id ? M.value * 1.5 : M.value,
|
|
536
538
|
shape: e.value.style.chart.plots.shape,
|
|
537
539
|
stroke: e.value.style.chart.plots.stroke,
|
|
538
540
|
strokeWidth: e.value.style.chart.plots.strokeWidth,
|
|
539
541
|
color: e.value.style.chart.plots.gradient.show ? `url(#${l.id})` : l.color,
|
|
540
|
-
onMouseenter: (V) =>
|
|
542
|
+
onMouseenter: (V) => Se({ datapoint: u, seriesIndex: $ }),
|
|
541
543
|
onMouseleave: o[0] || (o[0] = (V) => {
|
|
542
544
|
X.value = !1, v.value = null;
|
|
543
545
|
}),
|
|
@@ -545,7 +547,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
545
547
|
style: `transition: all 0.2s ease-in-out; opacity:${v.value ? v.value.id === u.id ? 1 : 0.2 : e.value.style.chart.plots.opacity};${N.value ? `transition-delay:${$ * 50}ms` : ""}`,
|
|
546
548
|
class: { "vue-ui-strip-plot-animated": e.value.useCssAnimation && N.value, "vue-ui-strip-plot-select-circle": e.value.useCssAnimation && !N.value }
|
|
547
549
|
}, t.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)),
|
|
548
|
-
d.value.dataLabels.show ? (s(), i("g",
|
|
550
|
+
d.value.dataLabels.show ? (s(), i("g", zt, [
|
|
549
551
|
(s(!0), i(g, null, C(l.plots, (u, $) => (s(), i(g, null, [
|
|
550
552
|
$ === l.plots.length - 1 || v.value && v.value.id === u.id && !d.value.showTooltip ? (s(), i("text", {
|
|
551
553
|
key: 0,
|
|
@@ -565,16 +567,16 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
565
567
|
r: e.value.style.chart.labels.bestPlotLabel.rounding
|
|
566
568
|
}),
|
|
567
569
|
{ datapoint: u, seriesIndex: $ }
|
|
568
|
-
) : ""), 13,
|
|
570
|
+
) : ""), 13, Nt)) : c("", !0)
|
|
569
571
|
], 64))), 256))
|
|
570
572
|
])) : c("", !0)
|
|
571
573
|
], 64))), 256)),
|
|
572
574
|
m(t.$slots, "svg", { svg: a.value }, void 0, !0)
|
|
573
|
-
], 14,
|
|
574
|
-
t.$slots.watermark ? (s(), i("div",
|
|
575
|
+
], 14, ct)) : c("", !0),
|
|
576
|
+
t.$slots.watermark ? (s(), i("div", At, [
|
|
575
577
|
m(t.$slots, "watermark", H(R({ isPrinting: h(ue) || h(ie) })), void 0, !0)
|
|
576
578
|
])) : c("", !0),
|
|
577
|
-
|
|
579
|
+
_.value ? c("", !0) : (s(), P(st, {
|
|
578
580
|
key: 4,
|
|
579
581
|
config: {
|
|
580
582
|
type: "stripPlot",
|
|
@@ -586,7 +588,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
586
588
|
}
|
|
587
589
|
}
|
|
588
590
|
}, null, 8, ["config"])),
|
|
589
|
-
|
|
591
|
+
be(at, {
|
|
590
592
|
show: d.value.showTooltip && X.value,
|
|
591
593
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
592
594
|
color: e.value.style.chart.tooltip.color,
|
|
@@ -599,7 +601,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
599
601
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
600
602
|
parent: z.value,
|
|
601
603
|
content: j.value,
|
|
602
|
-
isCustom: h(
|
|
604
|
+
isCustom: h(xe)(e.value.style.chart.tooltip.customFormat)
|
|
603
605
|
}, {
|
|
604
606
|
"tooltip-before": b(() => [
|
|
605
607
|
m(t.$slots, "tooltip-before", H(R({ ...J.value })), void 0, !0)
|
|
@@ -609,7 +611,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
609
611
|
]),
|
|
610
612
|
_: 3
|
|
611
613
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
612
|
-
|
|
614
|
+
_.value ? (s(), P(ut, {
|
|
613
615
|
key: 5,
|
|
614
616
|
hideDetails: "",
|
|
615
617
|
config: {
|
|
@@ -639,7 +641,7 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
639
641
|
x("div", {
|
|
640
642
|
innerHTML: l,
|
|
641
643
|
style: { display: "flex", "align-items": "center" }
|
|
642
|
-
}, null, 8,
|
|
644
|
+
}, null, 8, Ot)
|
|
643
645
|
]),
|
|
644
646
|
td: b(({ td: l }) => [
|
|
645
647
|
Ie(T(l.name || l), 1)
|
|
@@ -649,9 +651,9 @@ const nt = ["id"], vt = ["xmlns", "viewBox"], ct = { key: 0 }, ht = { key: 0 },
|
|
|
649
651
|
]),
|
|
650
652
|
_: 1
|
|
651
653
|
}, 8, ["config"])) : c("", !0)
|
|
652
|
-
], 14,
|
|
654
|
+
], 14, vt));
|
|
653
655
|
}
|
|
654
|
-
},
|
|
656
|
+
}, Yt = /* @__PURE__ */ nt(Ft, [["__scopeId", "data-v-85774736"]]);
|
|
655
657
|
export {
|
|
656
|
-
|
|
658
|
+
Yt as default
|
|
657
659
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BhH89oF0.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Bg_BK11V.cjs"),Q=require("./usePrinter-B8jr_V3b.cjs"),ce=require("./Tooltip-lM1Jzkza.cjs"),ve=require("./DataTable-CnkdsvIo.cjs"),de=require("./vue-ui-skeleton-Cf89QIhl.cjs"),he=require("./Shape-CgW0V2Og.cjs"),pe=require("./vue-ui-accordion-Bzq1iTL2.cjs"),Z=require("./useNestedProp-m8IH8hWW.cjs"),me=require("./PackageVersion-LdLhc8hQ.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ge={key:0},ke={key:0},xe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ce={key:1},we=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Le=["fill","font-size","x","y"],Te=["x1","x2","y1","y2","stroke"],Pe=["cx","cy","fill"],Ee=["cx","cy","fill"],ze=["id"],Ve=["stop-color"],Ae=["stop-color"],Fe=["stop-color"],Oe={key:0},De=["x","y","font-size","fill"],Me={key:3,class:"vue-data-ui-watermark"},We=["innerHTML"],Ie={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),O.value+=1,D.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(o.isFunction(a)&&o.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const N=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function j(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=o.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),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:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.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&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(me._sfc_main),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",ge,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,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,"stroke-linecap":"round"},null,8,xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.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,"stroke-linecap":"round"},null,8,we))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:a,seriesIndex:n})),9,Ne))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Se))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Le)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Te),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ee)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,ze))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:$=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>le("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._sfc_main,{show:c.value.showTooltip&&T.value,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:b.value,content:P.value,isCustom:e.unref(o.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Ge=fe._export_sfc(Ie,[["__scopeId","data-v-85774736"]]);exports.default=Ge;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-BhH89oF0.cjs"),e=require("vue"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((l,o)=>l-o),palette:g.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(l=>({average:Object.hasOwn(l,"average")?l.average:!1,decimals:Object.hasOwn(l,"decimals")?l.decimals:0,isMultiselect:Object.hasOwn(l,"isMultiselect")?l.isMultiselect:!1,isPercentage:Object.hasOwn(l,"isPercentage")?l.isPercentage:!1,isSearch:Object.hasOwn(l,"isSearch")?l.isSearch:!1,isSort:Object.hasOwn(l,"isSort")?l.isSort:!1,name:l.name,percentageTo:Object.hasOwn(l,"percentageTo")?l.percentageTo:void 0,prefix:Object.hasOwn(l,"prefix")?l.prefix:"",rangeFilter:Object.hasOwn(l,"rangeFilter")?l.rangeFilter:!1,suffix:Object.hasOwn(l,"suffix")?l.suffix:"",sum:Object.hasOwn(l,"sum")?l.sum:!1,type:l.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
2
2
|
Provide an array of objects of type:
|
|
3
3
|
{
|
|
4
4
|
name: string;
|