vue-data-ui 2.3.95 → 2.3.96
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-ClB1PHpS.js → Arrow-Dse9W-xd.js} +1 -1
- package/dist/{Arrow-OPbsbOoM.cjs → Arrow-eiCuVfYA.cjs} +1 -1
- package/dist/{BaseIcon-ZChy8GeS.js → BaseIcon-DFIHCTyJ.js} +6 -6
- package/dist/{BaseIcon-CGKu0qTV.cjs → BaseIcon-DJbzYsmN.cjs} +1 -1
- package/dist/{DataTable-B9SSwFM2.js → DataTable-TdEc8llA.js} +2 -2
- package/dist/{DataTable-CUi5w5e6.cjs → DataTable-YpBvWSn5.cjs} +1 -1
- package/dist/{Legend-D4PxDNTf.js → Legend-BsB-CXKk.js} +1 -1
- package/dist/{Legend-DP-Tm5Kr.cjs → Legend-CsYNhmuM.cjs} +1 -1
- package/dist/{PackageVersion-I1_4jcn_.js → PackageVersion-C5LvF-TN.js} +1 -1
- package/dist/{PackageVersion-DdGAD2ox.cjs → PackageVersion-kqwH1rG4.cjs} +1 -1
- package/dist/{Shape-DRb45Knl.cjs → Shape-CyDjKOjw.cjs} +1 -1
- package/dist/{Shape-DVc7K58k.js → Shape-DpWOBZlx.js} +1 -1
- package/dist/{Slicer-Bk9LTQad.js → Slicer-BQr2RZjz.js} +2 -2
- package/dist/{Slicer-D7S48Lno.cjs → Slicer-D-wCwIJ3.cjs} +1 -1
- package/dist/{Title-Cxlu3Etv.js → Title-BMSO566P.js} +1 -1
- package/dist/{Title-DcXqsD3c.cjs → Title-DWSN4YUC.cjs} +1 -1
- package/dist/{Tooltip-onlvaIFL.cjs → Tooltip-Bl8Ilf5h.cjs} +1 -1
- package/dist/{Tooltip-Bt9pHzBM.js → Tooltip-CHABi2zh.js} +1 -1
- package/dist/{index-DK7qqHGP.js → index-BcpaEQjg.js} +21 -21
- package/dist/{index-BwtKB_oG.cjs → index-Bv8wGGBc.cjs} +3 -3
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CE6ustAp.cjs → useNestedProp-Bf7w6kTt.cjs} +1 -1
- package/dist/{useNestedProp-0nRX_rTi.js → useNestedProp-CEsVEbKF.js} +1 -1
- package/dist/{usePrinter-BMJj8aqh.cjs → usePrinter-7jNVagoH.cjs} +1 -1
- package/dist/{usePrinter-Cza87yNE.js → usePrinter-DzCuoQHM.js} +1 -1
- package/dist/{vue-data-ui-C_TmwtMr.js → vue-data-ui-BFU1Dig_.js} +57 -57
- package/dist/{vue-data-ui-Hk08-jMu.cjs → vue-data-ui-Bs74qL5y.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C7dVjCP4.js → vue-ui-3d-bar-4ue7sfgA.js} +8 -8
- package/dist/{vue-ui-3d-bar-DLpRGWHF.cjs → vue-ui-3d-bar-DxfiT-RQ.cjs} +1 -1
- package/dist/{vue-ui-accordion-CM2NnUan.cjs → vue-ui-accordion-CSkH8Ztm.cjs} +1 -1
- package/dist/{vue-ui-accordion-5C4CP3gA.js → vue-ui-accordion-Dhi5XiYk.js} +3 -3
- package/dist/{vue-ui-age-pyramid-mLYneMWu.js → vue-ui-age-pyramid-BApJ-rfW.js} +9 -9
- package/dist/{vue-ui-age-pyramid-CTvGXHzp.cjs → vue-ui-age-pyramid-Ds5Q2JFz.cjs} +1 -1
- package/dist/{vue-ui-annotator-CPZoIz9j.cjs → vue-ui-annotator-8qRRkhYB.cjs} +1 -1
- package/dist/{vue-ui-annotator-BB0EN1X8.js → vue-ui-annotator-BASwkqF2.js} +1 -1
- package/dist/{vue-ui-candlestick-BqH7QdhN.cjs → vue-ui-candlestick-CljlKMFQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-91SHWtIZ.js → vue-ui-candlestick-Dlgm0_M_.js} +10 -10
- package/dist/{vue-ui-carousel-table-Dvr8K0wL.js → vue-ui-carousel-table-3izbh8XN.js} +4 -4
- package/dist/{vue-ui-carousel-table-Cj9K0i-8.cjs → vue-ui-carousel-table-DkveY2W7.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BMbO3LQx.cjs → vue-ui-chestnut-CQu1jOyT.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C8-hqYVj.js → vue-ui-chestnut-DzKXA8vJ.js} +7 -7
- package/dist/{vue-ui-cursor-fOFRnGWg.js → vue-ui-cursor-BrBsIJo3.js} +2 -2
- package/dist/{vue-ui-cursor-CiNq70Vh.cjs → vue-ui-cursor-DbQV-LLF.cjs} +1 -1
- package/dist/{vue-ui-dashboard-XROIeMZs.js → vue-ui-dashboard-DXdmiwYq.js} +2 -2
- package/dist/{vue-ui-dashboard-emcX9lzJ.cjs → vue-ui-dashboard-Wzves807.cjs} +1 -1
- package/dist/{vue-ui-digits-Dao_RHVG.js → vue-ui-digits-BppnP8CH.js} +2 -2
- package/dist/{vue-ui-digits-Fx6hf8lh.cjs → vue-ui-digits-CSQi9Lh3.cjs} +1 -1
- package/dist/vue-ui-donut-CqlGTsGd.cjs +1 -0
- package/dist/{vue-ui-donut-D5q_f9RX.js → vue-ui-donut-DkHShWM1.js} +17 -13
- package/dist/{vue-ui-donut-evolution-Dnx-o2Ok.cjs → vue-ui-donut-evolution-CwOes6ko.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-ciU7PKzb.js → vue-ui-donut-evolution-oDtnYccI.js} +10 -10
- package/dist/{vue-ui-dumbbell-nLr7lvcv.js → vue-ui-dumbbell-CDv2q1Sr.js} +9 -9
- package/dist/{vue-ui-dumbbell-DkX4VmBe.cjs → vue-ui-dumbbell-DQlj4MnV.cjs} +1 -1
- package/dist/{vue-ui-flow-B6HJtYfr.js → vue-ui-flow-1DFcpdAA.js} +8 -8
- package/dist/{vue-ui-flow-smeC886u.cjs → vue-ui-flow-Bx-zjQWh.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Buek4k31.cjs → vue-ui-galaxy-BqB8ilSB.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Ts-pIaqK.js → vue-ui-galaxy-bE0htYx4.js} +10 -10
- package/dist/{vue-ui-gauge-CB1FXw50.cjs → vue-ui-gauge-B3fJ7NBS.cjs} +1 -1
- package/dist/{vue-ui-gauge-CokjkUw7.js → vue-ui-gauge-QgQpiMpP.js} +6 -6
- package/dist/{vue-ui-gizmo-CQzBf-wG.cjs → vue-ui-gizmo-BPTXhk_5.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DcGemMpp.js → vue-ui-gizmo-Dvhxmifg.js} +3 -3
- package/dist/{vue-ui-heatmap-BBVeSW2b.js → vue-ui-heatmap-Dz__vLIx.js} +9 -9
- package/dist/{vue-ui-heatmap-B3eEfpF_.cjs → vue-ui-heatmap-mKhWCDCz.cjs} +1 -1
- package/dist/{vue-ui-kpi-0FoMbSuC.cjs → vue-ui-kpi-By6cERhR.cjs} +1 -1
- package/dist/{vue-ui-kpi-CPMnrH0b.js → vue-ui-kpi-CBUwc_CD.js} +3 -3
- package/dist/{vue-ui-mini-loader-Dpn4tXn2.js → vue-ui-mini-loader-DgHibV20.js} +2 -2
- package/dist/{vue-ui-mini-loader-DNrvLX3D.cjs → vue-ui-mini-loader-jX_8sp7v.cjs} +1 -1
- package/dist/{vue-ui-molecule-CKFgcQYg.cjs → vue-ui-molecule-B0U_SHX-.cjs} +1 -1
- package/dist/{vue-ui-molecule-C98VGiyq.js → vue-ui-molecule-DKpW8ux_.js} +10 -10
- package/dist/{vue-ui-mood-radar-CD3cjrDN.js → vue-ui-mood-radar-DCDK2sIV.js} +10 -10
- package/dist/{vue-ui-mood-radar-DN0allOW.cjs → vue-ui-mood-radar-DVChUb6f.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bdl_tUXJ.cjs → vue-ui-nested-donuts-CGp-Jubi.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B__WecmQ.js → vue-ui-nested-donuts-FMQPCwII.js} +10 -10
- package/dist/{vue-ui-onion-U8VRuYjQ.js → vue-ui-onion-DL6021Q8.js} +10 -10
- package/dist/{vue-ui-onion-4g5ewsye.cjs → vue-ui-onion-uId6GP2z.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CdegwDSr.cjs → vue-ui-parallel-coordinate-plot-BQnqXMkU.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-9WvsfJtY.js → vue-ui-parallel-coordinate-plot-BQuvfJQt.js} +11 -11
- package/dist/{vue-ui-quadrant-D2SDPxFH.cjs → vue-ui-quadrant-D0aD-7Tw.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DMto8r-E.js → vue-ui-quadrant-rUE9NWa4.js} +11 -11
- package/dist/vue-ui-quick-chart-D-sbJNy5.cjs +15 -0
- package/dist/{vue-ui-quick-chart-YlkEojCz.js → vue-ui-quick-chart-Jh4YDviZ.js} +190 -195
- package/dist/{vue-ui-radar-lg4R0yio.js → vue-ui-radar-Bfdoz0Xo.js} +11 -11
- package/dist/{vue-ui-radar-DdPAZvLB.cjs → vue-ui-radar-De-YX5t1.cjs} +1 -1
- package/dist/{vue-ui-rating-BxV1W8_t.js → vue-ui-rating-D9vACqJ2.js} +2 -2
- package/dist/{vue-ui-rating-B7erplTm.cjs → vue-ui-rating-Dur118_W.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BviKM7qW.js → vue-ui-relation-circle-CnRm-wQ3.js} +6 -6
- package/dist/{vue-ui-relation-circle-RHy8p_Rq.cjs → vue-ui-relation-circle-Dux0WfBo.cjs} +1 -1
- package/dist/{vue-ui-rings-Bn-nQaV1.js → vue-ui-rings-B3K3LXLl.js} +10 -10
- package/dist/{vue-ui-rings-DMksrRmV.cjs → vue-ui-rings-BkrRebjS.cjs} +1 -1
- package/dist/{vue-ui-scatter-DJ0wpNbL.cjs → vue-ui-scatter-DeebI4Fn.cjs} +1 -1
- package/dist/{vue-ui-scatter-BdTMgLFD.js → vue-ui-scatter-DejGOjhr.js} +11 -11
- package/dist/{vue-ui-screenshot-D0XIDX5K.cjs → vue-ui-screenshot-Bar9x-5m.cjs} +1 -1
- package/dist/{vue-ui-screenshot-beg_Jx2O.js → vue-ui-screenshot-C08awO8c.js} +1 -1
- package/dist/{vue-ui-skeleton-CQnYuosp.js → vue-ui-skeleton-C53xk8CG.js} +3 -3
- package/dist/{vue-ui-skeleton-snFRuZgs.cjs → vue-ui-skeleton-TRdDtmHK.cjs} +1 -1
- package/dist/{vue-ui-smiley-3x3w-9Zh.js → vue-ui-smiley-Cea-O3KH.js} +2 -2
- package/dist/{vue-ui-smiley-BUlMGmlz.cjs → vue-ui-smiley-Dav2CD3O.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Ds7Vnwpb.cjs → vue-ui-spark-trend-6ntFUEU4.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-LsojHGxX.js → vue-ui-spark-trend-Bs8twUaY.js} +5 -5
- package/dist/{vue-ui-sparkbar-DJAZa23-.cjs → vue-ui-sparkbar-C21yWQQ3.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-45yFHmFN.js → vue-ui-sparkbar-Cbmc-caP.js} +4 -4
- package/dist/{vue-ui-sparkgauge-D-hauinY.js → vue-ui-sparkgauge-0GVv8hjM.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CnMl3jNc.cjs → vue-ui-sparkgauge-BmamgyGt.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-vLsGWKZe.cjs → vue-ui-sparkhistogram-CfdPXl3J.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DaeMxgM8.js → vue-ui-sparkhistogram-DCM-BHkv.js} +5 -5
- package/dist/{vue-ui-sparkline-DDwGkMVO.cjs → vue-ui-sparkline-BTNHzn2V.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Ddi4Jz8I.js → vue-ui-sparkline-BYJczOkd.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-1_EPRHfC.js → vue-ui-sparkstackbar-CkAqCQvJ.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-wbl8ZH9S.cjs → vue-ui-sparkstackbar-DRhK17o6.cjs} +1 -1
- package/dist/{vue-ui-stackbar-0cKpezVg.js → vue-ui-stackbar-CfYTo4Ku.js} +11 -11
- package/dist/{vue-ui-stackbar-BKojs76u.cjs → vue-ui-stackbar-DYBUaxzj.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BPICqL2j.cjs → vue-ui-strip-plot-CIN4KwoI.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-D_7VbcMM.js → vue-ui-strip-plot-DEXBmsAI.js} +10 -10
- package/dist/{vue-ui-table-B1kfbP6Q.cjs → vue-ui-table-DRpceoPe.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-UKF0bVRc.js → vue-ui-table-heatmap-BA2teZNQ.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CrXS3ruF.cjs → vue-ui-table-heatmap-DGJ9FlVp.cjs} +1 -1
- package/dist/{vue-ui-table-BTdufdp5.js → vue-ui-table-nN3CrtRu.js} +1 -1
- package/dist/{vue-ui-table-sparkline-CbhcBl__.js → vue-ui-table-sparkline-BvnGInz9.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DnViPd7H.cjs → vue-ui-table-sparkline-Cu3WXN2z.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CGlN3EdJ.cjs → vue-ui-thermometer-DbZ0o20q.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BTb0KKkD.js → vue-ui-thermometer-tMXK87ka.js} +6 -6
- package/dist/{vue-ui-timer-Ca8z8fpL.cjs → vue-ui-timer-BC8eaIGC.cjs} +1 -1
- package/dist/{vue-ui-timer-DsXON-oQ.js → vue-ui-timer-SzmYKRd2.js} +5 -5
- package/dist/{vue-ui-tiremarks-C2FsHymJ.js → vue-ui-tiremarks-Ckslwdk8.js} +6 -6
- package/dist/{vue-ui-tiremarks-DfQgIZ-v.cjs → vue-ui-tiremarks-D-OLOU0v.cjs} +1 -1
- package/dist/{vue-ui-treemap-Ijgu5Uxo.cjs → vue-ui-treemap-CUtRsRug.cjs} +1 -1
- package/dist/{vue-ui-treemap-COGNksGL.js → vue-ui-treemap-Mm79m8P6.js} +10 -10
- package/dist/{vue-ui-vertical-bar-C8q8aSVA.cjs → vue-ui-vertical-bar-CvLxGsDB.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CSk11lJL.js → vue-ui-vertical-bar-r6pUOD2L.js} +10 -10
- package/dist/{vue-ui-waffle-BAFi3Ix0.cjs → vue-ui-waffle-CSyW6ncV.cjs} +1 -1
- package/dist/{vue-ui-waffle-nhWigJK4.js → vue-ui-waffle-C_9IOFs2.js} +10 -10
- package/dist/{vue-ui-wheel-DjPcnznT.js → vue-ui-wheel-BOhOVAnh.js} +6 -6
- package/dist/{vue-ui-wheel-CDcGk_zm.cjs → vue-ui-wheel-CKr2Vu47.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BwgErpI2.cjs → vue-ui-word-cloud-D2pGh3Xa.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DFGYfQfb.js → vue-ui-word-cloud-ES0R6vuB.js} +9 -9
- package/dist/{vue-ui-xy-CTxjevvM.cjs → vue-ui-xy-BASuw3ZU.cjs} +1 -1
- package/dist/{vue-ui-xy-BT3XcRoD.js → vue-ui-xy-CyFLJGSu.js} +13 -13
- package/dist/{vue-ui-xy-canvas-BPRpgAOu.cjs → vue-ui-xy-canvas-1N7guNkI.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-AgaDG8-s.js → vue-ui-xy-canvas-BSV_IOwc.js} +10 -10
- package/package.json +1 -1
- package/dist/vue-ui-donut-Bf7irbZr.cjs +0 -1
- package/dist/vue-ui-quick-chart-BLom9Z1d.cjs +0 -15
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-BwtKB_oG.cjs"),B=require("./DataTable-CUi5w5e6.cjs"),E=require("./Title-DcXqsD3c.cjs"),G=require("./Tooltip-onlvaIFL.cjs"),z=require("./usePrinter-BMJj8aqh.cjs"),V=require("./Shape-DRb45Knl.cjs"),P=require("./BaseIcon-CGKu0qTV.cjs"),M=require("./vue-ui-table-sparkline-DnViPd7H.cjs"),T=require("./vue-ui-skeleton-snFRuZgs.cjs"),D=require("./Slicer-D7S48Lno.cjs"),R=require("./vue-ui-accordion-CM2NnUan.cjs"),p=require("./useNestedProp-CE6ustAp.cjs"),H=require("./PackageVersion-DdGAD2ox.cjs"),t=require("vue"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=d.createUid(),Y={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:G._sfc_main,UserOptions:z.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default,PackageVersion:H._sfc_main},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});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"},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:q,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(a=>!this.segregatedSeries.includes(a.id)),i=Math.max(...l.map(a=>a.series.length)),n=[];for(let a=0;a<i;a+=1)n.push(l.map(e=>e.series[a]||0).reduce((e,g)=>(e||0)+(g||0),0));const m=Math.min(...n);return n.map(a=>a+(m<0?Math.abs(m):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(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height,autoScaleYLabels:a.autoScaleYLabels})),i=this.barSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),n=this.plotSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),m=[...l,...i,...n].flatMap(a=>a).length;return[...l,...i,...n].flatMap((a,e)=>({id:a.id,scaleLabel:a.scaleLabel,name:a.name,color:a.color,scale:a.scale,yOffset:a.yOffset,individualHeight:a.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/m*(e+1),yLabels:a.scaleYLabels||a.scale.ticks.map(g=>({y:g>=0?a.zero-a.individualHeight*(g/a.max):a.zero+a.individualHeight*Math.abs(g)/a.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))),m=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)/(m-n)),valueMin:n,valueMax:m<0?0:m},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)))},k=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,u=this.calculateNiceScaleWithExactExtremes(g.min,g.max===g.min?g.max*F:g.max,k),x=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*F:e.valueMax,k),L=u.min>=0?0:Math.abs(u.min),y=0,S=u.max+L,C=x.max+Math.abs(y),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,r=this.drawingArea.bottom-f-b*L/S,o=this.drawingArea.bottom-f-b*y/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=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*s-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(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),w=l.absoluteValues.map(c=>x.min>=0?(c-Math.abs(x.min))/(x.max-Math.abs(x.min)):(c+Math.abs(x.min))/(x.max+Math.abs(x.min))),A=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)*w[N]||0)),value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),I=u.ticks.map(c=>({y:c>=0?r-b*(c/S):r+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})),_=x.ticks.map(c=>{const N=(c-x.min)/(x.max-x.min);return{y:c>=0?o-b*N:o+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:_,individualHeight:b,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?x:u,individualMax:l.autoScaling?C:S,zeroPosition:l.autoScaling?o:r,plots:l.autoScaling?A:h}})},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,a={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,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+Math.abs(x),S=u.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*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+Math.abs(x))/y: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]||""}}),s=l.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=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*s[N]||0)),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}),w=this.createSmoothPath(o),A=this.createSmoothPath(h),I=F.ticks.map(c=>({y:c>=0?b-f*(c/y):b+f*Math.abs(c)/y,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=u.ticks.map(c=>{const N=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*N:r+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:_,individualHeight:f,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,curve:l.autoScaling?A:w,plots:l.autoScaling?h:o,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?h:o,l.autoScaling?r:b):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(I=>![null,void 0].includes(I))),n=Math.max(...l.absoluteValues.filter(I=>![null,void 0].includes(I)))||1,a={ratios:l.absoluteValues.filter(I=>![null,void 0].includes(I)).map(I=>(I-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,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+x,S=u.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*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((I,_)=>{const c=this.mutableConfig.useIndividualScale?(l.absoluteValues[_]+Math.abs(x))/y:this.ratioToMax(I);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-f*c),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=l.absoluteValues.map(I=>u.min>=0?(I-Math.abs(u.min))/(u.max-Math.abs(u.min)):(I+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((I,_)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[_]||0)),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),w=F.ticks.map(I=>({y:I>=0?b-f*(I/y):b+f*Math.abs(I)/y,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),A=u.ticks.map(I=>{const _=(I-u.min)/(u.max-u.min);return{y:I>=0?r-f*_:r+f*_,value:I,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:A,individualHeight:f,scaleYLabels:l.autoScaling?A:w,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,plots:l.autoScaling?h:o}})},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,m)=>{const a=[n];this.relativeDataset.forEach(e=>{a.push(this.canShowValue(e.absoluteValues[m])?Number(e.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(a)}),{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(k=>k.absoluteValues[e]??0).reduce((k,F)=>k+F,0);n.push([this.timeLabels[e]??"-"].concat(this.relativeDataset.map(k=>this.applyDataLabel(k.type==="line"?this.FINAL_CONFIG.line.labels.formatter:k.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,k.absoluteValues[e]??0,this.dataLabel({p:k.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:k.absoluteValues[e]??0,s:k.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(g??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const m={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},a=[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:m,colNames:a}},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(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,e)=>Math.abs(a)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({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(a=>{if(this.isSafeValue(a.value)){let e="",g="";switch(this.icons[a.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="${a.color}" /></svg>`;break;case"line":!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" />`:a.shape==="triangle"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="square"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="diamond"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="pentagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="hexagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="star"&&(g=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.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="${a.color}" />${g}</svg>`;break;case"plot":if(!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.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="${a.color}" /></svg>`;break}if(a.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="${a.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.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> ${a.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(a.type==="line"?this.FINAL_CONFIG.line.labels.formatter:a.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,a.value,this.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:a}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(a.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&a.comments.length&&a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.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:G.useMouse,useNestedProp:p.useNestedProp,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?{...p.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:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-Bv8wGGBc.cjs"),B=require("./DataTable-YpBvWSn5.cjs"),E=require("./Title-DWSN4YUC.cjs"),G=require("./Tooltip-Bl8Ilf5h.cjs"),z=require("./usePrinter-7jNVagoH.cjs"),V=require("./Shape-CyDjKOjw.cjs"),P=require("./BaseIcon-DJbzYsmN.cjs"),M=require("./vue-ui-table-sparkline-Cu3WXN2z.cjs"),T=require("./vue-ui-skeleton-TRdDtmHK.cjs"),D=require("./Slicer-D-wCwIJ3.cjs"),R=require("./vue-ui-accordion-CSkH8Ztm.cjs"),p=require("./useNestedProp-Bf7w6kTt.cjs"),H=require("./PackageVersion-kqwH1rG4.cjs"),t=require("vue"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=d.createUid(),Y={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:G._sfc_main,UserOptions:z.UserOptions,BaseIcon:P.default,TableSparkline:M.default,Skeleton:T.default,Slicer:D.Slicer,Accordion:R.default,PackageVersion:H._sfc_main},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});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"},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:q,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(a=>!this.segregatedSeries.includes(a.id)),i=Math.max(...l.map(a=>a.series.length)),n=[];for(let a=0;a<i;a+=1)n.push(l.map(e=>e.series[a]||0).reduce((e,g)=>(e||0)+(g||0),0));const m=Math.min(...n);return n.map(a=>a+(m<0?Math.abs(m):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(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height,autoScaleYLabels:a.autoScaleYLabels})),i=this.barSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),n=this.plotSet.map(a=>({name:a.name,color:a.color,scale:a.individualScale,scaleYLabels:a.scaleYLabels,zero:a.zeroPosition,max:a.individualMax,scaleLabel:a.scaleLabel||"",id:a.id,yOffset:a.yOffset||0,individualHeight:a.individualHeight||this.drawingArea.height})),m=[...l,...i,...n].flatMap(a=>a).length;return[...l,...i,...n].flatMap((a,e)=>({id:a.id,scaleLabel:a.scaleLabel,name:a.name,color:a.color,scale:a.scale,yOffset:a.yOffset,individualHeight:a.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/m*(e+1),yLabels:a.scaleYLabels||a.scale.ticks.map(g=>({y:g>=0?a.zero-a.individualHeight*(g/a.max):a.zero+a.individualHeight*Math.abs(g)/a.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))),m=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)/(m-n)),valueMin:n,valueMax:m<0?0:m},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)))},k=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,u=this.calculateNiceScaleWithExactExtremes(g.min,g.max===g.min?g.max*F:g.max,k),x=this.calculateNiceScaleWithExactExtremes(e.valueMin,e.valueMax===e.valueMin?e.valueMax*F:e.valueMax,k),L=u.min>=0?0:Math.abs(u.min),y=0,S=u.max+L,C=x.max+Math.abs(y),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,r=this.drawingArea.bottom-f-b*L/S,o=this.drawingArea.bottom-f-b*y/C,s=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=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*s-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(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),w=l.absoluteValues.map(c=>x.min>=0?(c-Math.abs(x.min))/(x.max-Math.abs(x.min)):(c+Math.abs(x.min))/(x.max+Math.abs(x.min))),A=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)*w[N]||0)),value:l.absoluteValues[N],zeroPosition:this.checkNaN(r),individualMax:this.checkNaN(S),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}}),I=u.ticks.map(c=>({y:c>=0?r-b*(c/S):r+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})),_=x.ticks.map(c=>{const N=(c-x.min)/(x.max-x.min);return{y:c>=0?o-b*N:o+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:_,individualHeight:b,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?x:u,individualMax:l.autoScaling?C:S,zeroPosition:l.autoScaling?o:r,plots:l.autoScaling?A:h}})},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,a={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,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+Math.abs(x),S=u.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*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((c,N)=>{const O=this.mutableConfig.useIndividualScale?(l.absoluteValues[N]+Math.abs(x))/y: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]||""}}),s=l.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=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*s[N]||0)),value:l.absoluteValues[N],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[N]||""}),w=this.createSmoothPath(o),A=this.createSmoothPath(h),I=F.ticks.map(c=>({y:c>=0?b-f*(c/y):b+f*Math.abs(c)/y,value:c,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),_=u.ticks.map(c=>{const N=(c-u.min)/(u.max-u.min);return{y:c>=0?r-f*N:r+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:_,individualHeight:f,scaleYLabels:l.autoScaling?_:I,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,curve:l.autoScaling?A:w,plots:l.autoScaling?h:o,area:l.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(l.autoScaling?h:o,l.autoScaling?r:b):this.createArea(o):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const i=Math.min(...l.absoluteValues.filter(I=>![null,void 0].includes(I))),n=Math.max(...l.absoluteValues.filter(I=>![null,void 0].includes(I)))||1,a={ratios:l.absoluteValues.filter(I=>![null,void 0].includes(I)).map(I=>(I-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,k=1.0000001,F=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*k:e.max,g),u=this.calculateNiceScaleWithExactExtremes(a.valueMin,a.valueMax===a.valueMin?a.valueMax*k:a.valueMax,g),x=F.min>=0?0:Math.abs(F.min),L=0,y=F.max+x,S=u.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*x/y,r=this.drawingArea.bottom-C-f*L/S,o=l.series.map((I,_)=>{const c=this.mutableConfig.useIndividualScale?(l.absoluteValues[_]+Math.abs(x))/y:this.ratioToMax(I);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-f*c),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""}}),s=l.absoluteValues.map(I=>u.min>=0?(I-Math.abs(u.min))/(u.max-Math.abs(u.min)):(I+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=l.series.map((I,_)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*_),y:this.checkNaN(this.drawingArea.bottom-C-(f*s[_]||0)),value:l.absoluteValues[_],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[_]||""})),w=F.ticks.map(I=>({y:I>=0?b-f*(I/y):b+f*Math.abs(I)/y,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),A=u.ticks.map(I=>{const _=(I-u.min)/(u.max-u.min);return{y:I>=0?r-f*_:r+f*_,value:I,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:A,individualHeight:f,scaleYLabels:l.autoScaling?A:w,individualScale:l.autoScaling?u:F,individualMax:l.autoScaling?S:y,zeroPosition:l.autoScaling?r:b,plots:l.autoScaling?h:o}})},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,m)=>{const a=[n];this.relativeDataset.forEach(e=>{a.push(this.canShowValue(e.absoluteValues[m])?Number(e.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),i.push(a)}),{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(k=>k.absoluteValues[e]??0).reduce((k,F)=>k+F,0);n.push([this.timeLabels[e]??"-"].concat(this.relativeDataset.map(k=>this.applyDataLabel(k.type==="line"?this.FINAL_CONFIG.line.labels.formatter:k.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,k.absoluteValues[e]??0,this.dataLabel({p:k.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:k.absoluteValues[e]??0,s:k.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(g??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const m={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},a=[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:m,colNames:a}},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(a=>a.value).filter(a=>this.isSafeValue(a)&&a!==null).reduce((a,e)=>Math.abs(a)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({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(a=>{if(this.isSafeValue(a.value)){let e="",g="";switch(this.icons[a.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="${a.color}" /></svg>`;break;case"line":!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.shape)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" />`:a.shape==="triangle"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="square"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="diamond"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="pentagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="hexagon"?g=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:a.shape==="star"&&(g=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.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="${a.color}" />${g}</svg>`;break;case"plot":if(!a.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(a.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="${a.color}" /></svg>`;break}if(a.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="${a.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(a.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="${a.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> ${a.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(a.type==="line"?this.FINAL_CONFIG.line.labels.formatter:a.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,a.value,this.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:a}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(a.value)/i*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&a.comments.length&&a.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.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:G.useMouse,useNestedProp:p.useNestedProp,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?{...p.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
2
|
-----> The serie '${l.name}' contains the value '${i}' at index ${n}.
|
|
3
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:m}=i.getBoundingClientRect();let a=null,e=0;this.FINAL_CONFIG.chart.title.show&&(a=this.$refs.chartTitle,e=a.getBoundingClientRect().height);let g=null,k=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(g=this.$refs.chartSlicer.$el,k=g.getBoundingClientRect().height);let F=null,u=0;this.FINAL_CONFIG.chart.legend.show&&(F=this.$refs.chartLegend,u=F.getBoundingClientRect().height),this.height=n-e-u-k,this.width=m,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(L=>{for(const y of L)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(k=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(u=this.$refs.chartLegend.getBoundingClientRect().height),this.height=y.contentBoxSize[0].blockSize-e-u-k-24,this.width=y.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},m=[];return l.forEach(a=>{m.push(`${a.x},${a.y} `)}),[i.x,i.y,...m,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},m={x:l.at(-1)?l.at(-1).x:Math.min(...l.filter(e=>!!e).map(e=>e.x)),y:i},a=[];return l.filter(e=>!!e).forEach(e=>{a.push(`${e.x},${e.y} `)}),[n.x,n.y,...a,m.x,m.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(l,i){let n=Array(l).fill(0);for(let m=0;m<i.length&&m<l;m+=1)n[m]=i[m];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],m=Math.abs(l-i[0]);for(let a=1;a<i.length;a+=1){const e=Math.abs(l-i[a]);e<m&&i[a]<l&&(n=i[a],m=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,m=l.concat([i]).concat(n),a=this.createCsvContent(m);this.downloadCsv({csvContent:a,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)}}},X=["id"],U=["viewBox"],Z={key:0},J={class:"vue-ui-xy-grid"},K=["stroke","x1","x2","y1","y2"],Q=["stroke","x1","x2","y1","y2"],j={key:1},$=["x1","x2","y1","y2","stroke"],ee=["x1","x2","y1","y2","stroke"],te=["x1","x2","y1","y2","stroke"],le={key:3},re=["x1","x2","y1","y2","stroke"],ae=["id"],ie=["stop-color"],se=["stop-color"],oe=["stop-color"],ne=["id"],ce=["stop-color"],he=["stop-color"],de=["stop-color"],ue=["id"],me=["stop-color"],ge=["stop-color"],Ne=["id"],fe=["stop-color"],ke=["stop-color"],Ie=["id"],xe=["stop-color"],be=["stop-color"],Fe=["x","y","height","width","fill"],ye=["x","y","width"],_e=["x","y","height","width","fill"],Ce=["x","y","height","width","rx","fill","stroke","stroke-width"],Se=["width","x","y"],Le={key:0},Ae=["id"],we=["fill"],Oe=["x1","x2","y1","y2","stroke","marker-end"],ve=["x","y","font-size","fill"],Ge=["stroke","x1","x2","y1","y2"],pe={key:2},Be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ee=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],ze={key:4},Ve=["x1","x2","y1","y2","stroke","stroke-width"],Pe=["fill","font-size","transform"],Me=["x1","x2","y1","y2","stroke"],Te=["x","y","font-size","fill"],De=["x1","x2","y1","y2","stroke"],Re=["x","y","font-size","fill"],He=["width","x","y"],We={style:{width:"100%"}},qe={key:0},Ye=["id"],Xe=["fill"],Ue=["x1","x2","y1","y2","stroke","marker-end"],Ze=["x","y","font-size","fill"],Je=["d","stroke","stroke-width","stroke-dasharray"],Ke={key:1},Qe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],je={key:0},$e=["d","fill"],et=["d","fill"],tt=["d","stroke","stroke-width","stroke-dasharray"],lt={key:2},rt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],at=["width","x","y"],it={style:{width:"100%"}},st={key:3},ot=["id"],nt=["fill"],ct=["x1","x2","y1","y2","stroke","marker-end"],ht=["x","y","font-size","fill"],dt={key:5},ut=["x","y","font-size","fill"],mt=["x","y","font-size","fill","font-weight"],gt={key:6},Nt=["x","y","font-size","fill"],ft=["x","y"],kt=["x","y"],It={key:7},xt=["x","y","font-size","fill"],bt=["x","y"],Ft=["x","y"],yt=["x","y","font-size","fill","innerHTML"],_t=["x","y","font-size","fill","innerHTML"],Ct=["x","y","font-size","fill","innerHTML"],St=["x","y","font-size","fill","innerHTML"],Lt=["x","y","width","height","fill","onMouseenter"],At=["font-size","fill","transform"],wt=["x","y","font-size","fill"],Ot={key:9},vt=["text-anchor","font-size","fill","transform"],Gt=["x","y","height","width","onMouseenter","onClick"],pt={key:10},Bt=["x","y"],Et=["cx","cy","r","fill"],zt={key:3,class:"vue-data-ui-watermark"},Vt=["onClick"],Pt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Mt=["fill"],Tt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Dt=["fill"],Rt={key:7,ref:"chartLegend"},Ht={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},Wt=["innerHTML"];function qt(l,i,n,m,a,e){const g=t.resolveComponent("Title"),k=t.resolveComponent("UserOptions"),F=t.resolveComponent("PackageVersion"),u=t.resolveComponent("Shape"),x=t.resolveComponent("Skeleton"),L=t.resolveComponent("Slicer"),y=t.resolveComponent("Tooltip"),S=t.resolveComponent("BaseIcon"),C=t.resolveComponent("TableSparkline"),f=t.resolveComponent("DataTable"),b=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${a.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${a.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.title.show?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(g,{key:`title_${a.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(k,{ref:"defails",key:`user_options_${a.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:a.isPrinting,isImaging:a.isImaging,uid:a.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:a.mutableConfig.isStacked,isFullscreen:a.isFullscreen,chartElement:l.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:a.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip},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:r,isFullscreen:o})=>[t.renderSlot(l.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":a.isFullscreen,"vue-data-ui-fulscreen--off":!a.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:a.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[t.createVNode(F),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",Z,[t.createElementVNode("g",J,[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,K)):t.createCommentVNode("",!0),a.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",null,[r.id===a.selectedScale&&r.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.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:r.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,ee))),256)):r.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(r.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,te))),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,Q)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,r=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.checkNaN(r.y),y2:e.checkNaN(r.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,$))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",le,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(r,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,re))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${o}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${o}_${a.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":r.color},null,8,ie),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(r.color,.02)}`},null,8,se),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,oe)],8,ae),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${o}_${a.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,ce),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(r.color,.02)}`},null,8,he),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,de)],8,ne)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${o}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${o}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,me),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ge)],8,ue)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${o}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${o}_${a.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(r.color,.05)}`},null,8,fe),t.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ke)],8,Ne),t.createElementVNode("linearGradient",{id:`areaGradient_${o}_${a.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(r.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,xe),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,be)],8,Ie)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,r=>(t.openBlock(),t.createElementBlock("g",null,[r.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.span,(o,s)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:r.from+s>=a.slicer.start&&r.from+s<=a.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.from+s-a.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(r.color,r.opacity)},null,12,Fe),r.caption.text&&s===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(r.from+s-a.slicer.start)-(r.caption.width==="auto"?0:r.caption.width/2-e.drawingArea.width/e.maxSeries*r.span/2),y:e.drawingArea.top+r.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:r.to>=a.slicer.start&&r.from<a.slicer.end?1:0}),height:"1",width:r.caption.width==="auto"?e.drawingArea.width/e.maxSeries*r.span:r.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${r.caption.padding}px;text-align:${r.caption.textAlign};font-size:${r.caption.fontSize}px;color:${r.caption.color};font-weight:${r.caption.bold?"bold":"normal"}`)},t.toDisplayString(r.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,(r,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:[a.selectedMinimapIndex,a.selectedSerieIndex,a.selectedRowIndex].includes(o)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,_e)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${o}`,class:t.normalizeClass(`serie_bar_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.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:a.mutableConfig.useIndividualScale?e.calcIndividualRectY(s):e.calcRectY(s),height:a.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(s)):Math.abs(e.calcRectHeight(s)),width:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?s.value>=0?`url(#rectGradient_pos_${o}_${a.uniqueId})`:`url(#rectGradient_neg_${o}_${a.uniqueId})`:r.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?r.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Ce)):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()-(a.mutableConfig.useIndividualScale&&a.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(a.mutableConfig.useIndividualScale&&a.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:r.color}},void 0,!0)],8,Se)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.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:r.color},null,8,we)],8,Ae)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${o})`},null,8,Oe)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,ve)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!a.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(a.selectedSerieIndex)||a.selectedMinimapIndex!==null)?(t.openBlock(),t.createElementBlock("g",pe,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.selectedSerieIndex||a.selectedMinimapIndex)+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.selectedSerieIndex||a.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,Be)])):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,Ee)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",ze,[a.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:r.x+e.xPadding,x2:r.x+e.xPadding,y1:a.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-r.yOffset-r.individualHeight):e.checkNaN(e.drawingArea.top),y2:a.mutableConfig.isStacked?e.checkNaN(e.drawingArea.bottom-r.yOffset):e.checkNaN(e.drawingArea.bottom),stroke:r.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,Ve)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:r.color,"font-size":a.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${r.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset-r.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(r.name)+" "+t.toDisplayString(r.scaleLabel?`- ${r.scaleLabel}`:""),9,Pe),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("line",{x1:r.x-3+e.xPadding,x2:r.x+e.xPadding,y1:e.checkNaN(o.y),y2:e.checkNaN(o.y),stroke:r.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Me))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.yLabels,(o,s)=>(t.openBlock(),t.createElementBlock("text",{x:r.x-5+e.xPadding,y:e.checkNaN(o.y)+a.fontSizes.dataLabels/3,"font-size":a.fontSizes.dataLabels,"text-anchor":"end",fill:r.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,Te))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${o}`},[e.canShowValue(r)&&r.value>=e.niceScale.min&&r.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(r.y),y2:e.checkNaN(r.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,De)):t.createCommentVNode("",!0),r.value>=e.niceScale.min&&r.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(r.y+a.fontSizes.dataLabels/3),"font-size":a.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(r.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,r.value,e.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:1})):""),9,Re)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${o}`,class:t.normalizeClass(`serie_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${o}_${a.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?r.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:a.selectedSerieIndex!==null&&a.selectedSerieIndex===h||a.selectedMinimapIndex!==null&&a.selectedMinimapIndex===h?(a.plotRadii.plot||6)*1.5:a.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:r.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",We,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,He)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.plots).trend)?(t.openBlock(),t.createElementBlock("g",qe,[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:r.color},null,8,Xe)],8,Ye)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${o})`},null,8,Ue)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Ze)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.smooth&&r.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${r.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,Je)):r.plots.length>1?(t.openBlock(),t.createElementBlock("g",Ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(r.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Qe)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.useArea&&r.plots.length>1?(t.openBlock(),t.createElementBlock("g",je,[r.smooth?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M ${r.plots[0]?r.plots[0].x:Math.min(...r.plots.filter(s=>!!s).map(s=>s.x))},${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset:e.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1)?r.plots.at(-1).x:e.drawingArea.left+e.slot.line*o+e.slot.line/2},${a.mutableConfig.isStacked?e.drawingArea.bottom-r.yOffset:e.drawingArea.bottom} Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${a.uniqueId})`:e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)},null,8,$e)):(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${r.area}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${a.uniqueId})`:e.setOpacity(r.color,e.FINAL_CONFIG.line.area.opacity)},null,8,et))])):t.createCommentVNode("",!0),r.smooth&&r.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${r.curve}`,stroke:r.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,tt)):r.plots.length>1?(t.openBlock(),t.createElementBlock("g",lt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`line_${o}_${h}`},[s&&h<r.plots.length-1&&r.plots[h+1]&&e.canShowValue(s.value)&&e.canShowValue(r.plots[h+1].value)?(t.openBlock(),t.createElementBlock("line",{key:0,x1:s.x,x2:r.plots[h+1].x,y1:s.y,y2:r.plots[h+1].y,stroke:r.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,rt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_line_${o}_${h}`},[s&&e.canShowValue(s.value)?(t.openBlock(),t.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${o}_${a.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?r.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(s.x),y:e.checkNaN(s.y)},radius:a.selectedSerieIndex!==null&&a.selectedSerieIndex===h||a.selectedMinimapIndex!==null&&a.selectedMinimapIndex===h?(a.plotRadii.line||6)*1.5:a.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:r.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",it,[t.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:r.color}},void 0,!0)])],8,at)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(e.calcLinearProgression(r.plots).trend)?(t.openBlock(),t.createElementBlock("g",st,[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:r.color},null,8,nt)],8,ot)]),r.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(r.plots).x1,x2:e.calcLinearProgression(r.plots).x2,y1:e.calcLinearProgression(r.plots).y1,y2:e.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${o})`},null,8,ct)):t.createCommentVNode("",!0),r.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(r.plots).x2,y:e.calcLinearProgression(r.plots).y2-6,"font-size":a.fontSizes.plotLabels,fill:r.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,ht)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}`,class:t.normalizeClass(`xLabel_bar_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_bar_${o}_${h}`},[s&&(!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:a.mutableConfig.useIndividualScale&&a.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":a.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:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:s,serie:r}):""),9,ut)):t.createCommentVNode("",!0),s&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:a.mutableConfig.useIndividualScale&&a.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":a.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?r.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:r.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):r.name),9,mt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",gt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.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":a.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:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:s,serie:r}):""),9,Nt)):t.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.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(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,ft)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(a.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(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,kt)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.line.labels.show&&a.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",It,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&!Object.hasOwn(r,"dataLabels")||r.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":a.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:r.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:r.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:s,serie:r}):""),9,xt)):t.createCommentVNode("",!0),s&&h===0&&r.useTag&&r.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(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,bt)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,x:s.x-r.name.length*(a.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(r.color,80)};color:${e.adaptColorToBackground(r.color)};width:fit-content;font-size:${a.fontSizes.plotLabels}px;border-radius: 2px;`)},t.toDisplayString(r.name),5)],8,Ft)):t.createCommentVNode("",!0)]))),128))],6))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}`,class:t.normalizeClass(`xLabel_line_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_line_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x-a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,yt)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x+a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,_t)):t.createCommentVNode("",!0)]))),128))],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}`,class:t.normalizeClass(`xLabel_plot_${o}`),style:t.normalizeStyle(`opacity:${a.selectedScale?a.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.plots,(s,h)=>(t.openBlock(),t.createElementBlock("g",{key:`xLabel_plot_${o}_${h}`},[s&&h===0&&r.showSerieName&&r.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:s.x-a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x-a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,Ct)):t.createCommentVNode("",!0),s&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:s.x+a.fontSizes.plotLabels,y:s.y,"font-size":a.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:e.createTSpans({content:r.name,fontSize:a.fontSizes.plotLabels,fill:r.color,x:s.x+a.fontSizes.plotLabels,y:s.y,maxWords:2})},null,8,St)):t.createCommentVNode("",!0)]))),128))],6))),128)),a.mutableConfig.useIndividualScale&&!a.mutableConfig.isStacked?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:8},t.renderList(e.allScales,r=>(t.openBlock(),t.createElementBlock("rect",{x:r.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:a.selectedScale===r.id?e.setOpacity(r.color,20):"transparent",onMouseenter:o=>a.selectedScale=r.id,onMouseleave:i[0]||(i[0]=o=>a.selectedScale=null)},null,40,Lt))),256)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!a.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":a.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${a.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,At)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:a.width/2,y:e.drawingArea.bottom+a.fontSizes.yAxis+a.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":a.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,wt)):t.createCommentVNode("",!0)]),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",Ot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.timeLabels,(r,o)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${o}`},[r&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&a.selectedSerieIndex===o&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&!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":a.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+a.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`},t.toDisplayString(r||""),9,vt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(r,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(a.selectedSerieIndex)?(t.openBlock(),t.createElementBlock("g",pt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*a.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[a.selectedSerieIndex]||a.selectedSerieIndex),5)],8,Bt)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*a.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,Et)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"svg",{svg:e.svg},void 0,!0)],14,U)):t.createCommentVNode("",!0),l.$slots.watermark?(t.openBlock(),t.createElementBlock("div",zt,[t.renderSlot(l.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:a.isPrinting||a.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(x,{key:4,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&&a.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(L,{ref:"chartSlicer",key:`slicer_${a.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[a.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a.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:a.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,max:a.maxX,min:0,valueStart:a.slicer.start,valueEnd:a.slicer.end,start:a.slicer.start,"onUpdate:start":i[2]||(i[2]=r=>a.slicer.start=r),end:a.slicer.end,"onUpdate:end":i[3]||(i[3]=r=>a.slicer.end=r),onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:r})=>[t.renderSlot(l.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:r})),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:6,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,(r,o)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${o}`,onClick:s=>e.segregate(r),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":a.segregatedSeries.includes(r.id)})},[a.icons[r.type]==="line"?(t.openBlock(),t.createElementBlock("svg",Pt,[t.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:r.color},null,8,Mt),t.createVNode(u,{plot:{x:10,y:9},radius:4,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(t.openBlock(),t.createElementBlock("svg",Tt,[a.icons[r.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:r.color},null,8,Dt)):(t.openBlock(),t.createBlock(u,{key:1,plot:{x:6,y:6},radius:5,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle"},null,8,["color","shape"]))])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(r.name),5)],10,Vt))),128))],4)):(t.openBlock(),t.createElementBlock("div",Rt,[t.renderSlot(l.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),t.createVNode(y,{show:a.mutableConfig.showTooltip&&a.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(b,{key:8,hideDetails:"",config:{open:a.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(`${a.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",Ht,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":i[4]||(i[4]=r=>a.showSparklineTable=r)},null,512),[[t.vModelCheckbox,a.showSparklineTable]]),t.createElementVNode("div",{onClick:i[5]||(i[5]=r=>a.showSparklineTable=!a.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(S,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),a.showSparklineTable?(t.openBlock(),t.createBlock(C,{key:`sparkline_${a.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(f,{key:`table_${a.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]=r=>a.mutableConfig.showTable=!1)},{th:t.withCtx(({th:r})=>[t.createElementVNode("div",{innerHTML:r},null,8,Wt)]),td:t.withCtx(({td:r})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(r))?r:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:r,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,X)}const Yt=W._export_sfc(Y,[["render",qt],["__scopeId","data-v-0b37e892"]]);exports.default=Yt;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as J, a as K, t as Q, z as j, p as $, U as q, O as T, f as U, K as ee, F as te, i as ae, _ as ie, Y as re, $ as le, v as se, a0 as ne, d as ce, B as oe, b as he, q as de, R as ue, a1 as ge, r as fe, e as Ne, y as me, M as Ie, x as xe, a2 as be, o as Fe, s as _e, w as ye, E as Ae, A as Le, u as Ce } from "./index-
|
|
2
|
-
import { D as Se } from "./DataTable-
|
|
3
|
-
import { _ as ke } from "./Title-
|
|
4
|
-
import { _ as we, u as Oe } from "./Tooltip-
|
|
5
|
-
import { U as Ge } from "./usePrinter-
|
|
6
|
-
import { _ as ve } from "./Shape-
|
|
7
|
-
import pe from "./BaseIcon-
|
|
8
|
-
import ze from "./vue-ui-table-sparkline-
|
|
9
|
-
import Me from "./vue-ui-skeleton-
|
|
10
|
-
import { S as Pe } from "./Slicer-
|
|
11
|
-
import Te from "./vue-ui-accordion-
|
|
12
|
-
import { u as Z } from "./useNestedProp-
|
|
13
|
-
import { _ as Ve } from "./PackageVersion-
|
|
1
|
+
import { c as J, a as K, t as Q, z as j, p as $, U as q, O as T, f as U, K as ee, F as te, i as ae, _ as ie, Y as re, $ as le, v as se, a0 as ne, d as ce, B as oe, b as he, q as de, R as ue, a1 as ge, r as fe, e as Ne, y as me, M as Ie, x as xe, a2 as be, o as Fe, s as _e, w as ye, E as Ae, A as Le, u as Ce } from "./index-BcpaEQjg.js";
|
|
2
|
+
import { D as Se } from "./DataTable-TdEc8llA.js";
|
|
3
|
+
import { _ as ke } from "./Title-BMSO566P.js";
|
|
4
|
+
import { _ as we, u as Oe } from "./Tooltip-CHABi2zh.js";
|
|
5
|
+
import { U as Ge } from "./usePrinter-DzCuoQHM.js";
|
|
6
|
+
import { _ as ve } from "./Shape-DpWOBZlx.js";
|
|
7
|
+
import pe from "./BaseIcon-DFIHCTyJ.js";
|
|
8
|
+
import ze from "./vue-ui-table-sparkline-BvnGInz9.js";
|
|
9
|
+
import Me from "./vue-ui-skeleton-C53xk8CG.js";
|
|
10
|
+
import { S as Pe } from "./Slicer-BQr2RZjz.js";
|
|
11
|
+
import Te from "./vue-ui-accordion-Dhi5XiYk.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-CEsVEbKF.js";
|
|
13
|
+
import { _ as Ve } from "./PackageVersion-C5LvF-TN.js";
|
|
14
14
|
import { resolveComponent as V, openBlock as r, createElementBlock as l, normalizeClass as P, normalizeStyle as A, createBlock as R, createCommentVNode as h, createSlots as Re, withCtx as z, renderSlot as G, normalizeProps as B, guardReactiveProps as Y, createVNode as X, createElementVNode as u, Fragment as m, renderList as I, toDisplayString as S, withDirectives as De, vModelCheckbox as We, createTextVNode as He } from "vue";
|
|
15
15
|
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Be = J(), Ye = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("./index-Bv8wGGBc.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),Ze=require("./Tooltip-Bl8Ilf5h.cjs"),Ge=require("./Legend-CsYNhmuM.cjs"),je=require("./Title-DWSN4YUC.cjs"),Je=require("./Slicer-D-wCwIJ3.cjs"),ze=require("./usePrinter-7jNVagoH.cjs"),Ke=require("./vue-ui-accordion-CSkH8Ztm.cjs"),Qe=require("./DataTable-YpBvWSn5.cjs"),et=require("./vue-ui-skeleton-TRdDtmHK.cjs"),$e=require("./useNestedProp-Bf7w6kTt.cjs"),tt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),at=["id"],lt=["onClick"],ot={key:2,class:"vue-data-ui-watermark"},rt=["innerHTML"],ut={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(J,{expose:Te,emit:Me}){const P=J,{vue_ui_xy_canvas:Pe}=n.useConfig(),U=a.ref(n.createUid()),D=a.ref(null),C=a.ref(null),N=a.ref(null),i=a.ref(null),g=a.ref(1),z=a.ref(1),_=a.ref(!1),f=a.ref(null),H=a.ref(""),K=a.ref(null),k=a.ref([]),O=a.ref(1),R=a.ref(!0),w=a.ref(!0),X=a.ref(null),Q=a.ref(0),ee=a.ref(0),A=a.ref(!1),te=a.ref(null),ae=a.ref(null),le=a.ref(null),oe=a.ref(0),re=a.ref(0),ue=a.ref(0),Z=a.computed(()=>!!P.dataset&&P.dataset.length),t=a.computed({get:()=>ne(),set:e=>e});function ne(){const e=$e.useNestedProp({userConfig:P.config,defaultConfig:Pe});return e.theme?{...$e.useNestedProp({userConfig:n.themes.vue_ui_xy_canvas[e.theme]||P.config,defaultConfig:e}),customPalette:n.themePalettes[e.theme]||n.palette}:e}a.watch(()=>P.config,e=>{t.value=ne(),pe(),oe.value+=1,re.value+=1,ue.value+=1},{deep:!0});const se=a.ref(t.value.style.chart.aspectRatio),{isPrinting:ie,isImaging:ve,generatePdf:ce,generateImage:de}=ze.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=a.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Re(e){A.value=e,ee.value+=1}const he=a.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=a.computed(()=>I.value?Math.max(...I.value.filter((e,o)=>!k.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),l=a.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:z.value,left:g.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function fe(e,o){return e/o}function Oe({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:p,individualHeight:v,stackIndex:m=null}){return o.map((L,j)=>{const S=h.min<0?Math.abs(h.min):0,T=fe(L+S,S+h.max);let M,E;e&&(M=Math.abs(h.min),E=fe(L+M,h.max+M));let B=0;return m===null?B=l.value.bottom-l.value.height*(e?E:T):B=l.value.bottom-p-v*(e?E:T),{x:l.value.left+l.value.slot*j+l.value.slot/2,y:B,value:L}})}const b=a.computed(()=>{const e=Math.min(...I.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),o=Math.max(...I.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),r=n.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=l.value.bottom-l.value.height*(d/(r.max+d)),p=r.ticks.map(v=>({y:l.value.bottom-l.value.height*((v+d)/(r.max+d)),x:l.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:p,zero:h}}),Ie=a.computed(()=>y.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as v, computed as b, watch as Y, onMounted as pa, onBeforeUnmount as ba, openBlock as S, createElementBlock as se, normalizeStyle as Z, normalizeClass as ma, createBlock as E, createCommentVNode as G, unref as N, createSlots as xa, withCtx as m, renderSlot as k, normalizeProps as V, guardReactiveProps as j, createElementVNode as q, createVNode as La, toDisplayString as Ue, createTextVNode as ka } from "vue";
|
|
2
|
-
import { u as Ca, c as wa, t as Sa, a as $a, p as D, b as za, C as fe, i as J, f as K, I as Ta, d as Ze, _ as Ma, o as Ra, e as Ia, x as Ge, y as Oa, q as Pa, r as Fa, s as Q, l as _a } from "./index-
|
|
2
|
+
import { u as Ca, c as wa, t as Sa, a as $a, p as D, b as za, C as fe, i as J, f as K, I as Ta, d as Ze, _ as Ma, o as Ra, e as Ia, x as Ge, y as Oa, q as Pa, r as Fa, s as Q, l as _a } from "./index-BcpaEQjg.js";
|
|
3
3
|
import { d as Ea, c as Na, a as Ve, t as Da, l as C, r as ye, b as P, p as je, u as Ha } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Wa } from "./Tooltip-
|
|
5
|
-
import { L as Ya } from "./Legend-
|
|
6
|
-
import { _ as Ba } from "./Title-
|
|
7
|
-
import { S as Xa } from "./Slicer-
|
|
8
|
-
import { u as Aa, U as Ua } from "./usePrinter-
|
|
9
|
-
import Za from "./vue-ui-accordion-
|
|
10
|
-
import { D as Ga } from "./DataTable-
|
|
11
|
-
import Va from "./vue-ui-skeleton-
|
|
12
|
-
import { u as qe } from "./useNestedProp-
|
|
4
|
+
import { _ as Wa } from "./Tooltip-CHABi2zh.js";
|
|
5
|
+
import { L as Ya } from "./Legend-BsB-CXKk.js";
|
|
6
|
+
import { _ as Ba } from "./Title-BMSO566P.js";
|
|
7
|
+
import { S as Xa } from "./Slicer-BQr2RZjz.js";
|
|
8
|
+
import { u as Aa, U as Ua } from "./usePrinter-DzCuoQHM.js";
|
|
9
|
+
import Za from "./vue-ui-accordion-Dhi5XiYk.js";
|
|
10
|
+
import { D as Ga } from "./DataTable-TdEc8llA.js";
|
|
11
|
+
import Va from "./vue-ui-skeleton-C53xk8CG.js";
|
|
12
|
+
import { u as qe } from "./useNestedProp-CEsVEbKF.js";
|
|
13
13
|
import { _ as ja } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const qa = ["id"], Ja = ["onClick"], Ka = {
|
|
15
15
|
key: 2,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BwtKB_oG.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),_e=require("./Title-DcXqsD3c.cjs"),fe=require("./usePrinter-BMJj8aqh.cjs"),Se=require("./DataTable-CUi5w5e6.cjs"),Pe=require("./Tooltip-onlvaIFL.cjs"),$e=require("./Legend-DP-Tm5Kr.cjs"),Ne=require("./vue-ui-skeleton-snFRuZgs.cjs"),Ee=require("./vue-ui-accordion-CM2NnUan.cjs"),ye=require("./useNestedProp-CE6ustAp.cjs"),Le=require("./PackageVersion-DdGAD2ox.cjs"),Fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=$=>(e.pushScopeId("data-v-a418a215"),$=$(),e.popScopeId(),$),ze=["id"],Oe=["xmlns","viewBox"],Te={key:0},Xe=["id"],De=["stop-color"],Me=["offset","stop-color"],Ye=["offset","stop-color"],Ie=["stop-color"],Ae={key:1},qe=["id","cx","cy"],Ge=["stop-color","stop-opacity"],Re=["stop-color"],je=["id"],He=["id"],Ue=Ve(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),We=["id"],Je=["flood-color"],Ke=["d","stroke","filter"],Qe=["x1","y1","x2","y2","stroke","filter"],Ze=["cx","cy","r","fill","filter"],et=["stroke","d"],tt=["d","fill","stroke","stroke-width","filter"],lt={key:0},at=["stroke","d"],ot=["d","fill","stroke","stroke-width","filter"],nt={key:1},rt=["cx","cy","r","fill","stroke","stroke-width"],ut=["cx","cy","r","stroke"],st=["cx","cy","r","fill"],it={key:0},ct=["d","fill","onMouseenter","onClick"],dt={key:1},vt=["cx","cy","r","fill"],ht=["x","y","fill","font-size"],ft=["x","y","fill","font-size"],yt=["x","y","fill","font-size"],mt=["x","y","fill","font-size"],pt=["filter"],gt={key:0},bt=["x","y"],kt={key:1},wt=["cx","cy","fill","filter","onClick"],Ct=["cx","cy","fill","filter","onClick"],xt=["text-anchor","x","y","fill","font-size","onClick"],Bt=["text-anchor","x","y","fill","font-size","onClick"],_t=["text-anchor","x","y","fill","font-size","onClick"],St=["text-anchor","x","y","fill","font-size","onClick"],Pt={key:2},$t=["x","y","width"],Nt=["x","y","width"],Et={key:3,class:"vue-data-ui-watermark"},Lt=["onClick"],Ft={key:0,style:{"font-variant-numeric":"tabular-nums"}},Vt={key:1},zt=["innerHTML"],Ot={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup($,{expose:me,emit:A}){const k=$,{vue_ui_donut:pe}=o.useConfig(),N=e.computed({get(){return!!k.dataset&&k.dataset.length},set(a){return a}}),E=e.ref(null),q=e.ref(null),G=e.ref(null),O=e.ref(null),R=e.ref(0),j=e.ref(0),H=e.ref(0);e.onMounted(()=>{U()}),e.onBeforeUnmount(()=>{O.value&&O.value.disconnect()});function U(){if(o.objectIsEmpty(k.dataset)?o.error({componentName:"VueUiDonut",type:"dataset"}):k.dataset.forEach((a,u)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{N.value=!1,o.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:l,index:u})})}),t.value.responsive){const a=he.throttle(()=>{const{width:u,height:l}=he.useResponsive({chart:E.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?G.value:null});r.value.width=u,r.value.height=l});O.value=new ResizeObserver(a),O.value.observe(E.value.parentNode)}}const f=e.ref(o.createUid()),ge=e.ref(null),T=e.ref(!1),D=e.ref(""),p=e.ref(null),W=e.ref(0);function J(){const a=ye.useNestedProp({userConfig:k.config,defaultConfig:pe});return a.theme?{...ye.useNestedProp({userConfig:o.themes.vue_ui_donut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}const t=e.computed({get:()=>J(),set:a=>a});e.watch(()=>k.config,a=>{t.value=J(),U(),R.value+=1,j.value+=1,H.value+=1},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:Z,generateImage:ee}=fe.usePrinter({elementId:`donut__${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),te=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),r=e.ref({height:360,width:512}),L=e.computed(()=>{const a=t.value.style.chart.layout.donut.strokeWidth/512,u=r.value.width*a,l=u>y.value?y.value:u;return l<24?24:l}),_=e.computed(()=>k.dataset.map((a,u)=>({name:a.name,color:o.convertColorToHex(a.color)||te.value[u]||o.palette[u]||o.palette[u%o.palette.length],value:a.values.reduce((l,n)=>l+n,0),absoluteValues:a.values,comment:a.comment||""}))),g=e.ref(_.value);e.watch(()=>_.value,a=>g.value=a);function be(){return _.value.map(a=>({name:a.name,color:a.color,value:a.value}))}const w=e.ref([]),le=e.ref(null),ae=e.ref(null),S=e.ref(!1);function oe(a){const u=_.value.find((s,h)=>h===a);let n=g.value.find((s,h)=>h===a).value;if(w.value.includes(a)){let h=function(){n>s?(cancelAnimationFrame(le.value),g.value=g.value.map((d,I)=>a===I?{...d,value:s}:d),S.value=!1):(S.value=!0,n+=s*.025,g.value=g.value.map((d,I)=>a===I?{...d,value:n}:d),le.value=requestAnimationFrame(h))};w.value=w.value.filter(d=>d!==a);const s=u.value;h()}else if(w.value.length<_.value.length-1){let s=function(){n<.1?(cancelAnimationFrame(ae.value),w.value.push(a),g.value=g.value.map((h,d)=>a===d?{...h,value:0}:h),S.value=!1):(S.value=!0,n/=1.1,g.value=g.value.map((h,d)=>a===d?{...h,value:n}:h),ae.value=requestAnimationFrame(s))};s()}A("selectLegend",C.value.map(s=>({name:s.name,color:s.color,value:s.value})))}const C=e.computed(()=>(g.value.forEach((a,u)=>{if([null,void 0].includes(a.values))return{...a,values:[]}}),g.value.map((a,u)=>({...a,seriesIndex:u})).filter((a,u)=>!w.value.includes(u)))),ne=e.computed(()=>k.dataset.map((a,u)=>({name:a.name,color:o.convertColorToHex(a.color)||te.value[u]||o.palette[u]||o.palette[u%o.palette.length],value:(a.values||[]).reduce((l,n)=>l+n,0),shape:"circle"})).map((a,u)=>({...a,proportion:a.value/k.dataset.map(l=>(l.values||[]).reduce((n,s)=>n+s,0)).reduce((l,n)=>l+n,0),opacity:w.value.includes(u)?.5:1,segregate:()=>oe(u),isSegregated:w.value.includes(u)}))),ke=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),y=e.computed(()=>{const a=Math.min(r.value.width/3,r.value.height/3);return a<55?55:a}),v=e.computed(()=>o.makeDonut({series:C.value},r.value.width/2,r.value.height/2,y.value,y.value,1.99999,2,1,360,105.25,L.value)),i=e.computed(()=>{const a=Math.max(...C.value.map(l=>l.value)),u=C.value.map(l=>l.value/a);return o.createPolarAreas({series:u,center:{x:r.value.width/2,y:r.value.height/2},maxRadius:Math.min(r.value.width,r.value.height)/3})});function P(a){return a.x>r.value.width/2+6?"start":a.x<r.value.width/2-6?"end":"middle"}function we(a){return a.middlePoint.y>r.value.height/2?o.offsetFromCenterPoint({initX:a.middlePoint.x,initY:a.middlePoint.y,offset:100,centerX:r.value.width/2,centerY:r.value.height/2}).y:o.offsetFromCenterPoint({initX:a.middlePoint.x,initY:a.middlePoint.y,offset:0,centerX:r.value.width/2,centerY:r.value.height/2}).y-100}function b(a){return a.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function M(a,u){const l=a.value/Ce(u);return isNaN(l)?0:o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,l*100,o.dataLabel({v:l*100,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding}),{datapoint:a})}function Ce(a){return[...a].map(u=>u.value).reduce((u,l)=>u+l,0)}const m=e.computed(()=>C.value.map(a=>a.value).reduce((a,u)=>a+u,0)),re=e.computed(()=>m.value/C.value.length),Y=e.ref(null),F=e.ref(!1);function ue({datapoint:a,relativeIndex:u,seriesIndex:l,show:n=!1}){Y.value={datapoint:a,seriesIndex:l,config:t.value,series:_.value},T.value=n,p.value=u;let s="";const h=t.value.style.chart.tooltip.customFormat;if(F.value=!1,o.isFunction(h))try{const d=h({seriesIndex:l,datapoint:a,series:_.value,config:t.value});typeof d=="string"&&(D.value=d,F.value=!0)}catch{console.warn("Custom format cannot be applied."),F.value=!1}if(!F.value){if(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${o.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,a.value,o.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.tooltip.roundingValue}),{datapoint:a,relativeIndex:u,seriesIndex:l})}</b>`),t.value.style.chart.tooltip.showPercentage){const d=o.applyDataLabel(t.value.style.chart.layout.labels.percentage.formatter,a.proportion*100,o.dataLabel({v:a.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}),{datapoint:a,relativeIndex:u,seriesIndex:l});t.value.style.chart.tooltip.showValue?s+=`<span>(${d})</span></div>`:s+=`<b>${d}</b></div>`}t.value.style.chart.comments.showInTooltip&&a.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${a.color}">${a.comment}</div>`),D.value=`<div>${s}</div>`}}function V(a){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==a?`url(#blur_${f.value})`:""}const x=e.computed(()=>{const a=C.value.map(l=>({name:l.name,color:l.color})),u=C.value.map(l=>l.value);return{head:a,body:u}});function se(){e.nextTick(()=>{const a=x.value.head.map((n,s)=>[[n.name],[x.value.body[s]],[isNaN(x.value.body[s]/m.value)?"-":x.value.body[s]/m.value*100]]),u=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(a),l=o.createCsvContent(u);o.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const X=e.computed(()=>{const a=[' <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>',o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],u=x.value.head.map((s,h)=>{const d=o.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:x.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},d,isNaN(x.value.body[h]/m.value)?"-":(x.value.body[h]/m.value*100).toFixed(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,t.value.table.columnNames.percentage],head:a,body:u,config:l}}),z=e.ref(!1);function xe(a){z.value=a,W.value+=1}const ie=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Be(a){return a.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(u=>"-").join("")}function B(a,u){A("selectDatapoint",{datapoint:a,index:u})}function ce(){c.value.showTable=!c.value.showTable}function de(){c.value.dataLabels.show=!c.value.dataLabels.show}function ve(){c.value.showTooltip=!c.value.showTooltip}return me({getData:be,generatePdf:Z,generateCsv:se,generateImage:ee,toggleTable:ce,toggleLabels:de,toggleTooltip:ve}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:E,class:e.normalizeClass(`vue-ui-donut ${z.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:`donut__${f.value}`},[e.renderSlot(a.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:q,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&N.value?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:ge,key:`user_option_${W.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:f.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:E.value,position:t.value.userOptions.position,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:xe,onGeneratePdf:e.unref(Z),onGenerateCsv:se,onGenerateImage:e.unref(ee),onToggleTable:ce,onToggleLabels:de,onToggleTooltip:ve},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.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":z.value,"vue-data-ui-fulscreen--off":!z.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Le._sfc_main),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("defs",Te,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,De),e.createElementVNode("stop",{offset:`${(1-L.value/y.value)*100}%`,"stop-color":e.unref(o.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,Me),e.createElementVNode("stop",{offset:`${(1-L.value/y.value/2)*100}%`,"stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.gradientIntensity)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0),"stop-opacity":"0"},null,8,Ie)],8,Xe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock("defs",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`polar_gradient_${n}_${f.value}`,cx:l.middlePoint.x/r.value.width*100+"%",cy:l.middlePoint.y/r.value.height*100+"%",r:"62%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.shiftHue)(v.value[n].color,.05),"stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":v.value[n].color},null,8,Re)],8,qe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${f.value}`},null,8,He),Ue],8,je),e.createElementVNode("filter",{id:`shadow_${f.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Je)],8,We)]),t.value.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:r.value.width/2,y:r.value.height/2},16,16,!1,!1,L.value),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(n)},null,8,Ke)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,y1:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,x2:i.value[n].middlePoint.x,y2:i.value[n].middlePoint.y,stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:V(n)},null,8,Qe)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:4,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${f.value})`:""},null,8,Ze)):e.createCommentVNode("",!0),m.value&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:l.arcSlice,fill:"#FFFFFF"},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:l.arcSlice,fill:e.unref(o.setOpacity)(l.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(n)},null,8,tt))),256))],64)):e.createCommentVNode("",!0),m.value&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[v.value.length>1?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:i.value[n].path,fill:"#FFFFFF"},null,8,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:i.value[n].path,fill:t.value.style.chart.useGradient?`url(#polar_gradient_${n}_${f.value})`:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:V(n)},null,8,ot))),256))])):(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:t.value.style.chart.useGradient?`url(#polar_gradient_0_${f.value})`:v.value[0].color,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth},null,8,rt)]))],64)):(e.openBlock(),e.createElementBlock("circle",{key:7,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:"transparent",stroke:t.value.style.chart.backgroundColor},null,8,ut)),t.value.style.chart.useGradient&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("circle",{key:8,cx:r.value.width/2,cy:r.value.height/2,r:y.value<=0?10:y.value,fill:`url(#gradient_${f.value})`},null,8,st)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:9},[v.value.length>1||t.value.type==="classic"?(e.openBlock(),e.createElementBlock("g",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:t.value.type==="classic"?l.arcSlice:i.value[n].path,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:s=>ue({datapoint:l,relativeIndex:n,seriesIndex:l.seriesIndex,show:!0}),onMouseleave:u[0]||(u[0]=s=>{T.value=!1,p.value=null}),onClick:s=>B(l,n)},null,40,ct))),256))])):(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("circle",{cx:r.value.width/2,cy:r.value.height/2,r:y.value,fill:p.value===a.i?"rgba(0,0,0,0.1)":"transparent","data-cy-donut-trap":"",onMouseenter:u[1]||(u[1]=l=>ue({datapoint:v.value[0],relativeIndex:0,seriesIndex:v.value[0].seriesIndex,show:!0})),onMouseleave:u[2]||(u[2]=l=>{T.value=!1,p.value=null}),onClick:u[3]||(u[3]=l=>B(v.value[0],a.i))},null,40,vt)]))],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,ht)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.total.value.formatter,m.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix}))),13,ft)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,yt)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:r.value.width/2,y:r.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(S.value?"--":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.hollow.average.value.formatter,re.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:re.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding}))),13,mt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{filter:V(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-120:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-60:e.unref(o.calcMarkerOffsetX)(l).x,y:e.unref(o.calcMarkerOffsetY)(l)-(ie.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:l,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:ie.value,isVisible:b(l)&&c.value.dataLabels.show,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor,percentage:M(l,v.value)})),void 0,!0)])],8,bt))])):(e.openBlock(),e.createElementBlock("g",kt,[t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.calcMarkerOffsetX)(l).x,cy:e.unref(o.calcMarkerOffsetY)(l)-3.5,fill:l.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${f.value})`,onClick:s=>B(l,n)},null,8,wt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).x,cy:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:24,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:l.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${f.value})`,onClick:s=>B(l,n)},null,8,Ct)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="classic"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0,12).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(M(l,v.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,xt)):e.createCommentVNode("",!0),b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,x:e.unref(o.calcMarkerOffsetX)(l,!0,12).x,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(l.name),13,Bt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="polar"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":P(i.value[n].middlePoint),x:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y,fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(M(l,v.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}),{datapoint:l})})`:""),13,_t)):e.createCommentVNode("",!0),b(l)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":P(i.value[n].middlePoint),x:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x,y:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).y+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:s=>B(l,n)},e.toDisplayString(l.name),13,St)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&l.comment?(e.openBlock(),e.createElementBlock("g",Pt,[b(l)&&t.value.type==="classic"?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="end"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width:e.unref(o.calcMarkerOffsetX)(l,!0).anchor==="middle"?e.unref(o.calcMarkerOffsetX)(l).x-t.value.style.chart.comments.width/2:e.unref(o.calcMarkerOffsetX)(l).x),y:e.unref(o.calcMarkerOffsetY)(l)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16,!0).anchor,flexAlign:e.unref(o.calcMarkerOffsetX)(l,!0,16).anchor}},void 0,!0)])],8,$t)):e.createCommentVNode("",!0),b(l)&&t.value.type==="polar"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:t.value.style.chart.comments.offsetX+(P(i.value[n].middlePoint)==="end"?e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width:P(i.value[n].middlePoint)==="middle"?e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x-t.value.style.chart.comments.width/2:e.unref(o.offsetFromCenterPoint)({initX:i.value[n].middlePoint.x,initY:i.value[n].middlePoint.y,offset:42,centerX:r.value.width/2,centerY:r.value.height/2}).x),y:we(i.value[n])+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(a.$slots,"plot-comment",{plot:{...l,textAlign:P(i.value[n].middlePoint),flexAlign:P(i.value[n].middlePoint)}},void 0,!0)])],8,Nt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,pt))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:4,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:L.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:G},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock($e.Legend,{key:`legend_${H.value}`,legendSet:ne.value,config:ke.value,onClickMarker:u[4]||(u[4]=({i:l})=>oe(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${w.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,index:n}))+" ",1),w.value.includes(n)?(e.openBlock(),e.createElementBlock("span",Vt," ( "+e.toDisplayString(Be(l.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",Ft," ("+e.toDisplayString(isNaN(l.value/m.value)?"-":e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,S.value?l.proportion*100:l.value/m.value*100,e.unref(o.dataLabel)({v:S.value?l.proportion*100:l.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})))+") ",1))],12,Lt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ne.value},void 0,!0)],512),e.createVNode(Pe._sfc_main,{show:c.value.showTooltip&&T.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:E.value,content:D.value,isCustom:F.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),N.value?(e.openBlock(),e.createBlock(Ee.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Se.DataTable,{key:`table_${j.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:u[5]||(u[5]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,zt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:isNaN(Number(l))?l.includes("%")?l:e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.percentage.formatter,l,e.unref(o.dataLabel)({v:l,s:"%",r:t.value.style.chart.layout.labels.percentage.rounding})):e.unref(o.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,l,e.unref(o.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.value.rounding}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ze))}},Tt=Fe._export_sfc(Ot,[["__scopeId","data-v-a418a215"]]);exports.default=Tt;
|