vue-data-ui 2.4.2 → 2.4.3
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-JuK2z9IB.js → Arrow-C7lNL7sY.js} +1 -1
- package/dist/{Arrow-DLTRnzcG.cjs → Arrow-Dz6AomGr.cjs} +1 -1
- package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BbvG1AlW.js} +1 -1
- package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-uALK38Ov.cjs} +1 -1
- package/dist/{DataTable-DJzhv96s.cjs → DataTable-DTzynbND.cjs} +1 -1
- package/dist/{DataTable-DTk7C4Pr.js → DataTable-DYqC2pqu.js} +2 -2
- package/dist/{Legend-YZ7Hz3o1.cjs → Legend-Cgw4lO2O.cjs} +1 -1
- package/dist/{Legend-CYF2gpXG.js → Legend-DNgTCgEK.js} +1 -1
- package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-DwI-KhXH.cjs} +1 -1
- package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-VkaUzgmt.js} +1 -1
- package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-CDFVOo7X.cjs} +1 -1
- package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-DAZYA8Ew.js} +2 -2
- package/dist/{Shape-BpPn4eWR.js → Shape-Bwon0l0g.js} +1 -1
- package/dist/{Shape-X2F-QV_B.cjs → Shape-D2Dpshg1.cjs} +1 -1
- package/dist/{Slicer-CU7dRZR0.js → Slicer-TfpN2Cr4.js} +3 -3
- package/dist/{Slicer-CL0tP5a5.cjs → Slicer-uSjfNJjG.cjs} +1 -1
- package/dist/{Title-Co5jI5ed.cjs → Title-0Tp4hZ4u.cjs} +1 -1
- package/dist/{Title-5VmBwT4i.js → Title-C5pIfQAz.js} +1 -1
- package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-9Tp2Yrd1.cjs} +1 -1
- package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-Cz24YLfw.js} +1 -1
- package/dist/{index-DnVHQ2xI.js → index-Bya_q1J-.js} +4 -1
- package/dist/index-eFox7weK.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -1
- package/dist/types/vue-data-ui.d.ts +4 -1
- package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-B33hazbH.js} +1 -1
- package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-BkgEhTQY.cjs} +1 -1
- package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-CSRFnDBU.cjs} +1 -1
- package/dist/{usePrinter-BEeNAqS5.js → usePrinter-CiHd1FwD.js} +1 -1
- package/dist/useResponsive-BY8tgM1n.js +188 -0
- package/dist/useResponsive-CodiGUOE.cjs +1 -0
- package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-BTtxyUc3.cjs} +1 -1
- package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-Bduq4f2p.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-B-P7PMHs.cjs} +2 -2
- package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BUEq_VdY.js} +41 -34
- package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-DfUfL2dI.js} +3 -3
- package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-TEMpM1hO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CH72tAMb.js} +163 -154
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +1 -0
- package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-DPeJ2its.js} +1 -1
- package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-DU_DJKCw.cjs} +1 -1
- package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-CtP3MlUT.js} +167 -136
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +34 -0
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +2 -0
- package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-DDil13a0.js} +173 -164
- package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-BaeIxyc0.js} +76 -69
- package/dist/vue-ui-carousel-table-C7SJIOG-.cjs +1 -0
- package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-BczSJF6S.js} +96 -89
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +6 -0
- package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-C2Pj_CI_.cjs} +1 -1
- package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-Dg_Dmww-.js} +2 -2
- package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-Bul9dqx1.js} +2 -2
- package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-Cg020NiT.cjs} +1 -1
- package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-B8iAa4YZ.js} +2 -2
- package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-Ctgd84JR.cjs} +1 -1
- package/dist/vue-ui-donut-D7KT9EAp.cjs +1 -0
- package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-DUcp-fat.js} +244 -235
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-C_YMbTwq.js} +125 -118
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +9 -0
- package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-Buwngz_V.js} +192 -183
- package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Bz3c0K5P.js} +78 -71
- package/dist/vue-ui-flow-D6rc8J-8.cjs +1 -0
- package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-Cjh0XGTX.js} +49 -42
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +1 -0
- package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-B1UvGkQa.js} +160 -151
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +1 -0
- package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-DFW6HnHp.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-DUQ4t-At.js} +3 -3
- package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-C-poazUw.js} +110 -103
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +1 -0
- package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-DXe-vxAk.js} +3 -3
- package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-Z4Oi4raz.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-BVtHTqxS.js} +2 -2
- package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-MMvpm9pz.cjs} +1 -1
- package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-BaJpDZND.js} +78 -71
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +1 -0
- package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-BUNDwsEI.js} +132 -125
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +1 -0
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-mDy2hXa6.js} +198 -189
- package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-DwFG3HAI.js} +248 -239
- package/dist/vue-ui-onion-GWNoZRhw.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-ImET_zeo.js} +233 -224
- package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BeveRihK.js} +188 -179
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-DAhllTfa.js} +343 -334
- package/dist/{vue-ui-quick-chart-gG5Ar8-i.cjs → vue-ui-quick-chart-DgFDBzjS.cjs} +2 -2
- package/dist/vue-ui-radar-BJH5SE6-.cjs +1 -0
- package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-BllatzRa.js} +174 -165
- package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-BoZo7caL.cjs} +1 -1
- package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D1ykV4xO.js} +2 -2
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +1 -0
- package/dist/{vue-ui-relation-circle-I45_Sk5l.js → vue-ui-relation-circle-xv2l5Be9.js} +142 -133
- package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-B-ZcX6y1.js} +165 -156
- package/dist/vue-ui-rings-DjH3CK23.cjs +2 -0
- package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-DG43ck1g.js} +269 -260
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +1 -0
- package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-C1JBP_N0.cjs} +1 -1
- package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-p3ca8cAl.js} +1 -1
- package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-BYssP0K4.js} +419 -379
- package/dist/vue-ui-skeleton-BqKzuhkB.cjs +41 -0
- package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-BXKVpHl2.cjs} +1 -1
- package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-D7dDCdpq.js} +2 -2
- package/dist/vue-ui-spark-trend-9V60hM3Z.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-GWFrO_0z.js} +86 -79
- package/dist/vue-ui-sparkbar-Bgn6AY0q.cjs +1 -0
- package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-CwqlyAyv.js} +90 -83
- package/dist/vue-ui-sparkgauge-Dqntz2Zv.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-F2XbiXyA.js} +57 -50
- package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-DRIKK6Ym.js} +74 -67
- package/dist/vue-ui-sparkhistogram-DnY4-Sdn.cjs +1 -0
- package/dist/vue-ui-sparkline-CAEs-gtK.cjs +1 -0
- package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-Cxtzdlhi.js} +134 -125
- package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-0A1klq9s.js} +84 -77
- package/dist/vue-ui-sparkstackbar-D37ms1rx.cjs +1 -0
- package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-ByOuJSdM.js} +205 -196
- package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-wun4S3C0.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-CMD0MSqY.js} +218 -209
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +1 -0
- package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-B75DJ39t.js} +1 -1
- package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-aj0XZ7T5.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-BO2ugWqD.js} +55 -48
- package/dist/vue-ui-table-heatmap-Ce93TyBF.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-CbjfAaj2.js} +88 -81
- package/dist/vue-ui-table-sparkline-D6KJjDnU.cjs +1 -0
- package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-Pq4PvSIP.js} +67 -60
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +1 -0
- package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-B6IB6yS6.cjs} +1 -1
- package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-Bk3BvB-B.js} +6 -6
- package/dist/{vue-ui-tiremarks-vdPQYiDp.js → vue-ui-tiremarks-CU9HJIqf.js} +84 -77
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +1 -0
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +1 -0
- package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-DY-lRAhC.js} +211 -202
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-DwxpB46q.js → vue-ui-vertical-bar-CtnIKsM1.js} +359 -350
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +1 -0
- package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-reOsx-gJ.js} +177 -168
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +1 -0
- package/dist/{vue-ui-wheel-Bbih5sSL.js → vue-ui-wheel-kYxny3vn.js} +95 -86
- package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-DbMqrHAf.js} +192 -183
- package/dist/vue-ui-word-cloud-DwLY4QdB.cjs +1 -0
- package/dist/vue-ui-xy-CGWzriYn.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-B0HTR7OV.js} +255 -246
- package/dist/vue-ui-xy-canvas-CgJd5FiT.cjs +9 -0
- package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-rbACig0h.js} +131 -122
- package/package.json +1 -1
- package/dist/index-FfZRtJ6A.cjs +0 -9
- package/dist/useResponsive-B3TrDDIG.cjs +0 -1
- package/dist/useResponsive-NZB-WLRF.js +0 -187
- package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
- package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
- package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
- package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
- package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
- package/dist/vue-ui-donut-CplNylps.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
- package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
- package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
- package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
- package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
- package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
- package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
- package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
- package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
- package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
- package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
- package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
- package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
- package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
- package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
- package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
- package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
- package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
- package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
- package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
- package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
- package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
- package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
- package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
- package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
- package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
- package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
- package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),Ne=require("./Title-Co5jI5ed.cjs"),ve=require("./usePrinter-BCAFeO_J.cjs"),Be=require("./Tooltip-Bl6W8Zn7.cjs"),_e=require("./Legend-YZ7Hz3o1.cjs"),Pe=require("./vue-ui-skeleton-Djv08J67.cjs"),ze=require("./DataTable-DJzhv96s.cjs"),Oe=require("./vue-ui-accordion-xXgqfR2l.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./useNestedProp-q7byAAIJ.cjs"),Ve=require("./PackageVersion-DVZtsuy4.cjs"),Ee=require("./PenAndPaper-CyXm-yVL.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function fe(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ge(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Re(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=fe(n,s),v=fe(u,s);return c>=v}}function Ae(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function Fe(n,d){const s={...d,children:n};return ye(s)}function Ie(n){return(n.x1-n.x0)*(n.y1-n.y0)}function me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},$=Object.assign({},k,B);w=x,m.push($)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},$=Object.assign({},k,B);b=x,m.push($)}return m}}function De(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function qe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function He(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=me(v,h);return f.concat(m)}const C=De(h),b=c[0],w=c.slice(1,p);if(Re(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let $=0;$<m;$+=1)g+=v[$].normalizedValue;const k=Me(h,g),x=me(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ye(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=qe(n.children,Ie(n)),s=He(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ye(s[h]));return Ae(c)}}function Me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ge(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ge(p)}}const We=n=>(e.pushScopeId("data-v-3cef6fec"),n=n(),e.popScopeId(),n),Ue=["id"],Ge=["xmlns","viewBox"],je={key:0},Xe=["id"],Ye=["stop-color"],Ze=["stop-color"],Je=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ke=["x","y","height","width"],Qe={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},et=We(()=>e.createElementVNode("br",null,null,-1)),tt={key:4,class:"vue-data-ui-watermark"},ot=["onClick"],lt={key:0},at={key:1},nt=["innerHTML"],rt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(0),$=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>Z(),set:o=>o});function Z(){const o=pe.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...pe.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=Z(),B.value+=1,$.value+=1,Y.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:ee}=ve.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function te(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),te(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{be()});function be(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),te(V.value),t.value.responsive){const o=he.throttle(()=>{const{width:a,height:l}=he.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),oe=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function le(o,a){return o.value/a}function ke(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-le(a,l);return r.lightenHexColor(o,i<0?0:i)}function ae(o,a,l,i){return o.map((y,z)=>{const M=ke(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),Se=le(y,i);return{...y,color:M,proportion:Se,parentName:l,children:y.children?ae(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>Fe(oe.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ae(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ne({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function re({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Ce(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),T=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function we(o){if(T.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}T.value=!T.value}const S=e.ref(null),ue=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),xe=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function se(o){T.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",oe.value)}const G=e.ref(null);function $e({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,i+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function ie(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Te(){return F.value}function ce(){_.value.showTable=!_.value.showTable}function de(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Te,generateCsv:ie,generateImage:ee,generatePdf:Q,toggleTable:ce,toggleTooltip:de,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ve.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:ie,onGenerateImage:e.unref(ee),onToggleTable:ce,onToggleTooltip:de,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",je,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ze)],8,Xe)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ne(l),width:re(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>we(l),onMouseenter:()=>$e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,Je),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ne(l),width:re(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",Qe,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),et,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:E(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Ke))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:T.value,rect:S.value,config:t.value})),void 0,!0)],14,Ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${Y.value}`,legendSet:ue.value,config:xe.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>se(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>se(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",at," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",lt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ot)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ue.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock(Oe.default,{key:6,hideDetails:"",config:{open:_.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(ze.DataTable,{key:`table_${$.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ue))}},ut=Le._export_sfc(rt,[["__scopeId","data-v-3cef6fec"]]);exports.default=ut;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),ie=require("./useResponsive-B3TrDDIG.cjs"),Se=require("./Title-Co5jI5ed.cjs"),ce=require("./usePrinter-BCAFeO_J.cjs"),Ve=require("./Tooltip-Bl6W8Zn7.cjs"),de=require("./Legend-YZ7Hz3o1.cjs"),Te=require("./vue-ui-skeleton-Djv08J67.cjs"),Be=require("./BaseIcon-BGExhz6v.cjs"),Ee=require("./vue-ui-accordion-xXgqfR2l.cjs"),ve=require("./useNestedProp-q7byAAIJ.cjs"),Le=require("./PackageVersion-DVZtsuy4.cjs"),Pe=require("./PenAndPaper-CyXm-yVL.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),De=["id"],Fe=["onClick"],Me=["xmlns","viewBox"],Oe=["id"],Ie=["stop-color"],Ae=["stop-color"],Re=["x","y","width","height","fill","rx"],qe=["x","y","width","height","fill","rx","stroke","stroke-width"],He=["x2","y1","y2","stroke","stroke-width"],Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x","y","text-anchor","font-size","fill","font-weight"],je=["x","y","font-size","fill","font-weight"],Ge=["x","y","font-size","fill","font-weight"],We=["x","y","font-size","fill","font-weight"],Ye=["y","width","height","fill","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Qe={style:"width:100%;padding-top: 36px;position:relative"},Ze={class:"vue-ui-data-table"},et={key:0},tt={style:{width:"100%"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},st=["data-cell"],it={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vt=["data-cell"],ht={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},pt=["data-cell"],yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},gt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(he,{expose:pe,emit:ye}){const y=he;e.useCssVars(a=>({"19a6ca00":a.tdo}));const{vue_ui_vertical_bar:ge}=n.useConfig(),B=e.computed(()=>!!y.dataset&&y.dataset.length),C=e.ref(n.createUid()),fe=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),be=e.ref(null),q=e.ref(0),N=e.ref(null),H=e.ref(null),M=e.ref(null),X=e.ref(0),O=e.ref(0),t=e.computed({get:()=>U(),set:a=>a});function U(){const a=ve.useNestedProp({userConfig:y.config,defaultConfig:ge});return a.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||y.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>y.config,a=>{t.value=U(),Z(),X.value+=1,O.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>y.dataset,P,{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:Y}=ce.usePrinter({elementId:`vue-ui-vertical-bar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),K=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),J=e.ref(null),Q=e.ref(!1),me=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=y.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),ke(),t.value.responsive){const a=ie.throttle(()=>{const{width:o,height:l}=ie.useResponsive({chart:N.value,title:t.value.style.chart.title.text?H.value:null,legend:t.value.style.chart.legend.show?M.value:null});le.value=o,s.value=l/E.value-c.value*2});L.value=new ResizeObserver(a),L.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function ke(){new ResizeObserver(o=>{o.forEach(l=>{Q.value=l.contentRect.width<me.value})}).observe(J.value)}const p=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ee=e.computed(()=>p.value.sortDesc),_=e.computed(()=>(y.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),y.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${C.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(h=>h.value||0).reduce((h,m)=>h+m,0):0),i=v>=0?1:-1;return{...a,id:l,shape:"square",opacity:f.value.includes(l)?.5:1,value:Math.abs(v),sign:i,hasChildren:r,isChild:!1,segregate:()=>S(l),isSegregated:f.value.includes(l),color:n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((h,m)=>ee.value?m.value-h.value:h.value-m.value).map((h,m)=>({...h,value:n.checkNaN(Math.abs(h.value)),sign:h.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:i,id:`vertical_child_${o}_${m}_${C.value}`,childIndex:m,color:n.convertColorToHex(h.color)||n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((h,m)=>({...h,isFirstChild:m===0,isLastChild:m===a.children.length-1}))}}).toSorted((a,o)=>ee.value?o.value-a.value:a.value-o.value))),te=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Ce=e.computed(()=>(s.value+c.value)*E.value),le=e.ref(512),d=e.computed(()=>({width:le.value,height:Ce.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){E.value=x.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const f=e.ref([]);function S(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a),P(),ye("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(a=>!f.value.includes(a.id))),b=e.computed(()=>x.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function ae(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/b.value*100),s:"%",r:l}):Math.abs(a)/b.value}const w=e.computed(()=>x.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>w.value.map(a=>a.sign).includes(-1)),_e=e.computed(()=>Math.max(...x.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function k(a){const o=a/_e.value;return u.value.width/($.value?2:1)*o}function xe(a){return k(a)+u.value.left}function V(a,o){const l=x.value.find(i=>i.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/b.value)?"":ae(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Ne(){return x.value}const I=e.ref(null),A=e.ref(null);function we(a,o){A.value={datapoint:a,seriesIndex:o,series:_.value,config:t.value},D.value=!0,I.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",i=t.value.style.chart.tooltip.customFormat;n.isFunction(i)&&n.functionReturnsString(()=>i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}))?F.value=i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
|
-
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${a.color}"/></svg> ${r}</div>
|
|
3
|
-
${v?`<div>${v}</div>`:""}
|
|
4
|
-
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/b.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),F.value=`<div style="text-align:left">${l}</div>`)}function oe(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),i=`(${ae(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${i}`:""}`}const g=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=w.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/b.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/b.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ne(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,l=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const T=e.ref(!1);function $e(a){T.value=a,q.value+=1}function re(){p.value.showTable=!p.value.showTable}function ue(){p.value.sortDesc=!p.value.sortDesc,P()}function se(){p.value.showTooltip=!p.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return pe({getData:Ne,recalculateHeight:P,generatePdf:W,generateCsv:ne,generateImage:Y,toggleTable:re,toggleSort:ue,toggleTooltip:se,toggleAnnotator:R}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:N,id:`vue-ui-vertical-bar_${C.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&B.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:fe,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),uid:C.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:T.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(W),onGenerateCsv:ne,onGenerateImage:e.unref(Y),onToggleTable:re,onToggleSort:ue,onToggleTooltip:se,onToggleAnnotator:R},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_top_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[0]||(o[0]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Fe)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Le._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${C.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,Ae)],8,Oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Re)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${C.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,qe),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==w.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):xe(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(oe(l.value,l,r,l.sign)),9,Ue),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(V(l,r).name),9,Ge)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(oe(V(l,r).value),V(l,r),r,l.parentSign||l.sign),9,We)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:d.value.width<=0?1e-4:d.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:I.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>we(l,r),onMouseleave:o[1]||(o[1]=v=>{be.value=null,D.value=!1,I.value=null})},null,40,Ye)]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_bottom_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[2]||(o[2]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Je)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:_.value},void 0,!0),e.createVNode(Ve._sfc_main,{show:p.value.showTooltip&&D.value&&f.value.length<y.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:F.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),B.value?(e.openBlock(),e.createBlock(Ee.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:J,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>p.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>p.value.showTable=!1,["enter"]))},[e.createVNode(Be.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":Q.value})},[e.createElementVNode("table",Ze,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(b.value)?"":b.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":g.value.head[0]??""},[e.createElementVNode("div",at,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,lt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",nt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ot),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",ut,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,rt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",it,e.toDisplayString(l.childName),1)],12,st),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",dt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",ht,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,vt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",yt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,De))}},ft=ze._export_sfc(gt,[["__scopeId","data-v-fdf1fdac"]]);exports.default=ft;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),ve=require("./useResponsive-B3TrDDIG.cjs"),Ne=require("./Title-Co5jI5ed.cjs"),de=require("./usePrinter-BCAFeO_J.cjs"),$e=require("./Tooltip-Bl6W8Zn7.cjs"),Le=require("./DataTable-DJzhv96s.cjs"),Pe=require("./Legend-YZ7Hz3o1.cjs"),Te=require("./vue-ui-skeleton-Djv08J67.cjs"),Ve=require("./vue-ui-accordion-xXgqfR2l.cjs"),pe=require("./useNestedProp-q7byAAIJ.cjs"),Ie=require("./PackageVersion-DVZtsuy4.cjs"),Ee=require("./PenAndPaper-CyXm-yVL.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=N=>(e.pushScopeId("data-v-b86c4773"),N=N(),e.popScopeId(),N),Fe=["id"],Ae=["xmlns","viewBox"],De=["id"],Oe=["stop-color"],qe=["stop-color"],Me=["id"],Re=he(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ue=he(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),je=[Re,Ue],Ge=["x","y","height","width"],We=["height","width"],He=["rx","x","y","height","width","stroke","stroke-width","filter"],Ye=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Xe=["x","y","height","width","filter"],Je={key:0},Ke={key:1},Qe={key:2},Ze={key:3},et=["onMouseover","x","y","height","width"],tt={key:4,class:"vue-data-ui-watermark"},lt=["onClick"],at={key:0},ot={key:1},rt=["innerHTML"],ut={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(N,{expose:fe,emit:ye}){const p=N,{vue_ui_waffle:ge}=n.useConfig(),V=e.computed(()=>!!p.dataset&&p.dataset.length),b=e.ref(n.createUid()),me=e.ref(null),A=e.ref(!1),D=e.ref(""),B=e.ref(null),U=e.ref(0),_=e.ref(null),j=e.ref(null),G=e.ref(null),W=e.ref(0),H=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>X(),set:l=>l});function X(){const l=pe.useNestedProp({userConfig:p.config,defaultConfig:ge});return l.theme?{...pe.useNestedProp({userConfig:n.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=X(),J(),W.value+=1,H.value+=1,Y.value+=1},{deep:!0});const I=e.ref(null);function J(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,r)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:r})})}),t.value.responsive){const l=ve.throttle(()=>{const{width:r,height:a}=ve.useResponsive({chart:_.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?G.value:null});k.value.width=r,k.value.height=a,f.value.width=r,f.value.height=a});I.value=new ResizeObserver(l),I.value.observe(_.value.parentNode)}}e.onMounted(()=>{J()}),e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=de.usePrinter({elementId:`vue-ui-waffle_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),k=e.ref({height:512,width:512}),f=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(f.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),C=e.computed(()=>(f.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>f.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>f.value.height/t.value.style.chart.layout.grid.size);function le(l){const r=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,R)=>h+R,0),o=l.map(h=>h/a*r),u=o.map(Math.floor),i=o.map(h=>h%1);let d=r-u.reduce((h,R)=>h+R,0);for(;d>0;){let h=i.indexOf(Math.max(...i));u[h]+=1,i[h]=0,d-=1}return u}function ae(){return p.dataset.map((l,r)=>({...l,color:n.convertColorToHex(l.color)||te.value[r]||n.palette[r]||n.palette[r%n.palette.length],uid:`serie_${r}`,absoluteIndex:r}))}const oe=e.computed(()=>ae()),c=e.ref(oe.value);e.watch(()=>p.dataset,l=>{c.value=ae()},{deep:!0});const be=e.computed(()=>{const l=c.value.filter((r,a)=>!v.value.includes(r.uid)).map((r,a)=>(r.values||[]).reduce((o,u)=>o+u,0));return le(l)}),ke=e.computed(()=>{const l=c.value.map((r,a)=>(r.values||[]).reduce((o,u)=>o+u));return le(l)}),L=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.values)&&n.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:r})}),c.value.filter((l,r)=>!v.value.includes(l.uid)).map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:be.value[r]})))),we=e.computed(()=>c.value.map((l,r)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,o)=>a+o,0),absoluteValues:l.values||[],proportion:ke.value[r]})));function Ce(){return we.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const xe=e.computed(()=>{let l=0;return L.value.map((r,a)=>{const o=l,u=o+r.proportion,i=[];for(let d=Math.floor(o);d<Math.floor(u);d+=1)i.push(d);return l=u,{...r,start:o,rects:i}})}),s=e.computed(()=>xe.value.flatMap((l,r)=>l.rects.map((a,o)=>({isFirst:o===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:r,absoluteStartIndex:o<3,serieId:l.uid,...l}))).map((l,r)=>({...l,isAbsoluteFirst:r%t.value.style.chart.layout.grid.size===0}))),P=e.computed(()=>{const l=[];for(let r=0;r<t.value.style.chart.layout.grid.size;r+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?r:a,x:(t.value.style.chart.layout.grid.vertical?r:a)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:r)*(C.value+t.value.style.chart.layout.grid.spaceBetween)+f.value.top});return l}),v=e.ref([]),x=e.ref(!1),re=e.ref(null),ue=e.ref(null);function ne(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<S.value.length-1&&S.value.length>1&&v.value.push(l);return}const r=oe.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);let o=c.value.find(u=>u.uid===l).values.reduce((u,i)=>u+i,0);if(v.value.includes(l)){let i=function(){o>u?(cancelAnimationFrame(re.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[u]}:d),x.value=!1):(x.value=!0,o+=u*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[o]}:d),re.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const u=r;i()}else if(v.value.length<S.value.length-1&&S.value.length>1){let u=function(){o<.1?(cancelAnimationFrame(ue.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,o/=1.5,c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[o]}:i),ue.value=requestAnimationFrame(u))};u()}ye("selectLegend",L.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const S=e.computed(()=>c.value.map((l,r)=>({name:l.name,color:l.color||te[r]||n.palette[r]||n.palette[r%n.palette.length],value:(l.values||[]).reduce((a,o)=>a+o,0),uid:l.uid,shape:"square"})).map((l,r)=>({...l,proportion:l.value/c.value.map(a=>(a.values||[]).reduce((o,u)=>o+u,0)).reduce((a,o)=>a+o,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>ne(l.uid),isSegregated:v.value.includes(l.uid)}))),Be=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),y=e.computed(()=>L.value.map(l=>l.value).reduce((l,r)=>l+r,0)),O=e.ref(null);function _e(l){if(v.value.length===p.dataset.length)return;const r=s.value[l];O.value={datapoint:r,seriesIndex:r.absoluteIndex,series:c.value,config:t.value},A.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(n.isFunction(a)&&n.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value})))D.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:r,series:c.value,config:t.value});else{let o="";if(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${r.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(o+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,r.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:r.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:r,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const u=n.dataLabel({v:r.value/y.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?o+=`<span>(${u})</span></div>`:o+=`<b>${u}%</b></div>`}D.value=o}}const g=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),r=L.value.map(a=>a.value);return{head:l,body:r}});function q(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${b.value})`:""}function se(){e.nextTick(()=>{const l=g.value.head.map((o,u)=>[[o.name],[g.value.body[u]],[isNaN(g.value.body[u]/y.value)?"-":g.value.body[u]/y.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=n.createCsvContent(r);n.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=e.computed(()=>{const l=[' <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>',n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,y.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],r=g.value.head.map((u,i)=>[{color:u.color,name:u.name},n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,g.value.body[i],n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(g.value.body[i]/y.value)?"-":n.dataLabel({v:g.value.body[i]/y.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),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},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:r,config:a,colNames:o}}),T=e.ref(!1);function Se(l){T.value=l,U.value+=1}function ie(){m.value.showTable=!m.value.showTable}function ce(){m.value.showTooltip=!m.value.showTooltip}const F=e.ref(!1);function M(){F.value=!F.value}return fe({getData:Ce,generatePdf:Z,generateCsv:se,generateImage:ee,toggleTable:ie,toggleTooltip:ce,toggleAnnotator:M}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${T.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:_,id:`vue-ui-waffle_${b.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,parent:_.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${W.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:me,key:`user_options_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:T.value,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Se,onGeneratePdf:e.unref(Z),onGenerateCsv:se,onGenerateImage:e.unref(ee),onToggleTable:ie,onToggleTooltip:ce,onToggleAnnotator:M},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ie._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,o)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${o}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,qe)],8,De))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${b.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},je,8,Me)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:s.value[o].color,...s.value[o]},isSelected:[null,void 0].includes(B.value)?!0:s.value[o].serieIndex===B.value})),void 0,!0)],8,Ge))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:f.value.height-24,width:f.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,We)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:q(s.value[o].serieIndex)},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:C.value<=0?1e-4:C.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${b.value}_${o})`:s.value[o].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:q(s.value[o].serieIndex)},null,8,Ye))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[o].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[o].isAbsoluteFirst&&o%t.value.style.chart.layout.grid.size===0&&s.value[o].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:q(s.value[o].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${$.value/12}px;color:${e.unref(n.adaptColorToBackground)(s.value[o].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",Je,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(n.abbreviate)({source:s.value[o].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[o].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ke,e.toDisplayString(e.unref(n.dataLabel)({v:s.value[o].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Qe," ("+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",Ze,e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[o].value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[o].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[o],position:a})),1)):e.createCommentVNode("",!0)],4)],8,Xe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(a,o)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>_e(o),onMouseleave:r[0]||(r[0]=u=>{A.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,et))),256)),e.renderSlot(l.$slots,"svg",{svg:k.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:5,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:G},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${Y.value}`,legendSet:S.value,config:Be.value,onClickMarker:r[1]||(r[1]=({legend:a})=>ne(a.uid))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ot," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",at," ("+e.toDisplayString(isNaN(a.value/y.value)?"-":e.unref(n.dataLabel)({v:a.value/y.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,lt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:S.value},void 0,!0)],512),e.createVNode($e._sfc_main,{show:m.value.showTooltip&&A.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:_.value,content:D.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize"]),V.value?(e.openBlock(),e.createBlock(Ve.default,{key:6,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Le.DataTable,{key:`table_${H.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,rt)]),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,Fe))}},nt=ze._export_sfc(ut,[["__scopeId","data-v-b86c4773"]]);exports.default=nt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),G=require("./Title-Co5jI5ed.cjs"),I=require("./usePrinter-BCAFeO_J.cjs"),z=require("./useResponsive-B3TrDDIG.cjs"),X=require("./vue-ui-skeleton-Djv08J67.cjs"),$=require("./useNestedProp-q7byAAIJ.cjs"),j=require("./PackageVersion-DVZtsuy4.cjs"),H=require("./PenAndPaper-CyXm-yVL.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=["id"],W=["xmlns","viewBox"],J=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],K=["cx","cy","r","stroke","stroke-width"],Q=["x","y","font-size","fill","font-weight"],Z={key:4,class:"vue-data-ui-watermark"},ee={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(F,{expose:O}){const i=F,{vue_ui_wheel:M}=r.useConfig(),y=e.computed(()=>!!i.dataset&&Object.keys(i.dataset).length),p=e.ref(r.createUid()),E=e.ref(null),k=e.ref(0),v=e.ref(null),w=e.ref(null),C=e.ref(0),t=e.computed({get:()=>b(),set:n=>n});function b(){const n=$.useNestedProp({userConfig:i.config,defaultConfig:M});return n.theme?{...$.useNestedProp({userConfig:r.themes.vue_ui_wheel[n.theme]||i.config,defaultConfig:n})}:n}e.watch(()=>i.config,n=>{t.value=b(),A(),C.value+=1},{deep:!0});const{isPrinting:P,isImaging:_,generatePdf:B,generateImage:x}=I.usePrinter({elementId:p.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),a=e.ref({size:360,height:360,width:360}),m=e.ref(t.value.style.chart.layout.percentage.fontSize),s=e.computed(()=>({radius:Math.min(a.value.width,a.value.height)*.9/2,centerX:a.value.width/2,centerY:a.value.height/2}));function N(n,c=1){return{x:s.value.centerX+s.value.radius*Math.cos(29.85+n*Math.PI/180)*c,y:s.value.centerY+s.value.radius*Math.sin(29.85+n*Math.PI/180)*c}}const o=e.ref(t.value.style.chart.animation.use?0:i.dataset.percentage||0);e.watch(()=>i.dataset,n=>{t.value.style.chart.animation.use?S(n.percentage):o.value=n.percentage||0},{deep:!0});const d=e.ref(null);e.onMounted(()=>{A()});function A(){if(r.objectIsEmpty(i.dataset)&&r.error({componentName:"VueUiWheel",type:"dataset"}),S(i.dataset.percentage||0),t.value.responsive){const n=z.throttle(()=>{const{width:c,height:l}=z.useResponsive({chart:v.value,title:t.value.style.chart.title.text?w.value:null});a.value.width=c,a.value.height=l,m.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(c,l)});d.value=new ResizeObserver(n),d.value.observe(v.value.parentNode)}}e.onBeforeUnmount(()=>{d.value&&d.value.disconnect()});function S(n){let c=t.value.style.chart.animation.speed;const l=Math.abs(n-o.value)/(c*120);function u(){o.value<n?o.value=Math.min(o.value+l,n):o.value>n&&(o.value=Math.max(o.value-l,n)),o.value!==n&&requestAnimationFrame(u)}u()}const q=e.computed(()=>{const n=[];for(let l=0;l<100;l+=1){const u=o.value>l?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:R,y:V}=N(a.value.size/100*l),{x:L,y:U}=N(a.value.size/100*l,t.value.style.chart.layout.wheel.ticks.sizeRatio);n.push({x1:R,y1:V,x2:L,y2:U,color:t.value.style.chart.layout.wheel.ticks.gradient.show?r.shiftHue(u,l/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):u})}return n}),h=e.ref(!1);function T(n){h.value=n,k.value+=1}const f=e.ref(!1);function g(){f.value=!f.value}return O({generatePdf:B,generateImage:x,toggleAnnotator:g}),(n,c)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:v,id:p.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(H.PenAndPaper,{key:0,parent:v.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:g},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(G._sfc_main,{key:`title_${C.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:E,key:`user_options_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(P),isImaging:e.unref(_),uid:p.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,chartElement:v.value,onToggleFullscreen:T,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(x),onToggleAnnotator:g},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(j._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(l,u)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,stroke:l.color,"stroke-width":5/360*Math.min(a.value.width,a.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u<=o.value})},null,10,J))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.centerX,cy:s.value.centerY,r:s.value.radius*.8<=0?1e-4:s.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,K)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.centerX,y:s.value.centerY+m.value/3,"font-size":m.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(r.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,o.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(r.checkNaN)(o.value),e.unref(r.dataLabel)({v:e.unref(r.checkNaN)(o.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,Q)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"svg",{svg:a.value},void 0,!0)],14,W)):e.createCommentVNode("",!0),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(_)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(X.default,{key:5,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,Y))}},te=D._export_sfc(ee,[["__scopeId","data-v-98d0ddd9"]]);exports.default=te;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),Ce=require("./Title-Co5jI5ed.cjs"),le=require("./usePrinter-BCAFeO_J.cjs"),G=require("./useResponsive-B3TrDDIG.cjs"),ke=require("./vue-ui-accordion-xXgqfR2l.cjs"),we=require("./DataTable-DJzhv96s.cjs"),xe=require("./BaseIcon-BGExhz6v.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),Se=require("./PackageVersion-DVZtsuy4.cjs"),$e=require("./Tooltip-Bl6W8Zn7.cjs"),Te=require("./PenAndPaper-CyXm-yVL.cjs"),Ne=c=>(e.pushScopeId("data-v-3fd7d274"),c=c(),e.popScopeId(),c),Pe={"data-html2canvas-ignore":""},Be={key:0,class:"reset-wrapper"},Fe={key:1,class:"reset-wrapper"},ze={class:"mono-slicer"},_e=Ne(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),Ae=["min","max","value"],Ve={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(c,{emit:P}){const r=c;e.useCssVars(g=>({"90ad3208":E.value,"4f9eef70":S.value,"6e07ae3e":f.value,"2fd430a0":c.selectColor,"6b8169a4":y.value}));const E=e.computed(()=>r.inputColor),y=e.computed(()=>r.background),f=e.computed(()=>`${r.selectColor}33`),S=e.computed(()=>r.borderColor);function $(){P("reset")}const h=e.computed(()=>{const g=r.max-r.min,p=0,b=(r.value-r.min)/g*100;return{left:`${p}%`,width:`${b-p}%`,background:r.selectColor}});return(g,p)=>(e.openBlock(),e.createElementBlock("div",Pe,[c.value!==c.source?(e.openBlock(),e.createElementBlock("div",Be,[c.useResetSlot?e.renderSlot(g.$slots,"reset-action",{key:1,reset:$},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:$},[e.createVNode(xe.default,{name:"refresh",stroke:c.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Fe)),e.createElementVNode("div",ze,[_e,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(h.value)},null,4),e.createElementVNode("input",{type:"range",min:c.min,max:c.max,value:Number(c.value),onInput:p[0]||(p[0]=b=>P("update:value",Number(b.target.value)))},null,40,Ae)])]))}},Ee=ne._export_sfc(Ve,[["__scopeId","data-v-3fd7d274"]]),Ie=["id"],Oe=["xmlns","viewBox"],Me=["transform"],Re=["fill","font-weight","x","y","font-size","transform","onMouseover"],qe={key:4,class:"vue-data-ui-watermark"},We=["innerHTML"],De={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(c,{expose:P}){const r=c,{vue_ui_word_cloud:E}=s.useConfig(),y=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),f=e.ref(typeof r.dataset=="string"?s.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map(o=>({...o,value:s.checkNaN(o.value)}))),S=e.ref(s.createUid()),$=e.ref(0),h=e.ref(null),g=e.ref(null),p=e.ref(0),b=e.ref(0),I=e.ref(!1),t=e.computed({get:()=>L(),set:o=>o});function L(){const o=ae.useNestedProp({userConfig:r.config,defaultConfig:E});return o.theme?{...ae.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>r.config,o=>{t.value=L(),X(),p.value+=1,b.value+=1,O()},{deep:!0});const j=e.ref(null),C=e.ref(0),u=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),re=G.throttle(()=>{const{width:o,height:a}=G.useResponsive({chart:h.value,title:t.value.style.chart.title.text?g.value:null,slicer:t.value.style.chart.zoom.show&&j.value});u.value.width=o,u.value.height=a,e.nextTick(M)});e.watch(()=>C.value,()=>{se()});const se=G.debounce(()=>{M()},10);function O(){C.value=Q.value}const B=e.ref(null);e.onMounted(()=>{X(),O()});function X(){s.objectIsEmpty(r.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):f.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{y.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(B.value=new ResizeObserver(re),B.value.observe(h.value.parentNode))}e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:H,isImaging:Y,generatePdf:J,generateImage:K}=le.usePrinter({elementId:`wordCloud_${S.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function ue(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function ie(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function ce(o,a,l){const i=[],n={x:-a/2,y:-l/2,width:a,height:l},v=0,w=0;return o.forEach(x=>{let D=!1;for(let V=0;V<Math.max(a,l)/2&&!D;V+=t.value.style.chart.words.packingWeight)for(let U=0;U<360&&!D;U+=t.value.style.chart.words.packingWeight){const oe=U*Math.PI/180,me=v+V*Math.cos(oe)-x.width/2,fe=w+V*Math.sin(oe)-x.height/2,m={...x,x:me,y:fe},ge=m.x>=n.x&&m.y>=n.y&&m.x+m.width<=n.x+n.width&&m.y+m.height<=n.y+n.height,ye=i.some(be=>ie(m,be));ge&&!ye&&(i.push(m),D=!0)}}),i}const T=e.ref([]);e.watch(()=>r.dataset,M,{immediate:!0});const Q=e.computed(()=>Math.min(...f.value.map(o=>o.value))),de=e.computed(()=>Math.max(...f.value.map(o=>o.value)));function M(){const o=[...f.value].filter(n=>n.value>=C.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),i=[...f.value].filter(n=>n.value>=C.value).map((n,v)=>{const w=(n.value-l)/(a-l)*(u.value.maxFontSize-u.value.minFontSize)+u.value.minFontSize,x=ue(n.name,w);return{...n,id:s.createUid(),fontSize:w,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[v]||t.value.customPalette[v%t.value.customPalette.length]||s.palette[v]||s.palette[v%s.palette.length]:t.value.style.chart.words.color}});T.value=ce(i,u.value.width,u.value.height).sort((n,v)=>v.fontSize-n.fontSize)}const F=e.computed(()=>{const o=T.value.map(l=>({name:l.name,color:l.color})),a=T.value.map(l=>l.value);return{head:o,body:a}});function Z(){e.nextTick(()=>{const o=F.value.head.map((i,n)=>[[i.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const z=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,v)=>{const w=s.dataLabel({p:t.value.table.td.prefix,v:F.value.body[v],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},w]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),_=e.ref(!1);function ve(o){_.value=o,$.value+=1}function he(){return T.value}function ee(){d.value.showTable=!d.value.showTable}function te(){d.value.showTooltip=!d.value.showTooltip}const A=e.ref(!1);function R(){A.value=!A.value}P({getData:he,generateCsv:Z,generatePdf:J,generateImage:K,toggleTable:ee,toggleTooltip:te,toggleAnnotator:R});const k=e.ref(null),N=e.ref(!1),q=e.ref(""),W=e.ref(null);function pe(o){if(!d.value.showTooltip)return;k.value=o.id,W.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(N.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(q.value=l,N.value=!0)}catch{console.warn("Custom format cannot be applied."),N.value=!1}if(!N.value){let l=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;q.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}I.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:h,id:`wordCloud_${S.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,parent:h.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:A.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:g,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${p.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(Y),uid:S.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(K),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:R},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Se._sfc_main),e.createElementVNode("g",{transform:`translate(${(u.value.width<=0?10:u.value.width)/2}, ${(u.value.height<=0?10:u.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:i,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":k.value&&k.value===l.id&&d.value.showTooltip,"word-not-selected":k.value&&k.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"middle",onMouseover:n=>pe(l),onMouseleave:a[0]||(a[0]=n=>{k.value=null,I.value=!1}),style:e.normalizeStyle(`animation-delay:${i*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Re))]))),256))],8,Me),e.renderSlot(o.$slots,"svg",{svg:{height:u.value.height,width:u.value.width}},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",qe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{show:d.value.showTooltip&&I.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:h.value,content:q.value,isCustom:N.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:j,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(Ee,{key:0,value:C.value,"onUpdate:value":a[1]||(a[1]=l=>C.value=l),min:Q.value,max:de.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:O},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),y.value?(e.openBlock(),e.createBlock(ke.default,{key:5,hideDetails:"",config:{open:d.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(we.DataTable,{key:`table_${b.value}`,colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>d.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,Ie))}},Ue=ne._export_sfc(De,[["__scopeId","data-v-23646184"]]);exports.default=Ue;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-FfZRtJ6A.cjs"),B=require("./DataTable-DJzhv96s.cjs"),E=require("./Title-Co5jI5ed.cjs"),p=require("./Tooltip-Bl6W8Zn7.cjs"),z=require("./usePrinter-BCAFeO_J.cjs"),V=require("./Shape-X2F-QV_B.cjs"),P=require("./BaseIcon-BGExhz6v.cjs"),M=require("./vue-ui-table-sparkline-DONmVOMh.cjs"),T=require("./vue-ui-skeleton-Djv08J67.cjs"),D=require("./Slicer-CL0tP5a5.cjs"),R=require("./vue-ui-accordion-xXgqfR2l.cjs"),G=require("./useNestedProp-q7byAAIJ.cjs"),H=require("./PackageVersion-DVZtsuy4.cjs"),W=require("./PenAndPaper-CyXm-yVL.cjs"),t=require("vue"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=d.createUid(),X={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:B.DataTable,Shape:V._sfc_main,Title:E._sfc_main,Tooltip:p._sfc_main,UserOptions:z.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default,PackageVersion:H._sfc_main,PenAndPaper:W.PenAndPaper},data(){this.dataset.forEach((n,u)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:u})});const l=Math.max(...this.dataset.map(n=>n.series.length)),i={start:0,end:l};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isAnnotator:!1,isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,tableStep:0,titleStep:0,slicer:i,__to__:null,maxX:l,showSparklineTable:!0,segregateStep:0,sliderId:Y,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null}},watch:{dataset:{handler(l,i){this.maxX=Math.max(...this.dataset.map(n=>n.series.length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,i){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1},deep:!0}},computed:{minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(r=>!this.segregatedSeries.includes(r.id)),i=Math.max(...l.map(r=>r.series.length)),n=[];for(let r=0;r<i;r+=1)n.push(l.map(e=>e.series[r]||0).reduce((e,g)=>(e||0)+(g||0),0));const u=Math.min(...n);return n.map(r=>r+(u<0?Math.abs(u):0))},customPalette(){return this.convertCustomPalette(this.FINAL_CONFIG.customPalette)},backgroundColor(){return this.FINAL_CONFIG.chart.backgroundColor},slicerColor(){return this.FINAL_CONFIG.chart.zoom.color},allScales(){const l=this.lineSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height,autoScaleYLabels:r.autoScaleYLabels})),i=this.barSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),n=this.plotSet.map(r=>({name:r.name,color:r.color,scale:r.individualScale,scaleYLabels:r.scaleYLabels,zero:r.zeroPosition,max:r.individualMax,scaleLabel:r.scaleLabel||"",id:r.id,yOffset:r.yOffset||0,individualHeight:r.individualHeight||this.drawingArea.height})),u=[...l,...i,...n].flatMap(r=>r).length;return[...l,...i,...n].flatMap((r,e)=>({id:r.id,scaleLabel:r.scaleLabel,name:r.name,color:r.color,scale:r.scale,yOffset:r.yOffset,individualHeight:r.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/u*(e+1),yLabels:r.scaleYLabels||r.scale.ticks.map(g=>({y:g>=0?r.zero-r.individualHeight*(g/r.max):r.zero+r.individualHeight*Math.abs(g)/r.max,value:g}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const l=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(l,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){return this.prepareConfig()},set:function(l){return l}},hasHighlightArea(){return Array.isArray(this.FINAL_CONFIG.chart.highlightArea)?this.FINAL_CONFIG.chart.highlightArea.some(l=>l.show):this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreas(){if(Array.isArray(this.FINAL_CONFIG.chart.highlightArea))return this.FINAL_CONFIG.chart.highlightArea.map(i=>({...i,span:i.from===i.to?1:i.to<i.from?0:i.to-i.from+1}));const l=this.FINAL_CONFIG.chart.highlightArea;return[{...l,span:l.from===l.to?1:l.to<l.from?0:l.to-l.from+1}]},xPadding(){return this.FINAL_CONFIG.chart.grid.position==="middle"?0:this.drawingArea.width/this.maxSeries/2},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,id:`uniqueId_${i}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,i)=>({...l,series:l.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[i]?this.customPalette[i]:this.palette[i]),id:`uniqueId_${i}`})):this.dataset},relativeDataset(){return this.safeDataset.map((l,i)=>({...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series})).filter(l=>!this.segregatedSeries.includes(l.id))},tableSparklineDataset(){return this.relativeDataset.map(l=>{const i=l.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:l.id,name:l.name,color:l.color,values:this.fillArray(this.maxSeries,i)}})},tableSparklineConfig(){return{responsiveBreakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint,roundingValues:this.FINAL_CONFIG.table.rounding,showAverage:!1,showMedian:!1,showTotal:!1,fontFamily:this.FINAL_CONFIG.chart.fontFamily,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((l,i)=>({absoluteIndex:i,...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,i)=>{this.checkAutoScaleError(l);const n=Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),u=Math.max(...l.absoluteValues.filter(c=>![null,void 0].includes(c))),e={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(u-n)),valueMin:n,valueMax:u<0?0:u},g={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...l.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,m=this.calculateNiceScaleWithExactExtremes(g.min,g.max===g.min?g.max*F:g.max,I),k=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*F:e.valueMax,I),L=m.min>=0?0:Math.abs(m.min),_=0,S=m.max+L,C=k.max+Math.abs(_),f=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,b=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,A=this.drawingArea.bottom-f-b*L/S,a=this.drawingArea.bottom-f-b*_/C,o=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,s=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+L)/S:this.ratioToMax(c),v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left+this.slot.bar*i+this.slot.bar*N*o-this.barSlot/2-i*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(v),y:this.drawingArea.bottom-f-b*O,value:l.absoluteValues[N],zeroPosition:this.checkNaN(A),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),h=l.absoluteValues.map(c=>k.min>=0?(c-Math.abs(k.min))/(k.max-Math.abs(k.min)):(c+Math.abs(k.min))/(k.max+Math.abs(k.min))),w=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*N:this.drawingArea.left-this.slot.bar/2+this.slot.bar*i+this.slot.bar*N*this.absoluteDataset.filter(v=>v.type==="bar").filter(v=>!this.segregatedSeries.includes(v.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(O),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*h[N]||0)),value:l.absoluteValues[N],zeroPosition:this.checkNaN(A),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),x=m.ticks.map(c=>({y:c>=0?A-b*(c/S):A+b*Math.abs(c)/S,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),y=k.ticks.map(c=>{const N=(c-k.min)/(k.max-k.min);return{y:c>=0?a-b*N:a+b*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:f,autoScaleYLabels:y,individualHeight:b,scaleYLabels:l.autoScaling?y:x,individualScale:l.autoScaling?k:m,individualMax:l.autoScaling?C:S,zeroPosition:l.autoScaling?a:A,plots:l.autoScaling?w:s}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...l.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,r={ratios:l.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,g),m=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,g),k=F.min>=0?0:Math.abs(F.min),L=0,_=F.max+Math.abs(k),S=m.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*k/_,A=this.drawingArea.bottom-C-f*L/S,a=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+Math.abs(k))/_:this.ratioToMax(c);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-f*O),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),o=l.absoluteValues.map(c=>m.min>=0?(c-Math.abs(m.min))/(m.max-Math.abs(m.min)):(c+Math.abs(m.min))/(m.max+Math.abs(m.min))),s=l.series.map((c,N)=>[void 0,null].includes(l.absoluteValues[N])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:b,value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*N),y:this.checkNaN(this.drawingArea.bottom-C-(f*o[N]||0)),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}),h=this.createSmoothPath(a),w=this.createSmoothPath(s),x=F.ticks.map(c=>({y:c>=0?b-f*(c/_):b+f*Math.abs(c)/_,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),y=m.ticks.map(c=>{const N=(c-m.min)/(m.max-m.min);return{y:c>=0?A-f*N:A+f*N,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:y,individualHeight:f,scaleYLabels:l.autoScaling?y:x,individualScale:l.autoScaling?m:F,individualMax:l.autoScaling?S:_,zeroPosition:l.autoScaling?A:b,curve:l.autoScaling?w:h,plots:l.autoScaling?s:a,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?s:a,l.autoScaling?A:b):this.createArea(a):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(x=>![null,void 0].includes(x))),n=Math.max(...l.absoluteValues.filter(x=>![null,void 0].includes(x)))||1,r={ratios:l.absoluteValues.filter(x=>![null,void 0].includes(x)).map(x=>(x-i)/(n-i)),valueMin:i,valueMax:n},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},g=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*I:e.max,g),m=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*I:r.valueMax,g),k=F.min>=0?0:Math.abs(F.min),L=0,_=F.max+k,S=m.max+Math.abs(L),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-l.cumulatedStackRatio):0,f=this.mutableConfig.isStacked?this.drawingArea.height*l.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,b=this.drawingArea.bottom-C-f*k/_,A=this.drawingArea.bottom-C-f*L/S,a=l.series.map((x,y)=>{const c=this.mutableConfig.useIndividualScale?(l.absoluteValues[y]+Math.abs(k))/_:this.ratioToMax(x);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*y),y:this.checkNaN(this.drawingArea.bottom-C-f*c),value:l.absoluteValues[y],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[y]||""}}),o=l.absoluteValues.map(x=>m.min>=0?(x-Math.abs(m.min))/(m.max-Math.abs(m.min)):(x+Math.abs(m.min))/(m.max+Math.abs(m.min))),s=l.series.map((x,y)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*y),y:this.checkNaN(this.drawingArea.bottom-C-(f*o[y]||0)),value:l.absoluteValues[y],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[y]||""})),h=F.ticks.map(x=>({y:x>=0?b-f*(x/_):b+f*Math.abs(x)/_,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),w=m.ticks.map(x=>{const y=(x-m.min)/(m.max-m.min);return{y:x>=0?A-f*y:A+f*y,value:x,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return{...l,yOffset:C,autoScaleYLabels:w,individualHeight:f,scaleYLabels:l.autoScaling?w:h,individualScale:l.autoScaling?m:F,individualMax:l.autoScaling?S:_,zeroPosition:l.autoScaling?A:b,plots:l.autoScaling?s:a}})},drawingArea(){const l=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(i=>!this.segregatedSeries.includes(i.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+l,height:this.height-(this.FINAL_CONFIG.chart.padding.top+this.FINAL_CONFIG.chart.padding.bottom),width:this.width-(this.FINAL_CONFIG.chart.padding.right+this.FINAL_CONFIG.chart.padding.left+l)}},max(){return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax?this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMax:Math.max(...this.safeDataset.filter(l=>!this.segregatedSeries.includes(l.id)).map(l=>Math.max(...l.series)))},min(){if(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin!==null)return this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin;const l=Math.min(...this.safeDataset.filter(i=>!this.segregatedSeries.includes(i.id)).map(i=>Math.min(...i.series)));return l>0?0:l},niceScale(){return this.calculateNiceScaleWithExactExtremes(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(l=>l.type==="bar").filter(l=>!this.segregatedSeries.includes(l.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const l=this.safeDataset.filter(i=>i.type==="bar").filter(i=>!this.segregatedSeries.includes(i.id)).length;return this.drawingArea.width/this.maxSeries/l-this.barPeriodGap*l},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(l=>l!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const l=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),i=[];return this.timeLabels.forEach((n,u)=>{const r=[n];this.relativeDataset.forEach(e=>{r.push(this.canShowValue(e.absoluteValues[u])?Number(e.absoluteValues[u].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(r)}),{head:l,body:i}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let i=[""].concat(this.relativeDataset.map(e=>e.name));l&&(i=i.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 n=[];for(let e=0;e<this.maxSeries;e+=1){const g=this.relativeDataset.map(I=>I.absoluteValues[e]??0).reduce((I,F)=>I+F,0);n.push([this.timeLabels[e]??"-"].concat(this.relativeDataset.map(I=>this.applyDataLabel(I.type==="line"?this.FINAL_CONFIG.line.labels.formatter:I.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,I.absoluteValues[e]??0,this.dataLabel({p:I.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:I.absoluteValues[e]??0,s:I.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(g??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const u={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},r=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:i,body:n,config:u,colNames:r}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(l=>({shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((i,n)=>n===this.selectedSerieIndex),comments:l.comments||[],prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix}))},tooltipContent(){let l="",i=this.selectedSeries.map(r=>r.value).filter(r=>this.isSafeValue(r)&&r!==null).reduce((r,e)=>Math.abs(r)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],u=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(u)&&this.functionReturnsString(()=>u({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?u({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(r=>{if(this.isSafeValue(r.value)){let e="",g="";switch(this.icons[r.type]){case"bar":e=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${r.color}" /></svg>`;break;case"line":!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" />`:r.shape==="triangle"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:r.shape==="square"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:r.shape==="diamond"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:r.shape==="pentagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:r.shape==="hexagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:r.shape==="star"&&(g=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${r.color}" />${g}</svg>`;break;case"plot":if(!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)){e=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" /></svg>`;break}if(r.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(r.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${r.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(r.type==="line"?this.FINAL_CONFIG.line.labels.formatter:r.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,r.value,this.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:r}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(r.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&r.comments.length&&r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${r.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${r.color}">${r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.prepareChart(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}})},methods:{abbreviate:d.abbreviate,adaptColorToBackground:d.adaptColorToBackground,applyDataLabel:d.applyDataLabel,assignStackRatios:d.assignStackRatios,calcLinearProgression:d.calcLinearProgression,calculateNiceScaleWithExactExtremes:d.calculateNiceScaleWithExactExtremes,checkNaN:d.checkNaN,closestDecimal:d.closestDecimal,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,createCsvContent:d.createCsvContent,createSmoothPath:d.createSmoothPath,createTSpans:d.createTSpans,dataLabel:d.dataLabel,downloadCsv:d.downloadCsv,error:d.error,functionReturnsString:d.functionReturnsString,hasDeepProperty:d.hasDeepProperty,isFunction:d.isFunction,isSafeValue:d.isSafeValue,objectIsEmpty:d.objectIsEmpty,setOpacity:d.setOpacity,shiftHue:d.shiftHue,translateSize:d.translateSize,treeShake:d.treeShake,useMouse:p.useMouse,useNestedProp:G.useNestedProp,toggleAnnotator(){this.isAnnotator=!this.isAnnotator},getHighlightAreaPosition(l){const i=this.drawingArea.left+this.drawingArea.width/this.maxSeries*(l.from-this.slicer.start),n=this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span<0?1e-5:this.drawingArea.width/(this.slicer.end-this.slicer.start)*l.span;return{x:i<this.drawingArea.left?this.drawingArea.left:i,width:n}},prepareConfig(){const l=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const i=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?i.chart.highlightArea=this.config.chart.highlightArea:i.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?i.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:i.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?i.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:i.chart.grid.labels.yAxis.scaleMax=null,i.theme?{...G.useNestedProp({userConfig:this.themes.vue_ui_xy[i.theme]||this.config,defaultConfig:i}),customPalette:this.themePalettes[i.theme]||this.palette}:i},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,i)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:i})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((i,n)=>{this.isSafeValue(i)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
2
|
-
-----> The serie '${l.name}' contains the value '${i}' at index ${n}.
|
|
3
|
-
'${i}' was converted to null to allow the chart to display.`)})}),this.mutableConfig={dataLabels:{show:!0},showTooltip:this.FINAL_CONFIG.chart.tooltip.show===!0,showTable:this.FINAL_CONFIG.showTable===!0,isStacked:this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,useIndividualScale:this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},this.FINAL_CONFIG.responsive){const i=this.$refs.chart.parentNode,{height:n,width:u}=i.getBoundingClientRect();let r=null,e=0;this.FINAL_CONFIG.chart.title.show&&(r=this.$refs.chartTitle,e=r.getBoundingClientRect().height);let g=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(g=this.$refs.chartSlicer.$el,I=g.getBoundingClientRect().height);let F=null,m=0;this.FINAL_CONFIG.chart.legend.show&&(F=this.$refs.chartLegend,m=F.getBoundingClientRect().height),this.height=n-e-m-I,this.width=u,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(L=>{for(const _ of L)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(I=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(m=this.$refs.chartLegend.getBoundingClientRect().height),this.height=_.contentBoxSize[0].blockSize-e-m-I-24,this.width=_.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()}).observe(i)}else this.height=this.FINAL_CONFIG.chart.height,this.width=this.FINAL_CONFIG.chart.width,this.viewBox=`0 0 ${this.width} ${this.height}`,this.fontSizes.dataLabels=this.FINAL_CONFIG.chart.grid.labels.fontSize,this.fontSizes.yAxis=this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,this.fontSizes.xAxis=this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,this.fontSizes.plotLabels=this.FINAL_CONFIG.chart.labels.fontSize,this.plotRadii.plot=this.FINAL_CONFIG.plot.radius,this.plotRadii.line=this.FINAL_CONFIG.line.radius},selectMinimapIndex(l){this.selectedMinimapIndex=l},convertSizes(){this.fontSizes.dataLabels=this.translateSize({relator:this.height,adjuster:400,source:this.FINAL_CONFIG.chart.grid.labels.fontSize,threshold:10,fallback:10}),this.fontSizes.yAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,threshold:10,fallback:10}),this.fontSizes.xAxis=this.translateSize({relator:this.width,adjuster:1e3,source:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,threshold:10,fallback:10}),this.fontSizes.plotLabels=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.chart.labels.fontSize,threshold:10,fallback:10}),this.plotRadii.plot=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.plot.radius,threshold:1,fallback:1}),this.plotRadii.line=this.translateSize({relator:this.width,adjuster:800,source:this.FINAL_CONFIG.line.radius,threshold:1,fallback:1})},toggleStack(){this.mutableConfig.isStacked=!this.mutableConfig.isStacked,this.mutableConfig.isStacked?this.mutableConfig.useIndividualScale=!0:this.mutableConfig.useIndividualScale=this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale},toggleTable(){this.mutableConfig.showTable=!this.mutableConfig.showTable},toggleLabels(){this.mutableConfig.dataLabels.show=!this.mutableConfig.dataLabels.show},toggleTooltip(){this.mutableConfig.showTooltip=!this.mutableConfig.showTooltip},checkAutoScaleError(l){l.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`),this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked||console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(l){if(!l[0])return[-10,-10,"",-10,-10];const i={x:l[0].x,y:this.zero},n={x:l.at(-1).x,y:this.zero},u=[];return l.forEach(r=>{u.push(`${r.x},${r.y} `)}),[i.x,i.y,...u,n.x,n.y].toString()},createIndividualArea(l,i){if(!l[0])return[-10,-10,"",-10,-10];const n={x:l[0]?l[0].x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},u={x:l.at(-1)?l.at(-1).x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},r=[];return l.filter(e=>!!e).forEach(e=>{r.push(`${e.x},${e.y} `)}),[n.x,n.y,...r,u.x,u.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(l,i){let n=Array(l).fill(0);for(let u=0;u<i.length&&u<l;u+=1)n[u]=i[u];return n},refreshSlicer(){this.slicer={start:0,end:Math.max(...this.dataset.map(l=>l.series.length))},this.slicerStep+=1},calcRectHeight(l){return l.value>=0?this.checkNaN(this.zero-l.y<=0?1e-5:this.zero-l.y):this.checkNaN(l.y-this.zero<=0?1e-5:l.y-this.zero)},calcIndividualHeight(l){return l.value>=0?this.checkNaN(l.zeroPosition-l.y<=0?1e-5:l.zeroPosition-l.y):this.checkNaN(l.y-l.zeroPosition<=0?1e-5:l.zeroPosition-l.y)},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(l){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?l.x+this.drawingArea.width/this.maxSeries*.05:l.x+this.slot.bar/2},calcRectY(l){return l.value>=0?l.y:this.zero},calcIndividualRectY(l){return l.value>=0?l.y:[null,void 0,NaN,1/0,-1/0].includes(l.zeroPosition)?0:l.zeroPosition},canShowValue(l){return![null,void 0,NaN,1/0,-1/0].includes(l)},findClosestValue(l,i){let n=i[0],u=Math.abs(l-i[0]);for(let r=1;r<i.length;r+=1){const e=Math.abs(l-i[r]);e<u&&i[r]<l&&(n=i[r],u=e)}return n},ratioToMax(l){return l/(this.canShowValue(this.absoluteMax)?this.absoluteMax:1)},selectX(l){this.$emit("selectX",{dataset:this.relativeDataset.map(i=>({name:i.name,value:[null,void 0,NaN].includes(i.absoluteValues[l])?null:i.absoluteValues[l],color:i.color,type:i.type})),index:l,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l]})},getData(){return this.absoluteDataset.map(l=>({values:l.absoluteValues,color:l.color,name:l.name,type:l.type}))},segregate(l){if(this.segregatedSeries.includes(l.id))this.segregatedSeries=this.segregatedSeries.filter(i=>i!==l.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(l.id)}this.$emit("selectLegend",this.relativeDataset.map(i=>({name:i.name,values:i.absoluteValues,color:i.color,type:i.type}))),this.segregateStep+=1},toggleTooltipVisibility(l,i=null){this.isTooltip=l,l?this.selectedSerieIndex=i:this.selectedSerieIndex=null},toggleFullscreen(l){this.isFullscreen=l,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},async generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.isPrinting=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./pdf-9cRTLjY8.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})}catch(l){console.error("Error generating PDF:",l)}finally{this.isPrinting=!1}},100)},generateCsv(){const l=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],i=["",...this.table.head.map(e=>e.label)],n=this.table.body,u=l.concat([i]).concat(n),r=this.createCsvContent(u);this.downloadCsv({csvContent:r,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},async generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.isImaging=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./img-BFCs759q.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"})}catch(l){console.error("Error generating image:",l)}finally{this.isImaging=!1}},100)}}},U=["id"],Z=["viewBox"],J={key:0},K={class:"vue-ui-xy-grid"},Q=["stroke","x1","x2","y1","y2"],j=["stroke","x1","x2","y1","y2"],$={key:1},ee=["x1","x2","y1","y2","stroke"],te=["x1","x2","y1","y2","stroke"],le=["x1","x2","y1","y2","stroke"],re={key:3},ae=["x1","x2","y1","y2","stroke"],ie=["id"],se=["stop-color"],oe=["stop-color"],ne=["stop-color"],ce=["id"],he=["stop-color"],de=["stop-color"],ue=["stop-color"],me=["id"],ge=["stop-color"],Ne=["stop-color"],fe=["id"],ke=["stop-color"],Ie=["stop-color"],xe=["id"],be=["stop-color"],Fe=["stop-color"],_e=["x","y","height","width","fill"],ye=["x","y","width"],Ce=["x","y","height","width","fill"],Ae=["x","y","height","width","rx","fill","stroke","stroke-width"],Se=["width","x","y"],Le={key:0},we=["id"],Oe=["fill"],ve=["x1","x2","y1","y2","stroke","marker-end"],pe=["x","y","font-size","fill"],Ge=["stroke","x1","x2","y1","y2"],Be={key:2},Ee=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ze=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],Ve={key:4},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["fill","font-size","transform"],Te=["x1","x2","y1","y2","stroke"],De=["x","y","font-size","fill"],Re=["x1","x2","y1","y2","stroke"],He=["x","y","font-size","fill"],We=["width","x","y"],qe={style:{width:"100%"}},Ye={key:0},Xe=["id"],Ue=["fill"],Ze=["x1","x2","y1","y2","stroke","marker-end"],Je=["x","y","font-size","fill"],Ke=["d","stroke","stroke-width","stroke-dasharray"],Qe={key:1},je=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],$e={key:0},et=["d","fill"],tt=["d","fill"],lt=["d","stroke","stroke-width","stroke-dasharray"],rt={key:2},at=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],it=["width","x","y"],st={style:{width:"100%"}},ot={key:3},nt=["id"],ct=["fill"],ht=["x1","x2","y1","y2","stroke","marker-end"],dt=["x","y","font-size","fill"],ut={key:5},mt=["x","y","font-size","fill"],gt=["x","y","font-size","fill","font-weight"],Nt={key:6},ft=["x","y","font-size","fill"],kt=["x","y"],It=["x","y"],xt={key:7},bt=["x","y","font-size","fill"],Ft=["x","y"],_t=["x","y"],yt=["x","y","font-size","fill","innerHTML"],Ct=["x","y","font-size","fill","innerHTML"],At=["x","y","font-size","fill","innerHTML"],St=["x","y","font-size","fill","innerHTML"],Lt=["x","y","width","height","fill","onMouseenter"],wt=["font-size","fill","transform"],Ot=["x","y","font-size","fill"],vt={key:9},pt=["text-anchor","font-size","fill","transform"],Gt=["x","y","height","width","onMouseenter","onClick"],Bt={key:10},Et=["x","y"],zt=["cx","cy","r","fill"],Vt={key:4,class:"vue-data-ui-watermark"},Pt=["onClick"],Mt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Tt=["fill"],Dt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Rt=["fill"],Ht={key:8,ref:"chartLegend"},Wt={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},qt=["innerHTML"];function Yt(l,i,n,u,r,e){const g=t.resolveComponent("PenAndPaper"),I=t.resolveComponent("Title"),F=t.resolveComponent("UserOptions"),m=t.resolveComponent("PackageVersion"),k=t.resolveComponent("Shape"),L=t.resolveComponent("Skeleton"),_=t.resolveComponent("Slicer"),S=t.resolveComponent("Tooltip"),C=t.resolveComponent("BaseIcon"),f=t.resolveComponent("TableSparkline"),b=t.resolveComponent("DataTable"),A=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${r.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${r.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${e.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:t.normalizeStyle(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;${e.FINAL_CONFIG.chart.title.text?"":"padding-top:36px"};font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive?"height: 100%":""}`)},[e.FINAL_CONFIG.chart.userOptions.buttons.annotator?(t.openBlock(),t.createBlock(g,{key:0,parent:l.$refs.chart,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,active:r.isAnnotator,onClose:e.toggleAnnotator},null,8,["parent","backgroundColor","color","active","onClose"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.title.show?(t.openBlock(),t.createElementBlock("div",{key:1,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(I,{key:`title_${r.titleStep}`,config:{title:{cy:"xy-div-title",...e.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...e.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.userOptions.show&&e.isDataset?(t.openBlock(),t.createBlock(F,{ref:"defails",key:`user_options_${r.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:r.isPrinting,isImaging:r.isImaging,uid:r.uniqueId,hasTooltip:e.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&e.FINAL_CONFIG.chart.tooltip.show,hasPdf:e.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:e.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:e.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:e.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:e.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:n.dataset.length>1&&e.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:r.mutableConfig.isStacked,isFullscreen:r.isFullscreen,chartElement:l.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:r.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},hasAnnotator:e.FINAL_CONFIG.chart.userOptions.buttons.annotator,isAnnotation:r.isAnnotator,onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip,onToggleAnnotator:e.toggleAnnotator},t.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[t.renderSlot(l.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:t.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[t.renderSlot(l.$slots,"optionAnnotator",t.normalizeProps(t.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip","onToggleAnnotator"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":r.isFullscreen,"vue-data-ui-fulscreen--off":!r.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:r.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[t.createVNode(m),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",J,[t.createElementVNode("g",K,[e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.drawingArea.bottom,y2:e.drawingArea.bottom,"stroke-linecap":"round"},null,8,Q)):t.createCommentVNode("",!0),r.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[a.id===r.selectedScale&&a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:a.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,te))),256)):a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(a.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,le))),256)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(t.openBlock(),t.createElementBlock("line",{key:0,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left+e.xPadding,y1:e.drawingArea.top,y2:e.drawingArea.bottom,"stroke-linecap":"round"},null,8,j)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",$,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,a=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(a.y),y2:e.checkNaN(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ee))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",re,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(a,o)=>(t.openBlock(),t.createElementBlock("line",{key:`grid_vertical_line_${o}`,x1:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,x2:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,y1:e.drawingArea.top,y2:e.drawingArea.bottom,"stroke-width":"0.5",stroke:e.FINAL_CONFIG.chart.grid.stroke},null,8,ae))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${o}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${o}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,se),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,oe),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,ne)],8,ie),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${o}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,he),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,de),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ue)],8,ce)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${o}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${o}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,ge),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ne)],8,me)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${o}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${o}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,ke),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,fe),t.createElementVNode("linearGradient",{id:`areaGradient_${o}_${r.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(a.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,be),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,Fe)],8,xe)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,a=>(t.openBlock(),t.createElementBlock("g",null,[a.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.span,(o,s)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:a.from+s>=r.slicer.start&&a.from+s<=r.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-r.slicer.start),y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:e.setOpacity(a.color,a.opacity)},null,12,_e),a.caption.text&&s===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+s-r.slicer.start)-(a.caption.width==="auto"?0:a.caption.width/2-e.drawingArea.width/e.maxSeries*a.span/2),y:e.drawingArea.top+a.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:a.to>=r.slicer.start&&a.from<r.slicer.end?1:0}),height:"1",width:a.caption.width==="auto"?e.drawingArea.width/e.maxSeries*a.span:a.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${a.caption.padding}px;text-align:${a.caption.textAlign};font-size:${a.caption.fontSize}px;color:${a.caption.color};font-weight:${a.caption.bold?"bold":"normal"}`)},t.toDisplayString(a.caption.text),5)],12,ye)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0)]))),256)),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_${o}`},[t.createElementVNode("rect",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(o)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,Ce)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${o}`,class:t.normalizeClass(`serie_bar_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`bar_plot_${o}_${h}`},[e.canShowValue(s.value)?(t.openBlock(),t.createElementBlock("rect",{key:0,x:e.calcRectX(s),y:r.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:r.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${o}_${r.uniqueId})`:`url(#rectGradient_neg_${o}_${r.uniqueId})`:a.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Ae)):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:(e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)/2)+e.FINAL_CONFIG.chart.comments.width,x:e.calcRectX(s)-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:e.checkNaN(s.y)+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:o,datapointIndex:h}},void 0,!0)],8,Se)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",Le,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`bar_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Oe)],8,we)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.calcLinearProgression(a.plots).y1,y2:e.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${o})`},null,8,ve)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,pe)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!r.mutableConfig.useIndividualScale&&e.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(t.openBlock(),t.createElementBlock("line",{key:1,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(e.zero),y2:e.checkNaN(e.zero),"stroke-linecap":"round"},null,8,Ge)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.highlighter.useLine&&(![null,void 0].includes(r.selectedSerieIndex)||r.selectedMinimapIndex!==null)?(t.openBlock(),t.createElementBlock("g",Be,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.selectedSerieIndex||r.selectedMinimapIndex)+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.selectedSerieIndex||r.selectedMinimapIndex)+e.drawingArea.width/e.maxSeries/2,y1:e.drawingArea.top,y2:e.drawingArea.bottom,stroke:e.FINAL_CONFIG.chart.highlighter.color,"stroke-width":e.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":e.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Ee)])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.frame.show?(t.openBlock(),t.createElementBlock("rect",{key:3,style:{pointerEvents:"none",transition:"none"},x:e.drawingArea.left+e.xPadding<0?0:e.drawingArea.left+e.xPadding,y:e.drawingArea.top,width:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries)<0?0:e.drawingArea.width-(e.FINAL_CONFIG.chart.grid.position==="middle"?0:e.drawingArea.width/e.maxSeries),height:e.drawingArea.height<0?0:e.drawingArea.height,fill:"transparent",stroke:e.FINAL_CONFIG.chart.grid.frame.stroke,"stroke-width":e.FINAL_CONFIG.chart.grid.frame.strokeWidth,"stroke-linecap":e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,"stroke-linejoin":e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,"stroke-dasharray":e.FINAL_CONFIG.chart.grid.frame.strokeDasharray},null,8,ze)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",Ve,[r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:a.x+e.xPadding,x2:a.x+e.xPadding,y1:r.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-a.yOffset-a.individualHeight):e.checkNaN(e.drawingArea.top),y2:r.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-a.yOffset):e.checkNaN(e.drawingArea.bottom),stroke:a.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Pe)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:a.color,"font-size":r.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset-a.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(a.name)+" "+t.toDisplayString(a.scaleLabel?`- ${a.scaleLabel}`:""),9,Me),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("line",{x1:a.x-3+e.xPadding,x2:a.x+e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:a.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Te))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("text",{x:a.x-5+e.xPadding,y:e.checkNaN(o.y)+r.fontSizes.dataLabels/3,"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:a.color},t.toDisplayString(e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,o.value,e.dataLabel({p:o.prefix,v:o.value,s:o.suffix,r:1}),{datapoint:o.datapoint,seriesIndex:s})),9,De))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${o}`},[e.canShowValue(a)&&a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left-5+e.xPadding,y1:e.checkNaN(a.y),y2:e.checkNaN(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,Re)):t.createCommentVNode("",!0),a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(a.y+r.fontSizes.dataLabels/3),"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(a.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,a.value,e.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:1})):""),9,He)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${o}`,class:t.normalizeClass(`serie_plot_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(k,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${o}_${r.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?a.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===h||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===h?(r.plotRadii.plot||6)*1.5:r.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.plot.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",qe,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:o,datapointIndex:h}},void 0,!0)])],8,We)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",Ye,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`plot_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Ue)],8,Xe)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.calcLinearProgression(a.plots).y1,y2:e.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${o})`},null,8,Ze)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,Je)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,Ke)):a.plots.length>1?(t.openBlock(),t.createElementBlock("g",Qe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<a.plots.length-1&&a.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(a.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:a.plots[h+1].x,y1:s.y,y2:a.plots[h+1].y,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,je)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.useArea&&a.plots.length>1?(t.openBlock(),t.createElementBlock("g",$e,[a.smooth?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(s=>!!s).map(s=>s.x))},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:e.drawingArea.left+e.slot.line*o+e.slot.line/2},${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset:e.drawingArea.bottom} Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,et)):(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.area}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,tt))])):t.createCommentVNode("",!0),a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.curve}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,lt)):a.plots.length>1?(t.openBlock(),t.createElementBlock("g",rt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<a.plots.length-1&&a.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(a.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:a.plots[h+1].x,y1:s.y,y2:a.plots[h+1].y,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,at)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_line_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(k,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${o}_${r.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?a.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===h||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===h?(r.plotRadii.line||6)*1.5:r.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.line.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),s.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:e.FINAL_CONFIG.chart.comments.width,x:s.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:s.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",st,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color,seriesIndex:o,datapointIndex:h}},void 0,!0)])],8,it)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",ot,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`line_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,ct)],8,nt)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.calcLinearProgression(a.plots).y1,y2:e.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${o})`},null,8,ht)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,dt)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",ut,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}`,class:t.normalizeClass(`xLabel_bar_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}_${h}`},[s&&(!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?s.x+e.slot.line/2:e.calcRectX(s)+e.calcRectWidth()/2-e.barPeriodGap/2,y:e.checkNaN(s.y)+(s.value>0?e.FINAL_CONFIG.bar.labels.offsetY:-e.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.bar.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:a}):""),9,mt)):t.createCommentVNode("",!0),s&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?s.x+e.slot.line/2:s.x+e.calcRectWidth()*1.1,y:s.y+(s.value>0?e.FINAL_CONFIG.bar.serieName.offsetY:-e.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?a.color:e.FINAL_CONFIG.bar.serieName.color,"font-weight":e.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},t.toDisplayString(e.FINAL_CONFIG.bar.serieName.useAbbreviation?e.abbreviate({source:a.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):a.name),9,gt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",Nt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+e.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.plot.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.plot.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:a}):""),9,ft)):t.createCommentVNode("",!0),s&&h===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,kt)):t.createCommentVNode("",!0),s&&h===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(r.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,It)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.line.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",xt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x,y:s.y+(s.value>0?e.FINAL_CONFIG.line.labels.offsetY:-e.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.line.labels.color},t.toDisplayString(e.canShowValue(s.value)?e.applyDataLabel(e.FINAL_CONFIG.line.labels.formatter,s.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:a}):""),9,bt)):t.createCommentVNode("",!0),s&&h===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:s.x,y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,Ft)):t.createCommentVNode("",!0),s&&h===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-a.name.length*(r.fontSizes.plotLabels/2),y:s.y-20,height:24,width:"150",style:{overflow:"visible"}},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(a.name),5)],8,_t)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&h===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x-r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,yt)):t.createCommentVNode("",!0),s&&h===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x+r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ct)):t.createCommentVNode("",!0)]))),128))],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&h===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x-r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,At)):t.createCommentVNode("",!0),s&&h===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+r.fontSizes.plotLabels,y:s.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:s.x+r.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,St)):t.createCommentVNode("",!0)]))),128))],6))),128)),r.mutableConfig.useIndividualScale&&!r.mutableConfig.isStacked?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:8},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("rect",{x:a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,y:e.drawingArea.top,width:e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:e.drawingArea.height<0?10:e.drawingArea.height,fill:r.selectedScale===a.id?e.setOpacity(a.color,20):"transparent",onMouseenter:o=>r.selectedScale=a.id,onMouseleave:i[0]||(i[0]=o=>r.selectedScale=null)},null,40,Lt))),256)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${r.fontSizes.yAxis+e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,wt)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.width/2,y:e.drawingArea.bottom+r.fontSizes.yAxis+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,Ot)):t.createCommentVNode("",!0)]),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",vt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.timeLabels,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${o}`},[a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&r.selectedSerieIndex===o&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&o%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(t.openBlock(),t.createElementBlock("text",{key:0,"text-anchor":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":r.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*o+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`},t.toDisplayString(a||""),9,pt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_${o}`},[t.createElementVNode("rect",{"data-cy-trap":"",x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:"transparent",onMouseenter:s=>e.toggleTooltipVisibility(!0,o),onMouseleave:i[1]||(i[1]=s=>e.toggleTooltipVisibility(!1)),onClick:s=>e.selectX(o)},null,40,Gt)]))),128))]),e.FINAL_CONFIG.chart.timeTag.show&&![null,void 0].includes(r.selectedSerieIndex)?(t.openBlock(),t.createElementBlock("g",Bt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*r.selectedSerieIndex-100+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[t.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:t.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)},t.toDisplayString(e.timeLabels[r.selectedSerieIndex]||r.selectedSerieIndex),5)],8,Et)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*r.selectedSerieIndex+e.drawingArea.width/e.maxSeries/2,cy:e.drawingArea.bottom,r:e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:e.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,zt)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"svg",{svg:e.svg},void 0,!0)],14,Z)):t.createCommentVNode("",!0),l.$slots.watermark?(t.openBlock(),t.createElementBlock("div",Vt,[t.renderSlot(l.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:r.isPrinting||r.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(L,{key:5,config:{type:"line",style:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:e.FINAL_CONFIG.chart.grid.stroke},path:{color:e.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),e.FINAL_CONFIG.chart.zoom.show&&r.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(_,{ref:"chartSlicer",key:`slicer_${r.slicerStep}`,background:e.FINAL_CONFIG.chart.zoom.color,fontSize:e.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:e.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.end-1],textColor:e.FINAL_CONFIG.chart.color,inputColor:e.FINAL_CONFIG.chart.zoom.color,selectColor:e.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:e.FINAL_CONFIG.chart.backgroundColor,minimap:e.minimap,smoothMinimap:e.FINAL_CONFIG.chart.zoom.minimap.smooth,minimapSelectedColor:e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,minimapSelectionRadius:e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,minimapLineColor:e.FINAL_CONFIG.chart.zoom.minimap.lineColor,minimapSelectedColorOpacity:e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:r.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,max:r.maxX,min:0,valueStart:r.slicer.start,valueEnd:r.slicer.end,start:r.slicer.start,"onUpdate:start":i[2]||(i[2]=a=>r.slicer.start=a),end:r.slicer.end,"onUpdate:end":i[3]||(i[3]=a=>r.slicer.end=a),onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:a})=>[t.renderSlot(l.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","minimap","smoothMinimap","minimapSelectedColor","minimapSelectionRadius","minimapLineColor","minimapSelectedColorOpacity","minimapSelectedIndex","minimapIndicatorColor","max","valueStart","valueEnd","start","end","onReset","onTrapMouse"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.legend.show?(t.openBlock(),t.createElementBlock("div",{key:7,ref:"chartLegend",class:"vue-ui-xy-legend",style:t.normalizeStyle(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.absoluteDataset,(a,o)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${o}`,onClick:s=>e.segregate(a),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":r.segregatedSeries.includes(a.id)})},[r.icons[a.type]==="line"?(t.openBlock(),t.createElementBlock("svg",Mt,[t.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:a.color},null,8,Tt),t.createVNode(k,{plot:{x:10,y:9},radius:4,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(t.openBlock(),t.createElementBlock("svg",Dt,[r.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:a.color},null,8,Rt)):(t.openBlock(),t.createBlock(k,{key:1,plot:{x:6,y:6},radius:5,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle"},null,8,["color","shape"]))])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(a.name),5)],10,Pt))),128))],4)):(t.openBlock(),t.createElementBlock("div",Ht,[t.renderSlot(l.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),t.createVNode(S,{show:r.mutableConfig.showTooltip&&r.isTooltip,backgroundColor:e.FINAL_CONFIG.chart.tooltip.backgroundColor,color:e.FINAL_CONFIG.chart.tooltip.color,fontSize:e.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:e.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:e.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:e.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:e.FINAL_CONFIG.chart.tooltip.position,offsetY:e.FINAL_CONFIG.chart.tooltip.offsetY,parent:l.$refs.chart,content:e.tooltipContent,isCustom:e.FINAL_CONFIG.chart.tooltip.customFormat&&typeof e.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-before",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),"tooltip-after":t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip-after",t.normalizeProps(t.guardReactiveProps({...e.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.isDataset?(t.openBlock(),t.createBlock(A,{key:9,hideDetails:"",config:{open:r.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color},head:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color}}},{content:t.withCtx(()=>[t.createElementVNode("div",{style:t.normalizeStyle(`${r.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",Wt,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=a=>r.showSparklineTable=a)},null,512),[[t.vModelCheckbox,r.showSparklineTable]]),t.createElementVNode("div",{onClick:i[5]||(i[5]=a=>r.showSparklineTable=!r.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(C,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),r.showSparklineTable?(t.openBlock(),t.createBlock(f,{key:`sparkline_${r.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(b,{key:`table_${r.tableStep}`,colNames:e.dataTable.colNames,head:e.dataTable.head,body:e.dataTable.body,config:e.dataTable.config,title:`${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text?` : ${e.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:i[6]||(i[6]=a=>r.mutableConfig.showTable=!1)},{th:t.withCtx(({th:a})=>[t.createElementVNode("div",{innerHTML:a},null,8,qt)]),td:t.withCtx(({td:a})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(a))?a:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:a,s:e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):t.createCommentVNode("",!0)],14,U)}const Xt=q._export_sfc(X,[["render",Yt],["__scopeId","data-v-8d96cbc4"]]);exports.default=Xt;
|