vue-data-ui 2.4.9 → 2.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/{Arrow-BGrY1ydc.cjs → Arrow-B2lMAc1C.cjs} +1 -1
- package/dist/{Arrow-Fke-ybVE.js → Arrow-DTcpIx4P.js} +1 -1
- package/dist/{BaseIcon-BFZiytmY.js → BaseIcon-CNl_wwAN.js} +1 -1
- package/dist/{BaseIcon-P668oVRL.cjs → BaseIcon-Cci48l_M.cjs} +1 -1
- package/dist/{DataTable-8vTlt4e4.cjs → DataTable-BoMFIudG.cjs} +1 -1
- package/dist/{DataTable-Bqouzjik.js → DataTable-DD2NjgWr.js} +2 -2
- package/dist/{Legend-DiLvq4vW.cjs → Legend-BEBhnrMH.cjs} +1 -1
- package/dist/{Legend-BN2BcDVi.js → Legend-rLopjauc.js} +1 -1
- package/dist/PackageVersion-BPbxd_rU.cjs +1 -0
- package/dist/{PackageVersion-CTpPwNFg.js → PackageVersion-DjRRmHKg.js} +1 -1
- package/dist/{PenAndPaper-DLwiH2Np.js → PenAndPaper-BkFQN_fq.js} +2 -2
- package/dist/{PenAndPaper-bKJD5B9n.cjs → PenAndPaper-CLAyC1BP.cjs} +1 -1
- package/dist/{Shape-IDJlHO6G.js → Shape-Bc8lWk7D.js} +1 -1
- package/dist/{Shape-CLIJMoFo.cjs → Shape-DFrKEycb.cjs} +1 -1
- package/dist/{Slicer-CQsrB1vr.js → Slicer-CfPeFpUJ.js} +2 -2
- package/dist/{Slicer-BkionZj4.cjs → Slicer-DnddhuPD.cjs} +1 -1
- package/dist/{Title-RGaMCxMM.cjs → Title-BWAmAhTl.cjs} +1 -1
- package/dist/{Title-eBZtf9JC.js → Title-NE47pLld.js} +1 -1
- package/dist/{Tooltip-wUAIAM2C.js → Tooltip-1RIjj9Cf.js} +1 -1
- package/dist/{Tooltip-DfxV57uu.cjs → Tooltip-CopGUpZs.cjs} +1 -1
- package/dist/{index-CRiXU5u4.js → index-9EusFpSb.js} +1265 -1195
- package/dist/index-D3H-ye-i.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +18 -0
- package/dist/types/vue-data-ui.d.ts +18 -0
- package/dist/{useNestedProp-DxRaQ3VM.cjs → useNestedProp-BkL_BRGP.cjs} +1 -1
- package/dist/{useNestedProp-CJpdmtwu.js → useNestedProp-DLOArwu0.js} +1 -1
- package/dist/{usePrinter-1WhDjgbn.cjs → usePrinter-Bp96LusR.cjs} +1 -1
- package/dist/{usePrinter-uc7d9V3q.js → usePrinter-Q5_oK30J.js} +1 -1
- package/dist/{vue-data-ui-MkOQ0Nle.cjs → vue-data-ui-HoFeCyRO.cjs} +1 -1
- package/dist/{vue-data-ui-CIm7VqEX.js → vue-data-ui-mDZeKnLu.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +11 -11
- package/dist/{vue-ui-3d-bar-C1Me6SaI.cjs → vue-ui-3d-bar-CUChTQDT.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-BJ3zWmrS.js → vue-ui-3d-bar-e8ooZusZ.js} +9 -9
- package/dist/{vue-ui-accordion-Bwp3om8n.cjs → vue-ui-accordion-BmZSXtWn.cjs} +1 -1
- package/dist/{vue-ui-accordion-UcagglMR.js → vue-ui-accordion-DE04OBLu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DFBnbj8i.cjs → vue-ui-age-pyramid-R8-ov8YO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CVziTeLg.js → vue-ui-age-pyramid-rBF6FLI0.js} +10 -10
- package/dist/{vue-ui-annotator-X2GVxnvT.js → vue-ui-annotator-C6w7-GB3.js} +1 -1
- package/dist/{vue-ui-annotator-DtntPrcs.cjs → vue-ui-annotator-C_ePw9hm.cjs} +1 -1
- package/dist/{vue-ui-bullet-Dgbg2x2i.cjs → vue-ui-bullet-CBMK8LjV.cjs} +1 -1
- package/dist/{vue-ui-bullet-gkQMIEIY.js → vue-ui-bullet-CrrpYnF-.js} +8 -8
- package/dist/{vue-ui-candlestick-a8DCa9QA.cjs → vue-ui-candlestick-DxzQ2_Xw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DlrvnR9W.js → vue-ui-candlestick-pRGkapAM.js} +11 -11
- package/dist/{vue-ui-carousel-table-Dv7Y4mPd.cjs → vue-ui-carousel-table-DEyQbJoc.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DqDoR5Ke.js → vue-ui-carousel-table-XQAJxsSd.js} +4 -4
- package/dist/{vue-ui-chestnut-B8O8csWz.cjs → vue-ui-chestnut-B0SB93Um.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B01FJ4C4.js → vue-ui-chestnut-CqkJL5mj.js} +8 -8
- package/dist/{vue-ui-cursor-BViP1aeI.cjs → vue-ui-cursor-8F-TYD5m.cjs} +1 -1
- package/dist/{vue-ui-cursor-Ba_H8Ncs.js → vue-ui-cursor-i9FdNF85.js} +2 -2
- package/dist/{vue-ui-dashboard-gP-6lXnW.cjs → vue-ui-dashboard-B-uIDy9E.cjs} +1 -1
- package/dist/{vue-ui-dashboard-14KBNioW.js → vue-ui-dashboard-BVNC1LLY.js} +2 -2
- package/dist/{vue-ui-digits-BsR96Ev2.js → vue-ui-digits-2kFZOssj.js} +2 -2
- package/dist/{vue-ui-digits-D2YQwzS9.cjs → vue-ui-digits-DE2wuVjS.cjs} +1 -1
- package/dist/{vue-ui-donut-CRfeBum_.js → vue-ui-donut-BBPED91N.js} +11 -11
- package/dist/{vue-ui-donut-BBgDxAnA.cjs → vue-ui-donut-Dj37tKw3.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-B8HXkrQY.js → vue-ui-donut-evolution-BUfkTz0e.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BJv9WfCY.cjs → vue-ui-donut-evolution-i1mnDbEF.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-W6qsJcrI.cjs → vue-ui-dumbbell-BRUIB_6C.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B8JLe4Rx.js → vue-ui-dumbbell-DhJADY6g.js} +10 -10
- package/dist/{vue-ui-flow-BaGjUUsp.cjs → vue-ui-flow-Blm_8Qvt.cjs} +1 -1
- package/dist/{vue-ui-flow-XQRrGPwP.js → vue-ui-flow-kshJA6fg.js} +9 -9
- package/dist/{vue-ui-galaxy-Dll7-xmx.cjs → vue-ui-galaxy-BD4b4UPK.cjs} +1 -1
- package/dist/{vue-ui-galaxy-C860KoXR.js → vue-ui-galaxy-CRympGmo.js} +11 -11
- package/dist/{vue-ui-gauge-Cw6HxC9W.cjs → vue-ui-gauge-CctxHIyM.cjs} +1 -1
- package/dist/{vue-ui-gauge-CaM7KOxs.js → vue-ui-gauge-GhVHQWB5.js} +7 -7
- package/dist/{vue-ui-gizmo-CUsTgs2Y.js → vue-ui-gizmo-BmxuTH7g.js} +3 -3
- package/dist/{vue-ui-gizmo-9S26lSOK.cjs → vue-ui-gizmo-DtizFyAK.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BDBRTOtW.cjs → vue-ui-heatmap-C-sjrmzc.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C_2gDpgT.js → vue-ui-heatmap-DxRULRVw.js} +10 -10
- package/dist/{vue-ui-kpi-8TItSsJI.js → vue-ui-kpi-9gsCJSlL.js} +3 -3
- package/dist/{vue-ui-kpi-x5RLnUtN.cjs → vue-ui-kpi-ByeLCYYp.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-AZUp82dL.cjs → vue-ui-mini-loader--9CTs5gd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BeWlFItj.js → vue-ui-mini-loader-BoUDfasO.js} +2 -2
- package/dist/{vue-ui-molecule-tkmH5BKP.cjs → vue-ui-molecule-GiHkJdKW.cjs} +1 -1
- package/dist/{vue-ui-molecule-CJ_9xqd9.js → vue-ui-molecule-kL3t5Yhh.js} +11 -11
- package/dist/{vue-ui-mood-radar-Ck53yZA6.js → vue-ui-mood-radar-Btlxem3-.js} +11 -11
- package/dist/{vue-ui-mood-radar-C75OoHKh.cjs → vue-ui-mood-radar-hasGnJHW.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bpyw1aFZ.cjs → vue-ui-nested-donuts-A8iBv-cs.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B_S0s6fo.js → vue-ui-nested-donuts-BNHhURZB.js} +11 -11
- package/dist/{vue-ui-onion-DnLZsLDV.js → vue-ui-onion-BjT6FXBW.js} +11 -11
- package/dist/{vue-ui-onion-lMCndwqx.cjs → vue-ui-onion-CfvgXR20.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Cjr4ER1g.js → vue-ui-parallel-coordinate-plot-1gJHwi-G.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-CiuKqlpx.cjs → vue-ui-parallel-coordinate-plot-72ULVOQs.cjs} +1 -1
- package/dist/vue-ui-quadrant-BIReuPm7.cjs +1 -0
- package/dist/{vue-ui-quadrant-7ayR33KM.js → vue-ui-quadrant-sfyO2CyO.js} +130 -123
- package/dist/{vue-ui-quick-chart-CF5lJluJ.cjs → vue-ui-quick-chart-C-Z1DYoT.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C0jzFqV_.js → vue-ui-quick-chart-C-srQH9J.js} +9 -9
- package/dist/{vue-ui-radar-_wv53dRp.js → vue-ui-radar-BzC0VQbN.js} +12 -12
- package/dist/{vue-ui-radar-Dpfn4aPE.cjs → vue-ui-radar-MiFm7SRw.cjs} +1 -1
- package/dist/{vue-ui-rating-DW2tgPIX.cjs → vue-ui-rating-BuD7W04t.cjs} +1 -1
- package/dist/{vue-ui-rating-DQHUlrFb.js → vue-ui-rating-ki_gfG3m.js} +11 -11
- package/dist/{vue-ui-relation-circle-BMq4fJ88.cjs → vue-ui-relation-circle-B67IFMK8.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-79WZpSrS.js → vue-ui-relation-circle-BZMISq3F.js} +7 -7
- package/dist/{vue-ui-rings-BoTgy6Fr.cjs → vue-ui-rings-BUyJgRUc.cjs} +1 -1
- package/dist/{vue-ui-rings-BrCjSI5Z.js → vue-ui-rings-CfpBmZkF.js} +11 -11
- package/dist/{vue-ui-scatter-CBmiFQT9.js → vue-ui-scatter-BFs-7dvK.js} +131 -127
- package/dist/vue-ui-scatter-DMNVRT91.cjs +1 -0
- package/dist/{vue-ui-screenshot-Bq3qvacn.cjs → vue-ui-screenshot-BMSEKDz2.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BKOcxDB2.js → vue-ui-screenshot-Cauo4x1P.js} +1 -1
- package/dist/{vue-ui-skeleton-xn62L2MO.cjs → vue-ui-skeleton-BWO9iit6.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CjpLaxv-.js → vue-ui-skeleton-DptJx8-6.js} +20 -20
- package/dist/{vue-ui-smiley-D6aLE71R.js → vue-ui-smiley-Cg1vDE5p.js} +2 -2
- package/dist/{vue-ui-smiley-9H9LUASi.cjs → vue-ui-smiley-DEV_dsFD.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DFwmZlab.cjs +1 -0
- package/dist/vue-ui-spark-trend-DmponpJr.js +282 -0
- package/dist/{vue-ui-sparkbar-BzN6k1x-.js → vue-ui-sparkbar-D4dlelWC.js} +4 -4
- package/dist/{vue-ui-sparkbar-CyNsfVim.cjs → vue-ui-sparkbar-DvVvbi80.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Cze6RBhD.js → vue-ui-sparkgauge-C2VZgwK6.js} +4 -4
- package/dist/{vue-ui-sparkgauge-m2_6j81L.cjs → vue-ui-sparkgauge-CRydFcHZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CLsOngeA.cjs → vue-ui-sparkhistogram-C8R8LNDx.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B-v4hU6_.js → vue-ui-sparkhistogram-DsMLAwhW.js} +5 -5
- package/dist/vue-ui-sparkline-CjRhD9aT.cjs +1 -0
- package/dist/{vue-ui-sparkline-DLnP9odc.js → vue-ui-sparkline-D0tbUqaT.js} +134 -124
- package/dist/{vue-ui-sparkstackbar-BXP6IEtT.cjs → vue-ui-sparkstackbar-Mcu-MB5q.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-cDy_FCNx.js → vue-ui-sparkstackbar-oXLKSeVe.js} +5 -5
- package/dist/{vue-ui-stackbar-DrpNm-6r.cjs → vue-ui-stackbar-CLejMfqE.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CiqiPCPX.js → vue-ui-stackbar-JD5iEkUX.js} +12 -12
- package/dist/{vue-ui-strip-plot-DNo9nipS.cjs → vue-ui-strip-plot-DT_HJhrK.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-C-zS7o1M.js → vue-ui-strip-plot-ZLb1XbOJ.js} +11 -11
- package/dist/{vue-ui-table-D9aY6eJT.cjs → vue-ui-table-CATIqeAZ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-KxsHw3d3.cjs → vue-ui-table-heatmap-2xNfY1n-.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-zs6Z470G.js → vue-ui-table-heatmap-Bx0wx_p5.js} +21 -21
- package/dist/{vue-ui-table-EATZiVw7.js → vue-ui-table-i2KKmKxr.js} +10 -10
- package/dist/{vue-ui-table-sparkline-BNI0g8vI.js → vue-ui-table-sparkline-BJ1p4Emo.js} +16 -16
- package/dist/{vue-ui-table-sparkline-CKXBmV2x.cjs → vue-ui-table-sparkline-lIhP_jpT.cjs} +1 -1
- package/dist/{vue-ui-thermometer-B70IlU6G.cjs → vue-ui-thermometer-C5HlafWP.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DWYtuYTq.js → vue-ui-thermometer-Cpw1HsJj.js} +7 -7
- package/dist/{vue-ui-timer-DLobjqLZ.js → vue-ui-timer-BqlatBRs.js} +5 -5
- package/dist/{vue-ui-timer-Dimpnhrr.cjs → vue-ui-timer-DJ6Z60f7.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CehKPt9l.cjs → vue-ui-tiremarks-COUOuw47.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DHosMEnc.js → vue-ui-tiremarks-D-X3Nci7.js} +7 -7
- package/dist/{vue-ui-treemap-3zwGXPWM.js → vue-ui-treemap-Bt24Hk6i.js} +11 -11
- package/dist/{vue-ui-treemap-uxUzrgJw.cjs → vue-ui-treemap-x7BAU-Mj.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-UXCZ5jyu.js → vue-ui-vertical-bar-BwLl08U5.js} +11 -11
- package/dist/{vue-ui-vertical-bar-tljvI8ZD.cjs → vue-ui-vertical-bar-DLarr8xJ.cjs} +1 -1
- package/dist/{vue-ui-waffle-B5YJ2-qg.js → vue-ui-waffle-CL53rtX8.js} +11 -11
- package/dist/{vue-ui-waffle-BB0nwq8k.cjs → vue-ui-waffle-CUgTo43L.cjs} +1 -1
- package/dist/{vue-ui-wheel-Doj339q6.cjs → vue-ui-wheel-BNcFNmnp.cjs} +1 -1
- package/dist/{vue-ui-wheel-BNV-kvRK.js → vue-ui-wheel-Cnktsvs_.js} +7 -7
- package/dist/{vue-ui-word-cloud-DzlAcim2.js → vue-ui-word-cloud-CNq7Fs2o.js} +10 -10
- package/dist/{vue-ui-word-cloud-vEgW75C-.cjs → vue-ui-word-cloud-DMQf_Jlw.cjs} +1 -1
- package/dist/{vue-ui-xy-DcinX3ix.js → vue-ui-xy-D0CYaEFW.js} +269 -255
- package/dist/{vue-ui-xy-canvas-C5oFgOEO.js → vue-ui-xy-canvas-CBkXw173.js} +63 -60
- package/dist/vue-ui-xy-canvas-CzEUFhi7.cjs +9 -0
- package/dist/vue-ui-xy-dwJ4ji_y.cjs +3 -0
- package/package.json +1 -1
- package/dist/PackageVersion-DPna32U7.cjs +0 -1
- package/dist/index-CxfVE-zl.cjs +0 -9
- package/dist/vue-ui-quadrant-DDbKIPVl.cjs +0 -1
- package/dist/vue-ui-scatter-AgWOR5nX.cjs +0 -1
- package/dist/vue-ui-spark-trend-DhUNW1YZ.js +0 -272
- package/dist/vue-ui-spark-trend-KO9LcvA9.cjs +0 -1
- package/dist/vue-ui-sparkline--mWL3SLf.cjs +0 -1
- package/dist/vue-ui-xy-CpuHnuJR.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D665Zxts.cjs +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CxfVE-zl.cjs"),ke=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./Title-RGaMCxMM.cjs"),xe=require("./usePrinter-1WhDjgbn.cjs"),Ve=require("./Tooltip-DfxV57uu.cjs"),Ae=require("./Legend-DiLvq4vW.cjs"),be=require("./Shape-CLIJMoFo.cjs"),Te=require("./DataTable-8vTlt4e4.cjs"),Pe=require("./vue-ui-skeleton-xn62L2MO.cjs"),De=require("./vue-ui-accordion-Bwp3om8n.cjs"),Be=require("./useNestedProp-DxRaQ3VM.cjs"),Fe=require("./PackageVersion-DPna32U7.cjs"),Oe=require("./PenAndPaper-bKJD5B9n.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["id"],Ie=["xmlns","viewBox"],Xe={key:0},Ye=["x1","x2","y1","y2","stroke","stroke-width"],je=["x1","x2","y1","y2","stroke","stroke-width"],Re={key:1},Ge=["points","fill","stroke-width","stroke-dasharray","stroke"],Ue={key:0},He=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Je={key:1},Ke={key:2},Qe=["id"],Ze=["stop-color"],et=["stop-color"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot=["x","y","width","height","fill","stroke","stroke-width","rx"],st=["x","y","height","width","fill","stroke","stroke-width","rx"],rt={key:0},nt=["d","stroke","stroke-width"],ut=["d","stroke","stroke-width"],it=["d","stroke","stroke-width"],ct=["d","stroke","stroke-width"],yt={key:3,style:{"pointer-events":"none !important"}},vt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],dt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],pt=["x","y","font-size","fill","font-weight","text-anchor"],ht=["x","y","font-size","fill","font-weight"],ft=["cx","cy","r","fill","stroke","stroke-width"],mt=["cx","cy","r","fill","stroke","stroke-width"],gt=["x","y","font-size","fill","font-weight","text-anchor"],kt={key:4},xt=["x","y","font-size","fill"],bt=["x","y","font-size","fill"],Bt=["id","transform","font-size","font-weight","fill"],wt={key:5},_t=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],Nt=["font-size","font-weight","fill","x","y"],St=["id"],Mt=["x","y","width","height"],$t={key:6},Et=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],Lt=["x","y","fill","font-size","font-weight"],zt={key:5,class:"vue-data-ui-watermark"},Vt=["onClick"],At={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},Tt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},Pt={key:0},Dt=["innerHTML"],Ft={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(we,{expose:_e}){const C=we,{vue_ui_scatter:Ce}=s.useConfig(),P=e.computed(()=>!!C.dataset&&C.dataset.length),g=e.ref(s.createUid()),Ne=e.ref(null),I=e.ref(!1),X=e.ref(""),J=e.ref(0),V=e.ref(null),K=e.ref(null),Q=e.ref(null),Z=e.ref(null),ee=e.ref(null),te=e.ref(0),le=e.ref(0),ae=e.ref(0),t=e.computed({get:()=>oe(),set:a=>a});function oe(){const a=Be.useNestedProp({userConfig:C.config,defaultConfig:Ce});return a.theme?{...Be.useNestedProp({userConfig:s.themes.vue_ui_scatter[a.theme]||C.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>C.config,a=>{t.value=oe(),se(),te.value+=1,le.value+=1,ae.value+=1},{deep:!0});const D=e.ref(null);e.onMounted(()=>{se()});function se(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=ke.throttle(()=>{const{width:u,height:l}=ke.useResponsive({chart:V.value,title:t.value.style.title.text?K.value:null,legend:t.value.style.legend.show?Q.value:null,source:Z.value,noTitle:ee.value});k.value.width=u,k.value.height=l});D.value=new ResizeObserver(a),D.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const{isPrinting:re,isImaging:ne,generatePdf:ue,generateImage:ie}=xe.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),ce=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{s.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(A=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${A}`,index:`${i} - ${E}`})})})});const a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:r}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),$=e.computed(()=>C.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:ce.value[u]||s.palette[u]||s.palette[u%s.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>he(l),isSegregated:p.value.includes(l)}})),Me=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),Y=e.computed(()=>$.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:ce.value[u]||s.palette[u]||s.palette[u%s.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>Y.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let r=0,o=0,i=0;for(const d of a.plots)r+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=r/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),A=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+A,y2:E*n.value.right+A,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),B=_.y1-m*_.x1,N=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-B)/m)),q={x:N,y:m*N+B<=t.value.style.layout.padding.top?n.value.top:m*N+B};return{...a,correlation:_,label:q,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*B)/(1+Math.pow(m,2)),G=(m*d.x+Math.pow(m,2)*d.y+B)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-G,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),ye=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function $e(){return x.value}function ve(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let r=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{r=Math.min(r,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-r,A=h-i,_=E/u,m=A/u,B=Array(u).fill(0),N=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const U=Math.floor((f-r)/_),H=Math.floor((z-i)/m);B[U]||(B[U]=0),N[H]||(N[H]=0),B[U]+=1,N[H]+=1});const q=[],d=[];for(let f=0;f<u;f+=1)q.push(r+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...B),G=Math.max(...N);return{x:B,y:N,avgX:q,avgY:d,maxX:L,maxY:G}}const M=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ve(Y.value,M.value)),Ee=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return Y.value.map(l=>{const r=ve(l,M.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:a-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPathVertical(r.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:l.color,id:l.id}})}),w=e.ref(void 0),c=e.ref(null),j=e.ref(null);function de(a,u){w.value=a.id,c.value=a;let l="";j.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?X.value=r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",X.value=`<div>${l}</div>`),I.value=!0}function pe(){I.value=!1,w.value=void 0,c.value=null}const p=e.ref([]);function he(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<C.dataset.length-1&&p.value.push(a)}function fe(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),r=s.createCsvContent(l);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const O=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),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{head:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function Le(a){T.value=a,J.value+=1}function me(){S.value.showTable=!S.value.showTable}function ge(){S.value.showTooltip=!S.value.showTooltip}const W=e.ref(!1);function R(){W.value=!W.value}return _e({getData:$e,generatePdf:ue,generateCsv:fe,generateImage:ie,toggleTable:me,toggleTooltip:ge,toggleAnnotator:R}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:V,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Oe.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:W.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ee,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:K,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${te.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value?(e.openBlock(),e.createBlock(xe.UserOptions,{ref_key:"details",ref:Ne,key:`user_options_${J.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ne),isPrinting:e.unref(re),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:S.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:W.value,onToggleFullscreen:Le,onGeneratePdf:e.unref(ue),onGenerateCsv:fe,onGenerateImage:e.unref(ie),onToggleTable:me,onToggleTooltip:ge,onToggleAnnotator:R},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ye),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,je)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:l.plots}),fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ge)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:w.value&&w.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>de(o,r),onMouseleave:pe,style:e.normalizeStyle(`opacity:${w.value&&w.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ye.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,He))),256))])):(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(be._sfc_main,{plot:{x:o.x,y:o.y},radius:w.value&&w.value===o.id?o.weight*2:o.weight,shape:l.shape,color:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>de(o,r),onMouseleave:pe,style:e.normalizeStyle(`opacity:${w.value&&w.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ye.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Ze),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,et)],8,Qe),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,at)],8,tt)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-n.value.width/M.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/M.value<=0?1e-4:n.value.width/M.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,ot)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-n.value.height/M.value/2,height:n.value.height/M.value<=0?1e-4:n.value.height/M.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,st)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,nt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ut)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,it)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,ct))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,vt),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,dt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,pt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,ht),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,ft),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,mt),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,gt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",kt,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,xt),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,bt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,Bt)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",wt,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,_t),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,Ct),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,Nt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,Mt)],8,St),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,Et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(l.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,Lt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",zt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(re)||e.unref(ne)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:6,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Q},[t.value.style.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${ae.value}`,legendSet:$.value,config:Me.value,onClickMarker:u[0]||(u[0]=({legend:l})=>he(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:r=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Vt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:Z,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ve._sfc_main,{show:S.value.showTooltip&&I.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:V.value,content:X.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",At,[(e.openBlock(),e.createElementBlock("svg",Tt,[e.createVNode(be._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),P.value?(e.openBlock(),e.createBlock(De.default,{key:8,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${le.value}`,colNames:O.value.colNames,head:O.value.head,body:O.value.body,config:O.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[1]||(u[1]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",Pt,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Dt))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,qe))}},Ot=We._export_sfc(Ft,[["__scopeId","data-v-d7fbb313"]]);exports.default=Ot;
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { computed as u, ref as g, watch as V, onMounted as Z, openBlock as s, createElementBlock as r, normalizeStyle as H, createBlock as C, unref as c, createVNode as J, createElementVNode as k, createCommentVNode as d, toDisplayString as B, renderSlot as K } from "vue";
|
|
2
|
-
import { u as Q, c as Y, t as ee, o as te, e as ae, v as y, W as le, X as ne, s as z, R as D, f as E, i as oe } from "./index-CRiXU5u4.js";
|
|
3
|
-
import { u as G } from "./useNestedProp-CJpdmtwu.js";
|
|
4
|
-
import S from "./BaseIcon-BFZiytmY.js";
|
|
5
|
-
import se from "./vue-ui-skeleton-CjpLaxv-.js";
|
|
6
|
-
import { _ as ue } from "./PackageVersion-CTpPwNFg.js";
|
|
7
|
-
import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const ie = ["id"], de = ["xmlns", "viewBox"], ve = ["id"], ce = ["stop-color"], ye = ["stop-color"], he = { key: 0 }, fe = ["d", "fill"], pe = ["d", "fill"], me = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ge = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ke = ["height", "width", "x"], _e = { style: { width: "100%" } }, be = ["x", "y", "fill", "font-size", "font-weight"], xe = ["stroke", "cx", "cy", "fill"], we = ["x", "y", "font-size", "fill", "font-weight"], Ce = {
|
|
9
|
-
key: 2,
|
|
10
|
-
ref: "source",
|
|
11
|
-
dir: "auto"
|
|
12
|
-
}, Le = {
|
|
13
|
-
__name: "vue-ui-spark-trend",
|
|
14
|
-
props: {
|
|
15
|
-
config: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default() {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
dataset: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default() {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
setup(O) {
|
|
29
|
-
const n = O, { vue_ui_spark_trend: U } = Q(), W = u(() => !!n.dataset && n.dataset.length), _ = g(Y()), e = u({
|
|
30
|
-
get: () => M(),
|
|
31
|
-
set: (t) => t
|
|
32
|
-
});
|
|
33
|
-
function M() {
|
|
34
|
-
const t = G({
|
|
35
|
-
userConfig: n.config,
|
|
36
|
-
defaultConfig: U
|
|
37
|
-
});
|
|
38
|
-
return t.theme ? {
|
|
39
|
-
...G({
|
|
40
|
-
userConfig: ee.vue_ui_spark_trend[t.theme] || n.config,
|
|
41
|
-
defaultConfig: t
|
|
42
|
-
})
|
|
43
|
-
} : t;
|
|
44
|
-
}
|
|
45
|
-
V(() => n.config, (t) => {
|
|
46
|
-
e.value = M(), I();
|
|
47
|
-
}, { deep: !0 }), V(() => n.dataset, (t) => {
|
|
48
|
-
p.value = n.dataset.map((l) => [void 0, 1 / 0, -1 / 0, null, NaN].includes(l) ? null : l);
|
|
49
|
-
}, { deep: !0 });
|
|
50
|
-
function L(t) {
|
|
51
|
-
return t.map((l) => y(l));
|
|
52
|
-
}
|
|
53
|
-
const p = g(n.dataset.map((t) => e.value.style.animation.show || [void 0, 1 / 0, -1 / 0, null, NaN].includes(t) ? null : t)), m = g(!1), $ = g(null);
|
|
54
|
-
Z(() => {
|
|
55
|
-
I();
|
|
56
|
-
let l = 1e3 / e.value.style.animation.animationFrames, v = performance.now();
|
|
57
|
-
if (e.value.style.animation.show && e.value.style.animation.animationFrames && n.dataset.length > 1) {
|
|
58
|
-
let T = function() {
|
|
59
|
-
m.value = !0;
|
|
60
|
-
let j = performance.now(), A = j - v;
|
|
61
|
-
A > l ? (v = j - A % l, f < n.dataset.length ? (p.value.push(n.dataset[f]), f += 1, $.value = requestAnimationFrame(T)) : (cancelAnimationFrame($.value), p.value = L(n.dataset), m.value = !1)) : $.value = requestAnimationFrame(T);
|
|
62
|
-
};
|
|
63
|
-
p.value = [];
|
|
64
|
-
let f = 0;
|
|
65
|
-
T();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
function I() {
|
|
69
|
-
te(n.dataset) && ae({
|
|
70
|
-
componentName: "VueUiSparkTrend",
|
|
71
|
-
type: "dataset"
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
const o = g({
|
|
75
|
-
height: 80,
|
|
76
|
-
width: 300
|
|
77
|
-
}), h = u(() => ({
|
|
78
|
-
top: e.value.style.padding.top,
|
|
79
|
-
left: e.value.style.padding.left,
|
|
80
|
-
right: o.value.width - e.value.style.padding.right,
|
|
81
|
-
bottom: o.value.height - e.value.style.padding.bottom,
|
|
82
|
-
height: o.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
|
|
83
|
-
width: o.value.width - (e.value.style.padding.left + e.value.style.padding.right)
|
|
84
|
-
})), N = u(() => {
|
|
85
|
-
const t = L(n.dataset);
|
|
86
|
-
return {
|
|
87
|
-
max: Math.max(...t.map((l) => y(l))),
|
|
88
|
-
min: Math.min(...t.map((l) => y(l)))
|
|
89
|
-
};
|
|
90
|
-
}), b = u(() => {
|
|
91
|
-
const t = N.value.min >= 0 ? 0 : N.value.min;
|
|
92
|
-
return Math.abs(t);
|
|
93
|
-
}), q = u(() => N.value.max + b.value);
|
|
94
|
-
function F(t) {
|
|
95
|
-
return t / q.value;
|
|
96
|
-
}
|
|
97
|
-
const P = u(() => n.dataset.length), a = u(() => p.value.map((t, l) => {
|
|
98
|
-
const v = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
|
|
99
|
-
return {
|
|
100
|
-
value: y(t),
|
|
101
|
-
absoluteValue: y(v),
|
|
102
|
-
plotValue: y(v + b.value),
|
|
103
|
-
toMax: F(v + b.value),
|
|
104
|
-
x: h.value.left + y(l * (h.value.width / (P.value - 1))) - e.value.style.padding.right,
|
|
105
|
-
y: h.value.bottom - y(h.value.height * F(v + b.value))
|
|
106
|
-
};
|
|
107
|
-
})), x = u(() => {
|
|
108
|
-
const t = L(n.dataset);
|
|
109
|
-
return e.value.style.trendLabel.trendType === "global" ? le(t) : e.value.style.trendLabel.trendType === "n-1" && t.length > 1 ? (t.at(-1) / t.at(-2) - 1) * 100 : e.value.style.trendLabel.trendType === "lastToFirst" ? (t.at(-1) / t[0] - 1) * 100 : 0;
|
|
110
|
-
}), w = u(() => m.value || x.value === 0 ? "neutral" : x.value > 0 ? "positive" : "negative"), i = u(() => e.value.style.arrow.colors[w.value]), R = u(() => {
|
|
111
|
-
const t = { x: a.value[0].x, y: o.value.height - 6 }, l = { x: a.value[a.value.length - 1].x, y: o.value.height - 6 }, v = [];
|
|
112
|
-
return a.value.forEach((f) => {
|
|
113
|
-
v.push(`${f.x},${f.y} `);
|
|
114
|
-
}), [t.x, t.y, ...v, l.x, l.y].toString();
|
|
115
|
-
}), X = u(() => {
|
|
116
|
-
let t = [];
|
|
117
|
-
return a.value.forEach((l) => {
|
|
118
|
-
t.push(`${l.x},${l.y} `);
|
|
119
|
-
}), `M ${t.toString()}`;
|
|
120
|
-
});
|
|
121
|
-
return (t, l) => (s(), r("div", {
|
|
122
|
-
class: "vue-ui-spark-trend",
|
|
123
|
-
id: _.value,
|
|
124
|
-
style: H(`width:100%;font-family:${e.value.style.fontFamily};background:${e.value.style.backgroundColor}`)
|
|
125
|
-
}, [
|
|
126
|
-
W.value ? (s(), r("svg", {
|
|
127
|
-
key: 1,
|
|
128
|
-
xmlns: c(ne),
|
|
129
|
-
viewBox: `0 0 ${o.value.width} ${o.value.height}`,
|
|
130
|
-
style: "width:100%;background:transparent;overflow:visible"
|
|
131
|
-
}, [
|
|
132
|
-
J(ue),
|
|
133
|
-
k("defs", null, [
|
|
134
|
-
k("linearGradient", {
|
|
135
|
-
x1: "0%",
|
|
136
|
-
y1: "0%",
|
|
137
|
-
x2: "0%",
|
|
138
|
-
y2: "100%",
|
|
139
|
-
id: `pill_gradient_${_.value}`
|
|
140
|
-
}, [
|
|
141
|
-
k("stop", {
|
|
142
|
-
offset: "0%",
|
|
143
|
-
"stop-color": c(z)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity)
|
|
144
|
-
}, null, 8, ce),
|
|
145
|
-
k("stop", {
|
|
146
|
-
offset: "100%",
|
|
147
|
-
"stop-color": e.value.style.backgroundColor
|
|
148
|
-
}, null, 8, ye)
|
|
149
|
-
], 8, ve)
|
|
150
|
-
]),
|
|
151
|
-
e.value.style.area.show && a.value[0] ? (s(), r("g", he, [
|
|
152
|
-
e.value.style.line.smooth ? (s(), r("path", {
|
|
153
|
-
key: 0,
|
|
154
|
-
d: `M ${a.value[0].x},${h.value.bottom} ${c(D)(a.value)} L ${a.value.at(-1).x},${h.value.bottom} Z`,
|
|
155
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${_.value})` : c(z)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
156
|
-
stroke: "none"
|
|
157
|
-
}, null, 8, fe)) : (s(), r("path", {
|
|
158
|
-
key: 1,
|
|
159
|
-
d: `M${R.value}Z`,
|
|
160
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${_.value})` : c(z)(e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke, e.value.style.area.opacity),
|
|
161
|
-
stroke: "none"
|
|
162
|
-
}, null, 8, pe))
|
|
163
|
-
])) : d("", !0),
|
|
164
|
-
e.value.style.line.smooth && a.value.length ? (s(), r("path", {
|
|
165
|
-
key: 1,
|
|
166
|
-
d: `M ${c(D)(a.value)}`,
|
|
167
|
-
stroke: e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke,
|
|
168
|
-
fill: "none",
|
|
169
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
170
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
171
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
172
|
-
}, null, 8, me)) : d("", !0),
|
|
173
|
-
!e.value.style.line.smooth && a.value.length ? (s(), r("path", {
|
|
174
|
-
key: 2,
|
|
175
|
-
d: X.value,
|
|
176
|
-
stroke: e.value.style.line.useColorTrend ? i.value : e.value.style.line.stroke,
|
|
177
|
-
fill: "none",
|
|
178
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
179
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
180
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
181
|
-
}, null, 8, ge)) : d("", !0),
|
|
182
|
-
m.value ? d("", !0) : (s(), r("foreignObject", {
|
|
183
|
-
key: 3,
|
|
184
|
-
height: o.value.height / 2,
|
|
185
|
-
width: o.value.height / 2,
|
|
186
|
-
x: o.value.height / 5,
|
|
187
|
-
y: 8
|
|
188
|
-
}, [
|
|
189
|
-
k("div", _e, [
|
|
190
|
-
w.value === "positive" ? (s(), C(S, {
|
|
191
|
-
key: 0,
|
|
192
|
-
stroke: i.value,
|
|
193
|
-
name: "arrowTop",
|
|
194
|
-
size: o.value.height / 2
|
|
195
|
-
}, null, 8, ["stroke", "size"])) : d("", !0),
|
|
196
|
-
w.value === "negative" ? (s(), C(S, {
|
|
197
|
-
key: 1,
|
|
198
|
-
stroke: i.value,
|
|
199
|
-
name: "arrowBottom",
|
|
200
|
-
size: o.value.height / 2
|
|
201
|
-
}, null, 8, ["stroke", "size"])) : d("", !0),
|
|
202
|
-
w.value === "neutral" ? (s(), C(S, {
|
|
203
|
-
key: 2,
|
|
204
|
-
stroke: i.value,
|
|
205
|
-
name: "arrowRight",
|
|
206
|
-
size: o.value.height / 2
|
|
207
|
-
}, null, 8, ["stroke", "size"])) : d("", !0)
|
|
208
|
-
])
|
|
209
|
-
], 8, ke)),
|
|
210
|
-
m.value ? d("", !0) : (s(), r("text", {
|
|
211
|
-
key: 4,
|
|
212
|
-
x: o.value.height / 2 - o.value.height / 20,
|
|
213
|
-
y: h.value.bottom,
|
|
214
|
-
"text-anchor": "middle",
|
|
215
|
-
fill: e.value.style.trendLabel.useColorTrend ? i.value : e.value.style.trendLabel.color,
|
|
216
|
-
"font-size": e.value.style.trendLabel.fontSize,
|
|
217
|
-
"font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
|
|
218
|
-
}, B(c(E)({
|
|
219
|
-
p: x.value > 0 ? "+" : "",
|
|
220
|
-
v: x.value,
|
|
221
|
-
s: "%",
|
|
222
|
-
r: e.value.style.trendLabel.rounding
|
|
223
|
-
})), 9, be)),
|
|
224
|
-
a.value.length && a.value.at(-1).x !== void 0 ? (s(), r("circle", {
|
|
225
|
-
key: 5,
|
|
226
|
-
stroke: e.value.style.backgroundColor,
|
|
227
|
-
"stroke-width": 2,
|
|
228
|
-
cx: a.value.at(-1).x,
|
|
229
|
-
cy: a.value.at(-1).y,
|
|
230
|
-
r: 4,
|
|
231
|
-
fill: i.value
|
|
232
|
-
}, null, 8, xe)) : d("", !0),
|
|
233
|
-
a.value.length && a.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (s(), r("text", {
|
|
234
|
-
key: 6,
|
|
235
|
-
"text-anchor": "middle",
|
|
236
|
-
x: a.value.at(-1).x,
|
|
237
|
-
y: a.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
|
|
238
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
239
|
-
fill: e.value.style.dataLabel.useColorTrend ? i.value : e.value.style.dataLabel.color,
|
|
240
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
241
|
-
}, B(c(oe)(
|
|
242
|
-
e.value.style.dataLabel.formatter,
|
|
243
|
-
a.value.at(-1).value,
|
|
244
|
-
c(E)({
|
|
245
|
-
p: e.value.style.dataLabel.prefix,
|
|
246
|
-
v: a.value.at(-1).value,
|
|
247
|
-
s: e.value.style.dataLabel.suffix,
|
|
248
|
-
r: e.value.style.dataLabel.rounding
|
|
249
|
-
}),
|
|
250
|
-
{ datapoint: a.value.at(-1) }
|
|
251
|
-
)), 9, we)) : d("", !0)
|
|
252
|
-
], 8, de)) : (s(), C(se, {
|
|
253
|
-
key: 0,
|
|
254
|
-
config: {
|
|
255
|
-
type: "sparkline",
|
|
256
|
-
style: {
|
|
257
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
258
|
-
sparkline: {
|
|
259
|
-
color: "#CCCCCC"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}, null, 8, ["config"])),
|
|
264
|
-
t.$slots.source ? (s(), r("div", Ce, [
|
|
265
|
-
K(t.$slots, "source", {}, void 0, !0)
|
|
266
|
-
], 512)) : d("", !0)
|
|
267
|
-
], 12, ie));
|
|
268
|
-
}
|
|
269
|
-
}, Fe = /* @__PURE__ */ re(Le, [["__scopeId", "data-v-96c5087f"]]);
|
|
270
|
-
export {
|
|
271
|
-
Fe as default
|
|
272
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CxfVE-zl.cjs"),V=require("./useNestedProp-DxRaQ3VM.cjs"),N=require("./BaseIcon-P668oVRL.cjs"),F=require("./vue-ui-skeleton-xn62L2MO.cjs"),j=require("./PackageVersion-DPna32U7.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=["id"],O=["xmlns","viewBox"],D=["id"],P=["stop-color"],G=["stop-color"],U={key:0},W=["d","fill"],Z=["d","fill"],H=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],R=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],X=["height","width","x"],J={style:{width:"100%"}},K=["x","y","fill","font-size","font-weight"],Q=["stroke","cx","cy","fill"],Y=["x","y","font-size","fill","font-weight"],ee={key:2,ref:"source",dir:"auto"},te={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(E){const r=E,{vue_ui_spark_trend:$}=o.useConfig(),S=e.computed(()=>!!r.dataset&&r.dataset.length),p=e.ref(o.createUid()),t=e.computed({get:()=>x(),set:l=>l});function x(){const l=V.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l}e.watch(()=>r.config,l=>{t.value=x(),C()},{deep:!0}),e.watch(()=>r.dataset,l=>{v.value=r.dataset.map(n=>[void 0,1/0,-1/0,null,NaN].includes(n)?null:n)},{deep:!0});function k(l){return l.map(n=>o.checkNaN(n))}const v=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0,1/0,-1/0,null,NaN].includes(l)?null:l)),h=e.ref(!1),g=e.ref(null);e.onMounted(()=>{C();let n=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){h.value=!0;let B=performance.now(),L=B-i;L>n?(i=B-L%n,d<r.dataset.length?(v.value.push(r.dataset[d]),d+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),v.value=k(r.dataset),h.value=!1)):g.value=requestAnimationFrame(b)};v.value=[];let d=0;b()}});function C(){o.objectIsEmpty(r.dataset)&&o.error({componentName:"VueUiSparkTrend",type:"dataset"})}const u=e.ref({height:80,width:300}),c=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:u.value.width-t.value.style.padding.right,bottom:u.value.height-t.value.style.padding.bottom,height:u.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:u.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l.map(n=>o.checkNaN(n))),min:Math.min(...l.map(n=>o.checkNaN(n)))}}),y=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),T=e.computed(()=>_.value.max+y.value);function w(l){return l/T.value}const z=e.computed(()=>r.dataset.length),a=e.computed(()=>v.value.map((l,n)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:o.checkNaN(l),absoluteValue:o.checkNaN(i),plotValue:o.checkNaN(i+y.value),toMax:w(i+y.value),x:c.value.left+o.checkNaN(n*(c.value.width/(z.value-1)))-t.value.style.padding.right,y:c.value.bottom-o.checkNaN(c.value.height*w(i+y.value))}})),f=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?o.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),m=e.computed(()=>h.value||f.value===0?"neutral":f.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[m.value]),M=e.computed(()=>{const l={x:a.value[0].x,y:u.value.height-6},n={x:a.value[a.value.length-1].x,y:u.value.height-6},i=[];return a.value.forEach(d=>{i.push(`${d.x},${d.y} `)}),[l.x,l.y,...i,n.x,n.y].toString()}),I=e.computed(()=>{let l=[];return a.value.forEach(n=>{l.push(`${n.x},${n.y} `)}),`M ${l.toString()}`});return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:p.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor}`)},[S.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"width:100%;background:transparent;overflow:visible"},[e.createVNode(j._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${p.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity)},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,G)],8,D)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",U,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${c.value.bottom} ${e.unref(o.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${c.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(o.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,W)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${M.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${p.value})`:e.unref(o.setOpacity)(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,t.value.style.area.opacity),stroke:"none"},null,8,Z))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(o.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,H)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:I.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,R)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:u.value.height/2,width:u.value.height/2,x:u.value.height/5,y:8},[e.createElementVNode("div",J,[m.value==="positive"?(e.openBlock(),e.createBlock(N.default,{key:0,stroke:s.value,name:"arrowTop",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="negative"?(e.openBlock(),e.createBlock(N.default,{key:1,stroke:s.value,name:"arrowBottom",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),m.value==="neutral"?(e.openBlock(),e.createBlock(N.default,{key:2,stroke:s.value,name:"arrowRight",size:u.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,X)),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:u.value.height/2-u.value.height/20,y:c.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(o.dataLabel)({p:f.value>0?"+":"",v:f.value,s:"%",r:t.value.style.trendLabel.rounding})),9,K)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,Q)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(o.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,Y)):e.createCommentVNode("",!0)],8,O)):(e.openBlock(),e.createBlock(F.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"])),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],12,A))}},le=q._export_sfc(te,[["__scopeId","data-v-96c5087f"]]);exports.default=le;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CxfVE-zl.cjs"),S=require("./useNestedProp-DxRaQ3VM.cjs"),G=require("./vue-ui-skeleton-xn62L2MO.cjs"),M=require("./useResponsive-BJ7DTGpm.cjs"),j=require("./PackageVersion-DPna32U7.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],U=["xmlns","viewBox"],X=["id"],Z=["stop-color"],Y=["stop-color"],J=["id"],K=["stop-color"],Q=["stop-color"],ee=["id"],te=["stop-color"],le=["stop-color"],ae={key:0},oe=["d","fill"],ne=["d","fill"],ue=["d","stroke","stroke-width"],re=["x1","x2","y1","y2","stroke","stroke-width"],se=["x","y","width","height","fill","rx"],ie=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],de=["x1","x2","y1","y2","stroke","stroke-dasharray","stroke-width"],ce=["cx","cy","r","fill","stroke","stroke-width"],ve=["x","y","font-size","font-weight","fill"],he=["x","y","height","width","onMouseenter","onClick"],ye={__name:"vue-ui-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},showInfo:{type:Boolean,default:!0},selectedIndex:{type:Number,default:void 0}},emits:["hoverIndex","selectDatapoint"],setup(f,{emit:_}){const i=f,{vue_ui_sparkline:z}=u.useConfig(),g=e.computed(()=>!!i.dataset&&i.dataset.length),v=e.ref(u.createUid()),x=e.ref(null),B=e.ref(null),L=e.ref(null),t=e.computed({get:()=>C(),set:l=>l});function C(){const l=S.useNestedProp({userConfig:i.config,defaultConfig:z});return l.theme?{...S.useNestedProp({userConfig:u.themes.vue_ui_sparkline[l.theme]||i.config,defaultConfig:l})}:l}e.watch(()=>i.config,l=>{t.value=C(),E(),o.value.chartWidth=t.value.style.chartWidth},{deep:!0}),e.watch(()=>i.dataset,l=>{p.value=i.dataset.map(n=>({...n,value:[void 0].includes(n.value)?null:n.value}))},{deep:!0});const p=e.ref(P());function P(){return i.dataset.map(l=>t.value.style.animation.show?{...l,value:null}:{...l,value:[void 0].includes(l.value)?null:l.value})}const V=e.ref(null);e.onMounted(()=>{if(E(),t.value.style.animation.show&&i.dataset.length>1){let a=function(){n<i.dataset.length?(p.value.push(i.dataset[n]),setTimeout(()=>{requestAnimationFrame(a)},l)):p.value=i.dataset,n+=1};p.value=[];const l=t.value.style.animation.animationFrames/i.dataset.length;let n=0;a()}});function E(){if(u.objectIsEmpty(i.dataset)?u.error({componentName:"VueUiSparkline",type:"dataset"}):i.dataset.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["period","value"]}).forEach(a=>{u.error({componentName:"VueUiSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.responsive){const l=M.throttle(()=>{const{width:n,height:a}=M.useResponsive({chart:x.value,title:t.value.style.title.show&&i.showInfo?B.value:null,source:L.value});o.value.width=n,o.value.height=a,o.value.chartWidth=t.value.style.chartWidth/500*n,o.value.padding=.06*n});V.value=new ResizeObserver(l),V.value.observe(x.value.parentNode)}}const o=e.ref({height:80,width:500,chartWidth:t.value.style.chartWidth,padding:30}),D=e.ref(6),r=e.computed(()=>({top:12,left:0,right:o.value.width,bottom:o.value.height-3,start:i.showInfo&&t.value.style.dataLabel.show&&t.value.style.dataLabel.position==="left"?o.value.width-o.value.chartWidth:o.value.padding,width:i.showInfo&&t.value.style.dataLabel.show?o.value.chartWidth:o.value.width-o.value.padding,height:o.value.height-12})),w=e.computed(()=>Math.min(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),W=e.computed(()=>Math.max(...p.value.map(l=>isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0))),m=e.computed(()=>{const l=w.value>=0?0:w.value;return Math.abs(l)}),A=e.computed(()=>W.value+m.value+D.value),b=e.computed(()=>r.value.bottom-r.value.height*N(m.value));function N(l){return l/A.value}const h=e.computed(()=>i.dataset.length-1),s=e.computed(()=>p.value.map((l,n)=>{const a=isNaN(l.value)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l.value)?0:l.value||0;return{absoluteValue:a,period:l.period,plotValue:a+m.value,toMax:N(a+m.value),x:r.value.start+n*(r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)),y:r.value.bottom-r.value.height*N(a+m.value),id:`plot_${v.value}_${n}`,color:k.value?t.value.style.bar.color:t.value.style.area.useGradient?u.shiftHue(t.value.style.line.color,.05*(1-n/h.value)):t.value.style.line.color,width:r.value.width/(h.value+1)>o.padding?o.padding:r.value.width/(h.value+1)}})),O=e.computed(()=>{const l={x:s.value[0].x,y:o.value.height-6},n={x:s.value[s.value.length-1].x,y:o.value.height-6},a=[];return s.value.forEach(d=>{a.push(`${d.x},${d.y} `)}),[l.x,l.y,...a,n.x,n.y].toString()}),c=e.ref(void 0);function F(l,n){c.value=l,_("hoverIndex",{index:n})}function q(){c.value=void 0,_("hoverIndex",{index:void 0})}const y=e.computed(()=>{if(g.value){const l=s.value.map(a=>a.absoluteValue),n=l.reduce((a,d)=>a+d,0);return{latest:s.value[s.value.length-1].absoluteValue,sum:n,average:n/s.value.length,median:u.calcMedian(l),trend:u.calcLinearProgression(s.value.map(({x:a,y:d,absoluteValue:I})=>({x:a,y:d,value:I}))).trend}}else return{latest:null,sum:null,average:null,median:null,trend:null}}),$=e.computed(()=>g.value?t.value.style.dataLabel.valueType==="latest"?y.value.latest:t.value.style.dataLabel.valueType==="sum"?y.value.sum:t.value.style.dataLabel.valueType==="average"?y.value.average:0:0),k=e.computed(()=>t.value.type&&t.value.type==="bar");function T(l,n){_("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"sparklineChart",ref:x,class:"vue-ui-sparkline",id:v.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily}`)},[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps({selected:c.value,latest:y.value.latest,sum:y.value.sum,average:y.value.average,median:y.value.median,trend:y.value.trend})),void 0,!0),t.value.style.title.show&&f.showInfo?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,class:"vue-ui-sparkline-title",style:e.normalizeStyle(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign==="left"?"flex-start":t.value.style.title.textAlign==="right"?"flex-end":"center"};height:${t.value.style.title.fontSize*2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold?"bold":"normal"};`)},[e.createElementVNode("span",{style:e.normalizeStyle(`padding:${t.value.style.title.textAlign==="left"?"0 0 0 12px":t.value.style.title.textAlign==="right"?"0 12px 0 0":"0"}`)},e.toDisplayString(c.value?c.value.period:t.value.style.title.text),5)],4)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};overflow:visible`)},[e.createVNode(j._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkline_gradient_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(t.value.style.area.color,.05),t.value.style.area.opacity)},null,8,Z),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,Y)],8,X),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_pos_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.bar.color},null,8,K),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(u.shiftHue)(t.value.style.bar.color,.05)},null,8,Q)],8,J),e.createElementVNode("linearGradient",{x2:"0%",y2:"100%",id:`sparkline_bar_gradient_neg_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.shiftHue)(t.value.style.bar.color,.05)},null,8,te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.bar.color},null,8,le)],8,ee)]),t.value.style.area.show&&!k.value&&s.value[0]?(e.openBlock(),e.createElementBlock("g",ae,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${s.value[0].x},${r.value.bottom} ${e.unref(u.createSmoothPath)(s.value)} L ${s.value.at(-1).x},${r.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,oe)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${O.value}Z`,fill:t.value.style.area.useGradient?`url(#sparkline_gradient_${v.value})`:e.unref(u.setOpacity)(t.value.style.area.color,t.value.style.area.opacity)},null,8,ne))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(u.createSmoothPath)(s.value)}`,stroke:t.value.style.line.color,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[d<s.value.length-1&&!t.value.style.line.smooth&&!k.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:s.value[d+1].x,y1:a.y,y2:s.value[d+1].y,stroke:a.color,"stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"geometricPrecision"},null,8,re)):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("rect",{key:1,x:a.x-a.width/2,y:a.absoluteValue>0?a.y:b.value,width:a.width,height:Math.abs(a.y-b.value),fill:a.absoluteValue>0?`url(#sparkline_bar_gradient_pos_${v.value})`:`url(#sparkline_bar_gradient_neg_${v.value})`,rx:t.value.style.bar.borderRadius},null,8,se)):e.createCommentVNode("",!0),t.value.style.verticalIndicator.show&&(c.value&&a.id===c.value.id||f.selectedIndex===d)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:a.x,x2:a.x,y1:r.value.top-6,y2:r.value.bottom,stroke:t.value.style.verticalIndicator.color||a.color,"stroke-width":t.value.style.verticalIndicator.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.verticalIndicator.strokeDasharray||0},null,8,ie)):e.createCommentVNode("",!0)]))),256)),w.value<0?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.start,x2:r.value.start+r.value.width-16,y1:b.value,y2:b.value,stroke:t.value.style.zeroLine.color,"stroke-dasharray":t.value.style.zeroLine.strokeWidth*2,"stroke-width":t.value.style.zeroLine.strokeWidth,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.plot.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("g",null,[c.value&&a.id===c.value.id||f.selectedIndex===d?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:a.x,cy:a.y,r:t.value.style.plot.radius,fill:a.color,stroke:t.value.style.plot.stroke,"stroke-width":t.value.style.plot.strokeWidth},null,8,ce)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),f.showInfo&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:t.value.style.dataLabel.position==="left"?12+t.value.style.dataLabel.offsetX:r.value.width+12+t.value.style.dataLabel.offsetX,y:o.value.height/2+t.value.style.dataLabel.fontSize/2.5+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,"font-weight":t.value.style.dataLabel.bold?"bold":"normal",fill:t.value.style.dataLabel.color},e.toDisplayString(c.value?e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,c.value.absoluteValue,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:c.value.absoluteValue,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}),{datapoint:c.value}):e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,$.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:$.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.roundingValue}))),9,ve)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,d)=>(e.openBlock(),e.createElementBlock("rect",{x:a.x-(r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1))/2,y:r.value.top-6,height:r.value.height+6,width:r.value.width/(h.value+1)>o.value.padding?o.value.padding:r.value.width/(h.value+1),fill:"transparent",onMouseenter:I=>F(a,d),onMouseleave:q,onClick:()=>T(a,d)},null,40,he))),256)),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],12,U)):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"source",ref:L,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(G.default,{key:3,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,H))}},pe=R._export_sfc(ye,[["__scopeId","data-v-afa97ea1"]]);exports.default=pe;
|