vue-data-ui 2.11.2 → 2.11.3-beta.0

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.
Files changed (170) hide show
  1. package/dist/{Arrow-OttzfahM.js → Arrow-DCGOHM6k.js} +1 -1
  2. package/dist/{BaseIcon-CpIcYACc.js → BaseIcon-B7gTspPS.js} +1 -1
  3. package/dist/{ColorPicker-BnsG9Qeu.js → ColorPicker-BZpHLKFj.js} +3 -3
  4. package/dist/{DataTable-CJOtzfgn.js → DataTable-CfJNJ7NR.js} +2 -2
  5. package/dist/{Legend-DKQ4psNY.js → Legend-Ci-FO3V2.js} +2 -2
  6. package/dist/{PackageVersion-D-aPPO0L.js → PackageVersion-Bye0MT5W.js} +3 -3
  7. package/dist/{PenAndPaper-D9g_r8-6.js → PenAndPaper-YLAKASXp.js} +3 -3
  8. package/dist/{Shape-DLjaeo5U.js → Shape-B1e1H4lS.js} +1 -1
  9. package/dist/{Slicer-DuqI_UVS.js → Slicer-CWPgea7y.js} +2 -2
  10. package/dist/{Title-DIYoufYR.js → Title-DqRYBmPn.js} +1 -1
  11. package/dist/{Tooltip-BFz2yelJ.js → Tooltip-Cn5TRz5k.js} +1 -1
  12. package/dist/{dom-to-png-BB-m1MuD.js → dom-to-png-D-0uAVLJ.js} +1 -1
  13. package/dist/{img-Cyr1eIO7.js → img-DP7bwOa0.js} +1 -1
  14. package/dist/{index-d3erwTWB.js → index-BHDxYxsA.js} +1 -1
  15. package/dist/{pdf-BQRTRQlZ.js → pdf-DSSAgKci.js} +1 -1
  16. package/dist/style.css +1 -1
  17. package/dist/{useNestedProp-BqKuhIvF.js → useNestedProp-CX8MPjxN.js} +1 -1
  18. package/dist/{usePrinter-CHrKIDM7.js → usePrinter-mUOYqNDs.js} +3 -3
  19. package/dist/{vue-data-ui-BRKcN5_z.js → vue-data-ui-Bt_OX-Tr.js} +63 -63
  20. package/dist/vue-data-ui.js +1 -1
  21. package/dist/{vue-ui-3d-bar-BIw7nTYA.js → vue-ui-3d-bar-ne-FQ3BQ.js} +9 -9
  22. package/dist/{vue-ui-accordion-BJyaBDyF.js → vue-ui-accordion-BA4dEISn.js} +3 -3
  23. package/dist/{vue-ui-age-pyramid-Dn_061NF.js → vue-ui-age-pyramid-gOYNoKxJ.js} +10 -10
  24. package/dist/{vue-ui-annotator-Y65oZVga.js → vue-ui-annotator-cclttELo.js} +2 -2
  25. package/dist/{vue-ui-bullet-B5mjXy0q.js → vue-ui-bullet-CvKSOwAe.js} +8 -8
  26. package/dist/{vue-ui-candlestick-BIC2-GAV.js → vue-ui-candlestick-B6X1XUi6.js} +11 -11
  27. package/dist/{vue-ui-carousel-table-CnvQ0CeQ.js → vue-ui-carousel-table-BfRMRgxl.js} +4 -4
  28. package/dist/{vue-ui-chestnut-IsRTDol2.js → vue-ui-chestnut-CmmSzRZK.js} +8 -8
  29. package/dist/{vue-ui-chord-iSsr3a59.js → vue-ui-chord-BXpdoJTc.js} +14 -14
  30. package/dist/{vue-ui-circle-pack-CS2l9IXg.js → vue-ui-circle-pack-DACAa7Po.js} +9 -9
  31. package/dist/{vue-ui-cursor-Cq9lPDB7.js → vue-ui-cursor-BCzCHBrt.js} +2 -2
  32. package/dist/{vue-ui-dashboard-7Cm-15oc.js → vue-ui-dashboard-Asv4ojaV.js} +62 -62
  33. package/dist/{vue-ui-digits-BecNI-j7.js → vue-ui-digits-B5FgN7v8.js} +2 -2
  34. package/dist/{vue-ui-donut-D_bFxovZ.js → vue-ui-donut-BBwG3_eI.js} +12 -12
  35. package/dist/{vue-ui-donut-evolution-C8dlmVur.js → vue-ui-donut-evolution-BfZgT3LC.js} +11 -11
  36. package/dist/{vue-ui-dumbbell-Ds41wAQh.js → vue-ui-dumbbell-D6_AcFXT.js} +10 -10
  37. package/dist/{vue-ui-flow-CqdSvk4_.js → vue-ui-flow-a_27wEq2.js} +11 -11
  38. package/dist/{vue-ui-funnel-CNDgAWjp.js → vue-ui-funnel-BQIASo-h.js} +9 -9
  39. package/dist/{vue-ui-galaxy-DzUAHZ4G.js → vue-ui-galaxy-D08PJlS7.js} +11 -11
  40. package/dist/{vue-ui-gauge-Cj-4ZhyL.js → vue-ui-gauge-BST6gr3o.js} +7 -7
  41. package/dist/{vue-ui-gizmo-CCS3u0qr.js → vue-ui-gizmo-CaTpG11y.js} +3 -3
  42. package/dist/{vue-ui-heatmap-CBRd8kvj.js → vue-ui-heatmap-DiuiJH7J.js} +10 -10
  43. package/dist/{vue-ui-history-plot-4XT22zB_.js → vue-ui-history-plot-CvGSOLla.js} +11 -11
  44. package/dist/{vue-ui-kpi-B-lBgRvZ.js → vue-ui-kpi-vDq_MbTb.js} +3 -3
  45. package/dist/{vue-ui-mini-loader-_ksyazrb.js → vue-ui-mini-loader-9J8LdVRw.js} +2 -2
  46. package/dist/{vue-ui-molecule-Db_QmLY6.js → vue-ui-molecule-B1Ykknv1.js} +11 -11
  47. package/dist/{vue-ui-mood-radar-Y_CGEC1L.js → vue-ui-mood-radar-Bo_9AlGw.js} +11 -11
  48. package/dist/{vue-ui-nested-donuts-DosW9Sfg.js → vue-ui-nested-donuts-C6etC_8f.js} +11 -11
  49. package/dist/{vue-ui-onion-CQwIVcfN.js → vue-ui-onion-E77bkiI8.js} +11 -11
  50. package/dist/{vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js → vue-ui-parallel-coordinate-plot-DRX5p5wU.js} +12 -12
  51. package/dist/{vue-ui-quadrant-B8H5sBMi.js → vue-ui-quadrant-BWvOT4Yn.js} +12 -12
  52. package/dist/{vue-ui-quick-chart-ClB6jwSV.js → vue-ui-quick-chart-D0yCkwLS.js} +9 -9
  53. package/dist/{vue-ui-radar-BTluZs04.js → vue-ui-radar-Dxb-NhkQ.js} +12 -12
  54. package/dist/{vue-ui-rating-CTNYeoXO.js → vue-ui-rating-BGBXFzF9.js} +2 -2
  55. package/dist/{vue-ui-relation-circle-CdHhoGcO.js → vue-ui-relation-circle-BhxPABn9.js} +7 -7
  56. package/dist/{vue-ui-ridgeline-Dr6UOfwb.js → vue-ui-ridgeline-CRKQ44VU.js} +12 -12
  57. package/dist/{vue-ui-rings-N2mHKtLh.js → vue-ui-rings-Bm_M6lPM.js} +12 -12
  58. package/dist/{vue-ui-scatter-BcJRyqbE.js → vue-ui-scatter-vrdnuI9T.js} +12 -12
  59. package/dist/{vue-ui-skeleton-BOtCpAcY.js → vue-ui-skeleton-BCAWMgrf.js} +3 -3
  60. package/dist/{vue-ui-smiley-BPqpTUTh.js → vue-ui-smiley-BbDcE-5m.js} +2 -2
  61. package/dist/{vue-ui-spark-trend-BXo8mbxJ.js → vue-ui-spark-trend-dGhL6Ncl.js} +5 -5
  62. package/dist/{vue-ui-sparkbar-DEsL52nJ.js → vue-ui-sparkbar-jBdFxBjW.js} +4 -4
  63. package/dist/{vue-ui-sparkgauge-DkawMq8d.js → vue-ui-sparkgauge-CH1PgkFm.js} +4 -4
  64. package/dist/{vue-ui-sparkhistogram-D8ZCXl7m.js → vue-ui-sparkhistogram-DxuZF7Jp.js} +5 -5
  65. package/dist/{vue-ui-sparkline-D8LYPXpr.js → vue-ui-sparkline-gCNfPXIx.js} +4 -4
  66. package/dist/{vue-ui-sparkstackbar-DzeVCG0H.js → vue-ui-sparkstackbar-CXbLZhzW.js} +5 -5
  67. package/dist/{vue-ui-stackbar-DQ9CcKUd.js → vue-ui-stackbar-CQUmq-Zs.js} +13 -13
  68. package/dist/{vue-ui-strip-plot-C6gcQLMI.js → vue-ui-strip-plot-CwH7POxM.js} +11 -11
  69. package/dist/{vue-ui-table-D7azsjo3.js → vue-ui-table-Bb1L4BbK.js} +3 -3
  70. package/dist/{vue-ui-table-heatmap-DINNMAyX.js → vue-ui-table-heatmap-Bnn-JBcA.js} +4 -4
  71. package/dist/{vue-ui-table-sparkline-BrYh6fVq.js → vue-ui-table-sparkline-Dtyp35z5.js} +5 -5
  72. package/dist/{vue-ui-thermometer-J0A6MZy_.js → vue-ui-thermometer-nqM9BT70.js} +7 -7
  73. package/dist/{vue-ui-timer-CI8zPXh3.js → vue-ui-timer-C2PW101V.js} +5 -5
  74. package/dist/{vue-ui-tiremarks-BuNik_Pf.js → vue-ui-tiremarks-C89aeRJ0.js} +7 -7
  75. package/dist/{vue-ui-treemap-oUtdOGWu.js → vue-ui-treemap-Dj1uUDg4.js} +12 -12
  76. package/dist/{vue-ui-vertical-bar-2bHPN2lr.js → vue-ui-vertical-bar-BwiU9hmU.js} +12 -12
  77. package/dist/{vue-ui-waffle-BuISvHw-.js → vue-ui-waffle-B8cjT4Kp.js} +12 -12
  78. package/dist/{vue-ui-wheel-CSy7_x22.js → vue-ui-wheel-BWUlrmeo.js} +7 -7
  79. package/dist/{vue-ui-word-cloud-DEpoSRMP.js → vue-ui-word-cloud-CLKZ_Ss2.js} +10 -10
  80. package/dist/{vue-ui-world-Cy1VBlK3.js → vue-ui-world-BA6Bpswn.js} +11 -11
  81. package/dist/{vue-ui-xy-PaM6vcjk.js → vue-ui-xy-CsHZNZlq.js} +16 -16
  82. package/dist/{vue-ui-xy-canvas-CSyX_xLO.js → vue-ui-xy-canvas-Cy_2j84B.js} +12 -12
  83. package/package.json +1 -2
  84. package/dist/Arrow-CogAJvGp.cjs +0 -1
  85. package/dist/BaseIcon-DY-33nfj.cjs +0 -1
  86. package/dist/ColorPicker-CrMLe8x_.cjs +0 -1
  87. package/dist/DataTable-CNCnRrD-.cjs +0 -1
  88. package/dist/Legend-ieOu_fKK.cjs +0 -1
  89. package/dist/PackageVersion-BxSGdh6L.cjs +0 -1
  90. package/dist/PenAndPaper-ByAFuR-l.cjs +0 -1
  91. package/dist/Shape-BQIcurpe.cjs +0 -1
  92. package/dist/Slicer-FXxFjXOP.cjs +0 -1
  93. package/dist/Title-D62pPwLz.cjs +0 -1
  94. package/dist/Tooltip-C_H6-uAa.cjs +0 -9
  95. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  96. package/dist/dom-to-png-B3SeX1JP.cjs +0 -3
  97. package/dist/img-Bl4Pt1QH.cjs +0 -1
  98. package/dist/index-Cn2tUOoX.cjs +0 -9
  99. package/dist/pdf-BQABl7QG.cjs +0 -1
  100. package/dist/useChartAccessibility-Cm7nkzTG.cjs +0 -1
  101. package/dist/useNestedProp-C8955nsn.cjs +0 -1
  102. package/dist/usePanZoom-PXRi2Rwx.cjs +0 -1
  103. package/dist/usePrinter-BrH80VBz.cjs +0 -1
  104. package/dist/useResponsive-BBkmXXaa.cjs +0 -1
  105. package/dist/useUserOptionState-BgepsfED.cjs +0 -1
  106. package/dist/vue-data-ui-BbzW2_-6.cjs +0 -9
  107. package/dist/vue-data-ui.cjs +0 -1
  108. package/dist/vue-ui-3d-bar-WFymJ4EL.cjs +0 -19
  109. package/dist/vue-ui-accordion-7GoAZx3k.cjs +0 -1
  110. package/dist/vue-ui-age-pyramid-DGpLdvsL.cjs +0 -1
  111. package/dist/vue-ui-annotator-ypStRKCB.cjs +0 -371
  112. package/dist/vue-ui-bullet-C_Ppz5nn.cjs +0 -34
  113. package/dist/vue-ui-candlestick-BrDk_pc_.cjs +0 -2
  114. package/dist/vue-ui-carousel-table-BTxtBHvb.cjs +0 -1
  115. package/dist/vue-ui-chestnut-D_NZDyDN.cjs +0 -6
  116. package/dist/vue-ui-chord-CZ66gJ7w.cjs +0 -16
  117. package/dist/vue-ui-circle-pack-lGkj98rL.cjs +0 -1
  118. package/dist/vue-ui-cursor-YZyc0ARl.cjs +0 -1
  119. package/dist/vue-ui-dashboard-jP2U4qtK.cjs +0 -1
  120. package/dist/vue-ui-digits-C5PfeED6.cjs +0 -1
  121. package/dist/vue-ui-donut-BM9i2XHJ.cjs +0 -1
  122. package/dist/vue-ui-donut-evolution-Oga32kTV.cjs +0 -1
  123. package/dist/vue-ui-dumbbell-ClzXgan7.cjs +0 -9
  124. package/dist/vue-ui-flow-Bp1oqzTj.cjs +0 -3
  125. package/dist/vue-ui-funnel-y3hN7BGU.cjs +0 -1
  126. package/dist/vue-ui-galaxy-D5vKPiFH.cjs +0 -1
  127. package/dist/vue-ui-gauge-57ahTSbZ.cjs +0 -1
  128. package/dist/vue-ui-gizmo-D5_kCO9e.cjs +0 -1
  129. package/dist/vue-ui-heatmap-B8sfOhVF.cjs +0 -1
  130. package/dist/vue-ui-history-plot-DQVpKlp1.cjs +0 -1
  131. package/dist/vue-ui-kpi-DjI1yXtc.cjs +0 -1
  132. package/dist/vue-ui-mini-loader-BpAnNEHG.cjs +0 -1
  133. package/dist/vue-ui-molecule-BqpYPmrd.cjs +0 -1
  134. package/dist/vue-ui-mood-radar-DI_FioVr.cjs +0 -1
  135. package/dist/vue-ui-nested-donuts-B0rJlEH0.cjs +0 -17
  136. package/dist/vue-ui-onion-CEHc9oKt.cjs +0 -5
  137. package/dist/vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs +0 -8
  138. package/dist/vue-ui-pattern-CT3p_iOg.cjs +0 -1
  139. package/dist/vue-ui-quadrant-DM3Afg_i.cjs +0 -1
  140. package/dist/vue-ui-quick-chart-ClJi48bc.cjs +0 -15
  141. package/dist/vue-ui-radar-f0QY_Mal.cjs +0 -1
  142. package/dist/vue-ui-rating-B71_TxmN.cjs +0 -1
  143. package/dist/vue-ui-relation-circle-DHOG2jKh.cjs +0 -1
  144. package/dist/vue-ui-ridgeline-CxhklaLX.cjs +0 -1
  145. package/dist/vue-ui-rings-DoGxh2qe.cjs +0 -2
  146. package/dist/vue-ui-scatter-BnRkkP5Z.cjs +0 -1
  147. package/dist/vue-ui-skeleton-Mcoev-5q.cjs +0 -41
  148. package/dist/vue-ui-smiley-Ch9trBZA.cjs +0 -2
  149. package/dist/vue-ui-spark-trend-PqEN-rL8.cjs +0 -1
  150. package/dist/vue-ui-sparkbar-DnRQFo63.cjs +0 -1
  151. package/dist/vue-ui-sparkgauge-C0E5Sojk.cjs +0 -1
  152. package/dist/vue-ui-sparkhistogram-Bqtsbb3w.cjs +0 -1
  153. package/dist/vue-ui-sparkline-BTruGe7A.cjs +0 -1
  154. package/dist/vue-ui-sparkstackbar-DeXUgBIH.cjs +0 -1
  155. package/dist/vue-ui-stackbar-CaFp42Tn.cjs +0 -6
  156. package/dist/vue-ui-strip-plot-DzNU6VRW.cjs +0 -1
  157. package/dist/vue-ui-table-DP2ZaGWa.cjs +0 -14
  158. package/dist/vue-ui-table-heatmap-B2gZkAqm.cjs +0 -1
  159. package/dist/vue-ui-table-sparkline-CgN2nMYT.cjs +0 -1
  160. package/dist/vue-ui-thermometer-DgZfQbR2.cjs +0 -1
  161. package/dist/vue-ui-timer-ClM5FpoU.cjs +0 -64
  162. package/dist/vue-ui-tiremarks-19Krsd1f.cjs +0 -1
  163. package/dist/vue-ui-treemap-DvmJ1MOU.cjs +0 -1
  164. package/dist/vue-ui-vertical-bar-RT-SM-us.cjs +0 -4
  165. package/dist/vue-ui-waffle-BSKRUJbJ.cjs +0 -1
  166. package/dist/vue-ui-wheel-DfBVkT9x.cjs +0 -1
  167. package/dist/vue-ui-word-cloud-BlfCmzD-.cjs +0 -1
  168. package/dist/vue-ui-world-EgFhVXSY.cjs +0 -19
  169. package/dist/vue-ui-xy-aQEDcKbT.cjs +0 -3
  170. package/dist/vue-ui-xy-canvas-C6-sYgU_.cjs +0 -9
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-Cn2tUOoX.cjs"),E=require("./DataTable-CNCnRrD-.cjs"),z=require("./Title-D62pPwLz.cjs"),p=require("./Tooltip-C_H6-uAa.cjs"),M=require("./usePrinter-BrH80VBz.cjs"),T=require("./Shape-BQIcurpe.cjs"),P=require("./BaseIcon-DY-33nfj.cjs"),R=require("./vue-ui-table-sparkline-CgN2nMYT.cjs"),D=require("./vue-ui-skeleton-Mcoev-5q.cjs"),H=require("./Slicer-FXxFjXOP.cjs"),W=require("./vue-ui-accordion-7GoAZx3k.cjs"),B=require("./useNestedProp-C8955nsn.cjs"),q=require("./PackageVersion-BxSGdh6L.cjs"),Y=require("./PenAndPaper-ByAFuR-l.cjs"),t=require("vue"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=d.createUid(),Z={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:E.DataTable,Shape:T._sfc_main,Title:z._sfc_main,Tooltip:p._sfc_main,UserOptions:M.UserOptions,BaseIcon:P.default,TableSparkline:R.default,Skeleton:D.default,Slicer:H.Slicer,Accordion:W.default,PackageVersion:q._sfc_main,PenAndPaper:Y._sfc_main},data(){this.dataset.forEach((h,r)=>{[null,void 0].includes(h.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:r})});const l=this.config.downsample&&this.config.downsample.threshold?this.config.downsample.threshold:500,s=Math.max(...this.dataset.map(h=>this.largestTriangleThreeBucketsArray({data:h.series,threshold:l}).length)),n={start:0,end:s};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isAnnotator:!1,isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,tableStep:0,titleStep:0,slicer:n,__to__:null,maxX:s,showSparklineTable:!0,segregateStep:0,sliderId:U,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3},selectedMinimapIndex:null,showUserOptionsOnChartHover:!1,keepUserOptionState:!0,userOptionsVisible:!0,svgRef:null,tagRefs:{}}},watch:{dataset:{handler(l,s){this.maxX=Math.max(...this.dataset.map(n=>this.largestTriangleThreeBucketsArray({data:n.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),this.slicer={start:0,end:this.maxX},this.slicerStep+=1,this.segregateStep+=1},deep:!0},config:{handler(l,s){this.FINAL_CONFIG=this.prepareConfig(),this.prepareChart(),this.titleStep+=1,this.tableStep+=1,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}},deep:!0}},computed:{chartAriaLabel(){const l=this.FINAL_CONFIG.chart.title.text||"Chart visualization",s=this.FINAL_CONFIG.chart.title.subtitle.text||"";return`${l}. ${s}`},optimize(){return{linePlot:this.maxSeries>this.FINAL_CONFIG.line.dot.hideAboveMaxSerieLength}},hasOptionsNoTitle(){return this.FINAL_CONFIG.chart.userOptions.show&&(!this.FINAL_CONFIG.chart.title.show||!this.FINAL_CONFIG.chart.title.text)},minimap(){if(!this.FINAL_CONFIG.chart.zoom.minimap.show)return[];const l=this.datasetWithIds.filter(r=>!this.segregatedSeries.includes(r.id)),s=Math.max(...l.map(r=>r.series.length)),n=[];for(let r=0;r<s;r+=1)n.push(l.map(e=>e.series[r]||0).reduce((e,F)=>(e||0)+(F||0),0));const h=Math.min(...n);return n.map(r=>r+(h<0?Math.abs(h):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(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||"",id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||this.drawingArea.height,autoScaleYLabels:e.autoScaleYLabels})),s=this.barSet.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||"",id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||this.drawingArea.height})),n=this.plotSet.map(e=>({name:e.name,color:e.color,scale:e.individualScale,scaleYLabels:e.scaleYLabels,zero:e.zeroPosition,max:e.individualMax,scaleLabel:e.scaleLabel||"",id:e.id,yOffset:e.yOffset||0,individualHeight:e.individualHeight||this.drawingArea.height})),h=this.mutableConfig.useIndividualScale&&!this.mutableConfig.isStacked?Object.values(this.scaleGroups):[...l,...s,...n],r=h.flatMap(e=>e).length;return h.flatMap((e,F)=>({unique:e.unique,id:e.id,groupId:e.groupId,scaleLabel:e.scaleLabel,name:this.mutableConfig.useIndividualScale&&!this.mutableConfig.isStacked?e.unique?e.name:e.groupName:e.name,color:this.mutableConfig.useIndividualScale&&!this.mutableConfig.isStacked?e.unique?e.color:e.groupColor:e.color,scale:e.scale,yOffset:e.yOffset,individualHeight:e.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/r*(F+1),yLabels:e.scaleYLabels||e.scale.ticks.map(m=>({y:m>=0?e.zero-e.individualHeight*(m/e.max):e.zero+e.individualHeight*Math.abs(m)/e.max,value:m}))}))},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(s=>({...s,span:s.from===s.to?1:s.to<s.from?0:s.to-s.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[null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)?this.niceScale.min>=0?0:Math.abs(this.niceScale.min):-this.niceScale.min},absoluteMax(){return this.niceScale.max+this.relativeZero},datasetWithIds(){return this.useSafeValues?this.dataset.map((l,s)=>({...l,series:this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}),id:`uniqueId_${s}`})):this.dataset},safeDataset(){return this.useSafeValues?this.dataset.map((l,s)=>{const n=this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}),h=`uniqueId_${s}`;return{...l,slotAbsoluteIndex:s,series:n.map(r=>this.isSafeValue(r)?r:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(l.color?l.color:this.customPalette[s]?this.customPalette[s]:this.palette[s]),id:h,scaleLabel:l.scaleLabel||h}}):this.dataset},relativeDataset(){return this.safeDataset.map((l,s)=>({...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 s=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,s)}})},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,s)=>({absoluteIndex:s,...l,series:l.series.map(n=>n+this.relativeZero),absoluteValues:l.series,segregate:()=>this.segregate(l),isSegregated:this.segregatedSeries.includes(l.id)}))},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(l=>!this.segregatedSeries.includes(l.id)))},scaleGroups(){const l=Object.groupBy(this.activeSeriesWithStackRatios,n=>n.scaleLabel),s={};for(const[n,h]of Object.entries(l)){const r=h.flatMap(e=>e.absoluteValues);s[n]={min:Math.min(...r)||0,max:Math.max(...r)||1,groupId:`scale_group_${this.createUid()}`}}return s},barSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="bar").map((l,s)=>{this.checkAutoScaleError(l);const n=this.scaleGroups[l.scaleLabel].min,h=this.scaleGroups[l.scaleLabel].max;l.absoluteValues.filter(N=>![null,void 0].includes(N)).map(N=>(N-n)/(h-n));const r={valueMin:n,valueMax:h<0?0:h},e={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues.filter(N=>![void 0,null].includes(N)))>0?0:Math.min(...l.absoluteValues.filter(N=>![null,void 0].includes(N)))},F=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,m=1.0000001,u=this.calculateNiceScaleWithExactExtremes(e.min,e.max===e.min?e.max*m:e.max,F),x=this.calculateNiceScaleWithExactExtremes(r.valueMin,r.valueMax===r.valueMin?r.valueMax*m:r.valueMax,F),L=u.min>=0?0:Math.abs(u.min),k=0,C=u.max+L,_=x.max+Math.abs(k),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,y=this.drawingArea.bottom-f-b*L/C,A=this.drawingArea.bottom-f-b*k/_,a=this.absoluteDataset.filter(N=>N.type==="bar").filter(N=>!this.segregatedSeries.includes(N.id)).length,o=l.series.map((N,w)=>{const v=this.mutableConfig.useIndividualScale?(l.absoluteValues[w]+L)/C:this.ratioToMax(N),G=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*w:this.drawingArea.left+this.slot.bar*s+this.slot.bar*w*a-this.barSlot/2-s*this.barPeriodGap;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(G),y:this.drawingArea.bottom-f-b*v,value:l.absoluteValues[w],zeroPosition:this.checkNaN(y),individualMax:this.checkNaN(C),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[w]||""}}),i=l.absoluteValues.map(N=>x.min>=0?(N-Math.abs(x.min))/(x.max-Math.abs(x.min)):(N+Math.abs(x.min))/(x.max+Math.abs(x.min))),c=l.series.map((N,w)=>{const v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*w:this.drawingArea.left-this.slot.bar/2+this.slot.bar*s+this.slot.bar*w*this.absoluteDataset.filter(G=>G.type==="bar").filter(G=>!this.segregatedSeries.includes(G.id)).length;return{yOffset:this.checkNaN(f),individualHeight:this.checkNaN(b),x:this.checkNaN(v),y:this.checkNaN(this.drawingArea.bottom-this.checkNaN(f)-(this.checkNaN(b)*i[w]||0)),value:l.absoluteValues[w],zeroPosition:this.checkNaN(y),individualMax:this.checkNaN(C),comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[w]||""}}),I=u.ticks.map(N=>({y:N>=0?y-b*(N/C):y+b*Math.abs(N)/C,value:N,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),S=x.ticks.map(N=>{const w=(N-x.min)/(x.max-x.min);return{y:N>=0?A-b*w:A+b*w,value:N,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return this.scaleGroups[l.scaleLabel].name=l.name,this.scaleGroups[l.scaleLabel].groupName=l.scaleLabel,this.scaleGroups[l.scaleLabel].groupColor=this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor||l.color,this.scaleGroups[l.scaleLabel].color=l.color,this.scaleGroups[l.scaleLabel].scaleYLabels=l.autoScaling?S:I,this.scaleGroups[l.scaleLabel].zeroPosition=l.autoScaling?A:y,this.scaleGroups[l.scaleLabel].individualMax=l.autoScaling?_:C,this.scaleGroups[l.scaleLabel].scaleLabel=l.scaleLabel,this.scaleGroups[l.scaleLabel].id=l.id,this.scaleGroups[l.scaleLabel].yOffset=f,this.scaleGroups[l.scaleLabel].individualHeight=b,this.scaleGroups[l.scaleLabel].autoScaleYLabels=S,this.scaleGroups[l.scaleLabel].unique=this.activeSeriesWithStackRatios.filter(N=>N.scaleLabel===l.scaleLabel).length===1,{...l,yOffset:f,autoScaleYLabels:S,individualHeight:b,scaleYLabels:l.autoScaling?S:I,individualScale:l.autoScaling?x:u,individualMax:l.autoScaling?_:C,zeroPosition:l.autoScaling?A:y,plots:l.autoScaling?c:o,groupId:this.scaleGroups[l.scaleLabel].groupId}})},lineSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="line").map(l=>{this.checkAutoScaleError(l);const s=this.scaleGroups[l.scaleLabel].min,n=this.scaleGroups[l.scaleLabel].max;l.absoluteValues.filter(g=>![null,void 0].includes(g)).map(g=>(g-s)/(n-s));const h={valueMin:s,valueMax:n},r={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||(Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues))},e=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,m=this.calculateNiceScaleWithExactExtremes(r.min,r.max===r.min?r.max*F:r.max,e),u=this.calculateNiceScaleWithExactExtremes(h.valueMin,h.valueMax===h.valueMin?h.valueMax*F:h.valueMax,e),x=m.min>=0?0:Math.abs(m.min),L=0,k=m.max+Math.abs(x),C=u.max+Math.abs(L),_=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-_-f*x/k,y=this.drawingArea.bottom-_-f*L/C,A=l.series.map((g,O)=>{const V=this.mutableConfig.useIndividualScale?(l.absoluteValues[O]+Math.abs(x))/k:this.ratioToMax(g);return{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*O),y:this.checkNaN(this.drawingArea.bottom-_-f*V),value:l.absoluteValues[O],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[O]||""}}),a=l.absoluteValues.map(g=>u.min>=0?(g-Math.abs(u.min))/(u.max-Math.abs(u.min)):(g+Math.abs(u.min))/(u.max+Math.abs(u.min))),o=l.series.map((g,O)=>[void 0,null].includes(l.absoluteValues[O])?{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*O),y:b,value:l.absoluteValues[O],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[O]||""}:{x:this.checkNaN(this.drawingArea.left+this.slot.line/2+this.slot.line*O),y:this.checkNaN(this.drawingArea.bottom-_-(f*a[O]||0)),value:l.absoluteValues[O],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[O]||""}),i=this.FINAL_CONFIG.line.cutNullValues?this.createSmoothPathWithCuts(A):this.createSmoothPath(A.filter(g=>g.value!==null)),c=this.FINAL_CONFIG.line.cutNullValues?this.createSmoothPathWithCuts(o):this.createSmoothPath(o.filter(g=>g.value!==null)),I=this.FINAL_CONFIG.line.cutNullValues?this.createStraightPathWithCuts(A):this.createStraightPath(A.filter(g=>g.value!==null)),S=this.FINAL_CONFIG.line.cutNullValues?this.createStraightPathWithCuts(o):this.createStraightPath(o.filter(g=>g.value!==null)),N=m.ticks.map(g=>({y:g>=0?b-f*(g/k):b+f*Math.abs(g)/k,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),w=u.ticks.map(g=>{const O=(g-u.min)/(u.max-u.min);return{y:g>=0?y-f*O:y+f*O,value:g,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});this.scaleGroups[l.scaleLabel].name=l.name,this.scaleGroups[l.scaleLabel].groupName=l.scaleLabel,this.scaleGroups[l.scaleLabel].groupColor=this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor||l.color,this.scaleGroups[l.scaleLabel].color=l.color,this.scaleGroups[l.scaleLabel].scaleYLabels=l.autoScaling?w:N,this.scaleGroups[l.scaleLabel].zeroPosition=l.autoScaling?y:b,this.scaleGroups[l.scaleLabel].individualMax=l.autoScaling?C:k,this.scaleGroups[l.scaleLabel].scaleLabel=l.scaleLabel,this.scaleGroups[l.scaleLabel].id=l.id,this.scaleGroups[l.scaleLabel].yOffset=_,this.scaleGroups[l.scaleLabel].individualHeight=f,this.scaleGroups[l.scaleLabel].autoScaleYLabels=w,this.scaleGroups[l.scaleLabel].unique=this.activeSeriesWithStackRatios.filter(g=>g.scaleLabel===l.scaleLabel).length===1;const v=this.mutableConfig.useIndividualScale?l.autoScaling?y:b:this.zero,G=Math.max(Math.max(l.autoScaling?y:N.at(-1).y,this.drawingArea.top),v);return{...l,yOffset:_,autoScaleYLabels:w,individualHeight:f,scaleYLabels:l.autoScaling?w:N,individualScale:l.autoScaling?u:m,individualMax:l.autoScaling?C:k,zeroPosition:l.autoScaling?y:b,curve:l.autoScaling?c:i,plots:l.autoScaling?o:A,area:l.useArea?this.mutableConfig.useIndividualScale?this.FINAL_CONFIG.line.cutNullValues?this.createIndividualAreaWithCuts(l.autoScaling?o:A,G):this.createIndividualArea(l.autoScaling?o.filter(g=>g.value!==null):A.filter(g=>g.value!==null),G):this.createIndividualArea(A.filter(g=>g.value!==null),G):"",curveAreas:l.useArea?d.createSmoothAreaSegments(l.autoScaling?this.FINAL_CONFIG.line.cutNullValues?o:o.filter(g=>g.value!==null):this.FINAL_CONFIG.line.cutNullValues?A:A.filter(g=>g.value!==null),G,this.FINAL_CONFIG.line.cutNullValues):[],straight:l.autoScaling?S:I,groupId:this.scaleGroups[l.scaleLabel].groupId}})},plotSet(){return this.activeSeriesWithStackRatios.filter(l=>l.type==="plot").map(l=>{this.checkAutoScaleError(l);const s=this.scaleGroups[l.scaleLabel].min,n=this.scaleGroups[l.scaleLabel].max;l.absoluteValues.filter(I=>![null,void 0].includes(I)).map(I=>(I-s)/(n-s));const h={valueMin:s,valueMax:n},r={max:l.scaleMax||Math.max(...l.absoluteValues)||1,min:l.scaleMin||Math.min(...l.absoluteValues)>0?0:Math.min(...l.absoluteValues)},e=l.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,F=1.0000001,m=this.calculateNiceScaleWithExactExtremes(r.min,r.max===r.min?r.max*F:r.max,e),u=this.calculateNiceScaleWithExactExtremes(h.valueMin,h.valueMax===h.valueMin?h.valueMax*F:h.valueMax,e),x=m.min>=0?0:Math.abs(m.min),L=0,k=m.max+x,C=u.max+Math.abs(L),_=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-_-f*x/k,y=this.drawingArea.bottom-_-f*L/C,A=l.series.map((I,S)=>{const N=this.mutableConfig.useIndividualScale?(l.absoluteValues[S]+Math.abs(x))/k:this.ratioToMax(I);return{x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*S),y:this.checkNaN(this.drawingArea.bottom-_-f*N),value:l.absoluteValues[S],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""}}),a=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))),o=l.series.map((I,S)=>({x:this.checkNaN(this.drawingArea.left+this.slot.plot/2+this.slot.plot*S),y:this.checkNaN(this.drawingArea.bottom-_-(f*a[S]||0)),value:l.absoluteValues[S],comment:l.comments&&l.comments.slice(this.slicer.start,this.slicer.end)[S]||""})),i=m.ticks.map(I=>({y:I>=0?b-f*(I/k):b+f*Math.abs(I)/k,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l})),c=u.ticks.map(I=>{const S=(I-u.min)/(u.max-u.min);return{y:I>=0?y-f*S:y+f*S,value:I,prefix:l.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:l.suffix||this.FINAL_CONFIG.chart.labels.suffix,datapoint:l}});return this.scaleGroups[l.scaleLabel].name=l.name,this.scaleGroups[l.scaleLabel].groupName=l.scaleLabel,this.scaleGroups[l.scaleLabel].groupColor=this.FINAL_CONFIG.chart.grid.labels.yAxis.groupColor||l.color,this.scaleGroups[l.scaleLabel].color=l.color,this.scaleGroups[l.scaleLabel].scaleYLabels=l.autoScaling?c:i,this.scaleGroups[l.scaleLabel].zeroPosition=l.autoScaling?y:b,this.scaleGroups[l.scaleLabel].individualMax=l.autoScaling?C:k,this.scaleGroups[l.scaleLabel].scaleLabel=l.scaleLabel,this.scaleGroups[l.scaleLabel].id=l.id,this.scaleGroups[l.scaleLabel].yOffset=_,this.scaleGroups[l.scaleLabel].individualHeight=f,this.scaleGroups[l.scaleLabel].autoScaleYLabels=c,this.scaleGroups[l.scaleLabel].unique=this.activeSeriesWithStackRatios.filter(I=>I.scaleLabel===l.scaleLabel).length===1,{...l,yOffset:_,autoScaleYLabels:c,individualHeight:f,scaleYLabels:l.autoScaling?c:i,individualScale:l.autoScaling?u:m,individualMax:l.autoScaling?C:k,zeroPosition:l.autoScaling?y:b,plots:l.autoScaling?o:A,groupId:this.scaleGroups[l.scaleLabel].groupId}})},drawingArea(){function l(h){const r=new Set;return h.forEach(e=>{const F=e.scaleLabel||"__noScaleLabel__";r.add(F)}),r.size}const s=l(this.absoluteDataset.filter(h=>!this.segregatedSeries.includes(h.id))),n=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?s*(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+n,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+n)}},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(s=>!this.segregatedSeries.includes(s.id)).map(s=>Math.min(...s.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(){const l=Math.max(...this.dataset.map(n=>this.largestTriangleThreeBucketsArray({data:n.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length)),s=[];for(let n=0;n<l;n+=1)s.push({text:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[n]||String(n),absoluteIndex:n});return s.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(s=>s.type==="bar").filter(s=>!this.segregatedSeries.includes(s.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})),s=[];return this.timeLabels.forEach((n,h)=>{const r=[n.text];this.relativeDataset.forEach(e=>{r.push(this.canShowValue(e.absoluteValues[h])?Number(e.absoluteValues[h].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),s.push(r)}),{head:l,body:s}},dataTable(){const l=this.FINAL_CONFIG.table.showSum;let s=[""].concat(this.relativeDataset.map(e=>e.name));l&&(s=s.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 F=this.relativeDataset.map(m=>m.absoluteValues[e]??0).reduce((m,u)=>m+u,0);n.push([this.timeLabels[e].text??"-"].concat(this.relativeDataset.map(m=>this.applyDataLabel(m.type==="line"?this.FINAL_CONFIG.line.labels.formatter:m.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,m.absoluteValues[e]??0,this.dataLabel({p:m.prefix||this.FINAL_CONFIG.chart.labels.prefix,v:m.absoluteValues[e]??0,s:m.suffix||this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.table.rounding})))).concat(l?(F??0).toFixed(this.FINAL_CONFIG.table.rounding):[]))}const h={th:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},td:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},breakpoint:this.FINAL_CONFIG.table.responsiveBreakpoint},r=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(e=>e.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:s,body:n,config:h,colNames:r}},dataTooltipSlot(){return{datapoint:this.selectedSeries,seriesIndex:this.selectedSerieIndex,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}},selectedSeries(){return this.relativeDataset.map(l=>({slotAbsoluteIndex:l.slotAbsoluteIndex,shape:l.shape||null,name:l.name,color:l.color,type:l.type,value:l.absoluteValues.find((s,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="",s=this.selectedSeries.map(r=>r.value).filter(r=>this.isSafeValue(r)&&r!==null).reduce((r,e)=>Math.abs(r)+Math.abs(e),0);const n=this.timeLabels[this.selectedSerieIndex],h=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(h)&&this.functionReturnsString(()=>h({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?h({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&n.text&&this.FINAL_CONFIG.chart.tooltip.showTimeLabel&&(l+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n.text}</div>`),this.selectedSeries.forEach(r=>{if(this.isSafeValue(r.value)){let e="",F="";switch(this.icons[r.type]){case"bar":e=`<svg viewBox="0 0 40 40" height="14" width="14">${this.$slots.pattern?`<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${r.color}" />`:""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${this.$slots.pattern?`url(#pattern_${this.uniqueId}_${r.slotAbsoluteIndex}`:r.color}" /></svg>`;break;case"line":!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)?F=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" />`:r.shape==="triangle"?F=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="square"?F=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="diamond"?F=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="pentagon"?F=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="hexagon"?F=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" />`:r.shape==="star"&&(F=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${r.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),e=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${r.color}" />${F}</svg>`;break;case"plot":if(!r.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(r.shape)){e=`<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" /></svg>`;break}if(r.shape==="star"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${r.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(r.shape==="triangle"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:3,rotation:.52}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="square"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:6,sides:4,rotation:.8}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="diamond"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:4,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="pentagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:5,rotation:.95}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(r.shape==="hexagon"){e=`<svg viewBox="0 0 12 12" height="14" width="14"><path d="${d.createPolygonPath({plot:{x:6,y:6},radius:5,sides:6,rotation:0}).path}" fill="${r.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}l+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${r.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.applyDataLabel(r.type==="line"?this.FINAL_CONFIG.line.labels.formatter:r.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,r.value,this.dataLabel({p:r.prefix,v:r.value,s:r.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}),{datapoint:r}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(r.value)/s*100),s:"%",r:this.FINAL_CONFIG.chart.tooltip.roundingPercentage})})`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&r.comments.length&&r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(l+=`<div class="vue-data-ui-tooltip-comment" style="background:${r.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${r.color}">${r.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]}</div>`)}}),`<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${l}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(l=>({y:l>=0?this.zero-this.drawingArea.height*this.ratioToMax(l):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(l)),value:l,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){this.svgRef=this.$refs.svgRef,this.prepareChart(),this.setupSlicer(),document.addEventListener("mousemove",l=>{this.clientPosition={x:l.clientX,y:l.clientY}}),document.addEventListener("scroll",this.hideTags)},beforeUnmount(){document.removeEventListener("scroll",this.hideTags)},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,createStraightPath:d.createStraightPath,createTSpans:d.createTSpans,dataLabel:d.dataLabel,downloadCsv:d.downloadCsv,error:d.error,forceValidValue:d.forceValidValue,functionReturnsString:d.functionReturnsString,hasDeepProperty:d.hasDeepProperty,isFunction:d.isFunction,isSafeValue:d.isSafeValue,largestTriangleThreeBucketsArray:d.largestTriangleThreeBucketsArray,objectIsEmpty:d.objectIsEmpty,setOpacity:d.setOpacity,shiftHue:d.shiftHue,translateSize:d.translateSize,treeShake:d.treeShake,useMouse:p.useMouse,useNestedProp:B.useNestedProp,createUid:d.createUid,placeXYTag:d.placeXYTag,createSmoothPathWithCuts:d.createSmoothPathWithCuts,createStraightPathWithCuts:d.createStraightPathWithCuts,createAreaWithCuts:d.createAreaWithCuts,createIndividualAreaWithCuts:d.createIndividualAreaWithCuts,createSmoothAreaSegments:d.createSmoothAreaSegments,createIndividualArea:d.createIndividualArea,hideTags(){const l=document.querySelectorAll(".vue-ui-xy-tag");l.length&&Array.from(l).forEach(s=>s.style.opacity="0")},setTagRef(l,s,n,h,r){n&&(this.tagRefs[`${l}_${s}_${h}_${r}`]=n)},setUserOptionsVisibility(l=!1){this.showUserOptionsOnChartHover&&(this.userOptionsVisible=l)},toggleAnnotator(){this.isAnnotator=!this.isAnnotator},selectTimeLabel(l,s){const n=this.relativeDataset.map(h=>({shape:h.shape||null,name:h.name,color:h.color,type:h.type,value:h.absoluteValues.find((r,e)=>e===s),comments:h.comments||[],prefix:h.prefix||this.FINAL_CONFIG.chart.labels.prefix,suffix:h.suffix||this.FINAL_CONFIG.chart.labels.suffix}));this.$emit("selectTimeLabel",{datapoint:n,absoluteIndex:l.absoluteIndex,label:l.text})},getHighlightAreaPosition(l){const s=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:s<this.drawingArea.left?this.drawingArea.left:s,width:n}},prepareConfig(){const l=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return l;const s=this.useNestedProp({userConfig:this.config,defaultConfig:l});return this.config&&this.hasDeepProperty(this.config,"chart.highlightArea")&&(Array.isArray(this.config.chart.highlightArea)?s.chart.highlightArea=this.config.chart.highlightArea:s.chart.highlightArea=[this.config.chart.highlightArea]),this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMin")?s.chart.grid.labels.yAxis.scaleMin=this.config.chart.grid.labels.yAxis.scaleMin:s.chart.grid.labels.yAxis.scaleMin=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.scaleMax")?s.chart.grid.labels.yAxis.scaleMax=this.config.chart.grid.labels.yAxis.scaleMax:s.chart.grid.labels.yAxis.scaleMax=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.startIndex")?s.chart.zoom.startIndex=this.config.chart.zoom.startIndex:s.chart.zoom.startIndex=null,this.config&&this.hasDeepProperty(this.config,"chart.zoom.endIndex")?s.chart.zoom.endIndex=this.config.chart.zoom.endIndex:s.chart.zoom.endIndex=null,this.config&&this.hasDeepProperty(this.config,"chart.grid.labels.yAxis.groupColor")?s.chart.grid.labels.yAxis.groupColor=this.config.chart.grid.labels.yAxis.groupColor:s.chart.grid.labels.yAxis.groupColor=null,s.theme?{...B.useNestedProp({userConfig:this.themes.vue_ui_xy[s.theme]||this.config,defaultConfig:s}),customPalette:this.themePalettes[s.theme]||this.palette}:s},prepareChart(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:s})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(l=>{l.series.forEach((s,n)=>{this.isSafeValue(s)||console.warn(`VueUiXy has detected an unsafe value in your dataset:
2
- -----> The serie '${l.name}' contains the value '${s}' at index ${n}.
3
- '${s}' was converted to null to allow the chart to display.`)})}),this.showUserOptionsOnChartHover=this.FINAL_CONFIG.chart.userOptions.showOnChartHover,this.keepUserOptionState=this.FINAL_CONFIG.chart.userOptions.keepStateOnChartLeave,this.userOptionsVisible=!this.FINAL_CONFIG.chart.userOptions.showOnChartHover,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 s=this.$refs.chart.parentNode,{height:n,width:h}=s.getBoundingClientRect();let r=null,e=0;this.FINAL_CONFIG.chart.title.show&&(r=this.$refs.chartTitle,e=r.getBoundingClientRect().height);let F=null,m=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(F=this.$refs.chartSlicer.$el,m=F.getBoundingClientRect().height);let u=null,x=0;this.FINAL_CONFIG.chart.legend.show&&(u=this.$refs.chartLegend,x=u.getBoundingClientRect().height);let L=0;this.$refs.source&&(L=this.$refs.source.getBoundingClientRect().height);let k=0;this.$refs.noTitle&&(k=this.$refs.noTitle.getBoundingClientRect().height),this.height=n-e-x-m-L-k,this.width=h,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(_=>{for(const f of _)this.$refs.chartTitle&&(e=this.$refs.chartTitle.getBoundingClientRect().height),this.$refs.chartSlicer&&this.$refs.chartSlicer.$el&&(m=this.$refs.chartSlicer.$el.getBoundingClientRect().height),this.$refs.chartLegend&&(x=this.$refs.chartLegend.getBoundingClientRect().height),this.$refs.source&&(L=this.$refs.source.getBoundingClientRect().height),requestAnimationFrame(()=>{this.height=f.contentBoxSize[0].blockSize-e-x-m-L-24,this.width=f.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()})}).observe(s)}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,s){if(!l[0])return[-10,-10,"",-10,-10];const n={x:l[0].x,y:s},h={x:l.at(-1).x,y:s},r=[];return l.forEach(e=>{r.push(`${e.x},${e.y} `)}),[n.x,n.y,...r,h.x,h.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(l,s){let n=Array(l).fill(0);for(let h=0;h<s.length&&h<l;h+=1)n[h]=s[h];return n},async setupSlicer(){(this.FINAL_CONFIG.chart.zoom.startIndex!==null||this.FINAL_CONFIG.chart.zoom.endIndex!==null)&&this.$refs.chartSlicer?(this.FINAL_CONFIG.chart.zoom.startIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setStartValue(this.FINAL_CONFIG.chart.zoom.startIndex)),this.FINAL_CONFIG.chart.zoom.endIndex!==null&&(await this.$nextTick(),await this.$nextTick(),this.$refs.chartSlicer.setEndValue(this.validSlicerEnd(this.FINAL_CONFIG.chart.zoom.endIndex+1)))):(this.slicer={start:0,end:Math.max(...this.dataset.map(l=>this.largestTriangleThreeBucketsArray({data:l.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length))},this.slicerStep+=1)},refreshSlicer(){this.setupSlicer()},validSlicerEnd(l){const s=Math.max(...this.dataset.map(n=>this.largestTriangleThreeBucketsArray({data:n.series,threshold:this.FINAL_CONFIG.downsample.threshold}).length));return l>s?s:l<0||this.FINAL_CONFIG.chart.zoom.startIndex!==null&&l<this.FINAL_CONFIG.chart.zoom.startIndex?this.FINAL_CONFIG.chart.zoom.startIndex!==null?this.FINAL_CONFIG.chart.zoom.startIndex+1:1:l},calcRectHeight(l){const s=![null,void 0].includes(this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin)&&this.FINAL_CONFIG.chart.grid.labels.yAxis.scaleMin>0&&this.min>=0?this.drawingArea.bottom:this.zero;return l.value>=0?this.checkNaN(s-l.y<=0?1e-5:s-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,s){let n=s[0],h=Math.abs(l-s[0]);for(let r=1;r<s.length;r+=1){const e=Math.abs(l-s[r]);e<h&&s[r]<l&&(n=s[r],h=e)}return n},ratioToMax(l){return l/(this.canShowValue(this.absoluteMax)?this.absoluteMax:1)},selectX(l){this.$emit("selectX",{dataset:this.relativeDataset.map(s=>({name:s.name,value:[null,void 0,NaN].includes(s.absoluteValues[l])?null:s.absoluteValues[l],color:s.color,type:s.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(s=>s!==l.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(l.id)}this.$emit("selectLegend",this.relativeDataset.map(s=>({name:s.name,values:s.absoluteValues,color:s.color,type:s.type}))),this.segregateStep+=1},toggleTooltipVisibility(l,s=null){this.isTooltip=l,l?this.selectedSerieIndex=s: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-BQABl7QG.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",options:this.FINAL_CONFIG.chart.userOptions.print})}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],[""]],s=["",...this.table.head.map(e=>e.label)],n=this.table.body,h=l.concat([s]).concat(n),r=this.createCsvContent(h);this.downloadCsv({csvContent:r,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},async generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.isImaging=!0,this.__to__=setTimeout(async()=>{try{const{default:l}=await Promise.resolve().then(()=>require("./img-Bl4Pt1QH.cjs"));await l({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png",options:this.FINAL_CONFIG.chart.userOptions.print})}catch(l){console.error("Error generating image:",l)}finally{this.isImaging=!1}},100)}}},J=["id"],K={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%; background:transparent"},Q=["viewBox","aria-label"],j=["x","y","width","height"],$={key:1},ee={class:"vue-ui-xy-grid"},te=["stroke","x1","x2","y1","y2"],le=["stroke","x1","x2","y1","y2"],re={key:1},ae=["x1","x2","y1","y2","stroke"],ie=["x1","x2","y1","y2","stroke"],se=["x1","x2","y1","y2","stroke"],oe={key:3},ne=["x1","x2","y1","y2","stroke"],ce=["id"],he=["stop-color"],de=["stop-color"],ue=["stop-color"],ge=["id"],me=["stop-color"],fe=["stop-color"],Ne=["stop-color"],Ie=["id"],Fe=["stop-color"],xe=["stop-color"],be=["id"],ke=["stop-color"],_e=["stop-color"],ye=["id"],Le=["stop-color"],Ce=["stop-color"],Ae=["x","y","height","width","fill"],Se=["x","y","width"],we=["x","y","height","width","fill"],Oe=["x","y","height","width","rx","fill","stroke","stroke-width"],Ge=["x","y","height","width","rx","fill","stroke","stroke-width"],ve=["width","x","y"],pe={key:0},Be=["id"],Ve=["fill"],Ee=["x1","x2","y1","y2","stroke","marker-end"],ze=["x","y","font-size","fill"],Me=["stroke","x1","x2","y1","y2"],Te={key:2},Pe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Re=["x","y","width","height","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray"],De={key:4},He=["x1","x2","y1","y2","stroke","stroke-width"],We=["fill","font-size","transform"],qe=["x1","x2","y1","y2","stroke"],Ye=["x","y","font-size","fill"],Xe=["x1","x2","y1","y2","stroke"],Ue=["x","y","font-size","fill"],Ze=["width","x","y"],Je={style:{width:"100%"}},Ke={key:0},Qe=["id"],je=["fill"],$e=["x1","x2","y1","y2","stroke","marker-end"],et=["x","y","font-size","fill"],tt=["d","stroke","stroke-width","stroke-dasharray"],lt=["d","stroke","stroke-width","stroke-dasharray"],rt={key:5},at={key:0},it=["d","fill"],st=["d","fill"],ot=["d","fill"],nt=["d","fill"],ct=["d","stroke","stroke-width","stroke-dasharray"],ht=["d","stroke","stroke-width","stroke-dasharray"],dt=["width","x","y"],ut={style:{width:"100%"}},gt={key:3},mt=["id"],ft=["fill"],Nt=["x1","x2","y1","y2","stroke","marker-end"],It=["x","y","font-size","fill"],Ft={key:6},xt=["x","y","font-size","fill"],bt=["x","y","font-size","fill","font-weight"],kt={key:7},_t=["x","y","font-size","fill"],yt={key:8},Lt=["x","y"],Ct=["innerHTML"],At=["x","y"],St=["innerHTML"],wt=["x1","x2","y1","y2","stroke"],Ot={key:9},Gt=["x","y","font-size","fill"],vt={key:10},pt=["x","y"],Bt=["innerHTML"],Vt=["x","y"],Et=["innerHTML"],zt=["x1","x2","y1","y2","stroke"],Mt=["x","y","font-size","fill","innerHTML"],Tt=["x","y","font-size","fill","innerHTML"],Pt=["x","y","font-size","fill","innerHTML"],Rt=["x","y","font-size","fill","innerHTML"],Dt=["id"],Ht=["stop-color"],Wt=["stop-color"],qt=["x","y","width","height","fill","onMouseenter"],Yt=["font-size","fill","transform"],Xt=["x","y","font-size","fill"],Ut={key:12},Zt=["text-anchor","font-size","fill","transform","onClick"],Jt=["x","y","height","width","onMouseenter","onClick"],Kt={key:13,style:{"pointer-events":"none"}},Qt=["x","y"],jt=["cx","cy","r","fill"],$t={key:5,class:"vue-data-ui-watermark"},el={class:"vue-ui-xy-tag-arrow",height:"20",viewBox:"0 0 10 20",style:{position:"absolute",right:"100%",top:"50%",transform:"translateY(-50%)"}},tl=["fill"],ll=["innerHTML"],rl={class:"vue-ui-xy-tag-arrow",height:"100%",viewBox:"0 0 10 20",style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)"}},al=["fill"],il=["innerHTML"],sl={class:"vue-ui-xy-tag-arrow",height:"20",viewBox:"0 0 10 20",style:{position:"absolute",right:"100%",top:"50%",transform:"translateY(-50%)"}},ol=["fill"],nl=["innerHTML"],cl={class:"vue-ui-xy-tag-arrow",height:"100%",viewBox:"0 0 10 20",style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)"}},hl=["fill"],dl=["innerHTML"],ul=["onClick"],gl={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},ml=["stroke","fill"],fl={key:1,viewBox:"0 0 40 40",height:"14",width:"14"},Nl=["fill"],Il=["fill"],Fl={key:2,viewBox:"0 0 12 12",height:"14",width:"14"},xl={key:9,ref:"chartLegend"},bl={key:10,ref:"source",dir:"auto"},kl={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-dom-to-png-ignore":""},_l=["innerHTML"];function yl(l,s,n,h,r,e){const F=t.resolveComponent("PenAndPaper"),m=t.resolveComponent("Title"),u=t.resolveComponent("UserOptions"),x=t.resolveComponent("PackageVersion"),L=t.resolveComponent("Shape"),k=t.resolveComponent("Skeleton"),C=t.resolveComponent("Slicer"),_=t.resolveComponent("Tooltip"),f=t.resolveComponent("BaseIcon"),b=t.resolveComponent("TableSparkline"),y=t.resolveComponent("DataTable"),A=t.resolveComponent("Accordion");return t.openBlock(),t.createElementBlock("div",{id:`vue-ui-xy_${r.uniqueId}`,class:t.normalizeClass(`vue-ui-xy ${r.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${e.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:t.normalizeStyle(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive?"height: 100%":""}`),onMouseenter:s[7]||(s[7]=()=>e.setUserOptionsVisibility(!0)),onMouseleave:s[8]||(s[8]=()=>e.setUserOptionsVisibility(!1))},[e.FINAL_CONFIG.chart.userOptions.buttons.annotator?(t.openBlock(),t.createBlock(F,{key:0,svgRef:r.svgRef,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,active:r.isAnnotator,onClose:e.toggleAnnotator},null,8,["svgRef","backgroundColor","color","active","onClose"])):t.createCommentVNode("",!0),e.hasOptionsNoTitle?(t.openBlock(),t.createElementBlock("div",K,null,512)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.title.show?(t.openBlock(),t.createElementBlock("div",{key:2,ref:"chartTitle",class:"vue-ui-xy-title",style:t.normalizeStyle(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)},[(t.openBlock(),t.createBlock(m,{key:`title_${r.titleStep}`,config:{title:{cy:"xy-div-title",...e.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...e.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.userOptions.show&&e.isDataset&&(r.keepUserOptionState||r.userOptionsVisible)?(t.openBlock(),t.createBlock(u,{ref:"defails",key:`user_options_${r.step}`,backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color,isPrinting:r.isPrinting,isImaging:r.isImaging,uid:r.uniqueId,hasTooltip:e.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&e.FINAL_CONFIG.chart.tooltip.show,hasPdf:e.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:e.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:e.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:e.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:e.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:n.dataset.length>1&&e.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:r.mutableConfig.isStacked,isFullscreen:r.isFullscreen,chartElement:l.$refs.chart,position:e.FINAL_CONFIG.chart.userOptions.position,isTooltip:r.mutableConfig.showTooltip,titles:{...e.FINAL_CONFIG.chart.userOptions.buttonTitles},hasAnnotator:e.FINAL_CONFIG.chart.userOptions.buttons.annotator,isAnnotation:r.isAnnotator,onToggleFullscreen:e.toggleFullscreen,onGeneratePdf:e.generatePdf,onGenerateCsv:e.generateCsv,onGenerateImage:e.generateImage,onToggleTable:e.toggleTable,onToggleLabels:e.toggleLabels,onToggleStack:e.toggleStack,onToggleTooltip:e.toggleTooltip,onToggleAnnotator:e.toggleAnnotator,style:t.normalizeStyle({visibility:r.keepUserOptionState?r.userOptionsVisible?"visible":"hidden":"visible"})},t.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:t.withCtx(({isOpen:a,color:o})=>[t.renderSlot(l.$slots,"menuIcon",t.normalizeProps(t.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[t.renderSlot(l.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"8"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:t.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[t.renderSlot(l.$slots,"optionAnnotator",t.normalizeProps(t.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip","onToggleAnnotator","style"])):t.createCommentVNode("",!0),e.isDataset?(t.openBlock(),t.createElementBlock("svg",{key:4,ref:"svgRef",xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass([{"vue-data-ui-fullscreen--on":r.isFullscreen,"vue-data-ui-fulscreen--off":!r.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:r.viewBox,style:t.normalizeStyle(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`),"aria-label":e.chartAriaLabel,role:"img","aria-live":"polite"},[t.createVNode(x),l.$slots["chart-background"]?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,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,style:{pointerEvents:"none"}},[t.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,j)):t.createCommentVNode("",!0),e.maxSeries>0?(t.openBlock(),t.createElementBlock("g",$,[t.createElementVNode("g",ee,[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.forceValidValue(e.drawingArea.bottom),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,te)):t.createCommentVNode("",!0),r.mutableConfig.useIndividualScale?e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[a.id===r.selectedScale&&a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(o.y),y2:e.forceValidValue(o.y),stroke:a.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,ie))),256)):a.yLabels.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(a.yLabels,o=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(o.y),y2:e.forceValidValue(o.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,se))),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.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-linecap":"round"},null,8,le)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.showHorizontalLines?(t.openBlock(),t.createElementBlock("g",re,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yLabels,a=>(t.openBlock(),t.createElementBlock("line",{x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ae))),256))])):t.createCommentVNode("",!0)],64)),e.FINAL_CONFIG.chart.grid.showVerticalLines?(t.openBlock(),t.createElementBlock("g",oe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries+(e.FINAL_CONFIG.chart.grid.position==="middle"?1:0),(a,o)=>(t.openBlock(),t.createElementBlock("line",{key:`grid_vertical_line_${o}`,x1:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,x2:e.drawingArea.width/e.maxSeries*o+e.drawingArea.left+e.xPadding,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(e.drawingArea.bottom),"stroke-width":"0.5",stroke:e.FINAL_CONFIG.chart.grid.stroke},null,8,ne))),128))])):t.createCommentVNode("",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_rect_${o}`},[t.createElementVNode("linearGradient",{id:`rectGradient_pos_${o}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,he),t.createElementVNode("stop",{offset:"62%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,de),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,ue)],8,ce),t.createElementVNode("linearGradient",{id:`rectGradient_neg_${o}_${r.uniqueId}`,x2:"0%",y2:"100%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,me),t.createElementVNode("stop",{offset:"38%","stop-color":`${e.shiftHue(a.color,.02)}`},null,8,fe),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ne)],8,ge)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_plot_${o}`},[t.createElementVNode("radialGradient",{id:`plotGradient_${o}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,Fe),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,xe)],8,Ie)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("defs",{key:`def_line_${o}`},[t.createElementVNode("radialGradient",{id:`lineGradient_${o}_${r.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.shiftHue(a.color,.05)}`},null,8,ke),t.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,_e)],8,be),t.createElementVNode("linearGradient",{id:`areaGradient_${o}_${r.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":`${e.setOpacity(e.shiftHue(a.color,.03),e.FINAL_CONFIG.line.area.opacity)}`},null,8,Le),t.createElementVNode("stop",{offset:"100%","stop-color":`${e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)}`},null,8,Ce)],8,ye)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.highlightAreas,a=>(t.openBlock(),t.createElementBlock("g",null,[a.show?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.span,(o,i)=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("rect",{style:t.normalizeStyle({transition:"none",opacity:a.from+i>=r.slicer.start&&a.from+i<=r.slicer.end-1?1:0}),x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+i-r.slicer.start),y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:e.setOpacity(a.color,a.opacity)},null,12,Ae),a.caption.text&&i===0?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*(a.from+i-r.slicer.start)-(a.caption.width==="auto"?0:a.caption.width/2-e.drawingArea.width/e.maxSeries*a.span/2),y:e.drawingArea.top+a.caption.offsetY,style:t.normalizeStyle({overflow:"visible",opacity:a.to>=r.slicer.start&&a.from<r.slicer.end?1:0}),height:"1",width:a.caption.width==="auto"?e.drawingArea.width/e.maxSeries*a.span:a.caption.width},[t.createElementVNode("div",{style:t.normalizeStyle(`padding:${a.caption.padding}px;text-align:${a.caption.textAlign};font-size:${a.caption.fontSize}px;color:${a.caption.color};font-weight:${a.caption.bold?"bold":"normal"}`)},t.toDisplayString(a.caption.text),5)],12,Se)):t.createCommentVNode("",!0)]))),256)):t.createCommentVNode("",!0)]))),256)),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`tooltip_trap_highlighter_${o}`},[t.createElementVNode("rect",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o,y:e.drawingArea.top,height:e.drawingArea.height<0?10:e.drawingArea.height,width:e.drawingArea.width/e.maxSeries<0?1e-5:e.drawingArea.width/e.maxSeries,fill:[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(o)?e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color,e.FINAL_CONFIG.chart.highlighter.opacity):"transparent"},null,8,we)]))),128))]),e.barSet.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_bar_${o}`,class:t.normalizeClass(`serie_bar_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock("g",{key:`bar_plot_${o}_${c}`},[e.canShowValue(i.value)?(t.openBlock(),t.createElementBlock("rect",{key:0,x:e.calcRectX(i),y:r.mutableConfig.useIndividualScale?e.calcIndividualRectY(i):e.calcRectY(i),height:r.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(i)):Math.abs(e.calcRectHeight(i)),width:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:e.FINAL_CONFIG.bar.useGradient?i.value>=0?`url(#rectGradient_pos_${o}_${r.uniqueId})`:`url(#rectGradient_neg_${o}_${r.uniqueId})`:a.color,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Oe)):t.createCommentVNode("",!0),e.canShowValue(i.value)&&l.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:1,x:e.calcRectX(i),y:r.mutableConfig.useIndividualScale?e.calcIndividualRectY(i):e.calcRectY(i),height:r.mutableConfig.useIndividualScale?Math.abs(e.calcIndividualHeight(i)):Math.abs(e.calcRectHeight(i)),width:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap),rx:e.FINAL_CONFIG.bar.borderRadius,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`,stroke:e.FINAL_CONFIG.bar.border.useSerieColor?a.color:e.FINAL_CONFIG.bar.border.stroke,"stroke-width":e.FINAL_CONFIG.bar.border.strokeWidth},null,8,Ge)):t.createCommentVNode("",!0),i.comment&&e.FINAL_CONFIG.chart.comments.show?(t.openBlock(),t.createElementBlock("foreignObject",{key:2,style:{overflow:"visible"},height:"12",width:(e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)<0?1e-5:e.calcRectWidth()-(r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?0:e.barPeriodGap)/2)+e.FINAL_CONFIG.chart.comments.width,x:e.calcRectX(i)-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:e.checkNaN(i.y)+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.renderSlot(l.$slots,"plot-comment",{plot:{...i,color:a.color,seriesIndex:o,datapointIndex:c}},void 0,!0)],8,ve)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",pe,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`bar_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,Ve)],8,Be)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1+e.calcRectWidth(),x2:e.calcLinearProgression(a.plots).x2+e.calcRectWidth(),y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${o})`},null,8,Ee)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2+e.calcRectWidth(),y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,ze)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)):t.createCommentVNode("",!0),!r.mutableConfig.useIndividualScale&&e.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(t.openBlock(),t.createElementBlock("line",{key:1,stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.right-e.xPadding,y1:e.forceValidValue(e.zero),y2:e.forceValidValue(e.zero),"stroke-linecap":"round"},null,8,Me)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.highlighter.useLine&&(![null,void 0].includes(r.selectedSerieIndex)||![null,void 0].includes(r.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Te,[t.createElementVNode("line",{x1:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,x2:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+e.drawingArea.width/e.maxSeries/2,y1:e.forceValidValue(e.drawingArea.top),y2:e.forceValidValue(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,Pe)])):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,Re)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.show?(t.openBlock(),t.createElementBlock("g",De,[r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",null,[t.createElementVNode("line",{x1:a.x+e.xPadding,x2:a.x+e.xPadding,y1:r.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset-a.individualHeight):e.forceValidValue(e.drawingArea.top),y2:r.mutableConfig.isStacked?e.forceValidValue(e.drawingArea.bottom-a.yOffset):e.forceValidValue(e.drawingArea.bottom),stroke:a.color,"stroke-width":e.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,He)]))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,a=>(t.openBlock(),t.createElementBlock("g",{style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.3:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("text",{fill:a.color,"font-size":r.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5+e.xPadding+e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleLabelOffsetX}, ${r.mutableConfig.isStacked?e.drawingArea.bottom-a.yOffset-a.individualHeight/2:e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`},t.toDisplayString(a.name)+" "+t.toDisplayString(a.scaleLabel&&a.unique&&a.scaleLabel!==a.id?`- ${a.scaleLabel}`:""),9,We),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(o,i)=>(t.openBlock(),t.createElementBlock("line",{x1:a.x-3+e.xPadding,x2:a.x+e.xPadding,y1:e.forceValidValue(o.y),y2:e.forceValidValue(o.y),stroke:a.color,"stroke-width":1,"stroke-linecap":"round"},null,8,qe))),256)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.yLabels,(o,i)=>(t.openBlock(),t.createElementBlock("text",{x:a.x-5+e.xPadding+e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleValueOffsetX,y:e.forceValidValue(o.y)+r.fontSizes.dataLabels/3,"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:a.color},t.toDisplayString(e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,o.value,e.dataLabel({p:o.prefix,v:o.value,s:o.suffix,r:1}),{datapoint:o.datapoint,seriesIndex:i})),9,Ye))),256))],4))),256))],64)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.yLabels,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`yLabel_${o}`},[e.canShowValue(a)&&a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.drawingArea.left+e.xPadding,x2:e.drawingArea.left-5+e.xPadding,y1:e.forceValidValue(a.y),y2:e.forceValidValue(a.y),stroke:e.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,Xe)):t.createCommentVNode("",!0),a.value>=e.niceScale.min&&a.value<=e.niceScale.max?(t.openBlock(),t.createElementBlock("text",{key:1,x:e.drawingArea.left-7+e.xPadding,y:e.checkNaN(a.y+r.fontSizes.dataLabels/3),"font-size":r.fontSizes.dataLabels,"text-anchor":"end",fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.canShowValue(a.value)?e.applyDataLabel(e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,a.value,e.dataLabel({p:a.prefix,v:a.value,s:a.suffix,r:1})):""),9,Ue)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_plot_${o}`,class:t.normalizeClass(`serie_plot_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock("g",{key:`circle_plot_${o}_${c}`},[i&&e.canShowValue(i.value)?(t.openBlock(),t.createBlock(L,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${o}_${r.uniqueId})`:e.FINAL_CONFIG.plot.dot.useSerieColor?a.color:e.FINAL_CONFIG.plot.dot.fill,plot:{x:e.checkNaN(i.x),y:e.checkNaN(i.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c?(r.plotRadii.plot||6)*1.5:r.plotRadii.plot||6,stroke:e.FINAL_CONFIG.plot.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.plot.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),i.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:i.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:i.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",Je,[t.renderSlot(l.$slots,"plot-comment",{plot:{...i,color:a.color,seriesIndex:o,datapointIndex:c}},void 0,!0)])],8,Ze)):t.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",Ke,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`plot_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,je)],8,Qe)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${o})`},null,8,$e)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,et)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${a.curve}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,tt)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.straight}`,stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":e.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,lt)):t.createCommentVNode("",!0)],6))),128)),l.$slots.pattern?(t.openBlock(),t.createElementBlock("defs",rt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.safeDataset,(a,o)=>t.renderSlot(l.$slots,"pattern",t.mergeProps({key:`serie_pattern_slot_${o}`},{ref_for:!0},{...a,seriesIndex:a.slotAbsoluteIndex,patternId:`pattern_${r.uniqueId}_${o}`}),void 0,!0)),128))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`serie_line_${o}`,class:t.normalizeClass(`serie_line_${o}`),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.useArea&&a.plots.length>1?(t.openBlock(),t.createElementBlock("g",at,[a.smooth?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(a.curveAreas,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:c},[t.createElementVNode("path",{d:i,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,it),l.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:i,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`},null,8,st)):t.createCommentVNode("",!0)],64))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(a.area.split(";"),(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:c},[t.createElementVNode("path",{d:`M${i}Z`,fill:e.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${o}_${r.uniqueId})`:e.setOpacity(a.color,e.FINAL_CONFIG.line.area.opacity)},null,8,ot),l.$slots.pattern?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${i}Z`,fill:`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`},null,8,nt)):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0),a.smooth&&a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${a.curve}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round"},null,8,ct)):a.plots.length>1?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M${a.straight}`,stroke:a.color,"stroke-width":e.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?e.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ht)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`circle_line_${o}_${c}`},[!e.optimize.linePlot&&i&&e.canShowValue(i.value)||e.optimize.linePlot&&i&&e.canShowValue(i.value)&&(r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c)?(t.openBlock(),t.createBlock(L,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",color:e.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${o}_${r.uniqueId})`:e.FINAL_CONFIG.line.dot.useSerieColor?a.color:e.FINAL_CONFIG.line.dot.fill,plot:{x:e.checkNaN(i.x),y:e.checkNaN(i.y)},radius:r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c?(r.plotRadii.line||6)*1.5:r.plotRadii.line||6,stroke:e.FINAL_CONFIG.line.dot.useSerieColor?e.FINAL_CONFIG.chart.backgroundColor:a.color,strokeWidth:e.FINAL_CONFIG.line.dot.strokeWidth},null,8,["shape","color","plot","radius","stroke","strokeWidth"])):t.createCommentVNode("",!0),i.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:i.x-e.FINAL_CONFIG.chart.comments.width/2+e.FINAL_CONFIG.chart.comments.offsetX,y:i.y+e.FINAL_CONFIG.chart.comments.offsetY+6},[t.createElementVNode("div",ut,[t.renderSlot(l.$slots,"plot-comment",{plot:{...i,color:a.color,seriesIndex:o,datapointIndex:c}},void 0,!0)])],8,dt)):t.createCommentVNode("",!0)],64))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(e.calcLinearProgression(a.plots).trend)?(t.openBlock(),t.createElementBlock("g",gt,[t.createElementVNode("defs",null,[t.createElementVNode("marker",{id:`line_arrow_${o}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[t.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:a.color},null,8,ft)],8,mt)]),a.plots.length>1?(t.openBlock(),t.createElementBlock("line",{key:0,x1:e.calcLinearProgression(a.plots).x1,x2:e.calcLinearProgression(a.plots).x2,y1:e.forceValidValue(e.calcLinearProgression(a.plots).y1),y2:e.forceValidValue(e.calcLinearProgression(a.plots).y2),"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${o})`},null,8,Nt)):t.createCommentVNode("",!0),a.plots.length>1?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:e.calcLinearProgression(a.plots).x2,y:e.calcLinearProgression(a.plots).y2-6,"font-size":r.fontSizes.plotLabels,fill:a.color},t.toDisplayString(e.dataLabel({v:e.calcLinearProgression(a.plots).trend*100,s:"%",r:2})),9,It)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],6))),128)),(e.FINAL_CONFIG.bar.labels.show||e.FINAL_CONFIG.bar.serieName.show)&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",Ft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.barSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_bar_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_bar_${o}_${c}`},[i&&(!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c)&&e.FINAL_CONFIG.bar.labels.show?(t.openBlock(),t.createElementBlock("text",{key:0,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?i.x+e.slot.line/2:e.calcRectX(i)+e.calcRectWidth()/2-e.barPeriodGap/2,y:e.checkNaN(i.y)+(i.value>=0?e.FINAL_CONFIG.bar.labels.offsetY:-e.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.labels.color,style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},t.toDisplayString(e.canShowValue(i.value)?e.applyDataLabel(e.FINAL_CONFIG.bar.labels.formatter,i.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.bar.labels.rounding}),{datapoint:i,serie:a}):""),13,xt)):t.createCommentVNode("",!0),i&&e.FINAL_CONFIG.bar.serieName.show?(t.openBlock(),t.createElementBlock("text",{key:1,x:r.mutableConfig.useIndividualScale&&r.mutableConfig.isStacked?i.x+e.slot.line/2:i.x+e.calcRectWidth()*1.1,y:i.y+(i.value>0?e.FINAL_CONFIG.bar.serieName.offsetY:-e.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.bar.serieName.useSerieColor?a.color:e.FINAL_CONFIG.bar.serieName.color,"font-weight":e.FINAL_CONFIG.bar.serieName.bold?"bold":"normal",style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},t.toDisplayString(e.FINAL_CONFIG.bar.serieName.useAbbreviation?e.abbreviate({source:a.name,length:e.FINAL_CONFIG.bar.serieName.abbreviationSize}):a.name),13,bt)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):t.createCommentVNode("",!0),e.FINAL_CONFIG.plot.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",kt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}_${c}`},[i&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c?(t.openBlock(),t.createElementBlock("text",{key:0,x:i.x,y:i.y+e.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.plot.labels.color,style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},t.toDisplayString(e.canShowValue(i.value)?e.applyDataLabel(e.FINAL_CONFIG.plot.labels.formatter,i.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.plot.labels.rounding}),{datapoint:i,serie:a}):""),13,_t)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):(t.openBlock(),t.createElementBlock("g",yt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}_${c}`},[e.FINAL_CONFIG.plot.tag.followValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag?(t.openBlock(),t.createElementBlock("line",{key:0,class:"vue-ui-xy-tag-plot",x1:e.drawingArea.left,x2:e.drawingArea.right,y1:i.y,y2:i.y,"stroke-width":1,"stroke-linecap":"round","stroke-dasharray":"2",stroke:a.color},null,8,wt)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i&&c===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:i.x,y:i.y-20,height:24,width:"150",style:t.normalizeStyle(`overflow: visible; opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`),innerHTML:e.applyDataLabel(e.FINAL_CONFIG.plot.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,12,Ct)],12,Lt)):t.createCommentVNode("",!0),i&&c===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:i.x-a.name.length*(r.fontSizes.plotLabels/2),y:i.y-20,height:24,width:"150",style:t.normalizeStyle(`overflow: visible; opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`),innerHTML:e.applyDataLabel(e.FINAL_CONFIG.plot.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,12,St)],12,At)):t.createCommentVNode("",!0)],64))],64))),128))],64))),128))])),e.FINAL_CONFIG.line.labels.show&&r.mutableConfig.dataLabels.show?(t.openBlock(),t.createElementBlock("g",Ot,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}_${c}`},[i&&!Object.hasOwn(a,"dataLabels")||a.dataLabels===!0||r.selectedSerieIndex!==null&&r.selectedSerieIndex===c||r.selectedMinimapIndex!==null&&r.selectedMinimapIndex===c?(t.openBlock(),t.createElementBlock("text",{key:0,x:i.x,y:i.y+(i.value>=0?e.FINAL_CONFIG.line.labels.offsetY:-e.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":r.fontSizes.plotLabels,fill:e.FINAL_CONFIG.line.labels.color,style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},t.toDisplayString(e.canShowValue(i.value)?e.applyDataLabel(e.FINAL_CONFIG.line.labels.formatter,i.value,e.dataLabel({p:a.prefix||e.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:a.suffix||e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.line.labels.rounding}),{datapoint:i,serie:a}):""),13,Gt)):t.createCommentVNode("",!0)],64))),128))],64))),128))])):(t.openBlock(),t.createElementBlock("g",vt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}_${c}`},[e.FINAL_CONFIG.line.tag.followValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag?(t.openBlock(),t.createElementBlock("line",{key:0,class:"vue-ui-xy-tag-line",x1:e.drawingArea.left,x2:e.drawingArea.right,y1:i.y,y2:i.y,"stroke-width":1,"stroke-linecap":"round","stroke-dasharray":"2",stroke:a.color},null,8,zt)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i&&c===0&&a.useTag&&a.useTag==="start"?(t.openBlock(),t.createElementBlock("foreignObject",{key:0,x:i.x,y:i.y-20,height:24,width:"150",style:t.normalizeStyle(`overflow: visible; opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`),innerHTML:e.applyDataLabel(e.FINAL_CONFIG.line.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,12,Bt)],12,pt)):t.createCommentVNode("",!0),i&&c===a.plots.length-1&&a.useTag&&a.useTag==="end"?(t.openBlock(),t.createElementBlock("foreignObject",{key:1,x:i.x,y:i.y-20,height:24,width:"150",style:t.normalizeStyle(`overflow: visible; opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},[t.createElementVNode("div",{style:t.normalizeStyle(`padding: 3px; background:${e.setOpacity(a.color,80)};color:${e.adaptColorToBackground(a.color)};width:fit-content;font-size:${r.fontSizes.plotLabels}px;border-radius: 2px;`),innerHTML:e.applyDataLabel(e.FINAL_CONFIG.line.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,12,Et)],12,Vt)):t.createCommentVNode("",!0)],64))],64))),128))],64))),128))])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_line_${o}_${c}`},[i&&c===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:i.x-r.fontSizes.plotLabels,y:i.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:i.x-r.fontSizes.plotLabels,y:i.y,maxWords:2}),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Mt)):t.createCommentVNode("",!0),i&&c===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:i.x+r.fontSizes.plotLabels,y:i.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:i.x+r.fontSizes.plotLabels,y:i.y,maxWords:2}),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Tt)):t.createCommentVNode("",!0)],64))),128))],64))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`xLabel_plot_${o}_${c}`},[i&&c===0&&a.showSerieName&&a.showSerieName==="start"?(t.openBlock(),t.createElementBlock("text",{key:0,x:i.x-r.fontSizes.plotLabels,y:i.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"end",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:i.x-r.fontSizes.plotLabels,y:i.y,maxWords:2}),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Pt)):t.createCommentVNode("",!0),i&&c===a.plots.length-1&&a.showSerieName&&a.showSerieName==="end"?(t.openBlock(),t.createElementBlock("text",{key:1,x:i.x+r.fontSizes.plotLabels,y:i.y,"font-size":r.fontSizes.plotLabels,"text-anchor":"start",fill:a.color,innerHTML:e.createTSpans({content:a.name,fontSize:r.fontSizes.plotLabels,fill:a.color,x:i.x+r.fontSizes.plotLabels,y:i.y,maxWords:2}),style:t.normalizeStyle(`opacity:${r.selectedScale?r.selectedScale===a.groupId?1:.2:1};transition:opacity 0.2s ease-in-out`)},null,12,Rt)):t.createCommentVNode("",!0)],64))),128))],64))),128)),r.mutableConfig.useIndividualScale&&!r.mutableConfig.isStacked?(t.openBlock(),t.createElementBlock(t.Fragment,{key:11},[t.createElementVNode("defs",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,(a,o)=>(t.openBlock(),t.createElementBlock("linearGradient",{id:`individual_scale_gradient_${r.uniqueId}_${o}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[t.createElementVNode("stop",{offset:"0%","stop-color":e.FINAL_CONFIG.chart.backgroundColor,"stop-opacity":"0"},null,8,Ht),t.createElementVNode("stop",{offset:"100%","stop-color":a.color,"stop-opacity":"0.2"},null,8,Wt)],8,Dt))),256))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.allScales,(a,o)=>(t.openBlock(),t.createElementBlock("rect",{x:a.x-e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+e.xPadding,y:e.drawingArea.top,width:e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:e.drawingArea.height<0?10:e.drawingArea.height,fill:r.selectedScale===a.groupId?`url(#individual_scale_gradient_${r.uniqueId}_${o})`:"transparent",onMouseenter:i=>r.selectedScale=a.groupId,onMouseleave:s[0]||(s[0]=i=>r.selectedScale=null)},null,40,qt))),256))],64)):t.createCommentVNode("",!0),t.createElementVNode("g",null,[e.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!r.mutableConfig.useIndividualScale?(t.openBlock(),t.createElementBlock("text",{key:0,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${r.fontSizes.yAxis+e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top+e.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,Yt)):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(t.openBlock(),t.createElementBlock("text",{key:1,"text-anchor":"middle",x:r.width/2,y:e.drawingArea.bottom+r.fontSizes.yAxis+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":r.fontSizes.yAxis,fill:e.FINAL_CONFIG.chart.grid.labels.color},t.toDisplayString(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,Xt)):t.createCommentVNode("",!0)]),s[9]||(s[9]=t.createTextVNode('v-for="(label, i) in timeLabels" :key="`time_label_${i}`" ')),e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(t.openBlock(),t.createElementBlock("g",Ut,[l.$slots["time-label"]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.timeLabels,(a,o)=>t.renderSlot(l.$slots,"time-label",t.mergeProps({key:`time_label_${o}`,ref_for:!0},{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*o+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,fontSize:r.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*o+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,absoluteIndex:a.absoluteIndex,content:a.text,textAnchor:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle",show:a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&r.selectedSerieIndex===o&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&o%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0}),void 0,!0)),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.timeLabels,(a,o)=>(t.openBlock(),t.createElementBlock("g",{key:`time_label_${o}`},[a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(o===0||o===e.timeLabels.length-1)&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&r.selectedSerieIndex===o&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&o%Math.floor((this.slicer.end-this.slicer.start)/e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(t.openBlock(),t.createElementBlock("text",{key:0,"text-anchor":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":r.fontSizes.xAxis,fill:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${e.drawingArea.left+e.drawingArea.width/e.maxSeries*o+e.drawingArea.width/e.maxSeries/2}, ${e.drawingArea.bottom+r.fontSizes.xAxis*1.3+e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`,style:{cursor:"pointer"},onClick:()=>e.selectTimeLabel(a,o)},t.toDisplayString(a.text||""),9,Zt)):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0),t.createElementVNode("g",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.maxSeries,(a,o)=>(t.openBlock(),t.createElementBlock("rect",{key:`tooltip_trap_${o}`,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:i=>e.toggleTooltipVisibility(!0,o),onMouseleave:s[1]||(s[1]=i=>e.toggleTooltipVisibility(!1)),onClick:i=>e.selectX(o)},null,40,Jt))),128))]),e.FINAL_CONFIG.chart.timeTag.show&&(![null,void 0].includes(r.selectedSerieIndex)||![null,void 0].includes(r.selectedMinimapIndex))?(t.openBlock(),t.createElementBlock("g",Kt,[(t.openBlock(),t.createElementBlock("foreignObject",{x:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))-100+e.drawingArea.width/e.maxSeries/2,y:e.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[t.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:t.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${e.FINAL_CONFIG.chart.timeTag.color};font-size:${e.FINAL_CONFIG.chart.timeTag.fontSize}px`)},t.toDisplayString(e.timeLabels[(r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0)].text||(r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0)),5)],8,Qt)),t.createElementVNode("circle",{cx:e.drawingArea.left+e.drawingArea.width/e.maxSeries*((r.selectedSerieIndex!==null?r.selectedSerieIndex:0)||(r.selectedMinimapIndex!==null?r.selectedMinimapIndex:0))+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,jt)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"svg",{svg:e.svg},void 0,!0)],14,Q)):t.createCommentVNode("",!0),l.$slots.watermark?(t.openBlock(),t.createElementBlock("div",$t,[t.renderSlot(l.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:r.isPrinting||r.isImaging})),void 0,!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.lineSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`tag_line_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`tag_line_${o}_${c}`},[[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag&&a.useTag==="end"&&e.FINAL_CONFIG.line.tag.followValue?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:I=>e.setTagRef(o,c,I,"right","line"),class:"vue-ui-xy-tag","data-tag":"right",style:t.normalizeStyle({position:"fixed",top:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.right+e.FINAL_CONFIG.line.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_right_line`],position:"right"}).top+"px",left:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.right+e.FINAL_CONFIG.line.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_right_line`],position:"right"}).left+"px",height:"fit-content",width:"fit-content",background:a.color,color:e.adaptColorToBackground(a.color),padding:"0 6px",fontSize:e.FINAL_CONFIG.line.tag.fontSize+"px",opacity:1})},[(t.openBlock(),t.createElementBlock("svg",el,[t.createElementVNode("path",{d:"M 0,10 10,0 10,20 Z",fill:a.color,stroke:"none"},null,8,tl)])),t.createElementVNode("div",{class:"vue-ui-xy-tag-content",innerHTML:e.applyDataLabel(e.FINAL_CONFIG.line.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,8,ll)],4)):t.createCommentVNode("",!0),[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag&&a.useTag==="start"&&e.FINAL_CONFIG.line.tag.followValue?(t.openBlock(),t.createElementBlock("div",{key:1,ref_for:!0,ref:I=>e.setTagRef(o,c,I,"left","line"),class:"vue-ui-xy-tag","data-tag":"left",style:t.normalizeStyle({position:"fixed",top:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.left-e.FINAL_CONFIG.line.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_left_line`],position:"left"}).top+"px",left:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.left-e.FINAL_CONFIG.line.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_left_line`],position:"left"}).left+"px",height:"fit-content",width:"fit-content",background:a.color,color:e.adaptColorToBackground(a.color),padding:"0 6px",fontSize:e.FINAL_CONFIG.line.tag.fontSize+"px",opacity:1})},[(t.openBlock(),t.createElementBlock("svg",rl,[t.createElementVNode("path",{d:"M 0,0 10,10 0,20 Z",fill:a.color,stroke:"none"},null,8,al)])),t.createElementVNode("div",{class:"vue-ui-xy-tag-content",innerHTML:e.applyDataLabel(e.FINAL_CONFIG.line.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,8,il)],4)):t.createCommentVNode("",!0)],64))),128))],64))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.plotSet,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`tag_plot_${o}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.plots,(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`tag_plot_${o}_${c}`},[[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag&&a.useTag==="end"&&e.FINAL_CONFIG.plot.tag.followValue?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:I=>e.setTagRef(o,c,I,"right","plot"),class:"vue-ui-xy-tag","data-tag":"right",style:t.normalizeStyle({position:"fixed",top:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.right+e.FINAL_CONFIG.plot.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_right_plot`],position:"right"}).top+"px",left:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.right+e.FINAL_CONFIG.plot.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_right_plot`],position:"right"}).left+"px",height:"fit-content",width:"fit-content",background:a.color,color:e.adaptColorToBackground(a.color),padding:"0 6px",fontSize:e.FINAL_CONFIG.plot.tag.fontSize+"px",opacity:1})},[(t.openBlock(),t.createElementBlock("svg",sl,[t.createElementVNode("path",{d:"M 0,10 10,0 10,20 Z",fill:a.color,stroke:"none"},null,8,ol)])),t.createElementVNode("div",{class:"vue-ui-xy-tag-content",innerHTML:e.applyDataLabel(e.FINAL_CONFIG.plot.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,8,nl)],4)):t.createCommentVNode("",!0),[r.selectedMinimapIndex,r.selectedSerieIndex,r.selectedRowIndex].includes(c)&&a.useTag&&a.useTag==="start"&&e.FINAL_CONFIG.plot.tag.followValue?(t.openBlock(),t.createElementBlock("div",{key:1,ref_for:!0,ref:I=>e.setTagRef(o,c,I,"left","plot"),class:"vue-ui-xy-tag","data-tag":"left",style:t.normalizeStyle({position:"fixed",top:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.left-e.FINAL_CONFIG.plot.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_left_plot`],position:"left"}).top+"px",left:e.placeXYTag({svgElement:r.svgRef,x:e.drawingArea.left-e.FINAL_CONFIG.plot.tag.fontSize/1.5,y:i.y,element:r.tagRefs[`${o}_${c}_left_plot`],position:"left"}).left+"px",height:"fit-content",width:"fit-content",background:a.color,color:e.adaptColorToBackground(a.color),padding:"0 6px",fontSize:e.FINAL_CONFIG.plot.tag.fontSize+"px",opacity:1})},[(t.openBlock(),t.createElementBlock("svg",cl,[t.createElementVNode("path",{d:"M 0,0 10,10 0,20 Z",fill:a.color,stroke:"none"},null,8,hl)])),t.createElementVNode("div",{class:"vue-ui-xy-tag-content",innerHTML:e.applyDataLabel(e.FINAL_CONFIG.plot.tag.formatter,i.value,a.name,{datapoint:i,seriesIndex:c,serieName:a.name})},null,8,dl)],4)):t.createCommentVNode("",!0)],64))),128))],64))),128)),e.isDataset?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(k,{key:6,config:{type:"line",style:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:e.FINAL_CONFIG.chart.grid.stroke},path:{color:e.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),e.FINAL_CONFIG.chart.zoom.show&&r.maxX>6&&e.isDataset?(t.openBlock(),t.createBlock(C,{ref:"chartSlicer",key:`slicer_${r.slicerStep}`,background:e.FINAL_CONFIG.chart.zoom.color,fontSize:e.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:e.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.start],labelRight:e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r.slicer.end-1],textColor:e.FINAL_CONFIG.chart.color,inputColor:e.FINAL_CONFIG.chart.zoom.color,selectColor:e.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:e.FINAL_CONFIG.chart.backgroundColor,minimap:e.minimap,smoothMinimap:e.FINAL_CONFIG.chart.zoom.minimap.smooth,minimapSelectedColor:e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,minimapSelectionRadius:e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,minimapLineColor:e.FINAL_CONFIG.chart.zoom.minimap.lineColor,minimapSelectedColorOpacity:e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:r.selectedSerieIndex,minimapIndicatorColor:e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,verticalHandles:e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,max:r.maxX,min:0,valueStart:r.slicer.start,valueEnd:r.slicer.end,start:r.slicer.start,"onUpdate:start":s[2]||(s[2]=a=>r.slicer.start=a),end:r.slicer.end,"onUpdate:end":s[3]||(s[3]=a=>r.slicer.end=a),refreshStartPoint:e.FINAL_CONFIG.chart.zoom.startIndex!==null?e.FINAL_CONFIG.chart.zoom.startIndex:0,refreshEndPoint:e.FINAL_CONFIG.chart.zoom.endIndex!==null?e.FINAL_CONFIG.chart.zoom.endIndex+1:Math.max(...n.dataset.map(a=>e.largestTriangleThreeBucketsArray({data:a.series,threshold:e.FINAL_CONFIG.downsample.threshold}).length)),enableRangeHandles:e.FINAL_CONFIG.chart.zoom.enableRangeHandles,enableSelectionDrag:e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,onReset:e.refreshSlicer,onTrapMouse:e.selectMinimapIndex},{"reset-action":t.withCtx(({reset:a})=>[t.renderSlot(l.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:a})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","minimap","smoothMinimap","minimapSelectedColor","minimapSelectionRadius","minimapLineColor","minimapSelectedColorOpacity","minimapSelectedIndex","minimapIndicatorColor","verticalHandles","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag","onReset","onTrapMouse"])):t.createCommentVNode("",!0),e.FINAL_CONFIG.chart.legend.show?(t.openBlock(),t.createElementBlock("div",{key:8,ref:"chartLegend",class:"vue-ui-xy-legend",style:t.normalizeStyle(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.absoluteDataset,(a,o)=>(t.openBlock(),t.createElementBlock("div",{key:`div_legend_item_${o}`,onClick:i=>e.segregate(a),class:t.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":r.segregatedSeries.includes(a.id)})},[r.icons[a.type]==="line"?(t.openBlock(),t.createElementBlock("svg",gl,[t.createElementVNode("rect",{x:"0",y:"7.5",rx:"1.5",stroke:e.FINAL_CONFIG.chart.backgroundColor,"stroke-width":.5,height:"3",width:"20",fill:a.color},null,8,ml),t.createVNode(L,{plot:{x:10,y:9},radius:4,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",stroke:e.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["color","shape","stroke"])])):r.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("svg",fl,[r.icons[a.type]==="bar"&&l.$slots.pattern?(t.openBlock(),t.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:a.color},null,8,Nl)):t.createCommentVNode("",!0),r.icons[a.type]==="bar"?(t.openBlock(),t.createElementBlock("rect",{key:1,x:"0",y:"0",rx:"1",height:"40",width:"40",stroke:"none",fill:l.$slots.pattern?`url(#pattern_${r.uniqueId}_${a.slotAbsoluteIndex})`:a.color},null,8,Il)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("svg",Fl,[t.createVNode(L,{plot:{x:6,y:6},radius:5,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle"},null,8,["color","shape"])])),t.createElementVNode("span",{style:t.normalizeStyle(`color:${e.FINAL_CONFIG.chart.legend.color}`)},t.toDisplayString(a.name),5)],10,ul))),128))],4)):(t.openBlock(),t.createElementBlock("div",xl,[t.renderSlot(l.$slots,"legend",{legend:e.absoluteDataset},void 0,!0)],512)),l.$slots.source?(t.openBlock(),t.createElementBlock("div",bl,[t.renderSlot(l.$slots,"source",{},void 0,!0)],512)):t.createCommentVNode("",!0),t.createVNode(_,{show:r.mutableConfig.showTooltip&&r.isTooltip,backgroundColor:e.FINAL_CONFIG.chart.tooltip.backgroundColor,color:e.FINAL_CONFIG.chart.tooltip.color,fontSize:e.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:e.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:e.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:e.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,position:e.FINAL_CONFIG.chart.tooltip.position,offsetY:e.FINAL_CONFIG.chart.tooltip.offsetY,parent:l.$refs.chart,content:e.tooltipContent,isFullscreen:r.isFullscreen,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","isFullscreen","isCustom"]),e.isDataset?(t.openBlock(),t.createBlock(A,{key:11,hideDetails:"",config:{open:r.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color},head:{backgroundColor:e.FINAL_CONFIG.chart.backgroundColor,color:e.FINAL_CONFIG.chart.color}}},{content:t.withCtx(()=>[t.createElementVNode("div",{style:t.normalizeStyle(`${r.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[t.createElementVNode("div",kl,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=a=>r.showSparklineTable=a)},null,512),[[t.vModelCheckbox,r.showSparklineTable]]),t.createElementVNode("div",{onClick:s[5]||(s[5]=a=>r.showSparklineTable=!r.showSparklineTable),style:{cursor:"pointer"}},[t.createVNode(f,{name:"chartLine",size:20,stroke:e.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),r.showSparklineTable?(t.openBlock(),t.createBlock(b,{key:`sparkline_${r.segregateStep}`,dataset:e.tableSparklineDataset,config:e.tableSparklineConfig},null,8,["dataset","config"])):(t.openBlock(),t.createBlock(y,{key:`table_${r.tableStep}`,colNames:e.dataTable.colNames,head:e.dataTable.head,body:e.dataTable.body,config:e.dataTable.config,title:`${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text?` : ${e.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:s[6]||(s[6]=a=>r.mutableConfig.showTable=!1)},{th:t.withCtx(({th:a})=>[t.createElementVNode("div",{innerHTML:a},null,8,_l)]),td:t.withCtx(({td:a})=>[t.createTextVNode(t.toDisplayString(isNaN(Number(a))?a:e.dataLabel({p:e.FINAL_CONFIG.chart.labels.prefix,v:a,s:e.FINAL_CONFIG.chart.labels.suffix,r:e.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):t.createCommentVNode("",!0)],46,J)}const Ll=X._export_sfc(Z,[["render",yl],["__scopeId","data-v-0ac0eb6b"]]);exports.default=Ll;
@@ -1,9 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./index-Cn2tUOoX.cjs"),x=require("./useResponsive-BBkmXXaa.cjs"),vt=require("./Tooltip-C_H6-uAa.cjs"),dt=require("./Legend-ieOu_fKK.cjs"),ht=require("./Title-D62pPwLz.cjs"),ft=require("./Slicer-FXxFjXOP.cjs"),Ue=require("./usePrinter-BrH80VBz.cjs"),yt=require("./vue-ui-accordion-7GoAZx3k.cjs"),pt=require("./DataTable-CNCnRrD-.cjs"),gt=require("./vue-ui-skeleton-Mcoev-5q.cjs"),qe=require("./useNestedProp-C8955nsn.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./BaseIcon-DY-33nfj.cjs"),xt=require("./ColorPicker-CrMLe8x_.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Ct=["disabled"],Lt=["data-mode","xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],zt=["x","y","fill","font-size"],$t=["x","dy"],Tt=["d","stroke","stroke-width"],Et={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(z,{emit:Ee}){const U=z,Be=Ee,L=t.ref([]),V=t.ref([]),K=t.ref("0 0 0 0"),D=t.ref(U.color),y=t.ref(1),m=t.ref("draw"),w=t.ref(null),q=t.ref(!1),h=t.ref(null),Y=t.ref({x:0,y:0}),X=t.ref([""]),E=t.ref({row:0,col:0}),P=t.ref(16);let W=1;function G(){return W++}function ne(i){var a;const r=R.value;if(!r)return{x:0,y:0};const o=r.createSVGPoint();let u=i.clientX,v=i.clientY;i.touches&&i.touches.length&&(u=i.touches[0].clientX,v=i.touches[0].clientY),o.x=u,o.y=v;const f=(a=r.getScreenCTM())==null?void 0:a.inverse();return f?o.matrixTransform(f):{x:0,y:0}}function re(i){if(!w.value||m.value!=="text"||q.value)return;const{x:r,y:o}=ne(i);Y.value={x:r,y:o},X.value=[""],E.value={row:0,col:0};const u=document.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("x",r),u.setAttribute("y",o),u.setAttribute("fill",D.value),u.setAttribute("font-size",P.value),u.setAttribute("font-family","sans-serif"),u.setAttribute("class","vue-data-ui-doodle"),u.setAttribute("dominant-baseline","hanging"),u.setAttribute("pointer-events","all");const v=document.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttribute("x",r),v.setAttribute("dy","0"),v.textContent="",u.appendChild(v),u.style.pointerEvents="none",u.style.userSelect="none",w.value.appendChild(u),h.value=u,q.value=!0,window.addEventListener("keydown",ue),window.addEventListener("mousedown",ie,!0),J(),se()}function ue(i){if(!q.value)return;let{row:r,col:o}=E.value,u=X.value.slice(),v=!1;if(i.key==="Enter"){const f=u[r],a=f.slice(0,o),T=f.slice(o);u.splice(r,1,a,T),r+=1,o=0,v=!0,i.preventDefault()}else if(i.key==="Backspace"){if(o>0)u[r]=u[r].slice(0,o-1)+u[r].slice(o),o-=1,v=!0;else if(r>0){const f=u[r-1].length;u[r-1]+=u[r],u.splice(r,1),r-=1,o=f,v=!0}i.preventDefault()}else if(i.key==="Delete")o<u[r].length?(u[r]=u[r].slice(0,o)+u[r].slice(o+1),v=!0):r<u.length-1&&(u[r]+=u[r+1],u.splice(r+1,1),v=!0),i.preventDefault();else if(i.key==="ArrowLeft")o>0?o-=1:r>0&&(r-=1,o=u[r].length),v=!0,i.preventDefault();else if(i.key==="ArrowRight")o<u[r].length?o+=1:r<u.length-1&&(r+=1,o=0),v=!0,i.preventDefault();else if(i.key==="ArrowUp")r>0&&(r-=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key==="ArrowDown")r<u.length-1&&(r+=1,o=Math.min(o,u[r].length),v=!0),i.preventDefault();else if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey)u[r]=u[r].slice(0,o)+i.key+u[r].slice(o),o+=1,v=!0,i.preventDefault();else if(i.key==="Escape"){ce(!0);return}else i.key==="Tab"&&i.preventDefault();v&&(X.value=u,E.value={row:r,col:o},J(),se())}function J(){const i=h.value,{x:r,y:o}=Y.value;for(;i.firstChild;)i.removeChild(i.firstChild);X.value.forEach((u,v)=>{const f=document.createElementNS("http://www.w3.org/2000/svg","tspan");f.setAttribute("x",r),f.setAttribute("dy",v===0?"0":`${P.value*1.2}`),f.textContent=u.length?u:"​",i.appendChild(f)})}function se(){const i=w.value.querySelector(".vue-data-ui-svg-caret");i&&w.value.removeChild(i);const r=h.value;if(!r)return;const{x:o,y:u}=Y.value,{row:v,col:f}=E.value,a=P.value,T=r.childNodes[v];if(!T)return;let B=T.textContent.slice(0,f);B.endsWith(" ")&&(B+=" ");const p=document.createElementNS("http://www.w3.org/2000/svg","text");p.setAttribute("x",o),p.setAttribute("y",u),p.setAttribute("font-size",a),p.setAttribute("font-family","sans-serif"),p.textContent=B||"",w.value.appendChild(p);const M=p.getBBox();w.value.removeChild(p);let $=u+v*a*1.2,g=o+M.width;const c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",g),c.setAttribute("y",$),c.setAttribute("width",1),c.setAttribute("height",a),c.setAttribute("fill",D.value),c.setAttribute("class","vue-data-ui-svg-caret"),w.value.appendChild(c)}function ie(i){if(h.value&&!h.value.contains(i.target)){const r=h.value.children;r.length===1&&(r[0].textContent===""||r[0].textContent==="​")&&h.value.remove(),ce(!1)}}function ce(i=!1){var u;window.removeEventListener("keydown",ue),window.removeEventListener("mousedown",ie,!0);const r=(u=w.value)==null?void 0:u.querySelector(".vue-data-ui-svg-caret");r&&w.value.removeChild(r);const o=X.value.every(v=>!v||v==="​");i||o||L.value.push({id:G(),type:"text",x:Y.value.x,y:Y.value.y,color:D.value,fontSize:P.value,lines:X.value.map(v=>v)}),h.value&&w.value&&w.value.contains(h.value)&&w.value.removeChild(h.value),q.value=!1,h.value=null,X.value=[""],E.value={row:0,col:0}}const H=t.computed(()=>d.lightenHexColor(U.color,.6));function ee({width:i,height:r}){K.value=`0 0 ${i} ${r}`}const _=t.ref(null);t.onMounted(()=>{t.nextTick(()=>{if(U.parent){_.value=new ResizeObserver(o=>{for(const u of o){const{width:v,height:f}=u.contentRect;ee({width:v,height:f})}}),_.value.observe(U.parent);const{width:i,height:r}=U.parent.getBoundingClientRect();ee({width:i,height:r})}}),w.value=R.value.querySelector("g")}),t.onBeforeUnmount(()=>{_.value&&_.value.disconnect()}),t.watch(()=>U.parent,i=>{if(!i)return;const{width:r,height:o}=U.parent.getBoundingClientRect();ee({width:r,height:o})},{immediate:!0}),t.watch(m,i=>{var r,o;i==="text"?(r=R.value)==null||r.addEventListener("mousedown",re):(o=R.value)==null||o.removeEventListener("mousedown",re)});const Z=t.ref(!1),N=t.ref(""),R=t.ref(null);function me(i){if(m.value!=="draw"||!R.value)return;Z.value=!0;const{x:r,y:o}=F(i);N.value=`M ${r} ${o}`}function be(i){if(!Z.value||!R.value)return;const{x:r,y:o}=F(i);N.value+=` ${r} ${o}`}function l(i){const r=i.trim().split(/\s+/);if(r.length<4)return i;const o=r.slice(1).map(Number);if(o.length%2!==0)return i;const u=ve(o),v=[`M ${u[0]} ${u[1]}`];for(let T=2;T<u.length-2;T+=2){const B=u[T-2],p=u[T-1],M=u[T],$=u[T+1],g=(B+M)/2,c=(p+$)/2;v.push(`Q ${B} ${p} ${g} ${c}`)}const f=u[u.length-2],a=u[u.length-1];return v.push(`L ${f} ${a}`),v.join(" ")}function ve(i,r=1){const o=[...i];for(let u=2;u<i.length-2;u+=2){const v=i[u],f=i[u+1],a=i[u-2],T=i[u-1],B=i[u+2],p=i[u+3];o[u]=v+r*((a+B)/2-v),o[u+1]=f+r*((T+p)/2-f)}return o}function xe(i){const r=i.trim().split(/\s+/);let o="",u="",v=null,f=null;for(let a=0;a<r.length;a+=1){const T=r[a];if(isNaN(T)){if(u=T,u==="M"||u==="L")v=parseFloat(r[++a]),f=parseFloat(r[++a]),o+=`${u}${v} ${f}`;else if(u==="Q"){const B=parseFloat(r[++a]),p=parseFloat(r[++a]),M=parseFloat(r[++a]),$=parseFloat(r[++a]);B===v&&p===f?o+=`t${M-v} ${$-f}`:o+=`q${B-v} ${p-f} ${M-v} ${$-f}`,v=M,f=$}}else{const B=parseFloat(T),p=parseFloat(r[++a]);if(u==="L"){const M=B-v,$=p-f;M===0?o+=`v${$}`:$===0?o+=`h${M}`:o+=`l${M} ${$}`,v=B,f=p}else if(u==="Q"){const M=B,$=p,g=parseFloat(r[++a]),c=parseFloat(r[++a]);M===v&&$===f?o+=`t${g-v} ${c-f}`:o+=`q${M-v} ${$-f} ${g-v} ${c-f}`,v=g,f=c}}}return o}function ae(){Z.value&&(L.value.push({id:G(),strokeWidth:y.value,path:xe(l(N.value)),color:D.value}),V.value=[],N.value=""),Z.value=!1}function F(i){if(!R.value)return{x:0,y:0};const r=R.value.getBoundingClientRect();let o,u;return i.touches&&i.touches.length?(o=i.touches[0].clientX,u=i.touches[0].clientY):(o=i.clientX,u=i.clientY),{x:o-r.left,y:u-r.top}}function ke(){if(L.value.length>0){const i=L.value.pop();V.value.push(i)}}function Ce(){if(V.value.length>0){const i=V.value.pop();L.value.push(i)}}function Le(){L.value=[],V.value=[]}const de=t.ref(null);return(i,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[z.active?(t.openBlock(),t.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:t.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:z.active}),style:t.normalizeStyle({backgroundColor:z.backgroundColor})},[t.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:r[0]||(r[0]=o=>Be("close"))},[t.createVNode(ge.default,{name:"close",stroke:z.color},null,8,["stroke"])],4),t.createElementVNode("button",kt,[t.createVNode(xt.ColorPicker,{value:D.value,"onUpdate:value":r[1]||(r[1]=o=>D.value=o),backgroundColor:z.backgroundColor,buttonBorderColor:H.value},null,8,["value","backgroundColor","buttonBorderColor"])]),t.createElementVNode("button",{class:t.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-active":m.value==="text"}]),onClick:r[2]||(r[2]=o=>m.value=m.value==="text"?"draw":"text"),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`})},[t.createVNode(ge.default,{name:m.value==="draw"?"annotator":"text",stroke:z.color},null,8,["name","stroke"]),t.createElementVNode("div",{style:t.normalizeStyle({position:"absolute",bottom:"-20px",color:H.value,width:"100%",textAlign:"center",fontSize:"12px"})},t.toDisplayString(t.unref(d.dataLabel)({v:m.value==="draw"?y.value:P.value,s:"px",r:1})),5)],6),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length}),disabled:!L.value.length,style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`,marginTop:"20px"}),onClick:ke},[t.createVNode(ge.default,{name:"restart",stroke:z.color},null,8,["stroke"])],14,Ct),t.createElementVNode("button",{class:t.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!V.value.length}),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Ce},[t.createVNode(ge.default,{name:"restart",stroke:z.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),t.createElementVNode("button",{class:t.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!L.value.length},"vue-ui-pen-and-paper-action"]),style:t.normalizeStyle({backgroundColor:z.backgroundColor,border:`1px solid ${H.value}`}),onClick:Le},[t.createVNode(ge.default,{name:"trash",stroke:z.color},null,8,["stroke"])],6),m.value==="draw"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":r[3]||(r[3]=o=>y.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,y.value]]):t.createCommentVNode("",!0),m.value==="text"?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"range",ref:de,type:"range",class:"vertical-range",min:3,max:48,step:.1,"onUpdate:modelValue":r[4]||(r[4]=o=>P.value=o),style:t.normalizeStyle({accentColor:z.color})},null,4)),[[t.vModelText,P.value]]):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),(t.openBlock(),t.createElementBlock("svg",{"data-mode":m.value,ref_key:"svgElement",ref:R,xmlns:t.unref(d.XMLNS),viewBox:K.value,class:t.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!z.active}),onMousedown:me,onMousemove:be,onMouseup:ae,onMouseleave:ae,onTouchstart:t.withModifiers(me,["prevent"]),onTouchmove:t.withModifiers(be,["prevent"]),onTouchend:ae},[t.createElementVNode("g",{ref_key:"G",ref:w},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value,o=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o.id},[o.path&&o.path.replace("M","").split(" ").length===2?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:o.path.replace("M","").split(" ")[0],cy:o.path.replace("M","").split(" ")[1],r:o.strokeWidth/2,fill:o.color},null,8,wt)):o.path?(t.openBlock(),t.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:o.path,stroke:o.color,"stroke-width":o.strokeWidth,fill:"none"},null,8,St)):o.type==="text"?(t.openBlock(),t.createElementBlock("text",{key:2,x:o.x,y:o.y,fill:o.color,"font-size":o.fontSize,"font-family":"sans-serif","dominant-baseline":"hanging",class:"vue-ui-pen-and-paper-text"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.lines,(u,v)=>(t.openBlock(),t.createElementBlock("tspan",{key:v,x:o.x,dy:v===0?"0":o.fontSize*1.2},t.toDisplayString(u.length?u:"​"),9,$t))),128))],8,zt)):t.createCommentVNode("",!0)],64))),128))],512),Z.value?(t.openBlock(),t.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:l(N.value),stroke:D.value,"stroke-width":y.value*1.1,fill:"none"},null,8,Tt)):t.createCommentVNode("",!0)],42,Lt))],64))}},Bt=We._export_sfc(Et,[["__scopeId","data-v-14478ba4"]]),Mt=["id"],Nt=["onClick"],Pt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],At={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(z,{expose:Ee,emit:U}){const{vue_ui_xy_canvas:Be}=d.useConfig(),L=z,V=t.ref(d.createUid()),K=t.ref(null),D=t.ref(null),y=t.ref(null),m=t.ref(1),w=t.ref(1),q=t.ref(!1),h=t.ref(null),Y=t.ref(""),X=t.ref(null),E=t.ref([]),P=t.ref(1),W=t.ref(!0),G=t.ref(!0),ne=t.ref(null),re=t.ref(0),ue=t.ref(0),J=t.ref(!1),se=t.ref(null),ie=t.ref(null),ce=t.ref(null),H=t.ref(null),ee=t.ref(0),_=t.ref(0),Z=t.ref(0),N=t.ref(null),R=t.computed(()=>!!L.dataset&&L.dataset.length),me=U,be=t.useSlots();t.onMounted(()=>{be["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const l=t.computed({get:()=>ke(),set:e=>e}),{userOptionsVisible:ve,setUserOptionsVisibility:xe,keepUserOptionState:ae}=mt.useUserOptionState({config:l.value}),{svgRef:F}=bt.useChartAccessibility({config:l.value.style.chart.title});function ke(){const e=qe.useNestedProp({userConfig:L.config,defaultConfig:Be});let n={};return e.theme?n={...qe.useNestedProp({userConfig:d.themes.vue_ui_xy_canvas[e.theme]||L.config,defaultConfig:e}),customPalette:d.themePalettes[e.theme]||d.palette}:n=e,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.min")?n.style.chart.scale.min=L.config.style.chart.scale.min:n.style.chart.scale.min=null,L.config&&d.hasDeepProperty(L.config,"style.chart.scale.max")?n.style.chart.scale.max=L.config.style.chart.scale.max:n.style.chart.scale.max=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.startIndex")?n.style.chart.zoom.startIndex=L.config.style.chart.zoom.startIndex:n.style.chart.zoom.startIndex=null,L.config&&d.hasDeepProperty(L.config,"style.chart.zoom.endIndex")?n.style.chart.zoom.endIndex=L.config.style.chart.zoom.endIndex:n.style.chart.zoom.endIndex=null,n}t.watch(()=>L.config,e=>{l.value=ke(),ve.value=!l.value.userOptions.showOnChartHover,Me(),ee.value+=1,_.value+=1,Z.value+=1,o.value.showTable=l.value.table.show,o.value.showDataLabels=l.value.style.chart.dataLabels.show,o.value.stacked=l.value.style.chart.stacked,o.value.showTooltip=l.value.style.chart.tooltip.show},{deep:!0}),t.watch(()=>L.dataset,()=>{Me(),ee.value+=1,_.value+=1,Z.value+=1},{deep:!0});const Ce=t.ref(l.value.style.chart.aspectRatio),{isPrinting:Le,isImaging:de,generatePdf:i,generateImage:r}=Ue.usePrinter({elementId:`xy_canvas_${V.value}`,fileName:l.value.style.chart.title.text||"vue-ui-xy-canvas",options:l.value.userOptions.print}),o=t.ref({showTable:l.value.table.show,showDataLabels:l.value.style.chart.dataLabels.show,stacked:l.value.style.chart.stacked,showTooltip:l.value.style.chart.tooltip.show});function u(e){J.value=e,ue.value+=1}const v=t.computed(()=>d.convertCustomPalette(l.value.customPalette)),f=t.computed(()=>$.value?Math.max(...$.value.filter((e,n)=>!E.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=t.computed(()=>{const e=m.value-m.value*(l.value.style.chart.paddingProportions.left+l.value.style.chart.paddingProportions.right);return{canvasWidth:m.value,canvasHeight:w.value,left:m.value*l.value.style.chart.paddingProportions.left,top:w.value*l.value.style.chart.paddingProportions.top,right:m.value-m.value*l.value.style.chart.paddingProportions.right,bottom:w.value-w.value*l.value.style.chart.paddingProportions.bottom,width:e,height:w.value-w.value*(l.value.style.chart.paddingProportions.top+l.value.style.chart.paddingProportions.bottom),slot:e/(c.value.end-c.value.start)}});function T(e,n){return e/n}function B({hasAutoScale:e,series:n,min:s,max:b,scale:C,yOffset:A,individualHeight:k,stackIndex:S=null}){return n.map((te,O)=>{const Q=C.min<0?Math.abs(C.min):0,le=T(te+Q,Q+C.max);let ye,pe;e&&(ye=C.min,pe=T(te-ye,C.max-ye));let j=0;return S===null?j=a.value.bottom-a.value.height*(e?pe:le):j=a.value.bottom-A-k*(e?pe:le),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:j,value:te}})}const p=t.computed(()=>{const e=l.value.style.chart.scale.min!==null?l.value.style.chart.scale.min:Math.min(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),n=l.value.style.chart.scale.max!==null?l.value.style.chart.scale.max:Math.max(...$.value.filter((k,S)=>!E.value.includes(k.absoluteIndex)).flatMap(k=>k.series.slice(c.value.start,c.value.end))),s=d.calculateNiceScale(e<0?e:0,n===e?e+1<0?0:e+1:n<0?0:n,l.value.style.chart.scale.ticks),b=s.min<0?Math.abs(s.min):0,C=a.value.bottom-a.value.height*(b/(s.max+b)),A=s.ticks.map(k=>({y:a.value.bottom-a.value.height*((k+b)/(s.max+b)),x:a.value.left-8,value:k}));return{absoluteMin:b,max:n,min:e,scale:s,yLabels:A,zero:C}}),M=t.computed(()=>g.value.map(e=>`
2
- <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
- <svg viewBox="0 0 10 10" height="12" width="12">
4
- <circle cx="5" cy="5" r="5" fill="${e.color}"/>
5
- </svg>
6
- <span>${e.name?e.name+": ":""}</span>
7
- <span>${d.applyDataLabel(l.value.style.chart.dataLabels.formatter,e.series[h.value],d.dataLabel({p:e.prefix||"",v:e.series[h.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:h.value})}</span>
8
- </div>
9
- `)),$=t.computed(()=>L.dataset.map((e,n)=>({...e,series:d.largestTriangleThreeBucketsArray({data:d.sanitizeArray(e.series),threshold:l.value.downsample.threshold}),absoluteIndex:n,color:d.convertColorToHex(e.color||v.value[n]||d.palette[n]||d.palette[n%d.palette.length])})));t.watch(f,e=>{e&&Pe()});const g=t.computed(()=>d.assignStackRatios($.value.filter((e,n)=>!E.value.includes(e.absoluteIndex))).map((e,n)=>({...e,series:e.series.slice(c.value.start,c.value.end)})).map((e,n)=>{let s=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,b=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;s===b&&(s=s>=0?b-1:s,b=b>=0?b:s+1),e.series.filter(j=>![null,void 0].includes(j)).map(j=>(j-s)/(b-s));const C={valueMin:s,valueMax:b},A=e.scaleSteps||l.value.style.chart.scale.ticks;let k;e.autoScaling?k=d.calculateNiceScale(C.valueMin,C.valueMax,A):k=d.calculateNiceScale(C.valueMin<0?C.valueMin:0,C.valueMax<=0?0:C.valueMax,A);const S=o.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,te=o.value.stacked?a.value.height/l.value.style.chart.stackGap:0,O=o.value.stacked?a.value.height*e.stackRatio-te:a.value.height,Q=k.min<0?Math.abs(k.min):0;let le;e.autoScaling&&o.value.stacked&&b<=0?le=a.value.bottom-S-O:le=a.value.bottom-S-O*(Q/(k.max+Q));const ye=k.ticks.map((j,ct)=>({y:a.value.bottom-S-O*(ct/(k.ticks.length-1)),x:a.value.left-8,value:j})),pe=B({hasAutoScale:o.value.stacked&&e.autoScaling,series:e.series,min:o.value.stacked?s:p.value.min,max:o.value.stacked?b:p.value.max,scale:o.value.stacked?k:p.value.scale,yOffset:S,individualHeight:O,stackIndex:o.value.stacked?n:null});return{...e,coordinatesLine:pe,min:s,max:b,localScale:k,localZero:le,localMin:Q,localYLabels:ye,yOffset:S,individualHeight:O}})),c=t.ref({start:0,end:f.value});function Pe(){Ie()}const oe=t.ref(null);async function Ie(){(l.value.style.chart.zoom.startIndex!==null||l.value.style.chart.zoom.endIndex!==null)&&oe.value?(l.value.style.chart.zoom.startIndex!==null&&(await t.nextTick(),await t.nextTick(),oe.value&&oe.value.setStartValue(l.value.style.chart.zoom.startIndex)),l.value.style.chart.zoom.endIndex!==null&&(await t.nextTick(),await t.nextTick(),oe.value&&oe.value.setEndValue(Ge(l.value.style.chart.zoom.endIndex+1)))):(c.value={start:0,end:f.value},re.value+=1)}function Ge(e){const n=f.value;return e>n?n:e<0||l.value.style.chart.zoom.startIndex!==null&&e<l.value.style.chart.zoom.startIndex?l.value.style.chart.zoom.startIndex!==null?l.value.style.chart.zoom.startIndex+1:1:e}const Ze=t.computed(()=>g.value.filter(e=>["line","plot",void 0].includes(e.type))),I=t.computed(()=>g.value.filter(e=>e.type==="bar"));function je(){if(!F.value)return;const e=D.value.offsetWidth,n=D.value.offsetHeight;F.value.width=e*P.value*2,F.value.height=n*P.value*2,m.value=e*P.value*2,w.value=n*P.value*2,y.value.scale(P.value,P.value),he()}function Ke(){if(y.value.clearRect(0,0,1e4,1e4),y.value.fillStyle=l.value.style.chart.backgroundColor,y.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),o.value.stacked)l.value.style.chart.grid.y.verticalLines.show&&c.value.end-c.value.start<l.value.style.chart.grid.y.verticalLines.hideUnderXLength?g.value.forEach(e=>{for(let n=0;n<c.value.end-c.value.start+1;n+=1)x.line(y.value,[{x:a.value.left+a.value.slot*n,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*n,y:a.value.bottom-e.yOffset}],{color:l.value.style.chart.grid.y.verticalLines.color})}):l.value.style.chart.grid.y.verticalLines.show&&c.value.end-c.value.start>=l.value.style.chart.grid.y.verticalLines.hideUnderXLength&&g.value.forEach(e=>{for(let n=c.value.start;n<c.value.end;n+=1)n%Math.floor((c.value.end-c.value.start)/l.value.style.chart.grid.y.timeLabels.modulo)===0&&x.line(y.value,[{x:a.value.left+a.value.slot*(n-c.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(n-c.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:l.value.style.chart.grid.y.verticalLines.color})}),l.value.style.chart.grid.x.horizontalLines.show&&(l.value.style.chart.grid.x.horizontalLines.alternate?g.value.forEach(e=>{e.localYLabels.forEach((n,s)=>{s<e.localYLabels.length-1&&x.rect(y.value,[{x:a.value.left,y:n.y},{x:a.value.right,y:n.y},{x:a.value.right,y:e.localYLabels[s+1].y},{x:a.value.left,y:e.localYLabels[s+1].y}],{fillColor:s%2===0?"transparent":d.setOpacity(l.value.style.chart.grid.x.horizontalLines.color,l.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):g.value.forEach(e=>{e.localYLabels.slice(c.value.start,c.value.end).forEach(n=>{x.line(y.value,[{x:a.value.left,y:n.y},{x:a.value.right,y:n.y}],{color:l.value.style.chart.grid.x.horizontalLines.color})})})),l.value.style.chart.grid.zeroLine.show&&g.value.forEach(e=>{x.line(y.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:l.value.style.chart.grid.zeroLine.color,lineDash:l.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),l.value.style.chart.grid.y.axisLabels.show&&g.value.forEach(e=>{x.line(y.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),x.line(y.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),g.value.forEach(e=>{x.text(y.value,e.name,m.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`})});else{if(l.value.style.chart.grid.y.verticalLines.show&&c.value.end-c.value.start<l.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<c.value.end-c.value.start+1;e+=1)x.line(y.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:l.value.style.chart.grid.y.verticalLines.color});else if(l.value.style.chart.grid.y.verticalLines.show&&c.value.end-c.value.start>=l.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=c.value.start;e<c.value.end;e+=1)e%Math.floor((c.value.end-c.value.start)/l.value.style.chart.grid.y.timeLabels.modulo)===0&&x.line(y.value,[{x:a.value.left+a.value.slot*(e-c.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-c.value.start)+a.value.slot/2,y:a.value.bottom}],{color:l.value.style.chart.grid.y.verticalLines.color});l.value.style.chart.grid.x.horizontalLines.show&&(l.value.style.chart.grid.x.horizontalLines.alternate?p.value.yLabels.forEach((e,n)=>{n<p.value.yLabels.length-1&&x.rect(y.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:p.value.yLabels[n+1].y},{x:a.value.left,y:p.value.yLabels[n+1].y}],{fillColor:n%2===0?"transparent":d.setOpacity(l.value.style.chart.grid.x.horizontalLines.color,l.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):p.value.yLabels.forEach(e=>{x.line(y.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:l.value.style.chart.grid.x.horizontalLines.color})})),l.value.style.chart.grid.y.showAxis&&x.line(y.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:l.value.style.chart.grid.y.axisColor,lineWidth:l.value.style.chart.grid.y.axisThickness}),l.value.style.chart.grid.x.showAxis&&x.line(y.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:l.value.style.chart.grid.x.axisColor,lineWidth:l.value.style.chart.grid.x.axisThickness}),l.value.style.chart.grid.zeroLine.show&&x.line(y.value,[{x:a.value.left,y:p.value.zero},{x:a.value.right,y:p.value.zero}],{color:l.value.style.chart.grid.zeroLine.color,lineDash:l.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}l.value.style.chart.grid.y.axisName&&x.text(y.value,l.value.style.chart.grid.y.axisName,m.value-m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${l.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.color,align:"center",rotation:90}),l.value.style.chart.grid.x.axisName&&x.text(y.value,l.value.style.chart.grid.x.axisName,m.value/2,w.value,{font:`${l.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.color,align:"center"})}function _e(e){for(let n=0;n<e.coordinatesLine.length;n+=1){const s=(h.value===n?m.value/150:l.value.style.chart.line.plots.show?m.value/200:0)*l.value.style.chart.line.plots.radiusRatio;x.circle(y.value,{x:e.coordinatesLine[n].x,y:e.coordinatesLine[n].y},s,{color:l.value.style.chart.backgroundColor,fillStyle:e.color})}}function Qe(){g.value.forEach(e=>{e.showYMarker&&fe(e)&&x.text(y.value,d.applyDataLabel(l.value.style.chart.dataLabels.formatter,fe(e).value,d.dataLabel({p:e.prefix||l.value.style.chart.grid.y.axisLabels.prefix||"",v:fe(e).value,s:e.suffix||l.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||l.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:fe(e),seriesIndex:null}),a.value.left-8+l.value.style.chart.grid.y.axisLabels.offsetX,fe(e).y,{align:"right",font:`${l.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:e.color})})}function Je(){l.value.style.chart.grid.y.axisLabels.show&&(o.value.stacked?g.value.forEach(e=>{e.localYLabels.forEach((n,s)=>{x.text(y.value,d.applyDataLabel(l.value.style.chart.dataLabels.formatter,n.value,d.dataLabel({p:e.prefix||l.value.style.chart.grid.y.axisLabels.prefix||"",v:n.value,s:e.suffix||l.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||l.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:n,seriesIndex:s}),n.x+l.value.style.chart.grid.y.axisLabels.offsetX,n.y,{align:"right",font:`${l.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(h.value)?.2:1})})}):p.value.yLabels.forEach((e,n)=>{x.text(y.value,d.applyDataLabel(l.value.style.chart.dataLabels.formatter,e.value,d.dataLabel({p:l.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:l.value.style.chart.grid.y.axisLabels.suffix||"",r:l.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:n}),e.x+l.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${l.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.grid.y.axisLabels.color,globalAlpha:g.value.some(s=>s.showYMarker)&&![null,void 0].includes(h.value)?.2:1})}))}function et(e){for(let n=0;n<e.coordinatesLine.length;n+=1)x.text(y.value,d.applyDataLabel(l.value.style.chart.dataLabels.formatter,e.coordinatesLine[n].value,d.dataLabel({p:e.prefix||"",v:e.coordinatesLine[n].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[n],seriesIndex:n}),e.coordinatesLine[n].x,e.coordinatesLine[n].y+l.value.style.chart.dataLabels.offsetY,{align:"center",font:`${l.value.style.chart.dataLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.dataLabels.useSerieColor?e.color:l.value.style.chart.dataLabels.color})}function tt(){for(let e=c.value.start;e<c.value.end;e+=1)(c.value.end-c.value.start<l.value.style.chart.grid.y.timeLabels.modulo||c.value.end-c.value.start>=l.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((c.value.end-c.value.start)/l.value.style.chart.grid.y.timeLabels.modulo)===0||e===h.value+c.value.start&&l.value.style.chart.grid.y.timeLabels.showMarker))&&x.text(y.value,l.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-c.value.start)+a.value.slot/2,a.value.bottom+m.value/l.value.style.chart.grid.y.timeLabels.offsetY,{align:l.value.style.chart.grid.y.timeLabels.rotation===0?"center":l.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${l.value.style.chart.grid.y.timeLabels.bold?"bold ":""}${Math.round(m.value/40*l.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.grid.y.timeLabels.showMarker?d.setOpacity(l.value.style.chart.grid.y.timeLabels.color,h.value!==null?h.value+c.value.start===e?100:20:100):l.value.style.chart.grid.y.timeLabels.color,rotation:l.value.style.chart.grid.y.timeLabels.rotation})}function Ae(){x.line(y.value,[{x:a.value.left+a.value.slot*h.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*h.value+a.value.slot/2,y:a.value.bottom}],{color:l.value.style.chart.selector.color,lineDash:l.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function lt(){N.value&&x.line(y.value,[{x:a.value.left,y:N.value},{x:a.value.right,y:N.value}],{color:l.value.style.chart.selector.color,lineDash:l.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function at(){I.value.forEach((e,n)=>{for(let s=0;s<e.coordinatesLine.length;s+=1)x.rect(y.value,[{x:a.value.left+a.value.slot*s+a.value.slot/10+(o.value.stacked?0:a.value.slot/I.value.length*n-(n===0?0:a.value.slot/(5*I.value.length)*n)),y:o.value.stacked?e.localZero:p.value.zero},{x:a.value.left+a.value.slot*s+a.value.slot/10+(o.value.stacked?0:a.value.slot/I.value.length*n-(n===0?0:a.value.slot/(5*I.value.length)*n))+a.value.slot*.8/(o.value.stacked?1:I.value.length),y:o.value.stacked?e.localZero:p.value.zero},{x:a.value.left+a.value.slot*s+a.value.slot/10+(o.value.stacked?0:a.value.slot/I.value.length*n-(n===0?0:a.value.slot/(5*I.value.length)*n))+a.value.slot*.8/(o.value.stacked?1:I.value.length),y:e.coordinatesLine[s].y},{x:a.value.left+a.value.slot*s+a.value.slot/10+(o.value.stacked?0:a.value.slot/I.value.length*n-(n===0?0:a.value.slot/(5*I.value.length)*n)),y:e.coordinatesLine[s].y}],{strokeColor:l.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[s].x,y:e.coordinatesLine[s].y},end:{x:e.coordinatesLine[s].x,y:o.value.stacked?e.localZero:p.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:l.value.style.chart.bar.gradient.show?d.lightenHexColor(e.color,.5):e.color}]}}),o.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&x.text(y.value,d.applyDataLabel(l.value.style.chart.dataLabels.formatter,e.coordinatesLine[s].value,d.dataLabel({p:e.prefix||"",v:e.coordinatesLine[s].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[s],seriesIndex:s}),a.value.left+a.value.slot*s+a.value.slot/10+(o.value.stacked?0:a.value.slot/I.value.length*n-(n===0?0:a.value.slot/(5*I.value.length)*n))+a.value.slot*.4/(o.value.stacked?1:I.value.length),(e.coordinatesLine[s].value<0?o.value.stacked?e.localZero:p.value.zero:e.coordinatesLine[s].y)+l.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(m.value/40*l.value.style.chart.dataLabels.fontSizeRatio)}px ${l.value.style.fontFamily}`,color:l.value.style.chart.dataLabels.useSerieColor?e.color:l.value.style.chart.dataLabels.color,strokeColor:l.value.style.chart.backgroundColor,lineWidth:.8})})}function ot(e){e.useArea?o.value.stacked?x.polygon(y.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:d.setOpacity(e.color,l.value.style.chart.area.opacity),strokeColor:"transparent"}):x.polygon(y.value,[{x:e.coordinatesLine[0].x,y:p.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:p.value.zero}],{fillColor:d.setOpacity(e.color,l.value.style.chart.area.opacity),strokeColor:"transparent"}):x.line(y.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function nt(){g.value.forEach((e,n)=>{x.line(y.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:l.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function he(){Ke(),W.value?(h.value!==null&&l.value.style.chart.selector.show&&Ae(),at(),o.value.stacked&&l.value.style.chart.grid.x.showAxis&&nt(),Ze.value.forEach(e=>{(e.type==="line"||!e.type)&&ot(e),G.value&&(_e(e),o.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&et(e))}),ne.value=x.cloneCanvas(F.value)):(ne.value&&(y.value.clearRect(0,0,1e4,1e4),y.value.drawImage(ne.value,0,0)),h.value!==null&&l.value.style.chart.selector.show&&Ae(),h.value!==null&&g.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[h.value])return;e.coordinatesLine[h.value].x!==void 0&&e.coordinatesLine[h.value].y!==void 0&&x.circle(y.value,{x:e.coordinatesLine[h.value].x,y:e.coordinatesLine[h.value].y},m.value/150*l.value.style.chart.line.plots.radiusRatio,{color:l.value.style.chart.backgroundColor,fillStyle:e.color})}})),l.value.style.chart.grid.y.timeLabels.show&&tt(),l.value.style.chart.selector.show&&l.value.style.chart.selector.showHorizontalSelector&&lt(),Je(),Qe(),W.value=!1}const we=x.debounce(()=>{G.value=!0,je()},f.value>200?10:1,!G.value);function fe(e){if([null,void 0].includes(h.value)||!e.coordinatesLine[h.value])return!1;const{y:n,value:s}=e.coordinatesLine[h.value];return{y:n,value:s}}function rt(e){const{left:n,top:s}=F.value.getBoundingClientRect(),b=e.clientX-n;if(N.value=(e.clientY-s)*2,(N.value<a.value.top||N.value>a.value.bottom)&&(N.value=null),b*2<a.value.left||b*2>a.value.right){q.value=!1,h.value=null;return}const C=b*2-a.value.left;if(h.value=Math.floor(C/a.value.slot),q.value=!0,!G.value)return;let A="";const k=l.value.style.chart.tooltip.customFormat;d.isFunction(k)&&d.functionReturnsString(()=>k({seriesIndex:h.value,datapoint:g.value.map(S=>({shape:S.shape||null,name:S.name,color:S.color,type:S.type||"line",value:S.series.find((te,O)=>O===h.value)})),series:g.value,config:l.value}))?Y.value=k({seriesIndex:h.value,datapoint:g.value.map(S=>({shape:S.shape||null,name:S.name,color:S.color,type:S.type||"line",value:S.series.find((te,O)=>O===h.value)})),series:g.value,config:l.value}):(l.value.style.chart.grid.y.timeLabels.values.slice(c.value.start,c.value.end)[h.value]&&(A+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${l.value.style.chart.tooltip.borderColor}; width:100%">${l.value.style.chart.grid.y.timeLabels.values.slice(c.value.start,c.value.end)[h.value]}</div>`),A+=M.value.join(""),Y.value=A),G.value=!1}t.watch(()=>h.value,e=>{we()}),t.watch(()=>c.value,e=>{W.value=!0,he()},{deep:!0}),t.watch(()=>o.value.showDataLabels,e=>{W.value=!0,he()}),t.watch(()=>N.value,e=>{e&&he()}),t.watch(()=>o.value.stacked,e=>{W.value=!0,G.value=!0,we()});function ut(){q.value=!1,h.value=null,Y.value="",N.value=null,he()}const Se=t.ref(null),ze=t.ref(null);t.onMounted(()=>{Me()});function Me(){if(d.objectIsEmpty(L.dataset)?d.error({componentName:"VueUiXyCanvas",type:"dataset"}):F.value&&(y.value=F.value.getContext("2d",{willReadFrequently:!0})),l.value.responsive){const e=x.throttle(()=>{const{width:n,height:s}=x.useResponsive({chart:K.value,title:l.value.style.chart.title.text?se.value:null,legend:l.value.style.chart.legend.show?ie.value:null,slicer:l.value.style.chart.zoom.show&&f.value>1?ce.value:null,source:H.value});requestAnimationFrame(()=>{Ce.value=`${n} / ${s}`})});Se.value=new ResizeObserver(e),Se.value.observe(K.value.parentNode)}ze.value=new ResizeObserver(e=>{for(const n of e)n.contentBoxSize&&D.value&&(W.value=!0,we())}),ze.value.observe(D.value),Ie()}t.onBeforeUnmount(()=>{ze.value&&ze.value.disconnect(),Se.value&&Se.value.disconnect()});function De(e){me("selectLegend",g.value.find(n=>n.absoluteIndex===e)),E.value.includes(e)?E.value=E.value.filter(n=>n!==e):E.value.push(e),W.value=!0,we()}const Re=t.computed(()=>$.value.map((e,n)=>({...e,name:e.name,color:d.convertColorToHex(e.color)||v.value[n]||d.palette[n]||d.palette[n%d.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:E.value.includes(e.absoluteIndex)?.5:1,segregate:()=>De(e.absoluteIndex),isSegregated:E.value.includes(e.absoluteIndex)}))),st=t.computed(()=>({cy:"donut-div-legend",backgroundColor:l.value.style.chart.legend.backgroundColor,color:l.value.style.chart.legend.color,fontSize:l.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:l.value.style.chart.legend.bold?"bold":""})),$e=t.computed(()=>{const e=[""].concat(g.value.map(C=>C.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let n=[];for(let C=0;C<f.value;C+=1){const A=g.value.map(k=>k.series[C]??0).reduce((k,S)=>k+S,0);n.push([l.value.style.chart.grid.y.timeLabels.values.slice(c.value.start,c.value.end)[C]??C+1].concat(g.value.map(k=>(k.series[C]??0).toFixed(l.value.table.rounding))).concat((A??0).toFixed(l.value.table.rounding)))}const s={th:{backgroundColor:l.value.table.th.backgroundColor,color:l.value.table.th.color,outline:l.value.table.th.outline},td:{backgroundColor:l.value.table.td.backgroundColor,color:l.value.table.td.color,outline:l.value.table.td.outline},breakpoint:l.value.table.responsiveBreakpoint},b=[l.value.table.columnNames.period].concat(g.value.map(C=>C.name)).concat(l.value.table.columnNames.total);return{head:e,body:n.slice(0,c.value.end-c.value.start),config:s,colNames:b}}),Fe=t.computed(()=>{if(g.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=g.value.map(s=>({label:s.name,color:s.color,type:s.type})),n=[];for(let s=c.value.start;s<c.value.end;s+=1){const b=[l.value.style.chart.grid.y.timeLabels.values[s]||s+1];g.value.forEach(C=>{b.push(Number((C.series[s]||0).toFixed(l.value.table.rounding)))}),n.push(b)}return{head:e,body:n}});function Oe(){const e=[[l.value.style.chart.title.text],[l.value.style.chart.title.subtitle.text],[""]],n=["",...Fe.value.head.map(A=>A.label)],s=Fe.value.body,b=e.concat([n]).concat(s),C=d.createCsvContent(b);d.downloadCsv({csvContent:C,title:l.value.style.chart.title.text||"vue-ui-xy-canvas"})}function it(){return g.value}function Ve(){o.value.showTable=!o.value.showTable}function Ye(){o.value.showDataLabels=!o.value.showDataLabels}function Xe(){o.value.stacked=!o.value.stacked}function He(){o.value.showTooltip=!o.value.showTooltip}const Te=t.ref(!1);function Ne(){Te.value=!Te.value}return Ee({getData:it,generateCsv:Oe,generatePdf:i,generateImage:r,toggleTable:Ve,toggleLabels:Ye,toggleStack:Xe,toggleTooltip:He,toggleAnnotator:Ne}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(`width:100%; position:relative; ${l.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:K,id:`xy_canvas_${V.value}`,class:t.normalizeClass(`vue-ui-donut ${J.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:n[5]||(n[5]=()=>t.unref(xe)(!0)),onMouseleave:n[6]||(n[6]=()=>t.unref(xe)(!1))},[l.value.style.chart.title.text?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:se,style:t.normalizeStyle(`width:100%;background:${l.value.style.chart.backgroundColor};`)},[(t.openBlock(),t.createBlock(ht._sfc_main,{key:`title_${ee.value}`,config:{title:{cy:"xy-canvas-title",...l.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...l.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):t.createCommentVNode("",!0),l.value.userOptions.show&&R.value&&(t.unref(ae)||t.unref(ve))?(t.openBlock(),t.createBlock(Ue.UserOptions,{ref:"details",key:`user_option_${ue.value}`,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,isPrinting:t.unref(Le),isImaging:t.unref(de),uid:V.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.chart.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasLabel:l.value.userOptions.buttons.labels,hasStack:z.dataset.length>1&&l.value.userOptions.buttons.stack,hasFullscreen:l.value.userOptions.buttons.fullscreen,hasTable:c.value.end-c.value.start<200&&l.value.userOptions.buttons.table,isFullscreen:J.value,isTooltip:o.value.showTooltip,isStacked:o.value.stacked,titles:{...l.value.userOptions.buttonTitles},chartElement:K.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:Te.value,onToggleFullscreen:u,onGeneratePdf:t.unref(i),onGenerateCsv:Oe,onGenerateImage:t.unref(r),onToggleTable:Ve,onToggleLabels:Ye,onToggleStack:Xe,onToggleTooltip:He,onToggleAnnotator:Ne,style:t.normalizeStyle({visibility:t.unref(ae)?t.unref(ve)?"visible":"hidden":"visible"})},t.createSlots({_:2},[e.$slots.menuIcon?{name:"menuIcon",fn:t.withCtx(({isOpen:s,color:b})=>[t.renderSlot(e.$slots,"menuIcon",t.normalizeProps(t.guardReactiveProps({isOpen:s,color:b})),void 0,!0)]),key:"0"}:void 0,e.$slots.optionTooltip?{name:"optionTooltip",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:t.withCtx(({toggleFullscreen:s,isFullscreen:b})=>[t.renderSlot(e.$slots,"optionFullscreen",t.normalizeProps(t.guardReactiveProps({toggleFullscreen:s,isFullscreen:b})),void 0,!0)]),key:"8"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:t.withCtx(({toggleAnnotator:s,isAnnotator:b})=>[t.renderSlot(e.$slots,"optionAnnotator",t.normalizeProps(t.guardReactiveProps({toggleAnnotator:s,isAnnotator:b})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"vue-ui-xy-canvas",style:t.normalizeStyle(`position: relative; aspect-ratio: ${Ce.value}`),ref_key:"container",ref:D},[R.value?(t.openBlock(),t.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:F,style:{width:"100%",height:"100%"},onMousemove:n[0]||(n[0]=s=>rt(s)),onMouseleave:ut},null,544)):(t.openBlock(),t.createBlock(gt.default,{key:1,config:{type:"line",style:{backgroundColor:l.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),t.createVNode(vt._sfc_main,{show:o.value.showTooltip&&q.value,backgroundColor:l.value.style.chart.tooltip.backgroundColor,color:l.value.style.chart.tooltip.color,fontSize:l.value.style.chart.tooltip.fontSize,borderRadius:l.value.style.chart.tooltip.borderRadius,borderColor:l.value.style.chart.tooltip.borderColor,borderWidth:l.value.style.chart.tooltip.borderWidth,position:l.value.style.chart.tooltip.position,offsetY:l.value.style.chart.tooltip.offsetY,parent:t.unref(F),content:Y.value,isFullscreen:J.value,backgroundOpacity:l.value.style.chart.tooltip.backgroundOpacity,isCustom:t.unref(d.isFunction)(l.value.style.chart.tooltip.customFormat)},{"tooltip-before":t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip-before",t.normalizeProps(t.guardReactiveProps({...X.value})),void 0,!0)]),"tooltip-after":t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip-after",t.normalizeProps(t.guardReactiveProps({...X.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),t.createElementVNode("div",{ref_key:"chartSlicer",ref:ce,style:t.normalizeStyle(`width:100%;background:${l.value.style.chart.backgroundColor}`),"data-dom-to-png-ignore":""},[l.value.style.chart.zoom.show&&f.value>1?(t.openBlock(),t.createBlock(ft.Slicer,{ref_key:"slicerComponent",ref:oe,key:`slicer_${re.value}`,background:l.value.style.chart.zoom.color,borderColor:l.value.style.chart.backgroundColor,fontSize:l.value.style.chart.zoom.fontSize,useResetSlot:l.value.style.chart.zoom.useResetSlot,labelLeft:l.value.style.chart.grid.y.timeLabels.values[c.value.start]?l.value.style.chart.grid.y.timeLabels.values[c.value.start]:"",labelRight:l.value.style.chart.grid.y.timeLabels.values[c.value.end-1]?l.value.style.chart.grid.y.timeLabels.values[c.value.end-1]:"",textColor:l.value.style.chart.color,inputColor:l.value.style.chart.zoom.color,selectColor:l.value.style.chart.zoom.highlightColor,max:f.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":n[1]||(n[1]=s=>c.value.start=s),end:c.value.end,"onUpdate:end":n[2]||(n[2]=s=>c.value.end=s),refreshStartPoint:l.value.style.chart.zoom.startIndex!==null?l.value.style.chart.zoom.startIndex:0,refreshEndPoint:l.value.style.chart.zoom.endIndex!==null?l.value.style.chart.zoom.endIndex+1:f.value,enableRangeHandles:l.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:l.value.style.chart.zoom.enableSelectionDrag,onReset:Pe},{"reset-action":t.withCtx(({reset:s})=>[t.renderSlot(e.$slots,"reset-action",t.normalizeProps(t.guardReactiveProps({reset:s})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{ref_key:"chartLegend",ref:ie},[l.value.style.chart.legend.show&&R.value?(t.openBlock(),t.createBlock(dt.Legend,{legendSet:Re.value,config:st.value,key:`legend_${Z.value}`,onClickMarker:n[3]||(n[3]=({i:s})=>De(s))},{item:t.withCtx(({legend:s,index:b})=>[t.createElementVNode("div",{onClick:C=>s.segregate(),style:t.normalizeStyle(`opacity:${E.value.includes(b)?.5:1}`)},t.toDisplayString(s.name),13,Nt)]),_:1},8,["legendSet","config"])):t.renderSlot(e.$slots,"legend",{key:1,legend:Re.value},void 0,!0)],512),e.$slots.watermark?(t.openBlock(),t.createElementBlock("div",Pt,[t.renderSlot(e.$slots,"watermark",t.normalizeProps(t.guardReactiveProps({isPrinting:t.unref(Le)||t.unref(de)})),void 0,!0)])):t.createCommentVNode("",!0),e.$slots.source?(t.openBlock(),t.createElementBlock("div",{key:3,ref_key:"source",ref:H,dir:"auto"},[t.renderSlot(e.$slots,"source",{},void 0,!0)],512)):t.createCommentVNode("",!0),c.value.end-c.value.start<200?(t.openBlock(),t.createBlock(yt.default,{key:4,hideDetails:"",config:{open:o.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color},head:{backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color}}},{content:t.withCtx(()=>[(t.openBlock(),t.createBlock(pt.DataTable,{key:`table_${_.value}`,colNames:$e.value.colNames,head:$e.value.head,body:$e.value.body,config:$e.value.config,title:`${l.value.style.chart.title.text}${l.value.style.chart.title.subtitle.text?` : ${l.value.style.chart.title.subtitle.text}`:""}`,onClose:n[4]||(n[4]=s=>o.value.showTable=!1)},{th:t.withCtx(({th:s})=>[t.createElementVNode("div",{innerHTML:s},null,8,It)]),td:t.withCtx(({td:s})=>[t.createTextVNode(t.toDisplayString(s),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):t.createCommentVNode("",!0),l.value.userOptions.buttons.annotator&&g.value.length?(t.openBlock(),t.createBlock(Bt,{key:5,parent:K.value,backgroundColor:l.value.style.chart.backgroundColor,color:l.value.style.chart.color,active:Te.value,onClose:Ne},null,8,["parent","backgroundColor","color","active"])):t.createCommentVNode("",!0)],46,Mt))}},Dt=We._export_sfc(At,[["__scopeId","data-v-b8851cb8"]]);exports.default=Dt;