vue-data-ui 2.3.3 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -15
- package/dist/Arrow-BSOdhAJO.cjs +1 -0
- package/dist/Arrow-BjDVSrfA.js +101 -0
- package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
- package/dist/BaseIcon-vmmfWlyR.js +174 -0
- package/dist/DataTable-CaB7GIwQ.js +127 -0
- package/dist/DataTable-ssrNbONo.cjs +1 -0
- package/dist/Legend-DHpoRTAE.js +62 -0
- package/dist/Legend-Dl5IYoxK.cjs +1 -0
- package/dist/Shape-CQT4S7N-.js +107 -0
- package/dist/Shape-CaF4pvOn.cjs +1 -0
- package/dist/Slicer-Bdb1BlrC.js +156 -0
- package/dist/Slicer-QC8nTm24.cjs +1 -0
- package/dist/Title-BNPZwnkp.js +46 -0
- package/dist/Title-Cj_xubjI.cjs +1 -0
- package/dist/Tooltip-CdJ5hegk.cjs +1 -0
- package/dist/Tooltip-ZnJAz6dl.js +94 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/documentation/installation.md +14 -13
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-BMCvLyab.js +10369 -0
- package/dist/index-BkomIE9L.cjs +4 -0
- package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +105 -5
- package/dist/types/vue-data-ui.d.ts +105 -5
- package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
- package/dist/useNestedProp-CkP8xhG_.js +13 -0
- package/dist/usePrinter-BuuBz5JR.js +513 -0
- package/dist/usePrinter-r6uHYEcR.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
- package/dist/vue-data-ui-DxeO0iaC.js +254 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +61 -59
- package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
- package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
- package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
- package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
- package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
- package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
- package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
- package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
- package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
- package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
- package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
- package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
- package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
- package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
- package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
- package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
- package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
- package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
- package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
- package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
- package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
- package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
- package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
- package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
- package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
- package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
- package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
- package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
- package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
- package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
- package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
- package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
- package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
- package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
- package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
- package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
- package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
- package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
- package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
- package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
- package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
- package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
- package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
- package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
- package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
- package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
- package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
- package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
- package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
- package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
- package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
- package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
- package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
- package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
- package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
- package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
- package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
- package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
- package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
- package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
- package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
- package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
- package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
- package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
- package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
- package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
- package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
- package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
- package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
- package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
- package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
- package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
- package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
- package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
- package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
- package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
- package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
- package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
- package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
- package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
- package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
- package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
- package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
- package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
- package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
- package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
- package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
- package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
- package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
- package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
- package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
- package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
- package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
- package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
- package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
- package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
- package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
- package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
- package/dist/vue-ui-xy-qToggEfh.js +2064 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkomIE9L.cjs"),Z=require("./Title-Cj_xubjI.cjs"),E=require("./usePrinter-r6uHYEcR.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ee=require("./vue-ui-accordion-SXsobrUt.cjs"),te=require("./DataTable-ssrNbONo.cjs"),M=require("./useNestedProp-BMxXyPbW.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],ne=["transform"],se=["fill","font-weight","x","y","font-size","transform"],re=["innerHTML"],ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(D,{expose:W}){const c=D,{vue_ui_word_cloud:q}=s.useConfig(),f=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),x=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset),$=e.ref(s.createUid()),P=e.ref(0),g=e.ref(null),S=e.ref(null),t=e.computed(()=>{const o=M.useNestedProp({userConfig:c.config,defaultConfig:q});return o.theme?{...M.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}),r=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),p=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):x.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=V.throttle(()=>{const{width:a,height:l}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?S.value:null});r.value.width=a,r.value.height=l,e.nextTick(F)});p.value=new ResizeObserver(o),p.value.observe(g.value.parentNode)}}),e.onBeforeUnmount(()=>{p.value&&p.value.disconnect()});const{isPrinting:A,isImaging:U,generatePdf:_,generateImage:z}=E.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),y=e.ref({showTable:t.value.table.show});function G(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function L(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function R(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},i=0,v=0;return o.forEach(h=>{let T=!1;for(let k=0;k<Math.max(a,l)/2&&!T;k+=t.value.style.chart.words.packingWeight)for(let N=0;N<360&&!T;N+=t.value.style.chart.words.packingWeight){const O=N*Math.PI/180,H=i+k*Math.cos(O)-h.width/2,Y=v+k*Math.sin(O)-h.height/2,d={...h,x:H,y:Y},J=d.x>=n.x&&d.y>=n.y&&d.x+d.width<=n.x+n.width&&d.y+d.height<=n.y+n.height,K=u.some(Q=>L(d,Q));J&&!K&&(u.push(d),T=!0)}}),u}const m=e.ref([]);e.watch(()=>c.dataset,F,{immediate:!0});function F(){const o=x.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=x.value.map((n,i)=>{const v=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize,h=G(n.name,v);return{...n,id:s.createUid(),fontSize:v,width:h.width,height:h.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[i]||t.value.customPalette[i%t.value.customPalette.length]||s.palette[i]||s.palette[i%s.palette.length]:t.value.style.chart.words.color}});m.value=R(u,r.value.width,r.value.height).sort((n,i)=>i.fontSize-n.fontSize)}const b=e.computed(()=>{const o=m.value.map(l=>({name:l.name,color:l.color})),a=m.value.map(l=>l.value);return{head:o,body:a}});function B(){e.nextTick(()=>{const o=b.value.head.map((u,n)=>[[u.name],[b.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=b.value.head.map((n,i)=>{const v=s.dataLabel({p:t.value.table.td.prefix,v:b.value.body[i],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},v]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),w=e.ref(!1);function X(o){w.value=o,P.value+=1}function j(){return m.value}function I(){y.value.showTable=!y.value.showTable}return W({getData:j,generateCsv:B,generatePdf:_,generateImage:z,toggleTable:I}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(E.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(U),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:B,onGenerateImage:e.unref(z),onToggleTable:I},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:u,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,se))]))),256))],8,ne),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],14,ae)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createBlock(ee.default,{key:3,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(te.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[0]||(a[0]=l=>y.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,re)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,le))}},ie=oe._export_sfc(ue,[["__scopeId","data-v-83c65691"]]);exports.default=ie;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./pdf-Cz3729tZ.cjs"),O=require("./usePrinter-r6uHYEcR.cjs"),d=require("./index-BkomIE9L.cjs"),E=require("./DataTable-ssrNbONo.cjs"),z=require("./Title-Cj_xubjI.cjs"),G=require("./Tooltip-CdJ5hegk.cjs"),V=require("./Shape-CaF4pvOn.cjs"),T=require("./BaseIcon-BoKtpbrI.cjs"),P=require("./vue-ui-table-sparkline-CJBU3y8-.cjs"),M=require("./vue-ui-skeleton-JmGp11-u.cjs"),R=require("./Slicer-QC8nTm24.cjs"),D=require("./vue-ui-accordion-SXsobrUt.cjs"),B=require("./useNestedProp-BMxXyPbW.cjs"),e=require("vue"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=d.createUid(),W={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},components:{DataTable:E.DataTable,Shape:V._sfc_main,Title:z._sfc_main,Tooltip:G._sfc_main,UserOptions:O.UserOptions,BaseIcon:T.default,TableSparkline:P.default,Skeleton:M.default,Slicer:R.Slicer,Accordion:D.default},data(){this.dataset.forEach((n,g)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:g})});const a=Math.max(...this.dataset.map(n=>n.series.length)),o={start:0,end:a};return{themePalettes:d.themePalettes,themes:d.themes,slicerStep:0,selectedScale:null,CTX:null,CANVAS:null,opacity:d.opacity,useSafeValues:!0,palette:d.palette,height:600,width:1e3,viewBox:"0 0 1000 600",clientPosition:{x:0,y:0},canvasClientPosition:{x:0,y:0},icons:{line:"line",bar:"bar",plot:"plot"},isFullscreen:!1,isPrinting:!1,isImaging:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},showTooltip:!0,showTable:!1,isStacked:!1,useIndividualScale:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:d.createUid(),step:0,slicer:o,__to__:null,maxX:a,showSparklineTable:!0,segregateStep:0,sliderId:q,fontSizes:{xAxis:18,yAxis:12,dataLabels:20,plotLabels:10},plotRadii:{plot:3,line:3}}},computed:{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 a=this.lineSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height,autoScaleYLabels:l.autoScaleYLabels})),o=this.barSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),n=this.plotSet.map(l=>({name:l.name,color:l.color,scale:l.individualScale,scaleYLabels:l.scaleYLabels,zero:l.zeroPosition,max:l.individualMax,scaleLabel:l.scaleLabel||"",id:l.id,yOffset:l.yOffset||0,individualHeight:l.individualHeight||this.drawingArea.height})),g=[...a,...o,...n].flatMap(l=>l).length;return[...a,...o,...n].flatMap((l,t)=>({id:l.id,scaleLabel:l.scaleLabel,name:l.name,color:l.color,scale:l.scale,yOffset:l.yOffset,individualHeight:l.individualHeight,x:this.mutableConfig.isStacked?this.drawingArea.left:this.drawingArea.left/g*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(m=>({y:m>=0?l.zero-l.individualHeight*(m/l.max):l.zero+l.individualHeight*Math.abs(m)/l.max,value:m}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const a=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(a,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){const a=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return a;const o=this.useNestedProp({userConfig:this.config,defaultConfig:a});return o.theme?{...B.useNestedProp({userConfig:this.themes.vue_ui_xy[o.theme]||this.config,defaultConfig:o}),customPalette:this.themePalettes[o.theme]||this.palette}:o},set:function(a){return a}},hasHighlightArea(){return this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreaSpan(){const{from:a,to:o}=this.FINAL_CONFIG.chart.highlightArea;return a===o?1:o<a?0:o-a+1},relativeZero(){return this.niceScale.min>=0?0:Math.abs(this.niceScale.min)},absoluteMax(){return this.niceScale.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((a,o)=>({...a,series:a.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(a.color?a.color:this.customPalette[o]?this.customPalette[o]:this.palette[o]),id:`uniqueId_${o}`})):this.dataset},relativeDataset(){return this.safeDataset.map((a,o)=>({...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series})).filter(a=>!this.segregatedSeries.includes(a.id))},tableSparklineDataset(){return this.relativeDataset.map(a=>{const o=a.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:a.id,name:a.name,color:a.color,values:this.fillArray(this.maxSeries,o)}})},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,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((a,o)=>({absoluteIndex:o,...a,series:a.series.map(n=>n+this.relativeZero),absoluteValues:a.series,segregate:()=>this.segregate(a),isSegregated:this.segregatedSeries.includes(a.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="bar").map((a,o)=>{this.checkAutoScaleError(a);const n=Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),g=Math.max(...a.absoluteValues.filter(c=>![null,void 0].includes(c))),t={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(g-n)),valueMin:n,valueMax:g<0?0:g},m={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...a.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,u=this.calculateNiceScale(m.min,m.max,I),f=this.calculateNiceScale(t.valueMin,t.valueMax,I),S=u.min>=0?0:Math.abs(u.min),_=0,y=u.max+S,C=f.max+Math.abs(_),N=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,F=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,r=this.drawingArea.bottom-N-F*S/y,s=this.drawingArea.bottom-N-F*_/C,i=this.absoluteDataset.filter(c=>c.type==="bar").filter(c=>!this.segregatedSeries.includes(c.id)).length,h=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+S)/y:this.ratioToMax(c),v=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left+this.slot.bar*o+this.slot.bar*k*i-this.barSlot/2-o*this.barPeriodGap;return{yOffset:N,individualHeight:F,x:v,y:this.drawingArea.bottom-N-F*w,value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=a.absoluteValues.map(c=>f.min>=0?(c-Math.abs(f.min))/(f.max-Math.abs(f.min)):(c+Math.abs(f.min))/(f.max+Math.abs(f.min))),A=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*k:this.drawingArea.left-this.slot.bar/2+this.slot.bar*o+this.slot.bar*k*this.absoluteDataset.filter(v=>v.type==="bar").filter(v=>!this.segregatedSeries.includes(v.id)).length;return{yOffset:N,individualHeight:F,x:w,y:this.drawingArea.bottom-N-(F*L[k]||0),value:a.absoluteValues[k],zeroPosition:r,individualMax:y,comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),b=u.ticks.map(c=>({y:c>=0?r-F*(c/y):r+F*Math.abs(c)/y,value:c})),x=f.ticks.map(c=>{const k=(c-f.min)/(f.max-f.min);return{y:c>=0?s-F*k:s+F*k,value:c}});return{...a,yOffset:N,autoScaleYLabels:x,individualHeight:F,scaleYLabels:a.autoScaling?x:b,individualScale:a.autoScaling?f:u,individualMax:a.autoScaling?C:y,zeroPosition:a.autoScaling?s:r,plots:a.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(a=>!this.segregatedSeries.includes(a.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="line").map(a=>{this.checkAutoScaleError(a);const o=Math.min(...a.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...a.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,l={ratios:a.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-o)/(n-o)),valueMin:o,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||(Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues))},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,m),u=this.calculateNiceScale(l.valueMin,l.valueMax,m),f=I.min>=0?0:Math.abs(I.min),S=0,_=I.max+Math.abs(f),y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,r=this.drawingArea.bottom-C-N*S/y,s=a.series.map((c,k)=>{const w=this.mutableConfig.useIndividualScale?(a.absoluteValues[k]+Math.abs(f))/_:this.ratioToMax(c);return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-N*w,value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),i=a.absoluteValues.map(c=>u.min>=0?(c-Math.abs(u.min))/(u.max-Math.abs(u.min)):(c+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((c,k)=>{if(![void 0,null].includes(a.absoluteValues[k]))return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*k,y:this.drawingArea.bottom-C-(N*i[k]||0),value:a.absoluteValues[k],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[k]||""}}),L=this.createSmoothPath(s),A=this.createSmoothPath(h),b=I.ticks.map(c=>({y:c>=0?F-N*(c/_):F+N*Math.abs(c)/_,value:c})),x=u.ticks.map(c=>{const k=(c-u.min)/(u.max-u.min);return{y:c>=0?r-N*k:r+N*k,value:c}});return{...a,yOffset:C,autoScaleYLabels:x,individualHeight:N,scaleYLabels:a.autoScaling?x:b,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:_,zeroPosition:a.autoScaling?r:F,curve:a.autoScaling?A:L,plots:a.autoScaling?h:s,area:a.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(a.autoScaling?h:s,a.autoScaling?r:F):this.createArea(s):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(a=>a.type==="plot").map(a=>{this.checkAutoScaleError(a);const o=Math.min(...a.absoluteValues.filter(b=>![null,void 0].includes(b))),n=Math.max(...a.absoluteValues.filter(b=>![null,void 0].includes(b)))||1,l={ratios:a.absoluteValues.filter(b=>![null,void 0].includes(b)).map(b=>(b-o)/(n-o)),valueMin:o,valueMax:n},t={max:a.scaleMax||Math.max(...a.absoluteValues)||1,min:a.scaleMin||Math.min(...a.absoluteValues)>0?0:Math.min(...a.absoluteValues)},m=a.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,m),u=this.calculateNiceScale(l.valueMin,l.valueMax,m),f=I.min>=0?0:Math.abs(I.min),S=0,_=I.max+f,y=u.max+Math.abs(S),C=this.mutableConfig.isStacked?this.drawingArea.height*(1-a.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*a.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,r=this.drawingArea.bottom-C-N*S/y,s=a.series.map((b,x)=>{const c=this.mutableConfig.useIndividualScale?(a.absoluteValues[x]+Math.abs(f))/_:this.ratioToMax(b);return{x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-N*c,value:a.absoluteValues[x],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[x]||""}}),i=a.absoluteValues.map(b=>u.min>=0?(b-Math.abs(u.min))/(u.max-Math.abs(u.min)):(b+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=a.series.map((b,x)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-(N*i[x]||0),value:a.absoluteValues[x],comment:a.comments&&a.comments.slice(this.slicer.start,this.slicer.end)[x]||""})),L=I.ticks.map(b=>({y:b>=0?F-N*(b/_):F+N*Math.abs(b)/_,value:b})),A=u.ticks.map(b=>{const x=(b-u.min)/(u.max-u.min);return{y:b>=0?r-N*x:r+N*x,value:b}});return{...a,yOffset:C,autoScaleYLabels:A,individualHeight:N,scaleYLabels:a.autoScaling?A:L,individualScale:a.autoScaling?u:I,individualMax:a.autoScaling?y:_,zeroPosition:a.autoScaling?r:F,plots:a.autoScaling?h:s}})},drawingArea(){const a=this.mutableConfig.useIndividualScale&&this.FINAL_CONFIG.chart.grid.labels.show?this.absoluteDataset.filter(o=>!this.segregatedSeries.includes(o.id)).length*(this.mutableConfig.isStacked?0:this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth):0;return{top:this.FINAL_CONFIG.chart.padding.top,right:this.width-this.FINAL_CONFIG.chart.padding.right,bottom:this.height-this.FINAL_CONFIG.chart.padding.bottom,left:this.FINAL_CONFIG.chart.padding.left+a,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+a)}},max(){return Math.max(...this.safeDataset.filter(a=>!this.segregatedSeries.includes(a.id)).map(a=>Math.max(...a.series)))},min(){const a=Math.min(...this.safeDataset.filter(o=>!this.segregatedSeries.includes(o.id)).map(o=>Math.min(...o.series)));return a>0?0:a},niceScale(){return this.calculateNiceScale(this.min,this.max<0?0:this.max,this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps)},maxSeries(){return this.slicer.end-this.slicer.start},timeLabels(){return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start,this.slicer.end)},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(a=>a.type==="bar").filter(a=>!this.segregatedSeries.includes(a.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const a=this.safeDataset.filter(o=>o.type==="bar").filter(o=>!this.segregatedSeries.includes(o.id)).length;return this.drawingArea.width/this.maxSeries/a-this.barPeriodGap*a},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(a=>a!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const a=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),o=[];return this.timeLabels.forEach((n,g)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[g])?Number(t.absoluteValues[g].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),o.push(l)}),{head:a,body:o}},dataTable(){const a=[""].concat(this.relativeDataset.map(l=>l.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 o=[];for(let l=0;l<this.maxSeries;l+=1){const t=this.relativeDataset.map(m=>m.absoluteValues[l]??0).reduce((m,I)=>m+I,0);o.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(m=>(m.absoluteValues[l]??0).toFixed(this.FINAL_CONFIG.table.rounding))).concat((t??0).toFixed(this.FINAL_CONFIG.table.rounding)))}const n={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},g=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:a,body:o,config:n,colNames:g}},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(a=>({shape:a.shape||null,name:a.name,color:a.color,type:a.type,value:a.absoluteValues.find((o,n)=>n===this.selectedSerieIndex),comments:a.comments||[]}))},tooltipContent(){let a="",o=this.selectedSeries.map(l=>l.value).filter(l=>this.isSafeValue(l)&&l!==null).reduce((l,t)=>Math.abs(l)+Math.abs(t),0);const n=this.timeLabels[this.selectedSerieIndex],g=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(g)&&this.functionReturnsString(()=>g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?g({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(a+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${n}</div>`),this.selectedSeries.forEach(l=>{if(this.isSafeValue(l.value)){let t="",m="";switch(this.icons[l.type]){case"bar":t=`<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${l.color}" /></svg>`;break;case"line":!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)?m=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:3,rotation:.52}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="square"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:.8}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="diamond"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:4,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="pentagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:5,rotation:.95}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="hexagon"?m=`<path d="${d.createPolygonPath({plot:{x:10,y:8},radius:4,sides:6,rotation:0}).path}" fill="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />`:l.shape==="star"&&(m=`<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:10,y:8},radius:4})}" />`),t=`<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${l.color}" />${m}</svg>`;break;case"plot":if(!l.shape||!["star","triangle","square","diamond","pentagon","hexagon"].includes(l.shape)){t=`<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="${l.color}" /></svg>`;break}if(l.shape==="star"){t=`<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" points="${d.createStar({plot:{x:6,y:6},radius:5})}" /></svg>`;break}if(l.shape==="triangle"){t=`<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="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="square"){t=`<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="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="diamond"){t=`<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="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="pentagon"){t=`<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="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}if(l.shape==="hexagon"){t=`<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="${l.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;break}}a+=`<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${t}</div> ${l.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue?this.dataLabel({p:this.FINAL_CONFIG.chart.labels.prefix,v:l.value,s:this.FINAL_CONFIG.chart.labels.suffix,r:this.FINAL_CONFIG.chart.tooltip.roundingValue}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(l.value)/o*100).toFixed(this.FINAL_CONFIG.chart.tooltip.roundingPercentage)}%)`:""}</div>`,this.FINAL_CONFIG.chart.comments.showInTooltip&&l.comments.length&&l.comments.slice(this.slicer.start,this.slicer.end)[this.selectedSerieIndex]&&(a+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${l.color}">${l.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}">${a}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(a=>({y:a>=0?this.zero-this.drawingArea.height*this.ratioToMax(a):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(a)),value:a}))},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){if(this.objectIsEmpty(this.dataset)?this.error({componentName:"VueUiXy",type:"dataset"}):this.dataset.forEach((a,o)=>{[null,void 0].includes(a.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:o})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(a=>{a.series.forEach((o,n)=>{this.isSafeValue(o)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
2
|
+
-----> The serie '${a.name}' contains the value '${o}' at index ${n}.
|
|
3
|
+
'${o}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",a=>{this.clientPosition={x:a.clientX,y:a.clientY}}),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 o=this.$refs.chart.parentNode,{height:n,width:g}=o.getBoundingClientRect();let l=null,t=0;this.FINAL_CONFIG.chart.title.show&&(l=this.$refs.chartTitle,t=l.getBoundingClientRect().height);let m=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(m=this.$refs.chartSlicer.$el,I=m.getBoundingClientRect().height);let u=null,f=0;this.FINAL_CONFIG.chart.legend.show&&(u=this.$refs.chartLegend,f=u.getBoundingClientRect().height),this.height=n-t-f-I,this.width=g,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes(),new ResizeObserver(_=>{for(const y of _)l&&(t=l.getBoundingClientRect().height),m&&(I=m.getBoundingClientRect().height),u&&(f=u.getBoundingClientRect().height),this.height=y.contentBoxSize[0].blockSize-t-f-I-24,this.width=y.contentBoxSize[0].inlineSize,this.viewBox=`0 0 ${this.width<0?10:this.width} ${this.height<0?10:this.height}`,this.convertSizes()}).observe(o)}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},methods:{abbreviate:d.abbreviate,assignStackRatios:d.assignStackRatios,calculateNiceScale:d.calculateNiceScale,checkNaN:d.checkNaN,createSmoothPath:d.createSmoothPath,isSafeValue:d.isSafeValue,treeShake:d.treeShake,shiftHue:d.shiftHue,pdf:p.pdf,img:O.saveAsImage,convertColorToHex:d.convertColorToHex,convertConfigColors:d.convertConfigColors,convertCustomPalette:d.convertCustomPalette,downloadCsv:d.downloadCsv,createCsvContent:d.createCsvContent,adaptColorToBackground:d.adaptColorToBackground,calcLinearProgression:d.calcLinearProgression,useMouse:G.useMouse,closestDecimal:d.closestDecimal,dataLabel:d.dataLabel,isFunction:d.isFunction,functionReturnsString:d.functionReturnsString,error:d.error,objectIsEmpty:d.objectIsEmpty,createTSpans:d.createTSpans,useNestedProp:B.useNestedProp,translateSize:d.translateSize,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(a){a.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${a.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: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(a){if(!a[0])return[-10,-10,"",-10,-10];const o={x:a[0].x,y:this.zero},n={x:a.at(-1).x,y:this.zero},g=[];return a.forEach(l=>{g.push(`${l.x},${l.y} `)}),[o.x,o.y,...g,n.x,n.y].toString()},createIndividualArea(a,o){if(!a[0])return[-10,-10,"",-10,-10];const n={x:a[0]?a[0].x:Math.min(...a.filter(t=>!!t).map(t=>t.x)),y:o},g={x:a.at(-1)?a.at(-1).x:Math.min(...a.filter(t=>!!t).map(t=>t.x)),y:o},l=[];return a.filter(t=>!!t).forEach(t=>{l.push(`${t.x},${t.y} `)}),[n.x,n.y,...l,g.x,g.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(a,o){let n=Array(a).fill(0);for(let g=0;g<o.length&&g<a;g+=1)n[g]=o[g];return n},refreshSlicer(){this.slicer={start:0,end:Math.max(...this.dataset.map(a=>a.series.length))},this.slicerStep+=1},calcRectHeight(a){return a.value>=0?this.zero-a.y<=0?1e-5:this.zero-a.y:a.y-this.zero<=0?1e-5:a.y-this.zero},calcIndividualHeight(a){return a.value>=0?a.zeroPosition-a.y<=0?1e-5:a.zeroPosition-a.y:a.y-a.zeroPosition<=0?1e-5:a.zeroPosition-a.y},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(a){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?a.x+this.drawingArea.width/this.maxSeries*.05:a.x+this.slot.bar/2},calcRectY(a){return a.value>=0?a.y:this.zero},calcIndividualRectY(a){return a.value>=0?a.y:a.zeroPosition},canShowValue(a){return![null,void 0,NaN].includes(a)},findClosestValue(a,o){let n=o[0],g=Math.abs(a-o[0]);for(let l=1;l<o.length;l+=1){const t=Math.abs(a-o[l]);t<g&&o[l]<a&&(n=o[l],g=t)}return n},ratioToMax(a){return a/this.absoluteMax},selectX(a){this.$emit("selectX",{dataset:this.relativeDataset.map(o=>({name:o.name,value:[null,void 0,NaN].includes(o.absoluteValues[a])?null:o.absoluteValues[a],color:o.color,type:o.type})),index:a,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a]})},getData(){return this.absoluteDataset.map(a=>({values:a.absoluteValues,color:a.color,name:a.name,type:a.type}))},segregate(a){if(this.segregatedSeries.includes(a.id))this.segregatedSeries=this.segregatedSeries.filter(o=>o!==a.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(a.id)}this.$emit("selectLegend",this.relativeDataset.map(o=>({name:o.name,values:o.absoluteValues,color:o.color,type:o.type}))),this.segregateStep+=1},toggleTooltipVisibility(a,o=null){this.isTooltip=a,a?this.selectedSerieIndex=o:this.selectedSerieIndex=null},toggleFullscreen(a){this.isFullscreen=a,this.step+=1},showSpinnerPdf(){this.isPrinting=!0},generatePdf(){this.showSpinnerPdf(),clearTimeout(this.__to__),this.__to__=setTimeout(()=>{this.pdf({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"}).finally(()=>{this.isPrinting=!1})},100)},generateCsv(){const a=[[this.FINAL_CONFIG.chart.title.text],[this.FINAL_CONFIG.chart.title.subtitle.text],[""]],o=["",...this.table.head.map(t=>t.label)],n=this.table.body,g=a.concat([o]).concat(n),l=this.createCsvContent(g);this.downloadCsv({csvContent:l,title:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy"})},showSpinnerImage(){this.isImaging=!0},generateImage(){this.showSpinnerImage(),clearTimeout(this.__to__),this.__to__=setTimeout(()=>{this.img({domElement:document.getElementById(`vue-ui-xy_${this.uniqueId}`),fileName:this.FINAL_CONFIG.chart.title.text||"vue-ui-xy",format:"png"}).finally(()=>{this.isImaging=!1})},100)}}},Y=["id"],X=["viewBox"],U={key:0},Z={class:"vue-ui-xy-grid"},J=["stroke","x1","x2","y1","y2"],K=["stroke","x1","x2","y1","y2"],Q={key:1},j=["x1","x2","y1","y2","stroke"],$=["x1","x2","y1","y2","stroke"],ee=["x1","x2","y1","y2","stroke"],te={key:3},le=["x1","x2","y1","y2","stroke"],re=["id"],ae=["stop-color"],ie=["stop-color"],oe=["stop-color"],se=["id"],ne=["stop-color"],ce=["stop-color"],he=["stop-color"],de=["id"],ue=["stop-color"],ge=["stop-color"],me=["id"],Ne=["stop-color"],fe=["stop-color"],ke=["id"],be=["stop-color"],Ie=["stop-color"],Fe=["x","y","height","width","rx","fill","stroke","stroke-width"],_e=["width","x","y"],ye={key:0},xe=["id"],Ce=["fill"],Se=["x1","x2","y1","y2","stroke","marker-end"],Ae=["x","y","font-size","fill"],Le=["stroke","x1","x2","y1","y2"],we=["width","x","y"],ve={style:{width:"100%"}},Oe={key:0},Ge=["id"],Be=["fill"],pe=["x1","x2","y1","y2","stroke","marker-end"],Ee=["x","y","font-size","fill"],ze=["d","stroke","stroke-width","stroke-dasharray"],Ve={key:1},Te=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Pe={key:0},Me=["d","fill"],Re=["d","fill"],De=["d","stroke","stroke-width","stroke-dasharray"],He={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],We=["width","x","y"],Ye={style:{width:"100%"}},Xe={key:3},Ue=["id"],Ze=["fill"],Je=["x1","x2","y1","y2","stroke","marker-end"],Ke=["x","y","font-size","fill"],Qe={key:2},je=["x","y","font-size","fill"],$e=["x","y","font-size","fill","font-weight"],et={key:3},tt=["x","y","font-size","fill"],lt=["x","y"],rt=["x","y"],at={key:4},it=["x","y","font-size","fill"],ot=["x","y"],st=["x","y"],nt={key:5},ct=["x","y","height","width","fill"],ht=["x","y","width"],dt=["y","width","height","fill"],ut=["x","y","width","height","fill"],gt=["x","y","font-size","fill","innerHTML"],mt=["x","y","font-size","fill","innerHTML"],Nt=["x","y","font-size","fill","innerHTML"],ft=["x","y","font-size","fill","innerHTML"],kt={key:6},bt=["x1","x2","y1","y2","stroke","stroke-width"],It=["fill","font-size","transform"],Ft=["x1","x2","y1","y2","stroke"],_t=["x","y","font-size","fill"],yt=["x1","x2","y1","y2","stroke"],xt=["x","y","font-size","fill"],Ct=["x","y","width","height","fill","onMouseenter"],St=["font-size","fill","transform"],At=["x","y","font-size","fill"],Lt={key:8},wt=["text-anchor","font-size","fill","transform"],vt=["x","y","height","width","fill","onMouseenter","onClick"],Ot={key:9},Gt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Bt={key:10},pt=["x","y"],Et=["cx","cy","r","fill"],zt=["onClick"],Vt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Tt=["fill"],Pt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Mt=["fill"],Rt={key:6,ref:"chartLegend"},Dt={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},Ht=["innerHTML"];function qt(a,o,n,g,l,t){const m=e.resolveComponent("Title"),I=e.resolveComponent("UserOptions"),u=e.resolveComponent("Shape"),f=e.resolveComponent("Skeleton"),S=e.resolveComponent("Slicer"),_=e.resolveComponent("Tooltip"),y=e.resolveComponent("BaseIcon"),C=e.resolveComponent("TableSparkline"),N=e.resolveComponent("DataTable"),F=e.resolveComponent("Accordion");return e.openBlock(),e.createElementBlock("div",{id:`vue-ui-xy_${l.uniqueId}`,class:e.normalizeClass(`vue-ui-xy ${l.isFullscreen?"vue-data-ui-wrapper-fullscreen":""} ${t.FINAL_CONFIG.useCssAnimation?"":"vue-ui-dna"}`),ref:"chart",style:e.normalizeStyle(`background:${t.FINAL_CONFIG.chart.backgroundColor}; color:${t.FINAL_CONFIG.chart.color};width:100%;${t.FINAL_CONFIG.chart.title.text?"":"padding-top:36px"};font-family:${t.FINAL_CONFIG.chart.fontFamily};${t.FINAL_CONFIG.responsive?"height: 100%":""}`)},[t.FINAL_CONFIG.chart.title.show?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"chartTitle",class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.FINAL_CONFIG.chart.fontFamily}`)},[e.createVNode(m,{config:{title:{cy:"xy-div-title",...t.FINAL_CONFIG.chart.title},subtitle:{cy:"xy-div-subtitle",...t.FINAL_CONFIG.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.userOptions.show&&t.isDataset?(e.openBlock(),e.createBlock(I,{ref:"defails",key:`user_options_${l.step}`,backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color,isPrinting:l.isPrinting,isImaging:l.isImaging,uid:l.uniqueId,hasTooltip:t.FINAL_CONFIG.chart.userOptions.buttons.tooltip&&t.FINAL_CONFIG.chart.tooltip.show,hasPdf:t.FINAL_CONFIG.chart.userOptions.buttons.pdf,hasXls:t.FINAL_CONFIG.chart.userOptions.buttons.csv,hasImg:t.FINAL_CONFIG.chart.userOptions.buttons.img,hasLabel:t.FINAL_CONFIG.chart.userOptions.buttons.labels,hasTable:t.FINAL_CONFIG.chart.userOptions.buttons.table,hasStack:n.dataset.length>1&&t.FINAL_CONFIG.chart.userOptions.buttons.stack,hasFullscreen:t.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,isStacked:l.mutableConfig.isStacked,isFullscreen:l.isFullscreen,chartElement:a.$refs.chart,isTooltip:l.mutableConfig.showTooltip,titles:{...t.FINAL_CONFIG.chart.userOptions.buttonTitles},onToggleFullscreen:t.toggleFullscreen,onGeneratePdf:t.generatePdf,onGenerateCsv:t.generateCsv,onGenerateImage:t.generateImage,onToggleTable:t.toggleTable,onToggleLabels:t.toggleLabels,onToggleStack:t.toggleStack,onToggleTooltip:t.toggleTooltip},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionStack?{name:"optionStack",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:s})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasLabel","hasTable","hasStack","hasFullscreen","isStacked","isFullscreen","chartElement","isTooltip","titles","onToggleFullscreen","onGeneratePdf","onGenerateCsv","onGenerateImage","onToggleTable","onToggleLabels","onToggleStack","onToggleTooltip"])):e.createCommentVNode("",!0),t.isDataset?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass([{"vue-data-ui-fullscreen--on":l.isFullscreen,"vue-data-ui-fulscreen--off":!l.isFullscreen},"vue-ui-xy-svg"]),width:"100%",viewBox:l.viewBox,style:e.normalizeStyle(`background:${t.FINAL_CONFIG.chart.backgroundColor}; color:${t.FINAL_CONFIG.chart.color}; font-family:${t.FINAL_CONFIG.chart.fontFamily}`)},[t.maxSeries>0?(e.openBlock(),e.createElementBlock("g",U,[e.createElementVNode("g",Z,[t.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left,x2:t.drawingArea.right,y1:t.drawingArea.bottom,y2:t.drawingArea.bottom,"stroke-linecap":"round"},null,8,J)):e.createCommentVNode("",!0),l.mutableConfig.useIndividualScale?t.FINAL_CONFIG.chart.grid.showHorizontalLines?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",null,[r.id===l.selectedScale&&r.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.yLabels,s=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left,x2:t.drawingArea.right,y1:s.y,y2:s.y,stroke:r.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,$))),256)):r.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.yLabels,s=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left,x2:t.drawingArea.right,y1:s.y,y2:s.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,ee))),256)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left,x2:t.drawingArea.left,y1:t.drawingArea.top,y2:t.drawingArea.bottom,"stroke-linecap":"round"},null,8,K)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.showHorizontalLines?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yLabels,r=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left,x2:t.drawingArea.right,y1:r.y,y2:r.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":.5,"stroke-linecap":"round"},null,8,j))),256))])):e.createCommentVNode("",!0)],64)),t.FINAL_CONFIG.chart.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries+1,(r,s)=>(e.openBlock(),e.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:t.drawingArea.width/t.maxSeries*s+t.drawingArea.left,x2:t.drawingArea.width/t.maxSeries*s+t.drawingArea.left,y1:t.drawingArea.top,y2:t.drawingArea.bottom,"stroke-width":"0.5",stroke:t.FINAL_CONFIG.chart.grid.stroke},null,8,le))),128))])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.barSet,(r,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_rect_${s}`},[e.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${l.uniqueId}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":r.color},null,8,ae),e.createElementVNode("stop",{offset:"62%","stop-color":`${t.shiftHue(r.color,.02)}DE`},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.shiftHue(r.color,.05)}66`},null,8,oe)],8,re),e.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${l.uniqueId}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}66`},null,8,ne),e.createElementVNode("stop",{offset:"38%","stop-color":`${t.shiftHue(r.color,.02)}DE`},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,he)],8,se)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_plot_${s}`},[e.createElementVNode("radialGradient",{id:`plotGradient_${s}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}`},null,8,ue),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,ge)],8,de)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("defs",{key:`def_line_${s}`},[e.createElementVNode("radialGradient",{id:`lineGradient_${s}_${l.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.05)}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":r.color},null,8,fe)],8,me),e.createElementVNode("linearGradient",{id:`areaGradient_${s}_${l.uniqueId}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(r.color,.03)}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Ie)],8,ke)]))),128)),t.barSet.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.barSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_bar_${s}`,class:e.normalizeClass(`serie_bar_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`bar_plot_${s}_${h}`},[t.canShowValue(i.value)?(e.openBlock(),e.createElementBlock("rect",{key:0,x:t.calcRectX(i),y:l.mutableConfig.useIndividualScale?t.calcIndividualRectY(i):t.calcRectY(i),height:l.mutableConfig.useIndividualScale?Math.abs(t.calcIndividualHeight(i)):Math.abs(t.calcRectHeight(i)),width:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)<0?1e-5:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap),rx:t.FINAL_CONFIG.bar.borderRadius,fill:t.FINAL_CONFIG.bar.useGradient?i.value>=0?`url(#rectGradient_pos_${s}_${l.uniqueId})`:`url(#rectGradient_neg_${s}_${l.uniqueId})`:r.color,stroke:t.FINAL_CONFIG.bar.border.useSerieColor?r.color:t.FINAL_CONFIG.bar.border.stroke,"stroke-width":t.FINAL_CONFIG.bar.border.strokeWidth},null,8,Fe)):e.createCommentVNode("",!0),i.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:(t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)<0?1e-5:t.calcRectWidth()-(l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?0:t.barPeriodGap)/2)+t.FINAL_CONFIG.chart.comments.width,x:t.calcRectX(i)-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)],8,_e)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",ye,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`bar_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Ce)],8,xe)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${s})`},null,8,Se)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Ae)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)):e.createCommentVNode("",!0),!l.mutableConfig.useIndividualScale&&t.FINAL_CONFIG.chart.grid.labels.zeroLine.show?(e.openBlock(),e.createElementBlock("line",{key:1,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1",x1:t.drawingArea.left,x2:t.drawingArea.right,y1:t.zero,y2:t.zero,"stroke-linecap":"round"},null,8,Le)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_plot_${s}`,class:e.normalizeClass(`serie_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_plot_${s}_${h}`},[t.canShowValue(i.value)?(e.openBlock(),e.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:t.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${s}_${l.uniqueId})`:r.color,plot:{x:i.x,y:i.y},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===h?(l.plotRadii.plot||6)*1.5:l.plotRadii.plot||6,stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["shape","color","plot","radius","stroke"])):e.createCommentVNode("",!0),i.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:t.FINAL_CONFIG.chart.comments.width,x:i.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",ve,[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)])],8,we)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`plot_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Be)],8,Ge)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${s})`},null,8,pe)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.smooth&&r.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M${r.curve}`,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,ze)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:r.plots[h+1].x,y1:i.y,y2:r.plots[h+1].y,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Te)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[r.useArea&&r.plots.length>1?(e.openBlock(),e.createElementBlock("g",Pe,[r.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${r.plots[0]?r.plots[0].x:Math.min(...r.plots.filter(i=>!!i).map(i=>i.x))},${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom} ${r.curve} L ${r.plots.at(-1)?r.plots.at(-1).x:t.drawingArea.left+t.slot.line*s+t.slot.line/2},${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom} Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${s}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Me)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${r.area}Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${s}_${l.uniqueId})`:`${r.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Re))])):e.createCommentVNode("",!0),r.smooth&&r.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${r.curve}`,stroke:r.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,De)):r.plots.length>1?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<r.plots.length-1&&r.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(r.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:r.plots[h+1].x,y1:i.y,y2:r.plots[h+1].y,stroke:r.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":r.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,qe)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`circle_line_${s}_${h}`},[i&&t.canShowValue(i.value)?(e.openBlock(),e.createBlock(u,{key:0,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",color:t.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${s}_${l.uniqueId})`:r.color,plot:{x:i.x,y:i.y},radius:l.selectedSerieIndex!==null&&l.selectedSerieIndex===h?(l.plotRadii.line||6)*1.5:l.plotRadii.line,stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:.5},null,8,["shape","color","plot","radius","stroke"])):e.createCommentVNode("",!0),i.comment&&t.FINAL_CONFIG.chart.comments.show?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,style:{overflow:"visible"},height:"12",width:t.FINAL_CONFIG.chart.comments.width,x:i.x-t.FINAL_CONFIG.chart.comments.width/2+t.FINAL_CONFIG.chart.comments.offsetX,y:i.y+t.FINAL_CONFIG.chart.comments.offsetY+6},[e.createElementVNode("div",Ye,[e.renderSlot(a.$slots,"plot-comment",{plot:{...i,color:r.color}},void 0,!0)])],8,We)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(r,"useProgression")&&r.useProgression===!0&&!isNaN(t.calcLinearProgression(r.plots).trend)?(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("defs",null,[e.createElementVNode("marker",{id:`line_arrow_${s}`,markerWidth:7,markerHeight:7,refX:"0",refY:7/2,orient:"auto"},[e.createElementVNode("polygon",{points:`0 0, 7 ${7/2}, 0 7`,fill:r.color},null,8,Ze)],8,Ue)]),r.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(r.plots).x1,x2:t.calcLinearProgression(r.plots).x2,y1:t.calcLinearProgression(r.plots).y1,y2:t.calcLinearProgression(r.plots).y2,"stroke-width":1,stroke:r.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${s})`},null,8,Je)):e.createCommentVNode("",!0),r.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(r.plots).x2,y:t.calcLinearProgression(r.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:r.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(r.plots).trend*100,s:"%",r:2})),9,Ke)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],6))),128)),(t.FINAL_CONFIG.bar.labels.show||t.FINAL_CONFIG.bar.serieName.show)&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.barSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}`,class:e.normalizeClass(`xLabel_bar_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}_${h}`},[i&&(!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0)&&t.FINAL_CONFIG.bar.labels.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?i.x+t.slot.line/2:t.calcRectX(i)+t.calcRectWidth()/2-t.barPeriodGap/2,y:i.y+(i.value>0?t.FINAL_CONFIG.bar.labels.offsetY:-t.FINAL_CONFIG.bar.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.bar.labels.color},e.toDisplayString(t.canShowValue(i.value)?t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.bar.labels.rounding}):""),9,je)):e.createCommentVNode("",!0),i&&t.FINAL_CONFIG.bar.serieName.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.mutableConfig.useIndividualScale&&l.mutableConfig.isStacked?i.x+t.slot.line/2:i.x+t.calcRectWidth()*1.1,y:i.y+(i.value>0?t.FINAL_CONFIG.bar.serieName.offsetY:-t.FINAL_CONFIG.bar.serieName.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.bar.serieName.useSerieColor?r.color:t.FINAL_CONFIG.bar.serieName.color,"font-weight":t.FINAL_CONFIG.bar.serieName.bold?"bold":"normal"},e.toDisplayString(t.FINAL_CONFIG.bar.serieName.useAbbreviation?t.abbreviate({source:r.name,length:t.FINAL_CONFIG.bar.serieName.abbreviationSize}):r.name),9,$e)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.plot.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x,y:i.y+t.FINAL_CONFIG.plot.labels.offsetY,"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.plot.labels.color},e.toDisplayString(t.canShowValue(i.value)?t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.plot.labels.rounding}):""),9,tt)):e.createCommentVNode("",!0),i&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:i.x,y:i.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,lt)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-r.name.length*(l.fontSizes.plotLabels/2),y:i.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,rt)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.line.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&!Object.hasOwn(r,"dataLabels")||r.dataLabels===!0?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x,y:i.y+(i.value>0?t.FINAL_CONFIG.line.labels.offsetY:-t.FINAL_CONFIG.line.labels.offsetY*3),"text-anchor":"middle","font-size":l.fontSizes.plotLabels,fill:t.FINAL_CONFIG.line.labels.color},e.toDisplayString(t.canShowValue(i.value)?t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:i.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.line.labels.rounding}):""),9,it)):e.createCommentVNode("",!0),i&&h===0&&r.useTag&&r.useTag==="start"?(e.openBlock(),e.createElementBlock("foreignObject",{key:1,x:i.x,y:i.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,ot)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.useTag&&r.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-r.name.length*(l.fontSizes.plotLabels/2),y:i.y-20,height:24,width:"150",style:{overflow:"visible"}},[e.createElementVNode("div",{style:e.normalizeStyle(`padding: 3px; background:${r.color}${l.opacity[80]};color:${t.adaptColorToBackground(r.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(r.name),5)],8,st)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.hasHighlightArea?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("rect",{x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*(t.FINAL_CONFIG.chart.highlightArea.from-l.slicer.start),y:t.drawingArea.top,height:t.drawingArea.height<0?10:t.drawingArea.height,width:t.drawingArea.width/t.maxSeries*t.highlightAreaSpan<0?1e-5:t.drawingArea.width/t.maxSeries*t.highlightAreaSpan,fill:`${t.FINAL_CONFIG.chart.highlightArea.color}${l.opacity[t.FINAL_CONFIG.chart.highlightArea.opacity]}`},null,8,ct),t.FINAL_CONFIG.chart.highlightArea.caption.text?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*(t.FINAL_CONFIG.chart.highlightArea.from-l.slicer.start)-(t.FINAL_CONFIG.chart.highlightArea.caption.width==="auto"?0:t.FINAL_CONFIG.chart.highlightArea.caption.width/2-t.drawingArea.width/t.maxSeries*t.highlightAreaSpan/2),y:t.drawingArea.top+t.FINAL_CONFIG.chart.highlightArea.caption.offsetY,style:{overflow:"visible"},height:"1",width:t.FINAL_CONFIG.chart.highlightArea.caption.width==="auto"?t.drawingArea.width/t.maxSeries*t.highlightAreaSpan:t.FINAL_CONFIG.chart.highlightArea.caption.width},[e.createElementVNode("div",{style:e.normalizeStyle(`padding:${t.FINAL_CONFIG.chart.highlightArea.caption.padding}px;text-align:${t.FINAL_CONFIG.chart.highlightArea.caption.textAlign};font-size:${t.FINAL_CONFIG.chart.highlightArea.caption.fontSize}px;color:${t.FINAL_CONFIG.chart.highlightArea.caption.color};font-weight:${t.FINAL_CONFIG.chart.highlightArea.caption.bold?"bold":"normal"}`)},e.toDisplayString(t.FINAL_CONFIG.chart.highlightArea.caption.text),5)],8,ht)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[e.createElementVNode("rect",{x:0,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.padding.left-1,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:t.FINAL_CONFIG.chart.backgroundColor},null,8,dt),e.createElementVNode("rect",{x:t.drawingArea.right+1,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.padding.right,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:t.FINAL_CONFIG.chart.backgroundColor},null,8,ut)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x-l.fontSizes.plotLabels,y:i.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,gt)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:i.x+l.fontSizes.plotLabels,y:i.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:i.x+l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,mt)):e.createCommentVNode("",!0)]))),128))],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&h===0&&r.showSerieName&&r.showSerieName==="start"?(e.openBlock(),e.createElementBlock("text",{key:0,x:i.x-l.fontSizes.plotLabels,y:i.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"end",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,Nt)):e.createCommentVNode("",!0),i&&h===r.plots.length-1&&r.showSerieName&&r.showSerieName==="end"?(e.openBlock(),e.createElementBlock("text",{key:1,x:i.x+l.fontSizes.plotLabels,y:i.y,"font-size":l.fontSizes.plotLabels,"text-anchor":"start",fill:r.color,innerHTML:t.createTSpans({content:r.name,fontSize:l.fontSizes.plotLabels,fill:r.color,x:i.x+l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,ft)):e.createCommentVNode("",!0)]))),128))],6))),128)),t.FINAL_CONFIG.chart.grid.labels.show?(e.openBlock(),e.createElementBlock("g",kt,[l.mutableConfig.useIndividualScale?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:r.x,x2:r.x,y1:l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset-r.individualHeight:t.drawingArea.top,y2:l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset:t.drawingArea.bottom,stroke:r.color,"stroke-width":t.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,bt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("g",{style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===r.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[e.createElementVNode("text",{fill:r.color,"font-size":l.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${r.x-t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${l.mutableConfig.isStacked?t.drawingArea.bottom-r.yOffset-r.individualHeight/2:t.drawingArea.top+t.drawingArea.height/2}) rotate(-90)`},e.toDisplayString(r.name)+" "+e.toDisplayString(r.scaleLabel?`- ${r.scaleLabel}`:""),9,It),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("line",{x1:r.x-3,x2:r.x,y1:s.y,y2:s.y,stroke:r.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Ft))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("text",{x:r.x-5,y:s.y,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:r.color},e.toDisplayString(t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:s.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:1})),9,_t))),256))],4))),256))],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.yLabels,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`yLabel_${s}`},[t.canShowValue(r)&&r.value>=t.niceScale.min&&r.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.drawingArea.left,x2:t.drawingArea.left-5,y1:r.y,y2:r.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,yt)):e.createCommentVNode("",!0),r.value>=t.niceScale.min&&r.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.drawingArea.left-7,y:r.y+l.fontSizes.dataLabels/3,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:t.FINAL_CONFIG.chart.grid.labels.color},e.toDisplayString(t.canShowValue(r.value)?t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:r.value,s:t.FINAL_CONFIG.chart.labels.suffix,r:1}):""),9,xt)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),l.mutableConfig.useIndividualScale&&!l.mutableConfig.isStacked?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:7},e.renderList(t.allScales,r=>(e.openBlock(),e.createElementBlock("rect",{x:r.x-t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,y:t.drawingArea.top,width:t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,height:t.drawingArea.height<0?10:t.drawingArea.height,fill:l.selectedScale===r.id?`${r.color}20`:"transparent",onMouseenter:s=>l.selectedScale=r.id,onMouseleave:o[0]||(o[0]=s=>l.selectedScale=null)},null,40,Ct))),256)):e.createCommentVNode("",!0),e.createElementVNode("g",null,[t.FINAL_CONFIG.chart.grid.labels.axis.yLabel&&!l.mutableConfig.useIndividualScale?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":l.fontSizes.yAxis,fill:t.FINAL_CONFIG.chart.grid.labels.color,transform:`translate(${l.fontSizes.yAxis+t.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${t.drawingArea.top+t.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle",style:{transition:"none"}},e.toDisplayString(t.FINAL_CONFIG.chart.grid.labels.axis.yLabel),9,St)):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.grid.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:l.width/2,y:t.drawingArea.bottom+l.fontSizes.yAxis+l.fontSizes.xAxis*1.3+t.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,"font-size":l.fontSizes.yAxis,fill:t.FINAL_CONFIG.chart.grid.labels.color},e.toDisplayString(t.FINAL_CONFIG.chart.grid.labels.axis.xLabel),9,At)):e.createCommentVNode("",!0)]),t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timeLabels,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`time_label_${s}`},[r&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(s===0||s===t.timeLabels.length-1)&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===s&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||r&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo&&s%Math.floor((this.slicer.end-this.slicer.start)/t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation>0?"start":t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation<0?"end":"middle","font-size":l.fontSizes.xAxis,fill:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,transform:`translate(${t.drawingArea.left+t.drawingArea.width/t.maxSeries*s+t.drawingArea.width/t.maxSeries/2}, ${t.drawingArea.bottom+l.fontSizes.xAxis*1.3+t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`},e.toDisplayString(r||""),9,wt)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.maxSeries,(r,s)=>(e.openBlock(),e.createElementBlock("g",{key:`tooltip_trap_${s}`},[e.createElementVNode("rect",{"data-cy-trap":"",x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*s,y:t.drawingArea.top,height:t.drawingArea.height<0?10:t.drawingArea.height,width:t.drawingArea.width/t.maxSeries<0?1e-5:t.drawingArea.width/t.maxSeries,fill:l.selectedSerieIndex===s||l.selectedRowIndex===s?`${t.FINAL_CONFIG.chart.highlighter.color}${l.opacity[t.FINAL_CONFIG.chart.highlighter.opacity]}`:"transparent",onMouseenter:i=>t.toggleTooltipVisibility(!0,s),onMouseleave:o[1]||(o[1]=i=>t.toggleTooltipVisibility(!1)),onClick:i=>t.selectX(s)},null,40,vt)]))),128))]),t.FINAL_CONFIG.chart.highlighter.useLine&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",Ot,[e.createElementVNode("line",{x1:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,x2:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,y1:t.drawingArea.top,y2:t.drawingArea.bottom,stroke:t.FINAL_CONFIG.chart.highlighter.color,"stroke-width":t.FINAL_CONFIG.chart.highlighter.lineWidth,"stroke-dasharray":t.FINAL_CONFIG.chart.highlighter.lineDasharray,"stroke-linecap":"round",style:{transition:"none !important",animation:"none !important","pointer-events":"none"}},null,8,Gt)])):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.timeTag.show&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",Bt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex-100+t.drawingArea.width/t.maxSeries/2,y:t.drawingArea.bottom,width:"200",height:"40",style:{overflow:"visible !important"}},[e.createElementVNode("div",{class:"vue-ui-xy-time-tag",style:e.normalizeStyle(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${t.FINAL_CONFIG.chart.timeTag.backgroundColor};color:${t.FINAL_CONFIG.chart.timeTag.color};font-size:${t.FINAL_CONFIG.chart.timeTag.fontSize}px`)},e.toDisplayString(t.timeLabels[l.selectedSerieIndex]||l.selectedSerieIndex),5)],8,pt)),e.createElementVNode("circle",{cx:t.drawingArea.left+t.drawingArea.width/t.maxSeries*l.selectedSerieIndex+t.drawingArea.width/t.maxSeries/2,cy:t.drawingArea.bottom,r:t.FINAL_CONFIG.chart.timeTag.circleMarker.radius,fill:t.FINAL_CONFIG.chart.timeTag.circleMarker.color},null,8,Et)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:t.svg},void 0,!0)],14,X)):e.createCommentVNode("",!0),t.isDataset?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:3,config:{type:"line",style:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,line:{axis:{color:t.FINAL_CONFIG.chart.grid.stroke},path:{color:t.FINAL_CONFIG.chart.grid.stroke,strokeWidth:.5}}}}},null,8,["config"])),t.FINAL_CONFIG.chart.zoom.show&&l.maxX>6&&t.isDataset?(e.openBlock(),e.createBlock(S,{ref:"chartSlicer",key:`slicer_${l.slicerStep}`,background:t.FINAL_CONFIG.chart.zoom.color,fontSize:t.FINAL_CONFIG.chart.zoom.fontSize,useResetSlot:t.FINAL_CONFIG.chart.zoom.useResetSlot,labelLeft:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.start],labelRight:t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[l.slicer.end-1],textColor:t.FINAL_CONFIG.chart.color,inputColor:t.FINAL_CONFIG.chart.zoom.color,selectColor:t.FINAL_CONFIG.chart.zoom.highlightColor,borderColor:t.FINAL_CONFIG.chart.backgroundColor,max:l.maxX,min:0,valueStart:l.slicer.start,valueEnd:l.slicer.end,start:l.slicer.start,"onUpdate:start":o[2]||(o[2]=r=>l.slicer.start=r),end:l.slicer.end,"onUpdate:end":o[3]||(o[3]=r=>l.slicer.end=r),onReset:t.refreshSlicer},{"reset-action":e.withCtx(({reset:r})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","borderColor","max","valueStart","valueEnd","start","end","onReset"])):e.createCommentVNode("",!0),t.FINAL_CONFIG.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:5,ref:"chartLegend",class:"vue-ui-xy-legend",style:e.normalizeStyle(`font-size:${t.FINAL_CONFIG.chart.legend.fontSize}px`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.absoluteDataset,(r,s)=>(e.openBlock(),e.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:i=>t.segregate(r),class:e.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":l.segregatedSeries.includes(r.id)})},[l.icons[r.type]==="line"?(e.openBlock(),e.createElementBlock("svg",Vt,[e.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:r.color},null,8,Tt),e.createVNode(u,{plot:{x:10,y:9},radius:4,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle",stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(e.openBlock(),e.createElementBlock("svg",Pt,[l.icons[r.type]==="bar"?(e.openBlock(),e.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:r.color},null,8,Mt)):(e.openBlock(),e.createBlock(u,{key:1,plot:{x:6,y:6},radius:5,color:r.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(r.shape)?r.shape:"circle"},null,8,["color","shape"]))])),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.FINAL_CONFIG.chart.legend.color}`)},e.toDisplayString(r.name),5)],10,zt))),128))],4)):(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(a.$slots,"legend",{legend:t.absoluteDataset},void 0,!0)],512)),e.createVNode(_,{show:l.mutableConfig.showTooltip&&l.isTooltip,backgroundColor:t.FINAL_CONFIG.chart.tooltip.backgroundColor,color:t.FINAL_CONFIG.chart.tooltip.color,fontSize:t.FINAL_CONFIG.chart.tooltip.fontSize,borderRadius:t.FINAL_CONFIG.chart.tooltip.borderRadius,borderColor:t.FINAL_CONFIG.chart.tooltip.borderColor,borderWidth:t.FINAL_CONFIG.chart.tooltip.borderWidth,backgroundOpacity:t.FINAL_CONFIG.chart.tooltip.backgroundOpacity,parent:a.$refs.chart,content:t.tooltipContent,isCustom:t.FINAL_CONFIG.chart.tooltip.customFormat&&typeof t.FINAL_CONFIG.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),t.isDataset?(e.openBlock(),e.createBlock(F,{key:7,hideDetails:"",config:{open:l.mutableConfig.showTable,maxHeight:1e4,body:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color},head:{backgroundColor:t.FINAL_CONFIG.chart.backgroundColor,color:t.FINAL_CONFIG.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{style:e.normalizeStyle(`${l.isPrinting?"":"max-height:400px"};overflow:auto;width:100%;margin-top:48px`)},[e.createElementVNode("div",Dt,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>l.showSparklineTable=r)},null,512),[[e.vModelCheckbox,l.showSparklineTable]]),e.createElementVNode("div",{onClick:o[5]||(o[5]=r=>l.showSparklineTable=!l.showSparklineTable),style:{cursor:"pointer"}},[e.createVNode(y,{name:"chartLine",size:20,stroke:t.FINAL_CONFIG.chart.color},null,8,["stroke"])])]),l.showSparklineTable?(e.openBlock(),e.createBlock(C,{key:`sparkline_${l.segregateStep}`,dataset:t.tableSparklineDataset,config:t.tableSparklineConfig},null,8,["dataset","config"])):(e.openBlock(),e.createBlock(N,{key:1,colNames:t.dataTable.colNames,head:t.dataTable.head,body:t.dataTable.body,config:t.dataTable.config,title:`${t.FINAL_CONFIG.chart.title.text}${t.FINAL_CONFIG.chart.title.subtitle.text?` : ${t.FINAL_CONFIG.chart.title.subtitle.text}`:""}`,onClose:o[6]||(o[6]=r=>l.mutableConfig.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r},null,8,Ht)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Y)}const Wt=H._export_sfc(W,[["render",qt],["__scopeId","data-v-185b12a6"]]);exports.default=Wt;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-BkomIE9L.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-CdJ5hegk.cjs"),Ue=require("./Legend-Dl5IYoxK.cjs"),Xe=require("./Title-Cj_xubjI.cjs"),Ae=require("./Slicer-QC8nTm24.cjs"),me=require("./usePrinter-r6uHYEcR.cjs"),Ye=require("./vue-ui-accordion-SXsobrUt.cjs"),Ze=require("./DataTable-ssrNbONo.cjs"),Ge=require("./vue-ui-skeleton-JmGp11-u.cjs"),be=require("./useNestedProp-BMxXyPbW.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Ke=["onClick"],Qe=["innerHTML"],et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(J,{expose:xe,emit:Le}){const R=J,{vue_ui_xy_canvas:ke}=s.useConfig(),X=l.ref(s.createUid()),D=l.ref(null),C=l.ref(null),O=l.ref(null),i=l.ref(null),g=l.ref(1),z=l.ref(1),_=l.ref(!1),y=l.ref(null),H=l.ref(""),K=l.ref(null),k=l.ref([]),N=l.ref(1),M=l.ref(!0),w=l.ref(!0),A=l.ref(null),Q=l.ref(0),ee=l.ref(0),Y=l.ref(!1),te=l.ref(null),le=l.ref(null),ae=l.ref(null),Z=l.computed(()=>!!R.dataset&&R.dataset.length),t=l.computed(()=>{const e=be.useNestedProp({userConfig:R.config,defaultConfig:ke});return e.theme?{...be.useNestedProp({userConfig:s.themes.vue_ui_xy_canvas[e.theme]||R.config,defaultConfig:e}),customPalette:s.themePalettes[e.theme]||s.palette}:e}),oe=l.ref(t.value.style.chart.aspectRatio),{isPrinting:Ce,isImaging:we,generatePdf:re,generateImage:ue}=me.usePrinter({elementId:`xy_canvas_${X.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),n=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Se(e){Y.value=e,ee.value+=1}const ne=l.computed(()=>s.convertCustomPalette(t.value.customPalette)),P=l.computed(()=>Math.max(...E.value.filter((e,o)=>!k.value.includes(e.absoluteIndex)).map(e=>e.series.length))),a=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:z.value,left:g.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function se(e,o){return e/o}function ze({hasAutoScale:e,series:o,min:r,max:d,scale:h,yOffset:p,individualHeight:v,stackIndex:m=null}){return o.map((L,j)=>{const S=h.min<0?Math.abs(h.min):0,$=se(L+S,S+h.max);let T,F;e&&(T=Math.abs(h.min),F=se(L+T,h.max+T));let I=0;return m===null?I=a.value.bottom-a.value.height*(e?F:$):I=a.value.bottom-p-v*(e?F:$),{x:a.value.left+a.value.slot*j+a.value.slot/2,y:I,value:L}})}const b=l.computed(()=>{const e=Math.min(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),o=Math.max(...E.value.filter((v,m)=>!k.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(u.value.start,u.value.end))),r=s.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=a.value.bottom-a.value.height*(d/(r.max+d)),p=r.ticks.map(v=>({y:a.value.bottom-a.value.height*((v+d)/(r.max+d)),x:a.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:p,zero:h}}),$e=l.computed(()=>f.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>${s.dataLabel({p:e.prefix||"",v:e.series[y.value],s:e.suffix||"",r:e.rounding||0})}</span>
|
|
8
|
+
</div>
|
|
9
|
+
`)),E=l.computed(()=>R.dataset.map((e,o)=>({...e,absoluteIndex:o,color:s.convertColorToHex(e.color||ne.value[o]||s.palette[o]||s.palette[o%s.palette.length])}))),f=l.computed(()=>s.assignStackRatios(E.value.filter((e,o)=>!k.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(u.value.start,u.value.end)})).map((e,o)=>{let r=Math.min(...e.series)||0,d=Math.max(...e.series)||1;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const p={ratios:e.series.filter(B=>![null,void 0].includes(B)).map(B=>(B-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=s.calculateNiceScale(p.valueMin,p.valueMax,v):m=s.calculateNiceScale(p.valueMin<0?p.valueMin:0,p.valueMax<=0?0:p.valueMax,v);const L=n.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,j=n.value.stacked?a.value.height/t.value.style.chart.stackGap:0,S=n.value.stacked?a.value.height*e.stackRatio-j:a.value.height,$=m.min<0?Math.abs(m.min):0;let T;e.autoScaling&&n.value.stacked&&d<=0?T=a.value.bottom-L-S:T=a.value.bottom-L-S*($/(m.max+$));const F=m.ticks.map((B,Ve)=>({y:a.value.bottom-L-S*(Ve/(m.ticks.length-1)),x:a.value.left-8,value:B})),I=ze({hasAutoScale:n.value.stacked&&e.autoScaling,series:e.series,min:n.value.stacked?r:b.value.min,max:n.value.stacked?d:b.value.max,scale:n.value.stacked?m:b.value.scale,yOffset:L,individualHeight:S,stackIndex:n.value.stacked?o:null});return{...e,coordinatesLine:I,min:r,max:d,localScale:m,localZero:T,localMin:$,localYLabels:F,yOffset:L,individualHeight:S}})),u=l.ref({start:0,end:P.value});function Te(){u.value={start:0,end:P.value},Q.value+=1}const Me=l.computed(()=>f.value.filter(e=>["line","plot",void 0].includes(e.type))),x=l.computed(()=>f.value.filter(e=>e.type==="bar"));function Pe(){if(!C.value)return;const e=O.value.offsetWidth,o=O.value.offsetHeight;C.value.width=e*N.value*2,C.value.height=o*N.value*2,g.value=e*N.value*2,z.value=o*N.value*2,i.value.scale(N.value,N.value),G()}function Re(){if(i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),n.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&u.value.end-u.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&f.value.forEach(e=>{for(let o=0;o<u.value.end-u.value.start+1;o+=1)c.line(i.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?f.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":t.value.style.chart.grid.x.horizontalLines.color+s.opacity[t.value.style.chart.grid.x.horizontalLines.opacity],strokeColor:"transparent"})})}):f.value.forEach(e=>{e.localYLabels.slice(u.value.start,u.value.end).forEach(o=>{c.line(i.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&f.value.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&f.value.forEach(e=>{c.line(i.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}),c.line(i.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}),e.localYLabels.forEach(o=>{c.text(i.value,s.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),f.value.forEach(e=>{c.text(i.value,e.name,g.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&u.value.end-u.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<u.value.end-u.value.start+1;e+=1)c.line(i.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:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?b.value.yLabels.forEach((e,o)=>{o<b.value.yLabels.length-1&&c.rect(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:b.value.yLabels[o+1].y},{x:a.value.left,y:b.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":t.value.style.chart.grid.x.horizontalLines.color+s.opacity[t.value.style.chart.grid.x.horizontalLines.opacity],strokeColor:"transparent"})}):b.value.yLabels.forEach(e=>{c.line(i.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:a.value.left,y:b.value.zero},{x:a.value.right,y:b.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&b.value.yLabels.forEach(e=>{c.text(i.value,s.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,z.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Ne(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(y.value===o?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function Oe(e){for(let o=0;o<e.coordinatesLine.length;o+=1)c.text(i.value,s.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ee(){for(let e=u.value.start;e<u.value.end;e+=1)(u.value.end-u.value.start<t.value.style.chart.grid.y.timeLabels.modulo||u.value.end-u.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((u.value.end-u.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===y.value+u.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-u.value.start)+a.value.slot/2,a.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.timeLabels.color+s.opacity[y.value!==null?y.value+u.value.start===e?100:20:100],rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function ie(){c.line(i.value,[{x:a.value.left+a.value.slot*y.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*y.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function Fe(){x.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(n.value.stacked?0:a.value.slot/x.value.length*o-(o===0?0:a.value.slot/(5*x.value.length)*o)),y:n.value.stacked?e.localZero:b.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(n.value.stacked?0:a.value.slot/x.value.length*o-(o===0?0:a.value.slot/(5*x.value.length)*o))+a.value.slot*.8/(n.value.stacked?1:x.value.length),y:n.value.stacked?e.localZero:b.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(n.value.stacked?0:a.value.slot/x.value.length*o-(o===0?0:a.value.slot/(5*x.value.length)*o))+a.value.slot*.8/(n.value.stacked?1:x.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(n.value.stacked?0:a.value.slot/x.value.length*o-(o===0?0:a.value.slot/(5*x.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:n.value.stacked?e.localZero:b.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:s.lightenHexColor(e.color,.5)}]}}),n.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,s.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),a.value.left+a.value.slot*r+a.value.slot/10+(n.value.stacked?0:a.value.slot/x.value.length*o-(o===0?0:a.value.slot/(5*x.value.length)*o))+a.value.slot*.4/(n.value.stacked?1:x.value.length),(e.coordinatesLine[r].value<0?n.value.stacked?e.localZero:b.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Ie(e){e.useArea?n.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:e.color+s.opacity[t.value.style.chart.area.opacity],strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:b.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:b.value.zero}],{fillColor:e.color+s.opacity[t.value.style.chart.area.opacity],strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Be(){f.value.forEach((e,o)=>{c.line(i.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function G(){Re(),M.value?(w.value&&y.value!==null&&t.value.style.chart.selector.show&&ie(),Fe(),n.value.stacked&&t.value.style.chart.grid.x.showAxis&&Be(),Me.value.forEach(e=>{(e.type==="line"||!e.type)&&Ie(e),w.value&&(Ne(e),n.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Oe(e))}),A.value=c.cloneCanvas(C.value)):(A.value&&i.value.drawImage(A.value,0,0),w.value&&y.value!==null&&t.value.style.chart.selector.show&&ie(),w.value&&y.value!==null&&f.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[y.value])return;e.coordinatesLine[y.value].x!==void 0&&e.coordinatesLine[y.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[y.value].x,y:e.coordinatesLine[y.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ee(),M.value=!1}const W=c.debounce(()=>{w.value=!0,Pe()},P.value>200?10:1,!w.value);function De(e){const{left:o}=C.value.getBoundingClientRect(),r=e.clientX-o;if(r*2<a.value.left||r*2>a.value.right){_.value=!1,y.value=null;return}const d=r*2-a.value.left;if(y.value=Math.floor(d/a.value.slot),_.value=!0,!w.value)return;let h="";const p=t.value.style.chart.tooltip.customFormat;s.isFunction(p)&&s.functionReturnsString(()=>p({seriesIndex:y.value,datapoint:f.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((m,L)=>L===y.value)})),series:f.value,config:t.value}))?H.value=p({seriesIndex:y.value,datapoint:f.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((m,L)=>L===y.value)})),series:f.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(u.value.start,u.value.end)[y.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(u.value.start,u.value.end)[y.value]}</div>`),h+=$e.value.join(""),H.value=h),w.value=!1}l.watch(()=>y.value,e=>{W()}),l.watch(()=>u.value,e=>{M.value=!0,G()},{deep:!0}),l.watch(()=>n.value.showDataLabels,e=>{M.value=!0,G()}),l.watch(()=>n.value.stacked,e=>{M.value=!0,w.value=!0,W()});function _e(){_.value=!1,y.value=null,H.value=""}const V=l.ref(null),q=l.ref(null);l.onMounted(()=>{if(s.objectIsEmpty(R.dataset)?s.error({componentName:"VueUiXyCanvas",type:"dataset"}):C.value&&(i.value=C.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:o,height:r}=c.useResponsive({chart:D.value,title:t.value.style.chart.title.text?te.value:null,legend:t.value.style.chart.legend.show?le.value:null,slicer:t.value.style.chart.zoom.show&&P.value>1?ae.value:null});oe.value=`${o} / ${r}`});V.value=new ResizeObserver(e),V.value.observe(D.value.parentNode)}q.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&O.value&&(M.value=!0,W())}),q.value.observe(O.value)}),l.onBeforeUnmount(()=>{q.value&&q.value.disconnect(),V.value&&V.value.disconnect()});function ve(e){Le("selectLegend",f.value.find(o=>o.absoluteIndex===e)),k.value.includes(e)?k.value=k.value.filter(o=>o!==e):k.value.push(e),M.value=!0,W()}const ce=l.computed(()=>E.value.map((e,o)=>({...e,name:e.name,color:s.convertColorToHex(e.color)||ne.value[o]||s.palette[o]||s.palette[o%s.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:k.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ve(e.absoluteIndex),isSegregated:k.value.includes(e.absoluteIndex)}))),He=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),U=l.computed(()=>{const e=[""].concat(f.value.map(h=>h.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 o=[];for(let h=0;h<P.value;h+=1){const p=f.value.map(v=>v.series[h]??0).reduce((v,m)=>v+m,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(u.value.start,u.value.end)[h]??h+1].concat(f.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((p??0).toFixed(t.value.table.rounding)))}const r={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},d=[t.value.table.columnNames.period].concat(f.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,u.value.end-u.value.start),config:r,colNames:d}}),de=l.computed(()=>{if(f.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=f.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=u.value.start;r<u.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];f.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(d)}return{head:e,body:o}});function he(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...de.value.head.map(p=>p.label)],r=de.value.body,d=e.concat([o]).concat(r),h=s.createCsvContent(d);s.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function We(){return f.value}function ye(){n.value.showTable=!n.value.showTable}function fe(){n.value.showDataLabels=!n.value.showDataLabels}function ge(){n.value.stacked=!n.value.stacked}function pe(){n.value.showTooltip=!n.value.showTooltip}return xe({getData:We,generateCsv:he,generatePdf:re,generateImage:ue,toggleTable:ye,toggleLabels:fe,toggleStack:ge,toggleTooltip:pe}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position: relative;${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:D,id:`xy_canvas_${X.value}`,class:l.normalizeClass(`vue-ui-donut ${Y.value?"vue-data-ui-wrapper-fullscreen":""}`)},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:te,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[l.createVNode(Xe._sfc_main,{config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Z.value?(l.openBlock(),l.createBlock(me.UserOptions,{ref:"details",key:`user_option_${ee.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(Ce),isImaging:l.unref(we),uid:X.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:J.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:u.value.end-u.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:Y.value,isTooltip:n.value.showTooltip,isStacked:n.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:D.value,onToggleFullscreen:Se,onGeneratePdf:l.unref(re),onGenerateCsv:he,onGenerateImage:l.unref(ue),onToggleTable:ye,onToggleLabels:fe,onToggleStack:ge,onToggleTooltip:pe},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","onGeneratePdf","onGenerateImage"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${oe.value}`),ref_key:"container",ref:O},[Z.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:C,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>De(r)),onMouseleave:_e},null,544)):(l.openBlock(),l.createBlock(Ge.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(qe._sfc_main,{show:n.value.showTooltip&&_.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,parent:C.value,content:H.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(s.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...K.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...K.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","parent","content","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ae,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&P.value>1?(l.openBlock(),l.createBlock(Ae.Slicer,{key:`slicer_${Q.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[u.value.start]?t.value.style.chart.grid.y.timeLabels.values[u.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[u.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[u.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:P.value,min:0,valueStart:u.value.start,valueEnd:u.value.end,start:u.value.start,"onUpdate:start":o[1]||(o[1]=r=>u.value.start=r),end:u.value.end,"onUpdate:end":o[2]||(o[2]=r=>u.value.end=r),onReset:Te},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:le},[t.value.style.chart.legend.show&&Z.value?(l.openBlock(),l.createBlock(Ue.Legend,{key:0,legendSet:ce.value,config:He.value,onClickMarker:o[3]||(o[3]=({i:r})=>ve(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${k.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,Ke)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:ce.value},void 0,!0)],512),u.value.end-u.value.start<200?(l.openBlock(),l.createBlock(Ye.default,{key:2,hideDetails:"",config:{open:n.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:l.withCtx(()=>[l.createVNode(Ze.DataTable,{colNames:U.value.colNames,head:U.value.head,body:U.value.body,config:U.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[4]||(o[4]=r=>n.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,Qe)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):l.createCommentVNode("",!0)],14,Je))}},tt=je._export_sfc(et,[["__scopeId","data-v-8ae56fe6"]]);exports.default=tt;
|