vue-data-ui 2.3.37 → 2.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bb6L1SdH.js → Arrow-B0RusPlY.js} +1 -1
- package/dist/{Arrow-D4_9ATE8.cjs → Arrow-gLWBasXL.cjs} +1 -1
- package/dist/{BaseIcon-DZeqsESI.cjs → BaseIcon-Cfy7hUAu.cjs} +1 -1
- package/dist/{BaseIcon-BYikkWFZ.js → BaseIcon-E5xGjSQn.js} +1 -1
- package/dist/{DataTable-CAXMjWn5.js → DataTable-CcVgHrwx.js} +2 -2
- package/dist/{DataTable-BWmxv2dU.cjs → DataTable-D7JJfjpO.cjs} +1 -1
- package/dist/{Legend-Du9xqOk5.cjs → Legend-BDgAlEzL.cjs} +1 -1
- package/dist/{Legend-CXJs07Ij.js → Legend-BPGeRVxf.js} +1 -1
- package/dist/{Shape-CgkXbbSY.cjs → Shape-DDEKu71I.cjs} +1 -1
- package/dist/{Shape-DLcI9AEd.js → Shape-DnfO-k8Q.js} +1 -1
- package/dist/{Slicer-CvOsHsE5.cjs → Slicer-BhktgQpC.cjs} +1 -1
- package/dist/{Slicer-BaraIN42.js → Slicer-Dr5g4_di.js} +1 -1
- package/dist/{Title-Cfhww4Z2.cjs → Title-BngFmPpq.cjs} +1 -1
- package/dist/{Title-C79SPRaJ.js → Title-DJW7JJGo.js} +1 -1
- package/dist/{Tooltip-pL4iIflR.js → Tooltip-pvQzx3z4.js} +1 -1
- package/dist/{Tooltip-skDk7LoG.cjs → Tooltip-ztxY4WiA.cjs} +1 -1
- package/dist/{index-C61CWbhi.cjs → index-COMTToJY.cjs} +1 -1
- package/dist/{index-BzC4GFT4.js → index-CQyrBpOX.js} +1 -1
- package/dist/{useNestedProp-Ci4Xkt-B.js → useNestedProp-CK_S9Ya9.js} +1 -1
- package/dist/{useNestedProp-CQPRjDbe.cjs → useNestedProp-DJwc68Re.cjs} +1 -1
- package/dist/{usePrinter-Cmb8gRBK.js → usePrinter-BJn_Etby.js} +1 -1
- package/dist/{usePrinter-DMtrNmBj.cjs → usePrinter-THxtdQMP.cjs} +1 -1
- package/dist/{vue-data-ui-CvIKpEo1.js → vue-data-ui-9yG_ZuXl.js} +57 -57
- package/dist/{vue-data-ui-BdrRIy96.cjs → vue-data-ui-gHSCvnDy.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Bow_nGLE.cjs → vue-ui-3d-bar-6G46Xaar.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-Ct1B7bTl.js → vue-ui-3d-bar-BqL1MhRd.js} +7 -7
- package/dist/{vue-ui-accordion-CvtrqT6u.cjs → vue-ui-accordion-BDkYau8u.cjs} +1 -1
- package/dist/{vue-ui-accordion-Bgi-_3Lv.js → vue-ui-accordion-DqRnuig6.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Cuz5tJDb.cjs → vue-ui-age-pyramid-BPyJ5l9B.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DGcbNNqc.js → vue-ui-age-pyramid-IRh5kfKI.js} +8 -8
- package/dist/{vue-ui-annotator-DiS6L-Lo.js → vue-ui-annotator-BlxLsUao.js} +1 -1
- package/dist/{vue-ui-annotator-BuiDubdn.cjs → vue-ui-annotator-CS2-dXB1.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BJRYzLGH.cjs → vue-ui-candlestick-D6iWs_w-.cjs} +1 -1
- package/dist/{vue-ui-candlestick-gYV7zNpb.js → vue-ui-candlestick-bqMr_UNG.js} +9 -9
- package/dist/{vue-ui-carousel-table-CZt3aUxS.js → vue-ui-carousel-table-BPbrMmZ5.js} +4 -4
- package/dist/{vue-ui-carousel-table-Cb7Ue6WK.cjs → vue-ui-carousel-table-BmR6Xj7Q.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Aw5UziyJ.js → vue-ui-chestnut-BlhoOgtt.js} +6 -6
- package/dist/{vue-ui-chestnut-CZu2zG44.cjs → vue-ui-chestnut-lh4q8a6L.cjs} +1 -1
- package/dist/{vue-ui-cursor-B5yhZyFM.cjs → vue-ui-cursor-BWUNJ2kc.cjs} +1 -1
- package/dist/{vue-ui-cursor-nrSXxY9A.js → vue-ui-cursor-DwilivV-.js} +2 -2
- package/dist/{vue-ui-dashboard-Cfldt4f-.js → vue-ui-dashboard-B1EdqIcE.js} +2 -2
- package/dist/{vue-ui-dashboard-CVb-Gaop.cjs → vue-ui-dashboard-BCeu5EHs.cjs} +1 -1
- package/dist/{vue-ui-digits-CTGE6aQS.cjs → vue-ui-digits-DqGz7C40.cjs} +1 -1
- package/dist/{vue-ui-digits-BOOnmm8f.js → vue-ui-digits-YOnGoYnu.js} +2 -2
- package/dist/{vue-ui-donut-CWu2l7lY.cjs → vue-ui-donut-Crhz1o2x.cjs} +1 -1
- package/dist/{vue-ui-donut-BWbkX7xL.js → vue-ui-donut-DJ3z2Uyy.js} +9 -9
- package/dist/{vue-ui-donut-evolution-D2rDuoGB.js → vue-ui-donut-evolution-CGBLKyts.js} +9 -9
- package/dist/{vue-ui-donut-evolution-C0_LyjWv.cjs → vue-ui-donut-evolution-irJ5g-tB.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BZQmwS6E.cjs → vue-ui-dumbbell-C7lYqtns.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CcJFLLxg.js → vue-ui-dumbbell-YiLDRgnr.js} +8 -8
- package/dist/{vue-ui-flow-DTXFQlVy.js → vue-ui-flow-B7nJzAUa.js} +7 -7
- package/dist/{vue-ui-flow-uorZ0daM.cjs → vue-ui-flow-C5XhyO1a.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Bn2EUZ_r.js → vue-ui-galaxy-CXiYVwzF.js} +9 -9
- package/dist/{vue-ui-galaxy-BcFN6ZAC.cjs → vue-ui-galaxy-CkiIGplF.cjs} +1 -1
- package/dist/{vue-ui-gauge-CzHZHaVd.cjs → vue-ui-gauge-Box-ij8Z.cjs} +1 -1
- package/dist/{vue-ui-gauge-DLheQibb.js → vue-ui-gauge-DQdwIuYM.js} +5 -5
- package/dist/{vue-ui-gizmo-BtIIZr2e.cjs → vue-ui-gizmo-lQ-JQuH5.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DPPQHFYy.js → vue-ui-gizmo-yMLEUprK.js} +2 -2
- package/dist/{vue-ui-heatmap-CZrslleT.cjs → vue-ui-heatmap-D9uCI4vM.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BmHxCDX3.js → vue-ui-heatmap-DdolYuul.js} +8 -8
- package/dist/vue-ui-kpi-CcufgDrC.cjs +1 -0
- package/dist/{vue-ui-kpi-Dhq0sqmq.js → vue-ui-kpi-Db-iLGIK.js} +8 -8
- package/dist/{vue-ui-mini-loader-CbubV2dS.js → vue-ui-mini-loader-B5ZAVomk.js} +2 -2
- package/dist/{vue-ui-mini-loader-Bsk1kmlJ.cjs → vue-ui-mini-loader-CxJ-z9rE.cjs} +1 -1
- package/dist/{vue-ui-molecule-BS9maTXr.cjs → vue-ui-molecule-C2m9xcdx.cjs} +1 -1
- package/dist/{vue-ui-molecule-DXr2S-4k.js → vue-ui-molecule-DjClBVrK.js} +9 -9
- package/dist/{vue-ui-mood-radar-D3DQfdlr.cjs → vue-ui-mood-radar-CE3utSmC.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B6f7vL8Z.js → vue-ui-mood-radar-UN10Owti.js} +9 -9
- package/dist/{vue-ui-nested-donuts-D8r5m5dO.js → vue-ui-nested-donuts-DUytF3gU.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CCb2Pnsc.cjs → vue-ui-nested-donuts-iXADllgD.cjs} +1 -1
- package/dist/{vue-ui-onion-hevHDHWY.cjs → vue-ui-onion-BUI2Pkue.cjs} +1 -1
- package/dist/{vue-ui-onion-BYw8HmIk.js → vue-ui-onion-D5nX9TfZ.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-DB-LtRqE.js → vue-ui-parallel-coordinate-plot-CXOgpfTc.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-B6Evq2Od.cjs → vue-ui-parallel-coordinate-plot-q1BCGfqt.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BNOBKlhX.js → vue-ui-quadrant-BF2MCegC.js} +10 -10
- package/dist/{vue-ui-quadrant-DxujW8z6.cjs → vue-ui-quadrant-g-zHilV9.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BfSzxmNc.cjs → vue-ui-quick-chart-Ca-2xvNg.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-rsZzpy0G.js → vue-ui-quick-chart-zvfAdour.js} +6 -6
- package/dist/{vue-ui-radar-Dr5wWnMj.cjs → vue-ui-radar-BjPOMUF0.cjs} +1 -1
- package/dist/{vue-ui-radar-BG3L5IM2.js → vue-ui-radar-CzEW9PsS.js} +10 -10
- package/dist/{vue-ui-rating-CAvBCNS1.cjs → vue-ui-rating-BNg7w51y.cjs} +1 -1
- package/dist/{vue-ui-rating-B0o8bqKW.js → vue-ui-rating-BjmKc3wq.js} +2 -2
- package/dist/{vue-ui-relation-circle-BqyeCd0n.js → vue-ui-relation-circle-BJJ7raSa.js} +5 -5
- package/dist/{vue-ui-relation-circle-BMqLTqQb.cjs → vue-ui-relation-circle-DA3hM60W.cjs} +1 -1
- package/dist/{vue-ui-rings-uUzxyzTu.cjs → vue-ui-rings-DB7ZLrAT.cjs} +1 -1
- package/dist/{vue-ui-rings-Ca-eFxZM.js → vue-ui-rings-bHA_aSSF.js} +9 -9
- package/dist/{vue-ui-scatter-CWo-w-9F.js → vue-ui-scatter-B6SJj98H.js} +10 -10
- package/dist/{vue-ui-scatter-Otkkooqz.cjs → vue-ui-scatter-HNeVup0c.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B73dx0RL.js → vue-ui-screenshot-BiiJxMC8.js} +1 -1
- package/dist/{vue-ui-screenshot-QpgoV_tc.cjs → vue-ui-screenshot-k4Or7u-C.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DCC5qNwg.js → vue-ui-skeleton-CjYyI3Lv.js} +2 -2
- package/dist/{vue-ui-skeleton-DOB3BXPS.cjs → vue-ui-skeleton-DYdGA7uQ.cjs} +1 -1
- package/dist/{vue-ui-smiley-Bov4viPa.cjs → vue-ui-smiley-ByuyPzc9.cjs} +1 -1
- package/dist/{vue-ui-smiley-DhNsQ3s9.js → vue-ui-smiley-UjJLCUmA.js} +2 -2
- package/dist/{vue-ui-spark-trend-D89B50VU.js → vue-ui-spark-trend-BLRiuWa6.js} +4 -4
- package/dist/{vue-ui-spark-trend-DbjxuK7z.cjs → vue-ui-spark-trend-D0PCBdx2.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BZgNGMiI.cjs → vue-ui-sparkbar-TZC1RhBk.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CugUl2Ge.js → vue-ui-sparkbar-lF45jZmU.js} +3 -3
- package/dist/{vue-ui-sparkgauge-B8tauERd.cjs → vue-ui-sparkgauge-BBDYAjXD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-E6ffgyZ7.js → vue-ui-sparkgauge-BV0puE5M.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-s5Brj3fs.js → vue-ui-sparkhistogram-0M-yChB2.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BeKsPc3B.cjs → vue-ui-sparkhistogram-vCVdP_Vp.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BrTZ3RsA.js → vue-ui-sparkline-Cxmg-Mpb.js} +3 -3
- package/dist/{vue-ui-sparkline-oTMDHdy8.cjs → vue-ui-sparkline-mn0nDWC2.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CIfL620D.cjs → vue-ui-sparkstackbar-CKCZgV0u.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BShlglvB.js → vue-ui-sparkstackbar-Dw9Bhm6u.js} +3 -3
- package/dist/{vue-ui-stackbar-DBMbisOP.cjs → vue-ui-stackbar-DH5EbkWA.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DpVf6ihy.js → vue-ui-stackbar-P-SgetqL.js} +10 -10
- package/dist/{vue-ui-strip-plot-BbdVUOC9.js → vue-ui-strip-plot-B4L64D2e.js} +9 -9
- package/dist/{vue-ui-strip-plot-DM7xT5IU.cjs → vue-ui-strip-plot-DD1KLWvq.cjs} +1 -1
- package/dist/{vue-ui-table-D3ceAXMF.cjs → vue-ui-table-B8VYN1DQ.cjs} +1 -1
- package/dist/{vue-ui-table-CWCMQ2os.js → vue-ui-table-DKlWL1sg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DA5Ne1R3.cjs → vue-ui-table-heatmap-CTq6J5BC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B3Bg-XhY.js → vue-ui-table-heatmap-CvTl-kYk.js} +4 -4
- package/dist/{vue-ui-table-sparkline-YXOKi_8R.js → vue-ui-table-sparkline-BOmWrdlg.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DrVVBI-I.cjs → vue-ui-table-sparkline-BXem0A7t.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Lj4IWfmo.cjs → vue-ui-thermometer-BDnoT676.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CrJx6Sux.js → vue-ui-thermometer-BsuH7l6d.js} +5 -5
- package/dist/{vue-ui-timer-uwwQ0iHa.js → vue-ui-timer-CqLYv7at.js} +4 -4
- package/dist/{vue-ui-timer-CbkaYjVH.cjs → vue-ui-timer-FXG91zBm.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C6UTRWU-.js → vue-ui-tiremarks-B2jU97U6.js} +5 -5
- package/dist/{vue-ui-tiremarks-mgVRvszt.cjs → vue-ui-tiremarks-CT7yMfna.cjs} +1 -1
- package/dist/{vue-ui-treemap-BZV954rU.js → vue-ui-treemap-DSdNtVRs.js} +9 -9
- package/dist/{vue-ui-treemap-D5vTiOnY.cjs → vue-ui-treemap-rOLqWnMD.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BderaPsm.cjs → vue-ui-vertical-bar-DJBOce-a.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-D7LDMhQh.js → vue-ui-vertical-bar-_ZuU0A54.js} +9 -9
- package/dist/{vue-ui-waffle-CJEmX3I4.cjs → vue-ui-waffle-BzKAYW6F.cjs} +1 -1
- package/dist/{vue-ui-waffle-E4H7vTL6.js → vue-ui-waffle-CKp48kdM.js} +9 -9
- package/dist/{vue-ui-wheel-BWuPdNXg.cjs → vue-ui-wheel-6FFJt53W.cjs} +1 -1
- package/dist/{vue-ui-wheel-Bbm7l79E.js → vue-ui-wheel-DPjB5xcl.js} +5 -5
- package/dist/{vue-ui-word-cloud-BMg_8Rnx.js → vue-ui-word-cloud-BY_qs7bW.js} +7 -7
- package/dist/{vue-ui-word-cloud-Cm9iFLer.cjs → vue-ui-word-cloud-VybUTXFv.cjs} +1 -1
- package/dist/{vue-ui-xy-CZfhmpIO.js → vue-ui-xy-BgBvVtwZ.js} +12 -12
- package/dist/{vue-ui-xy-w5e977sw.cjs → vue-ui-xy-CVxPe82S.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CsVqIcPg.js → vue-ui-xy-canvas-B2mkEuiI.js} +10 -10
- package/dist/{vue-ui-xy-canvas-BAgRNpy2.cjs → vue-ui-xy-canvas-BjPLlJyo.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-kpi-DHPCOJJU.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-C61CWbhi.cjs"),ne=require("./Title-Cfhww4Z2.cjs"),W=require("./usePrinter-DMtrNmBj.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-CvtrqT6u.cjs"),se=require("./DataTable-BWmxv2dU.cjs"),ue=require("./BaseIcon-DZeqsESI.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-CQPRjDbe.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const $=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&($.value=new ResizeObserver(X),$.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),N=e.ref({showTable:t.value.table.show});function Y(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 J(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 K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){N.value.showTable=!N.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.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:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._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(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},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:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),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":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(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:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,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:e.withCtx(()=>[e.createVNode(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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,ye))}},$e=L._export_sfc(Se,[["__scopeId","data-v-04df2736"]]);exports.default=$e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-COMTToJY.cjs"),ne=require("./Title-BngFmPpq.cjs"),W=require("./usePrinter-THxtdQMP.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-BDkYau8u.cjs"),se=require("./DataTable-D7JJfjpO.cjs"),ue=require("./BaseIcon-Cfy7hUAu.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-DJwc68Re.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const $=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&($.value=new ResizeObserver(X),$.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),N=e.ref({showTable:t.value.table.show});function Y(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 J(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 K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),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}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){N.value.showTable=!N.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.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:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._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(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.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:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},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:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),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":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(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:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,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:e.withCtx(()=>[e.createVNode(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),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,ye))}},$e=L._export_sfc(Se,[["__scopeId","data-v-04df2736"]]);exports.default=$e;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { p as J } from "./pdf-97UbtKC2.js";
|
|
2
|
-
import { U as K, s as Q } from "./usePrinter-
|
|
3
|
-
import { c as U, a as j, t as $, v as ee, p as te, u as ae, P as X, J as M, f as q, F as le, U as re, i as ie, A as se, V as oe, M as ne, W as he, y as ce, s as ue, d as de, z as ge, b as fe, r as be, q as Ie, D as me, S as Ne, Y as _e, w as Fe, x as xe, e as ye, o as Ae, Z as Le, C as Se } from "./index-
|
|
4
|
-
import { D as Ce } from "./DataTable-
|
|
5
|
-
import { _ as ke } from "./Title-
|
|
6
|
-
import { _ as we, u as Oe } from "./Tooltip-
|
|
7
|
-
import { _ as ve } from "./Shape-
|
|
8
|
-
import Ge from "./BaseIcon-
|
|
9
|
-
import ze from "./vue-ui-table-sparkline-
|
|
10
|
-
import pe from "./vue-ui-skeleton-
|
|
11
|
-
import { S as Te } from "./Slicer-
|
|
12
|
-
import Me from "./vue-ui-accordion-
|
|
13
|
-
import { u as Z } from "./useNestedProp-
|
|
2
|
+
import { U as K, s as Q } from "./usePrinter-BJn_Etby.js";
|
|
3
|
+
import { c as U, a as j, t as $, v as ee, p as te, u as ae, P as X, J as M, f as q, F as le, U as re, i as ie, A as se, V as oe, M as ne, W as he, y as ce, s as ue, d as de, z as ge, b as fe, r as be, q as Ie, D as me, S as Ne, Y as _e, w as Fe, x as xe, e as ye, o as Ae, Z as Le, C as Se } from "./index-CQyrBpOX.js";
|
|
4
|
+
import { D as Ce } from "./DataTable-CcVgHrwx.js";
|
|
5
|
+
import { _ as ke } from "./Title-DJW7JJGo.js";
|
|
6
|
+
import { _ as we, u as Oe } from "./Tooltip-pvQzx3z4.js";
|
|
7
|
+
import { _ as ve } from "./Shape-DnfO-k8Q.js";
|
|
8
|
+
import Ge from "./BaseIcon-E5xGjSQn.js";
|
|
9
|
+
import ze from "./vue-ui-table-sparkline-BOmWrdlg.js";
|
|
10
|
+
import pe from "./vue-ui-skeleton-CjYyI3Lv.js";
|
|
11
|
+
import { S as Te } from "./Slicer-Dr5g4_di.js";
|
|
12
|
+
import Me from "./vue-ui-accordion-DqRnuig6.js";
|
|
13
|
+
import { u as Z } from "./useNestedProp-CK_S9Ya9.js";
|
|
14
14
|
import { resolveComponent as P, openBlock as r, createElementBlock as i, normalizeClass as T, normalizeStyle as L, createVNode as E, createCommentVNode as h, createBlock as V, createSlots as Pe, withCtx as z, renderSlot as v, normalizeProps as Y, guardReactiveProps as W, createElementVNode as d, Fragment as I, renderList as m, toDisplayString as C, withDirectives as Ve, vModelCheckbox as Re, createTextVNode as De } from "vue";
|
|
15
15
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const Be = U(), Ye = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./pdf-Cz3729tZ.cjs"),v=require("./usePrinter-DMtrNmBj.cjs"),d=require("./index-C61CWbhi.cjs"),E=require("./DataTable-BWmxv2dU.cjs"),z=require("./Title-Cfhww4Z2.cjs"),G=require("./Tooltip-skDk7LoG.cjs"),V=require("./Shape-CgkXbbSY.cjs"),P=require("./BaseIcon-DZeqsESI.cjs"),T=require("./vue-ui-table-sparkline-DrVVBI-I.cjs"),M=require("./vue-ui-skeleton-DOB3BXPS.cjs"),D=require("./Slicer-CvOsHsE5.cjs"),R=require("./vue-ui-accordion-CvtrqT6u.cjs"),p=require("./useNestedProp-CQPRjDbe.cjs"),e=require("vue"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=d.createUid(),q={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:v.UserOptions,BaseIcon:P.default,TableSparkline:T.default,Skeleton:M.default,Slicer:D.Slicer,Accordion:R.default},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});const r=Math.max(...this.dataset.map(n=>n.series.length)),o={start:0,end:r};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:r,showSparklineTable:!0,segregateStep:0,sliderId:Y,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 r=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})),m=[...r,...o,...n].flatMap(l=>l).length;return[...r,...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/m*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(g=>({y:g>=0?l.zero-l.individualHeight*(g/l.max):l.zero+l.individualHeight*Math.abs(g)/l.max,value:g}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const r=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(r,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){const r=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return r;const o=this.useNestedProp({userConfig:this.config,defaultConfig:r});return o.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[o.theme]||this.config,defaultConfig:o}),customPalette:this.themePalettes[o.theme]||this.palette}:o},set:function(r){return r}},hasHighlightArea(){return this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreaSpan(){const{from:r,to:o}=this.FINAL_CONFIG.chart.highlightArea;return r===o?1:o<r?0:o-r+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((r,o)=>({...r,series:r.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(r.color?r.color:this.customPalette[o]?this.customPalette[o]:this.palette[o]),id:`uniqueId_${o}`})):this.dataset},relativeDataset(){return this.safeDataset.map((r,o)=>({...r,series:r.series.map(n=>n+this.relativeZero),absoluteValues:r.series})).filter(r=>!this.segregatedSeries.includes(r.id))},tableSparklineDataset(){return this.relativeDataset.map(r=>{const o=r.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:r.id,name:r.name,color:r.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,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((r,o)=>({absoluteIndex:o,...r,series:r.series.map(n=>n+this.relativeZero),absoluteValues:r.series,segregate:()=>this.segregate(r),isSegregated:this.segregatedSeries.includes(r.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="bar").map((r,o)=>{this.checkAutoScaleError(r);const n=Math.min(...r.absoluteValues.filter(c=>![null,void 0].includes(c))),m=Math.max(...r.absoluteValues.filter(c=>![null,void 0].includes(c))),t={ratios:r.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(m-n)),valueMin:n,valueMax:m<0?0:m},g={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...r.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,u=this.calculateNiceScale(g.min,g.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-r.cumulatedStackRatio):0,F=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,a=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=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale?(r.absoluteValues[b]+S)/y:this.ratioToMax(c),O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*b:this.drawingArea.left+this.slot.bar*o+this.slot.bar*b*i-this.barSlot/2-o*this.barPeriodGap;return{yOffset:N,individualHeight:F,x:O,y:this.drawingArea.bottom-N-F*w,value:r.absoluteValues[b],zeroPosition:a,individualMax:y,comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),L=r.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=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*b:this.drawingArea.left-this.slot.bar/2+this.slot.bar*o+this.slot.bar*b*this.absoluteDataset.filter(O=>O.type==="bar").filter(O=>!this.segregatedSeries.includes(O.id)).length;return{yOffset:N,individualHeight:F,x:w,y:this.drawingArea.bottom-N-(F*L[b]||0),value:r.absoluteValues[b],zeroPosition:a,individualMax:y,comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),k=u.ticks.map(c=>({y:c>=0?a-F*(c/y):a+F*Math.abs(c)/y,value:c})),x=f.ticks.map(c=>{const b=(c-f.min)/(f.max-f.min);return{y:c>=0?s-F*b:s+F*b,value:c}});return{...r,yOffset:N,autoScaleYLabels:x,individualHeight:F,scaleYLabels:r.autoScaling?x:k,individualScale:r.autoScaling?f:u,individualMax:r.autoScaling?C:y,zeroPosition:r.autoScaling?s:a,plots:r.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(r=>!this.segregatedSeries.includes(r.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="line").map(r=>{this.checkAutoScaleError(r);const o=Math.min(...r.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...r.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,l={ratios:r.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-o)/(n-o)),valueMin:o,valueMax:n},t={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||(Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues))},g=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,g),u=this.calculateNiceScale(l.valueMin,l.valueMax,g),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-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,a=this.drawingArea.bottom-C-N*S/y,s=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale?(r.absoluteValues[b]+Math.abs(f))/_:this.ratioToMax(c);return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*b,y:this.drawingArea.bottom-C-N*w,value:r.absoluteValues[b],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),i=r.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=r.series.map((c,b)=>{if(![void 0,null].includes(r.absoluteValues[b]))return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*b,y:this.drawingArea.bottom-C-(N*i[b]||0),value:r.absoluteValues[b],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),L=this.createSmoothPath(s),A=this.createSmoothPath(h),k=I.ticks.map(c=>({y:c>=0?F-N*(c/_):F+N*Math.abs(c)/_,value:c})),x=u.ticks.map(c=>{const b=(c-u.min)/(u.max-u.min);return{y:c>=0?a-N*b:a+N*b,value:c}});return{...r,yOffset:C,autoScaleYLabels:x,individualHeight:N,scaleYLabels:r.autoScaling?x:k,individualScale:r.autoScaling?u:I,individualMax:r.autoScaling?y:_,zeroPosition:r.autoScaling?a:F,curve:r.autoScaling?A:L,plots:r.autoScaling?h:s,area:r.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(r.autoScaling?h:s,r.autoScaling?a:F):this.createArea(s):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="plot").map(r=>{this.checkAutoScaleError(r);const o=Math.min(...r.absoluteValues.filter(k=>![null,void 0].includes(k))),n=Math.max(...r.absoluteValues.filter(k=>![null,void 0].includes(k)))||1,l={ratios:r.absoluteValues.filter(k=>![null,void 0].includes(k)).map(k=>(k-o)/(n-o)),valueMin:o,valueMax:n},t={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues)},g=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,g),u=this.calculateNiceScale(l.valueMin,l.valueMax,g),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-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,a=this.drawingArea.bottom-C-N*S/y,s=r.series.map((k,x)=>{const c=this.mutableConfig.useIndividualScale?(r.absoluteValues[x]+Math.abs(f))/_:this.ratioToMax(k);return{x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-N*c,value:r.absoluteValues[x],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[x]||""}}),i=r.absoluteValues.map(k=>u.min>=0?(k-Math.abs(u.min))/(u.max-Math.abs(u.min)):(k+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=r.series.map((k,x)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-(N*i[x]||0),value:r.absoluteValues[x],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[x]||""})),L=I.ticks.map(k=>({y:k>=0?F-N*(k/_):F+N*Math.abs(k)/_,value:k})),A=u.ticks.map(k=>{const x=(k-u.min)/(u.max-u.min);return{y:k>=0?a-N*x:a+N*x,value:k}});return{...r,yOffset:C,autoScaleYLabels:A,individualHeight:N,scaleYLabels:r.autoScaling?A:L,individualScale:r.autoScaling?u:I,individualMax:r.autoScaling?y:_,zeroPosition:r.autoScaling?a:F,plots:r.autoScaling?h:s}})},drawingArea(){const r=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+r,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+r)}},max(){return Math.max(...this.safeDataset.filter(r=>!this.segregatedSeries.includes(r.id)).map(r=>Math.max(...r.series)))},min(){const r=Math.min(...this.safeDataset.filter(o=>!this.segregatedSeries.includes(o.id)).map(o=>Math.min(...o.series)));return r>0?0:r},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(r=>r.type==="bar").filter(r=>!this.segregatedSeries.includes(r.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const r=this.safeDataset.filter(o=>o.type==="bar").filter(o=>!this.segregatedSeries.includes(o.id)).length;return this.drawingArea.width/this.maxSeries/r-this.barPeriodGap*r},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(r=>r!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const r=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),o=[];return this.timeLabels.forEach((n,m)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[m])?Number(t.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),o.push(l)}),{head:r,body:o}},dataTable(){const r=[""].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(g=>g.absoluteValues[l]??0).reduce((g,I)=>g+I,0);o.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(g=>(g.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},m=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:r,body:o,config:n,colNames:m}},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(r=>({shape:r.shape||null,name:r.name,color:r.color,type:r.type,value:r.absoluteValues.find((o,n)=>n===this.selectedSerieIndex),comments:r.comments||[]}))},tooltipContent(){let r="",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],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(r+=`<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="",g="";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)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?g=`<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"?g=`<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"?g=`<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"?g=`<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"?g=`<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"&&(g=`<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}" />${g}</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}}r+=`<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.applyDataLabel(l.type==="line"?this.FINAL_CONFIG.line.labels.formatter:l.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,l.value,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}),{datapoint:l}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(l.value)/o*100),s:"%",r: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]&&(r+=`<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}">${r}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(r=>({y:r>=0?this.zero-this.drawingArea.height*this.ratioToMax(r):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)),value:r}))},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((r,o)=>{[null,void 0].includes(r.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:o})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(r=>{r.series.forEach((o,n)=>{this.isSafeValue(o)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./pdf-Cz3729tZ.cjs"),v=require("./usePrinter-THxtdQMP.cjs"),d=require("./index-COMTToJY.cjs"),E=require("./DataTable-D7JJfjpO.cjs"),z=require("./Title-BngFmPpq.cjs"),G=require("./Tooltip-ztxY4WiA.cjs"),V=require("./Shape-DDEKu71I.cjs"),P=require("./BaseIcon-Cfy7hUAu.cjs"),T=require("./vue-ui-table-sparkline-BXem0A7t.cjs"),M=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),D=require("./Slicer-BhktgQpC.cjs"),R=require("./vue-ui-accordion-BDkYau8u.cjs"),p=require("./useNestedProp-DJwc68Re.cjs"),e=require("vue"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=d.createUid(),q={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:v.UserOptions,BaseIcon:P.default,TableSparkline:T.default,Skeleton:M.default,Slicer:D.Slicer,Accordion:R.default},data(){this.dataset.forEach((n,m)=>{[null,void 0].includes(n.series)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"series (number[])",index:m})});const r=Math.max(...this.dataset.map(n=>n.series.length)),o={start:0,end:r};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:r,showSparklineTable:!0,segregateStep:0,sliderId:Y,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 r=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})),m=[...r,...o,...n].flatMap(l=>l).length;return[...r,...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/m*(t+1),yLabels:l.scaleYLabels||l.scale.ticks.map(g=>({y:g>=0?l.zero-l.individualHeight*(g/l.max):l.zero+l.individualHeight*Math.abs(g)/l.max,value:g}))}))},isDataset(){return!!this.dataset&&this.dataset.length},chartFont(){const r=document.getElementById(`vue-ui-xy_${this.uniqueId}`);return window.getComputedStyle(r,null).getPropertyValue("font-family")},FINAL_CONFIG:{get:function(){const r=d.useConfig().vue_ui_xy;if(!Object.keys(this.config||{}).length)return r;const o=this.useNestedProp({userConfig:this.config,defaultConfig:r});return o.theme?{...p.useNestedProp({userConfig:this.themes.vue_ui_xy[o.theme]||this.config,defaultConfig:o}),customPalette:this.themePalettes[o.theme]||this.palette}:o},set:function(r){return r}},hasHighlightArea(){return this.FINAL_CONFIG.chart.highlightArea&&this.FINAL_CONFIG.chart.highlightArea.show},highlightAreaSpan(){const{from:r,to:o}=this.FINAL_CONFIG.chart.highlightArea;return r===o?1:o<r?0:o-r+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((r,o)=>({...r,series:r.series.map(n=>this.isSafeValue(n)?n:null).slice(this.slicer.start,this.slicer.end),color:this.convertColorToHex(r.color?r.color:this.customPalette[o]?this.customPalette[o]:this.palette[o]),id:`uniqueId_${o}`})):this.dataset},relativeDataset(){return this.safeDataset.map((r,o)=>({...r,series:r.series.map(n=>n+this.relativeZero),absoluteValues:r.series})).filter(r=>!this.segregatedSeries.includes(r.id))},tableSparklineDataset(){return this.relativeDataset.map(r=>{const o=r.absoluteValues.map(n=>[void 0,null].includes(n)?0:n);return{id:r.id,name:r.name,color:r.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,prefix:this.FINAL_CONFIG.chart.labels.prefix,suffix:this.FINAL_CONFIG.chart.labels.suffix,colNames:JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),thead:{backgroundColor:this.FINAL_CONFIG.table.th.backgroundColor,color:this.FINAL_CONFIG.table.th.color,outline:this.FINAL_CONFIG.table.th.outline},tbody:{backgroundColor:this.FINAL_CONFIG.table.td.backgroundColor,color:this.FINAL_CONFIG.table.td.color,outline:this.FINAL_CONFIG.table.td.outline},userOptions:{show:!1}}},absoluteDataset(){return this.safeDataset.map((r,o)=>({absoluteIndex:o,...r,series:r.series.map(n=>n+this.relativeZero),absoluteValues:r.series,segregate:()=>this.segregate(r),isSegregated:this.segregatedSeries.includes(r.id)}))},barSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="bar").map((r,o)=>{this.checkAutoScaleError(r);const n=Math.min(...r.absoluteValues.filter(c=>![null,void 0].includes(c))),m=Math.max(...r.absoluteValues.filter(c=>![null,void 0].includes(c))),t={ratios:r.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-n)/(m-n)),valueMin:n,valueMax:m<0?0:m},g={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues.filter(c=>![void 0,null].includes(c)))>0?0:Math.min(...r.absoluteValues.filter(c=>![null,void 0].includes(c)))},I=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,u=this.calculateNiceScale(g.min,g.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-r.cumulatedStackRatio):0,F=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,a=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=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale?(r.absoluteValues[b]+S)/y:this.ratioToMax(c),O=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*b:this.drawingArea.left+this.slot.bar*o+this.slot.bar*b*i-this.barSlot/2-o*this.barPeriodGap;return{yOffset:N,individualHeight:F,x:O,y:this.drawingArea.bottom-N-F*w,value:r.absoluteValues[b],zeroPosition:a,individualMax:y,comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),L=r.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=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.drawingArea.left+this.drawingArea.width/this.maxSeries*b:this.drawingArea.left-this.slot.bar/2+this.slot.bar*o+this.slot.bar*b*this.absoluteDataset.filter(O=>O.type==="bar").filter(O=>!this.segregatedSeries.includes(O.id)).length;return{yOffset:N,individualHeight:F,x:w,y:this.drawingArea.bottom-N-(F*L[b]||0),value:r.absoluteValues[b],zeroPosition:a,individualMax:y,comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),k=u.ticks.map(c=>({y:c>=0?a-F*(c/y):a+F*Math.abs(c)/y,value:c})),x=f.ticks.map(c=>{const b=(c-f.min)/(f.max-f.min);return{y:c>=0?s-F*b:s+F*b,value:c}});return{...r,yOffset:N,autoScaleYLabels:x,individualHeight:F,scaleYLabels:r.autoScaling?x:k,individualScale:r.autoScaling?f:u,individualMax:r.autoScaling?C:y,zeroPosition:r.autoScaling?s:a,plots:r.autoScaling?A:h}})},activeSeriesLength(){return this.absoluteDataset.length},activeSeriesWithStackRatios(){return this.assignStackRatios(this.absoluteDataset.filter(r=>!this.segregatedSeries.includes(r.id)))},lineSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="line").map(r=>{this.checkAutoScaleError(r);const o=Math.min(...r.absoluteValues.filter(c=>![void 0,null].includes(c))),n=Math.max(...r.absoluteValues.filter(c=>![void 0,null].includes(c)))||1,l={ratios:r.absoluteValues.filter(c=>![null,void 0].includes(c)).map(c=>(c-o)/(n-o)),valueMin:o,valueMax:n},t={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||(Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues))},g=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,g),u=this.calculateNiceScale(l.valueMin,l.valueMax,g),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-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,a=this.drawingArea.bottom-C-N*S/y,s=r.series.map((c,b)=>{const w=this.mutableConfig.useIndividualScale?(r.absoluteValues[b]+Math.abs(f))/_:this.ratioToMax(c);return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*b,y:this.drawingArea.bottom-C-N*w,value:r.absoluteValues[b],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),i=r.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=r.series.map((c,b)=>{if(![void 0,null].includes(r.absoluteValues[b]))return{x:this.drawingArea.left+this.slot.line/2+this.slot.line*b,y:this.drawingArea.bottom-C-(N*i[b]||0),value:r.absoluteValues[b],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[b]||""}}),L=this.createSmoothPath(s),A=this.createSmoothPath(h),k=I.ticks.map(c=>({y:c>=0?F-N*(c/_):F+N*Math.abs(c)/_,value:c})),x=u.ticks.map(c=>{const b=(c-u.min)/(u.max-u.min);return{y:c>=0?a-N*b:a+N*b,value:c}});return{...r,yOffset:C,autoScaleYLabels:x,individualHeight:N,scaleYLabels:r.autoScaling?x:k,individualScale:r.autoScaling?u:I,individualMax:r.autoScaling?y:_,zeroPosition:r.autoScaling?a:F,curve:r.autoScaling?A:L,plots:r.autoScaling?h:s,area:r.useArea?this.mutableConfig.useIndividualScale?this.createIndividualArea(r.autoScaling?h:s,r.autoScaling?a:F):this.createArea(s):""}})},plotSet(){return this.activeSeriesWithStackRatios.filter(r=>r.type==="plot").map(r=>{this.checkAutoScaleError(r);const o=Math.min(...r.absoluteValues.filter(k=>![null,void 0].includes(k))),n=Math.max(...r.absoluteValues.filter(k=>![null,void 0].includes(k)))||1,l={ratios:r.absoluteValues.filter(k=>![null,void 0].includes(k)).map(k=>(k-o)/(n-o)),valueMin:o,valueMax:n},t={max:r.scaleMax||Math.max(...r.absoluteValues)||1,min:r.scaleMin||Math.min(...r.absoluteValues)>0?0:Math.min(...r.absoluteValues)},g=r.scaleSteps||this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps,I=this.calculateNiceScale(t.min,t.max,g),u=this.calculateNiceScale(l.valueMin,l.valueMax,g),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-r.cumulatedStackRatio):0,N=this.mutableConfig.isStacked?this.drawingArea.height*r.stackRatio-this.FINAL_CONFIG.chart.grid.labels.yAxis.gap:this.drawingArea.height,F=this.drawingArea.bottom-C-N*f/_,a=this.drawingArea.bottom-C-N*S/y,s=r.series.map((k,x)=>{const c=this.mutableConfig.useIndividualScale?(r.absoluteValues[x]+Math.abs(f))/_:this.ratioToMax(k);return{x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-N*c,value:r.absoluteValues[x],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[x]||""}}),i=r.absoluteValues.map(k=>u.min>=0?(k-Math.abs(u.min))/(u.max-Math.abs(u.min)):(k+Math.abs(u.min))/(u.max+Math.abs(u.min))),h=r.series.map((k,x)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*x,y:this.drawingArea.bottom-C-(N*i[x]||0),value:r.absoluteValues[x],comment:r.comments&&r.comments.slice(this.slicer.start,this.slicer.end)[x]||""})),L=I.ticks.map(k=>({y:k>=0?F-N*(k/_):F+N*Math.abs(k)/_,value:k})),A=u.ticks.map(k=>{const x=(k-u.min)/(u.max-u.min);return{y:k>=0?a-N*x:a+N*x,value:k}});return{...r,yOffset:C,autoScaleYLabels:A,individualHeight:N,scaleYLabels:r.autoScaling?A:L,individualScale:r.autoScaling?u:I,individualMax:r.autoScaling?y:_,zeroPosition:r.autoScaling?a:F,plots:r.autoScaling?h:s}})},drawingArea(){const r=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+r,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+r)}},max(){return Math.max(...this.safeDataset.filter(r=>!this.segregatedSeries.includes(r.id)).map(r=>Math.max(...r.series)))},min(){const r=Math.min(...this.safeDataset.filter(o=>!this.segregatedSeries.includes(o.id)).map(o=>Math.min(...o.series)));return r>0?0:r},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(r=>r.type==="bar").filter(r=>!this.segregatedSeries.includes(r.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},barSlot(){const r=this.safeDataset.filter(o=>o.type==="bar").filter(o=>!this.segregatedSeries.includes(o.id)).length;return this.drawingArea.width/this.maxSeries/r-this.barPeriodGap*r},barPeriodGap(){return this.slot.line*this.FINAL_CONFIG.bar.periodGap},maxSlot(){return Math.max(...Object.values(this.slot).filter(r=>r!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[],config:{},columnNames:[]};const r=this.relativeDataset.map(n=>({label:n.name,color:n.color,type:n.type})),o=[];return this.timeLabels.forEach((n,m)=>{const l=[n];this.relativeDataset.forEach(t=>{l.push(this.canShowValue(t.absoluteValues[m])?Number(t.absoluteValues[m].toFixed(this.FINAL_CONFIG.table.rounding)):"")}),o.push(l)}),{head:r,body:o}},dataTable(){const r=[""].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(g=>g.absoluteValues[l]??0).reduce((g,I)=>g+I,0);o.push([this.timeLabels[l]??"-"].concat(this.relativeDataset.map(g=>(g.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},m=[this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map(l=>l.name)).concat(this.FINAL_CONFIG.table.columnNames.total);return{head:r,body:o,config:n,colNames:m}},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(r=>({shape:r.shape||null,name:r.name,color:r.color,type:r.type,value:r.absoluteValues.find((o,n)=>n===this.selectedSerieIndex),comments:r.comments||[]}))},tooltipContent(){let r="",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],m=this.FINAL_CONFIG.chart.tooltip.customFormat;return this.isFunction(m)&&this.functionReturnsString(()=>m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}))?m({seriesIndex:this.selectedSerieIndex,datapoint:this.selectedSeries,series:this.absoluteDataset,bars:this.barSet,lines:this.lineSet,plots:this.plotSet,config:this.FINAL_CONFIG}):(n&&(r+=`<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="",g="";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)?g=`<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${l.color}" />`:l.shape==="triangle"?g=`<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"?g=`<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"?g=`<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"?g=`<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"?g=`<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"&&(g=`<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}" />${g}</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}}r+=`<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.applyDataLabel(l.type==="line"?this.FINAL_CONFIG.line.labels.formatter:l.type==="bar"?this.FINAL_CONFIG.bar.labels.formatter:this.FINAL_CONFIG.plot.labels.formatter,l.value,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}),{datapoint:l}):""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage?`(${d.dataLabel({v:this.checkNaN(Math.abs(l.value)/o*100),s:"%",r: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]&&(r+=`<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}">${r}</div>`)},svg(){return{height:this.height,width:this.width}},yLabels(){return this.niceScale.ticks.map(r=>({y:r>=0?this.zero-this.drawingArea.height*this.ratioToMax(r):this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)),value:r}))},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((r,o)=>{[null,void 0].includes(r.name)&&this.error({componentName:"VueUiXy",type:"datasetSerieAttribute",property:"name (string)",index:o})}),this.FINAL_CONFIG.showWarnings&&this.dataset.forEach(r=>{r.series.forEach((o,n)=>{this.isSafeValue(o)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
2
2
|
-----> The serie '${r.name}' contains the value '${o}' at index ${n}.
|
|
3
3
|
'${o}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",r=>{this.clientPosition={x:r.clientX,y:r.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:m}=o.getBoundingClientRect();let l=null,t=0;this.FINAL_CONFIG.chart.title.show&&(l=this.$refs.chartTitle,t=l.getBoundingClientRect().height);let g=null,I=0;this.FINAL_CONFIG.chart.zoom.show&&this.maxX>6&&this.isDataset&&(g=this.$refs.chartSlicer.$el,I=g.getBoundingClientRect().height);let 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=m,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),g&&(I=g.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,applyDataLabel:d.applyDataLabel,calculateNiceScale:d.calculateNiceScale,checkNaN:d.checkNaN,createSmoothPath:d.createSmoothPath,isSafeValue:d.isSafeValue,treeShake:d.treeShake,shiftHue:d.shiftHue,pdf:B.pdf,img:v.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:p.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(r){r.autoScaling&&(this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale||console.warn(`VueUiXy (datapoint: ${r.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: ${r.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`))},createArea(r){if(!r[0])return[-10,-10,"",-10,-10];const o={x:r[0].x,y:this.zero},n={x:r.at(-1).x,y:this.zero},m=[];return r.forEach(l=>{m.push(`${l.x},${l.y} `)}),[o.x,o.y,...m,n.x,n.y].toString()},createIndividualArea(r,o){if(!r[0])return[-10,-10,"",-10,-10];const n={x:r[0]?r[0].x:Math.min(...r.filter(t=>!!t).map(t=>t.x)),y:o},m={x:r.at(-1)?r.at(-1).x:Math.min(...r.filter(t=>!!t).map(t=>t.x)),y:o},l=[];return r.filter(t=>!!t).forEach(t=>{l.push(`${t.x},${t.y} `)}),[n.x,n.y,...l,m.x,m.y].toString()},createStar:d.createStar,createPolygonPath:d.createPolygonPath,fillArray(r,o){let n=Array(r).fill(0);for(let m=0;m<o.length&&m<r;m+=1)n[m]=o[m];return n},refreshSlicer(){this.slicer={start:0,end:Math.max(...this.dataset.map(r=>r.series.length))},this.slicerStep+=1},calcRectHeight(r){return r.value>=0?this.zero-r.y<=0?1e-5:this.zero-r.y:r.y-this.zero<=0?1e-5:r.y-this.zero},calcIndividualHeight(r){return r.value>=0?r.zeroPosition-r.y<=0?1e-5:r.zeroPosition-r.y:r.y-r.zeroPosition<=0?1e-5:r.zeroPosition-r.y},calcRectWidth(){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?this.slot.line-this.drawingArea.width/this.maxSeries*.1:this.slot.bar},calcRectX(r){return this.mutableConfig.useIndividualScale&&this.mutableConfig.isStacked?r.x+this.drawingArea.width/this.maxSeries*.05:r.x+this.slot.bar/2},calcRectY(r){return r.value>=0?r.y:this.zero},calcIndividualRectY(r){return r.value>=0?r.y:r.zeroPosition},canShowValue(r){return![null,void 0,NaN].includes(r)},findClosestValue(r,o){let n=o[0],m=Math.abs(r-o[0]);for(let l=1;l<o.length;l+=1){const t=Math.abs(r-o[l]);t<m&&o[l]<r&&(n=o[l],m=t)}return n},ratioToMax(r){return r/this.absoluteMax},selectX(r){this.$emit("selectX",{dataset:this.relativeDataset.map(o=>({name:o.name,value:[null,void 0,NaN].includes(o.absoluteValues[r])?null:o.absoluteValues[r],color:o.color,type:o.type})),index:r,indexLabel:this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[r]})},getData(){return this.absoluteDataset.map(r=>({values:r.absoluteValues,color:r.color,name:r.name,type:r.type}))},segregate(r){if(this.segregatedSeries.includes(r.id))this.segregatedSeries=this.segregatedSeries.filter(o=>o!==r.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(r.id)}this.$emit("selectLegend",this.relativeDataset.map(o=>({name:o.name,values:o.absoluteValues,color:o.color,type:o.type}))),this.segregateStep+=1},toggleTooltipVisibility(r,o=null){this.isTooltip=r,r?this.selectedSerieIndex=o:this.selectedSerieIndex=null},toggleFullscreen(r){this.isFullscreen=r,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 r=[[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,m=r.concat([o]).concat(n),l=this.createCsvContent(m);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)}}},W=["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"],ae=["id"],re=["stop-color"],ie=["stop-color"],oe=["stop-color"],se=["id"],ne=["stop-color"],ce=["stop-color"],he=["stop-color"],de=["id"],ue=["stop-color"],me=["stop-color"],ge=["id"],Ne=["stop-color"],fe=["stop-color"],be=["id"],ke=["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"],Oe={style:{width:"100%"}},ve={key:0},Ge=["id"],pe=["fill"],Be=["x1","x2","y1","y2","stroke","marker-end"],Ee=["x","y","font-size","fill"],ze=["d","stroke","stroke-width","stroke-dasharray"],Ve={key:1},Pe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Te={key:0},Me=["d","fill"],De=["d","fill"],Re=["d","stroke","stroke-width","stroke-dasharray"],He={key:2},Ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],qe=["width","x","y"],We={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"],at=["x","y"],rt={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"],mt=["x","y","font-size","fill","innerHTML"],gt=["x","y","font-size","fill","innerHTML"],Nt=["x","y","font-size","fill","innerHTML"],ft=["x","y","font-size","fill","innerHTML"],bt={key:6},kt=["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"],Ot=["x","y","height","width","fill","onMouseenter","onClick"],vt={key:9},Gt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],pt={key:10},Bt=["x","y"],Et=["cx","cy","r","fill"],zt={key:3,class:"vue-data-ui-watermark"},Vt=["onClick"],Pt={key:0,viewBox:"0 0 20 12",height:"14",width:"20"},Tt=["fill"],Mt={key:1,viewBox:"0 0 12 12",height:"14",width:"14"},Dt=["fill"],Rt={key:7,ref:"chartLegend"},Ht={style:{display:"flex","flex-direction":"row",gap:"6px","align-items":"center","padding-left":"6px"},"data-html2canvas-ignore":""},Yt=["innerHTML"];function qt(r,o,n,m,l,t){const g=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(g,{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:r.$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},[r.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,r.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,r.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,r.$slots.optionStack?{name:"optionStack",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,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,a=>(e.openBlock(),e.createElementBlock("g",null,[a.id===l.selectedScale&&a.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.yLabels,s=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left,x2:t.drawingArea.right,y1:s.y,y2:s.y,stroke:a.color,"stroke-width":.5,"stroke-linecap":"round"},null,8,$))),256)):a.yLabels.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.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,a=>(e.openBlock(),e.createElementBlock("line",{x1:t.drawingArea.left,x2:t.drawingArea.right,y1:a.y,y2:a.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,(a,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,(a,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":a.color},null,8,re),e.createElementVNode("stop",{offset:"62%","stop-color":`${t.shiftHue(a.color,.02)}DE`},null,8,ie),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.shiftHue(a.color,.05)}66`},null,8,oe)],8,ae),e.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${l.uniqueId}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${t.shiftHue(a.color,.05)}66`},null,8,ne),e.createElementVNode("stop",{offset:"38%","stop-color":`${t.shiftHue(a.color,.02)}DE`},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,he)],8,se)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(a,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(a.color,.05)}`},null,8,ue),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,me)],8,de)]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(a,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(a.color,.05)}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,fe)],8,ge),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(a.color,.03)}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":`${a.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Ie)],8,be)]))),128)),t.barSet.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.barSet,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_bar_${s}`,class:e.normalizeClass(`serie_bar_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.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})`:a.color,stroke:t.FINAL_CONFIG.bar.border.useSerieColor?a.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(r.$slots,"plot-comment",{plot:{...i,color:a.color}},void 0,!0)],8,_e)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(t.calcLinearProgression(a.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:a.color},null,8,Ce)],8,xe)]),a.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(a.plots).x1,x2:t.calcLinearProgression(a.plots).x2,y1:t.calcLinearProgression(a.plots).y1,y2:t.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#bar_arrow_${s})`},null,8,Se)):e.createCommentVNode("",!0),a.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(a.plots).x2,y:t.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_plot_${s}`,class:e.normalizeClass(`serie_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.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(a.shape)?a.shape:"circle",color:t.FINAL_CONFIG.plot.useGradient?`url(#plotGradient_${s}_${l.uniqueId})`:a.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",Oe,[e.renderSlot(r.$slots,"plot-comment",{plot:{...i,color:a.color}},void 0,!0)])],8,we)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(t.calcLinearProgression(a.plots).trend)?(e.openBlock(),e.createElementBlock("g",ve,[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:a.color},null,8,pe)],8,Ge)]),a.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(a.plots).x1,x2:t.calcLinearProgression(a.plots).x2,y1:t.calcLinearProgression(a.plots).y1,y2:t.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#plot_arrow_${s})`},null,8,Be)):e.createCommentVNode("",!0),a.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(a.plots).x2,y:t.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.smooth&&a.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M${a.curve}`,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,ze)):a.plots.length>1?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<a.plots.length-1&&a.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(a.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:a.plots[h+1].x,y1:i.y,y2:a.plots[h+1].y,stroke:t.FINAL_CONFIG.chart.backgroundColor,"stroke-width":t.FINAL_CONFIG.line.strokeWidth+1,"stroke-dasharray":a.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`serie_line_${s}`,class:e.normalizeClass(`serie_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[a.useArea&&a.plots.length>1?(e.openBlock(),e.createElementBlock("g",Te,[a.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.plots[0]?a.plots[0].x:Math.min(...a.plots.filter(i=>!!i).map(i=>i.x))},${l.mutableConfig.isStacked?t.drawingArea.bottom-a.yOffset:t.drawingArea.bottom} ${a.curve} L ${a.plots.at(-1)?a.plots.at(-1).x:t.drawingArea.left+t.slot.line*s+t.slot.line/2},${l.mutableConfig.isStacked?t.drawingArea.bottom-a.yOffset:t.drawingArea.bottom} Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${s}_${l.uniqueId})`:`${a.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,Me)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${a.area}Z`,fill:t.FINAL_CONFIG.line.area.useGradient?`url(#areaGradient_${s}_${l.uniqueId})`:`${a.color}${l.opacity[t.FINAL_CONFIG.line.area.opacity]}`},null,8,De))])):e.createCommentVNode("",!0),a.smooth&&a.plots.length>1?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${a.curve}`,stroke:a.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,fill:"none"},null,8,Re)):a.plots.length>1?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`line_${s}_${h}`},[i&&h<a.plots.length-1&&a.plots[h+1]&&t.canShowValue(i.value)&&t.canShowValue(a.plots[h+1].value)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:i.x,x2:a.plots[h+1].x,y1:i.y,y2:a.plots[h+1].y,stroke:a.color,"stroke-width":t.FINAL_CONFIG.line.strokeWidth,"stroke-dasharray":a.dashed?t.FINAL_CONFIG.line.strokeWidth*2:0,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ye)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.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(a.shape)?a.shape:"circle",color:t.FINAL_CONFIG.line.useGradient?`url(#lineGradient_${s}_${l.uniqueId})`:a.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",We,[e.renderSlot(r.$slots,"plot-comment",{plot:{...i,color:a.color}},void 0,!0)])],8,qe)):e.createCommentVNode("",!0)]))),128)),Object.hasOwn(a,"useProgression")&&a.useProgression===!0&&!isNaN(t.calcLinearProgression(a.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:a.color},null,8,Ze)],8,Ue)]),a.plots.length>1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.calcLinearProgression(a.plots).x1,x2:t.calcLinearProgression(a.plots).x2,y1:t.calcLinearProgression(a.plots).y1,y2:t.calcLinearProgression(a.plots).y2,"stroke-width":1,stroke:a.color,"stroke-dasharray":2,"marker-end":`url(#line_arrow_${s})`},null,8,Je)):e.createCommentVNode("",!0),a.plots.length>1?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",x:t.calcLinearProgression(a.plots).x2,y:t.calcLinearProgression(a.plots).y2-6,"font-size":l.fontSizes.plotLabels,fill:a.color},e.toDisplayString(t.dataLabel({v:t.calcLinearProgression(a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}`,class:e.normalizeClass(`xLabel_bar_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_bar_${s}_${h}`},[i&&(!Object.hasOwn(a,"dataLabels")||a.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.applyDataLabel(t.FINAL_CONFIG.bar.labels.formatter,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}),{datapoint:i,serie:a}):""),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?a.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:a.name,length:t.FINAL_CONFIG.bar.serieName.abbreviationSize}):a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&!Object.hasOwn(a,"dataLabels")||a.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.applyDataLabel(t.FINAL_CONFIG.plot.labels.formatter,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}),{datapoint:i,serie:a}):""),9,tt)):e.createCommentVNode("",!0),i&&h===0&&a.useTag&&a.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:${a.color}${l.opacity[80]};color:${t.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(a.name),5)],8,lt)):e.createCommentVNode("",!0),i&&h===a.plots.length-1&&a.useTag&&a.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-a.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:${a.color}${l.opacity[80]};color:${t.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(a.name),5)],8,at)):e.createCommentVNode("",!0)]))),128))],6))),128))])):e.createCommentVNode("",!0),t.FINAL_CONFIG.line.labels.show&&l.mutableConfig.dataLabels.show?(e.openBlock(),e.createElementBlock("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lineSet,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&!Object.hasOwn(a,"dataLabels")||a.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.applyDataLabel(t.FINAL_CONFIG.line.labels.formatter,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}),{datapoint:i,serie:a}):""),9,it)):e.createCommentVNode("",!0),i&&h===0&&a.useTag&&a.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:${a.color}${l.opacity[80]};color:${t.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(a.name),5)],8,ot)):e.createCommentVNode("",!0),i&&h===a.plots.length-1&&a.useTag&&a.useTag==="end"?(e.openBlock(),e.createElementBlock("foreignObject",{key:2,x:i.x-a.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:${a.color}${l.opacity[80]};color:${t.adaptColorToBackground(a.color)};width:fit-content;font-size:${l.fontSizes.plotLabels}px;border-radius: 2px;`)},e.toDisplayString(a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}`,class:e.normalizeClass(`xLabel_line_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_line_${s}_${h}`},[i&&h===0&&a.showSerieName&&a.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:a.color,innerHTML:t.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,mt)):e.createCommentVNode("",!0),i&&h===a.plots.length-1&&a.showSerieName&&a.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:a.color,innerHTML:t.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:i.x+l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,gt)):e.createCommentVNode("",!0)]))),128))],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.plotSet,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}`,class:e.normalizeClass(`xLabel_plot_${s}`),style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.2:1};transition:opacity 0.2s ease-in-out`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(i,h)=>(e.openBlock(),e.createElementBlock("g",{key:`xLabel_plot_${s}_${h}`},[i&&h===0&&a.showSerieName&&a.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:a.color,innerHTML:t.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.color,x:i.x-l.fontSizes.plotLabels,y:i.y,maxWords:2})},null,8,Nt)):e.createCommentVNode("",!0),i&&h===a.plots.length-1&&a.showSerieName&&a.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:a.color,innerHTML:t.createTSpans({content:a.name,fontSize:l.fontSizes.plotLabels,fill:a.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",bt,[l.mutableConfig.useIndividualScale?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,a=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:a.x,x2:a.x,y1:l.mutableConfig.isStacked?t.drawingArea.bottom-a.yOffset-a.individualHeight:t.drawingArea.top,y2:l.mutableConfig.isStacked?t.drawingArea.bottom-a.yOffset:t.drawingArea.bottom,stroke:a.color,"stroke-width":t.FINAL_CONFIG.chart.grid.stroke,"stroke-linecap":"round",style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},null,12,kt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allScales,a=>(e.openBlock(),e.createElementBlock("g",{style:e.normalizeStyle(`opacity:${l.selectedScale?l.selectedScale===a.id?1:.3:1};transition:opacity 0.2s ease-in-out`)},[e.createElementVNode("text",{fill:a.color,"font-size":l.fontSizes.dataLabels,"text-anchor":"middle",transform:`translate(${a.x-t.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth+5}, ${l.mutableConfig.isStacked?t.drawingArea.bottom-a.yOffset-a.individualHeight/2:t.drawingArea.top+t.drawingArea.height/2}) rotate(-90)`},e.toDisplayString(a.name)+" "+e.toDisplayString(a.scaleLabel?`- ${a.scaleLabel}`:""),9,It),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x-3,x2:a.x,y1:s.y,y2:s.y,stroke:a.color,"stroke-width":1,"stroke-linecap":"round"},null,8,Ft))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.yLabels,(s,i)=>(e.openBlock(),e.createElementBlock("text",{x:a.x-5,y:s.y,"font-size":l.fontSizes.dataLabels,"text-anchor":"end",fill:a.color},e.toDisplayString(t.applyDataLabel(t.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,s.value,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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`yLabel_${s}`},[t.canShowValue(a)&&a.value>=t.niceScale.min&&a.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:t.drawingArea.left,x2:t.drawingArea.left-5,y1:a.y,y2:a.y,stroke:t.FINAL_CONFIG.chart.grid.stroke,"stroke-width":"1","stroke-linecap":"round"},null,8,yt)):e.createCommentVNode("",!0),a.value>=t.niceScale.min&&a.value<=t.niceScale.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:t.drawingArea.left-7,y:a.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(a.value)?t.applyDataLabel(t.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,a.value,t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:a.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,a=>(e.openBlock(),e.createElementBlock("rect",{x:a.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===a.id?`${a.color}20`:"transparent",onMouseenter:s=>l.selectedScale=a.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,(a,s)=>(e.openBlock(),e.createElementBlock("g",{key:`time_label_${s}`},[a&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&(s===0||s===t.timeLabels.length-1)&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast&&l.selectedSerieIndex===s&&!t.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo||a&&!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(a||""),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,(a,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,Ot)]))),128))]),t.FINAL_CONFIG.chart.highlighter.useLine&&![null,void 0].includes(l.selectedSerieIndex)?(e.openBlock(),e.createElementBlock("g",vt,[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",pt,[(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,Bt)),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(r.$slots,"svg",{svg:t.svg},void 0,!0)],14,X)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:l.isPrinting||l.isImaging})),void 0,!0)])):e.createCommentVNode("",!0),t.isDataset?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:4,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]=a=>l.slicer.start=a),end:l.slicer.end,"onUpdate:end":o[3]||(o[3]=a=>l.slicer.end=a),onReset:t.refreshSlicer},{"reset-action":e.withCtx(({reset:a})=>[e.renderSlot(r.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:a})),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:6,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,(a,s)=>(e.openBlock(),e.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:i=>t.segregate(a),class:e.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":l.segregatedSeries.includes(a.id)})},[l.icons[a.type]==="line"?(e.openBlock(),e.createElementBlock("svg",Pt,[e.createElementVNode("rect",{x:"0",y:"7",rx:"3",stroke:"none",height:"4",width:"20",fill:a.color},null,8,Tt),e.createVNode(u,{plot:{x:10,y:9},radius:4,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle",stroke:t.FINAL_CONFIG.chart.backgroundColor,strokeWidth:1},null,8,["color","shape","stroke"])])):(e.openBlock(),e.createElementBlock("svg",Mt,[l.icons[a.type]==="bar"?(e.openBlock(),e.createElementBlock("rect",{key:0,x:"0",y:"0",rx:"1",height:"12",width:"12",stroke:"none",fill:a.color},null,8,Dt)):(e.openBlock(),e.createBlock(u,{key:1,plot:{x:6,y:6},radius:5,color:a.color,shape:["triangle","square","diamond","pentagon","hexagon","star"].includes(a.shape)?a.shape:"circle"},null,8,["color","shape"]))])),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.FINAL_CONFIG.chart.legend.color}`)},e.toDisplayString(a.name),5)],10,Vt))),128))],4)):(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(r.$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,position:t.FINAL_CONFIG.chart.tooltip.position,offsetY:t.FINAL_CONFIG.chart.tooltip.offsetY,parent:r.$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(r.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(r.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...t.dataTooltipSlot})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),t.isDataset?(e.openBlock(),e.createBlock(F,{key:8,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",Ht,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=a=>l.showSparklineTable=a)},null,512),[[e.vModelCheckbox,l.showSparklineTable]]),e.createElementVNode("div",{onClick:o[5]||(o[5]=a=>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]=a=>l.mutableConfig.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,Yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(isNaN(Number(a))?a:t.dataLabel({p:t.FINAL_CONFIG.chart.labels.prefix,v:a,s:t.FINAL_CONFIG.chart.labels.suffix,r:t.FINAL_CONFIG.table.rounding})),1)]),_:1},8,["colNames","head","body","config","title"]))],4)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,W)}const Wt=H._export_sfc(q,[["render",qt],["__scopeId","data-v-6a1d72ac"]]);exports.default=Wt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as d, computed as m, watch as re, onMounted as ha, onBeforeUnmount as ya, openBlock as T, createElementBlock as se, normalizeStyle as X, normalizeClass as fa, createVNode as ye, createCommentVNode as A, createBlock as Z, unref as E, createSlots as ga, withCtx as b, renderSlot as k, normalizeProps as G, guardReactiveProps as V, createElementVNode as j, toDisplayString as We, createTextVNode as pa } from "vue";
|
|
2
|
-
import { u as ma, c as ba, t as xa, a as La, p as N, b as ka, A as fe, i as q, f as J, d as Ye, U as Ca, o as wa, e as Sa, w as Be, x as $a, q as za, r as Ta, v as K, l as Ma } from "./index-
|
|
2
|
+
import { u as ma, c as ba, t as xa, a as La, p as N, b as ka, A as fe, i as q, f as J, d as Ye, U as Ca, o as wa, e as Sa, w as Be, x as $a, q as za, r as Ta, v as K, l as Ma } from "./index-CQyrBpOX.js";
|
|
3
3
|
import { d as Ra, c as Ia, a as Ue, t as Oa, l as C, r as ge, b as O, p as Xe, u as Pa } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Fa } from "./Tooltip-
|
|
5
|
-
import { L as Ea } from "./Legend-
|
|
6
|
-
import { _ as Na } from "./Title-
|
|
7
|
-
import { S as _a } from "./Slicer-
|
|
8
|
-
import { u as Da, U as Ha } from "./usePrinter-
|
|
9
|
-
import Wa from "./vue-ui-accordion-
|
|
10
|
-
import { D as Ya } from "./DataTable-
|
|
11
|
-
import Ba from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Ae } from "./useNestedProp-
|
|
4
|
+
import { _ as Fa } from "./Tooltip-pvQzx3z4.js";
|
|
5
|
+
import { L as Ea } from "./Legend-BPGeRVxf.js";
|
|
6
|
+
import { _ as Na } from "./Title-DJW7JJGo.js";
|
|
7
|
+
import { S as _a } from "./Slicer-Dr5g4_di.js";
|
|
8
|
+
import { u as Da, U as Ha } from "./usePrinter-BJn_Etby.js";
|
|
9
|
+
import Wa from "./vue-ui-accordion-DqRnuig6.js";
|
|
10
|
+
import { D as Ya } from "./DataTable-CcVgHrwx.js";
|
|
11
|
+
import Ba from "./vue-ui-skeleton-CjYyI3Lv.js";
|
|
12
|
+
import { u as Ae } from "./useNestedProp-CK_S9Ya9.js";
|
|
13
13
|
import { _ as Ua } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Xa = ["id"], Aa = ["onClick"], Za = {
|
|
15
15
|
key: 2,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-COMTToJY.cjs"),c=require("./useResponsive-B3TrDDIG.cjs"),qe=require("./Tooltip-ztxY4WiA.cjs"),Ye=require("./Legend-BDgAlEzL.cjs"),Ue=require("./Title-BngFmPpq.cjs"),Xe=require("./Slicer-BhktgQpC.cjs"),xe=require("./usePrinter-THxtdQMP.cjs"),Ae=require("./vue-ui-accordion-BDkYau8u.cjs"),Ze=require("./DataTable-D7JJfjpO.cjs"),Ge=require("./vue-ui-skeleton-DYdGA7uQ.cjs"),Le=require("./useNestedProp-DJwc68Re.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Ke=["onClick"],Qe={key:2,class:"vue-data-ui-watermark"},et=["innerHTML"],tt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(J,{expose:ke,emit:Ce}){const R=J,{vue_ui_xy_canvas:we}=s.useConfig(),U=a.ref(s.createUid()),D=a.ref(null),C=a.ref(null),I=a.ref(null),i=a.ref(null),g=a.ref(1),z=a.ref(1),_=a.ref(!1),f=a.ref(null),H=a.ref(""),K=a.ref(null),k=a.ref([]),N=a.ref(1),M=a.ref(!0),w=a.ref(!0),X=a.ref(null),Q=a.ref(0),ee=a.ref(0),A=a.ref(!1),te=a.ref(null),ae=a.ref(null),le=a.ref(null),Z=a.computed(()=>!!R.dataset&&R.dataset.length),t=a.computed(()=>{const e=Le.useNestedProp({userConfig:R.config,defaultConfig:we});return e.theme?{...Le.useNestedProp({userConfig:s.themes.vue_ui_xy_canvas[e.theme]||R.config,defaultConfig:e}),customPalette:s.themePalettes[e.theme]||s.palette}:e}),oe=a.ref(t.value.style.chart.aspectRatio),{isPrinting:re,isImaging:ue,generatePdf:ne,generateImage:se}=xe.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),n=a.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Se(e){A.value=e,ee.value+=1}const ie=a.computed(()=>s.convertCustomPalette(t.value.customPalette)),P=a.computed(()=>Math.max(...E.value.filter((e,o)=>!k.value.includes(e.absoluteIndex)).map(e=>e.series.length))),l=a.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:z.value,left:g.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function ve(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,$=ve(L+S,S+h.max);let T,O;e&&(T=Math.abs(h.min),O=ve(L+T,h.max+T));let F=0;return m===null?F=l.value.bottom-l.value.height*(e?O:$):F=l.value.bottom-p-v*(e?O:$),{x:l.value.left+l.value.slot*j+l.value.slot/2,y:F,value:L}})}const b=a.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=l.value.bottom-l.value.height*(d/(r.max+d)),p=r.ticks.map(v=>({y:l.value.bottom-l.value.height*((v+d)/(r.max+d)),x:l.value.left-8,value:v}));return{absoluteMin:d,max:o,min:e,scale:r,yLabels:p,zero:h}}),$e=a.computed(()=>y.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),m=require("./useNestedProp-CQPRjDbe.cjs"),n=require("./index-C61CWbhi.cjs"),f=require("./vue-ui-digits-CTGE6aQS.cjs"),g={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(u){const o=u,{vue_ui_kpi:c}=n.useConfig(),e=a.computed(()=>m.useNestedProp({userConfig:o.config,defaultConfig:c})),d=a.ref((typeof o.dataset=="number",o.dataset)),t=a.ref(e.value.useAnimation?e.value.animationValueStart:d.value),i=l=>{const s=e.value.animationFrames,r=Math.abs(l-t.value)/s;function v(){t.value<l?t.value=Number(Math.min(t.value+r,l).toFixed(e.value.valueRounding)):t.value>l&&(t.value=Number(Math.max(t.value-r,l).toFixed(e.value.valueRounding))),t.value!==l&&requestAnimationFrame(v)}v()};return a.onMounted(()=>{e.value.useAnimation?(t.value=e.value.animationValueStart,i(o.dataset)):t.value=o.dataset}),a.watch(()=>o.dataset,l=>{e.value.useAnimation?i(l):t.value=l}),(l,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(l.$slots,"title",{comment:u.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(l.$slots,"comment-before",{comment:u.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(l.$slots,"value",{comment:u.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(f.default,{dataset:t.value,config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(n.applyDataLabel)(e.value.formatter,t.value,a.unref(n.dataLabel)({p:e.value.prefix,v:t.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(l.$slots,"comment-after",{comment:u.dataset})],6))}};exports.default=g;
|