vue-data-ui 2.5.1 → 2.5.2
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-BYoqvFMN.cjs → Arrow-B6TKrox1.cjs} +1 -1
- package/dist/{Arrow-CNFYWYKd.js → Arrow-DWRIfIAk.js} +1 -1
- package/dist/{BaseIcon-WPy5Rb2H.cjs → BaseIcon-BdnE2DAH.cjs} +1 -1
- package/dist/{BaseIcon-CZ4uFxC7.js → BaseIcon-QBIdDtsh.js} +1 -1
- package/dist/{DataTable-BiaAVa_F.js → DataTable-BaW_PF1t.js} +2 -2
- package/dist/{DataTable-CdUbJy2R.cjs → DataTable-D8Jrpq-B.cjs} +1 -1
- package/dist/{Legend-BnISukey.cjs → Legend-D_1LwKfa.cjs} +1 -1
- package/dist/{Legend-Dw8hyLSd.js → Legend-Qe36RQO1.js} +2 -2
- package/dist/{PackageVersion-DJECkV0A.cjs → PackageVersion-CLMnI-8e.cjs} +1 -1
- package/dist/{PackageVersion-BFyYSHga.js → PackageVersion-DBbbI7TU.js} +1 -1
- package/dist/{PenAndPaper-BLFX9yTF.cjs → PenAndPaper-DxTPtHU5.cjs} +1 -1
- package/dist/{PenAndPaper-1g9CCad-.js → PenAndPaper-tV-SbWUa.js} +3 -3
- package/dist/{Shape-BSJQ7DnI.js → Shape-BDcnW_8x.js} +1 -1
- package/dist/{Shape-DEgEDWnK.cjs → Shape-lPTNUyoX.cjs} +1 -1
- package/dist/{Slicer-CH4QNS2q.js → Slicer-BnomLNhl.js} +2 -2
- package/dist/{Slicer-C0CDSZWe.cjs → Slicer-UxISG-yc.cjs} +1 -1
- package/dist/{Title-Cg-pVkpN.cjs → Title-C6GY7-tb.cjs} +1 -1
- package/dist/{Title-BzUgxBMs.js → Title-hfEOmPlv.js} +1 -1
- package/dist/{Tooltip-CFIkSHmH.cjs → Tooltip-CVzhBGn7.cjs} +1 -1
- package/dist/{Tooltip-O0zo8BID.js → Tooltip-DvcJ9uFx.js} +1 -1
- package/dist/{index-D6jkeYks.cjs → index-8TfPi9lB.cjs} +1 -1
- package/dist/{index-DOp04QkH.js → index-OhfEeW2N.js} +1 -1
- package/dist/{useNestedProp-rf0W8kVM.cjs → useNestedProp-BKRkMJ0r.cjs} +1 -1
- package/dist/{useNestedProp-Bcfi6on_.js → useNestedProp-Cwjz-hIm.js} +1 -1
- package/dist/{usePrinter-DX7QbYMt.cjs → usePrinter-CzqlwBQp.cjs} +1 -1
- package/dist/{usePrinter-SqbV_ohU.js → usePrinter-stvkbwgz.js} +1 -1
- package/dist/{vue-data-ui-Ch3scsoz.cjs → vue-data-ui-BU2uVZ8u.cjs} +1 -1
- package/dist/{vue-data-ui-DZklL9pZ.js → vue-data-ui-BtU5J1kO.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B1W3tnaP.js → vue-ui-3d-bar-Bf1P0qgr.js} +9 -9
- package/dist/{vue-ui-3d-bar-VEHwaBcd.cjs → vue-ui-3d-bar-Dyo1Q2wP.cjs} +1 -1
- package/dist/{vue-ui-accordion-BXv_xEog.js → vue-ui-accordion-BH0OU8sD.js} +3 -3
- package/dist/{vue-ui-accordion-CgkYT3Cq.cjs → vue-ui-accordion-CDyaHBeZ.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CBCTPthi.js → vue-ui-age-pyramid-D_geE4yV.js} +10 -10
- package/dist/{vue-ui-age-pyramid-D_IUZzvf.cjs → vue-ui-age-pyramid-pVg5s_Ov.cjs} +1 -1
- package/dist/{vue-ui-annotator-C34K5Ew0.js → vue-ui-annotator-B7SCNeQW.js} +1 -1
- package/dist/{vue-ui-annotator-CLIKuTqr.cjs → vue-ui-annotator-C801utZu.cjs} +1 -1
- package/dist/{vue-ui-bullet-CzVEhFRG.cjs → vue-ui-bullet-BHEWqnfi.cjs} +1 -1
- package/dist/{vue-ui-bullet-Xk8xvqSf.js → vue-ui-bullet-BkhafZhy.js} +8 -8
- package/dist/{vue-ui-candlestick-Ba6yXyYj.cjs → vue-ui-candlestick-DO_gKBjH.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CCMbT5ip.js → vue-ui-candlestick-p--HKs4y.js} +11 -11
- package/dist/{vue-ui-carousel-table-BsDjjayA.js → vue-ui-carousel-table-085oPZYs.js} +4 -4
- package/dist/{vue-ui-carousel-table-CkTMdwC2.cjs → vue-ui-carousel-table-CFkTzNWc.cjs} +1 -1
- package/dist/{vue-ui-chestnut-HkoXXqLL.js → vue-ui-chestnut-DwwohH1I.js} +8 -8
- package/dist/{vue-ui-chestnut-gNeEA-fs.cjs → vue-ui-chestnut-nwV10tRK.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-C7mESU9Q.js → vue-ui-circle-pack-CEbJgElX.js} +9 -9
- package/dist/{vue-ui-circle-pack-DDdvmNlI.cjs → vue-ui-circle-pack-Ckz1noNv.cjs} +1 -1
- package/dist/{vue-ui-cursor-DB82p9Hm.js → vue-ui-cursor-DoI4WKkL.js} +2 -2
- package/dist/{vue-ui-cursor-DWcza74W.cjs → vue-ui-cursor-Dy-h9HRU.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C61sthvf.cjs → vue-ui-dashboard-D4D8EpSH.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C0BPKDja.js → vue-ui-dashboard-S_-VrC-e.js} +2 -2
- package/dist/{vue-ui-digits-CbE1Mix-.js → vue-ui-digits-DVrKHvAx.js} +2 -2
- package/dist/{vue-ui-digits-CbTCX8mU.cjs → vue-ui-digits-woeBxaRE.cjs} +1 -1
- package/dist/{vue-ui-donut-C57Wdzm2.cjs → vue-ui-donut-BQpTsxFs.cjs} +1 -1
- package/dist/{vue-ui-donut-Cb2buz06.js → vue-ui-donut-DLSPHatR.js} +12 -12
- package/dist/{vue-ui-donut-evolution-zlYc16Ii.cjs → vue-ui-donut-evolution-BNz1stCl.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DdFLbXi8.js → vue-ui-donut-evolution-CUISQ53T.js} +11 -11
- package/dist/{vue-ui-dumbbell-Chl4VHoW.js → vue-ui-dumbbell-BANsx_dg.js} +10 -10
- package/dist/{vue-ui-dumbbell-BFZ3fbJv.cjs → vue-ui-dumbbell-BEbI6awt.cjs} +1 -1
- package/dist/{vue-ui-flow-DMBCObQV.js → vue-ui-flow-DkLbGRW4.js} +9 -9
- package/dist/{vue-ui-flow-CbXKICkI.cjs → vue-ui-flow-_0zTxd16.cjs} +1 -1
- package/dist/{vue-ui-funnel-BfjCE1cI.cjs → vue-ui-funnel-BiHd3sXy.cjs} +1 -1
- package/dist/{vue-ui-funnel-DgfiF2HU.js → vue-ui-funnel-D6i4ABc6.js} +9 -9
- package/dist/{vue-ui-galaxy-Dn0bfQjf.js → vue-ui-galaxy-C5_aW-lx.js} +11 -11
- package/dist/{vue-ui-galaxy-Dpy6zMBl.cjs → vue-ui-galaxy-LHVVEbkR.cjs} +1 -1
- package/dist/{vue-ui-gauge-BOU_X96H.js → vue-ui-gauge-CQWnEC8a.js} +7 -7
- package/dist/{vue-ui-gauge-CHnLLES1.cjs → vue-ui-gauge-CuG7d3WL.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DnhuJcvj.js → vue-ui-gizmo-B8da3ua8.js} +3 -3
- package/dist/{vue-ui-gizmo-wrxzscYI.cjs → vue-ui-gizmo-DT4GUmYv.cjs} +1 -1
- package/dist/{vue-ui-heatmap-PD47EF73.cjs → vue-ui-heatmap-BRSvLW0z.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BAjPEZIs.js → vue-ui-heatmap-pcdqGLRS.js} +10 -10
- package/dist/{vue-ui-history-plot--XkBi7LP.js → vue-ui-history-plot-B2DaZsY0.js} +11 -11
- package/dist/{vue-ui-history-plot-AQOaXiMJ.cjs → vue-ui-history-plot-BVu0hQ59.cjs} +1 -1
- package/dist/{vue-ui-kpi-Di3Y0kcW.js → vue-ui-kpi-D7j0srlP.js} +3 -3
- package/dist/{vue-ui-kpi-CFo8XLRM.cjs → vue-ui-kpi-DLVZ4U8H.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DZ-19Fy_.js → vue-ui-mini-loader-D7VHDTGz.js} +2 -2
- package/dist/{vue-ui-mini-loader-dxxljHLh.cjs → vue-ui-mini-loader-RBVygXcT.cjs} +1 -1
- package/dist/{vue-ui-molecule-DJBnE_jH.js → vue-ui-molecule-C_uhs2U_.js} +11 -11
- package/dist/{vue-ui-molecule-BJqx_dc3.cjs → vue-ui-molecule-CbZJ0z9y.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CpwJ_cB8.cjs → vue-ui-mood-radar-C-dVtA4T.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DBiJFS62.js → vue-ui-mood-radar-CU0CfAfQ.js} +11 -11
- package/dist/{vue-ui-nested-donuts-C42pYQix.js → vue-ui-nested-donuts-D8LwVfr9.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CefKrEVc.cjs → vue-ui-nested-donuts-Dn138dxB.cjs} +1 -1
- package/dist/{vue-ui-onion-BeDt4Anf.cjs → vue-ui-onion-4Kme64Fh.cjs} +1 -1
- package/dist/{vue-ui-onion-B3phYszo.js → vue-ui-onion-BfGt1Swk.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-jXTfaR6Q.cjs → vue-ui-parallel-coordinate-plot-CzmGTTtd.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-MZBn_QTf.js → vue-ui-parallel-coordinate-plot-I0JYDTzv.js} +12 -12
- package/dist/{vue-ui-quadrant-Bq9Uulba.js → vue-ui-quadrant-BkM4J8Zo.js} +12 -12
- package/dist/{vue-ui-quadrant-CEXW_YPr.cjs → vue-ui-quadrant-DUJK0sJm.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CbjQYY94.cjs → vue-ui-quick-chart-BOOd6VGK.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C2rS5ZpC.js → vue-ui-quick-chart-DOIEo_Ek.js} +9 -9
- package/dist/{vue-ui-radar-DJbTdhLl.js → vue-ui-radar-DCuyQ8TQ.js} +12 -12
- package/dist/{vue-ui-radar-DNt9byAF.cjs → vue-ui-radar-KqvUF0yd.cjs} +1 -1
- package/dist/{vue-ui-rating-DwNJCpUJ.cjs → vue-ui-rating-Cf9IXhte.cjs} +1 -1
- package/dist/{vue-ui-rating-D7jOrfpr.js → vue-ui-rating-IQbpjp9W.js} +2 -2
- package/dist/{vue-ui-relation-circle-DFYrWmK5.cjs → vue-ui-relation-circle-Ch4R9uAU.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-WSXW7BVk.js → vue-ui-relation-circle-D6oDkLxu.js} +7 -7
- package/dist/{vue-ui-rings-CT-GkKu3.js → vue-ui-rings-DIIMJ6Ki.js} +12 -12
- package/dist/{vue-ui-rings-CrZBI8PB.cjs → vue-ui-rings-DUZubsW3.cjs} +1 -1
- package/dist/{vue-ui-scatter-Dj_6kLom.js → vue-ui-scatter-DlB5PjIz.js} +12 -12
- package/dist/{vue-ui-scatter-C3W6efmF.cjs → vue-ui-scatter-eKhsBZM7.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DZr2dJ3_.cjs → vue-ui-screenshot-BvDI2Y8t.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Bp2d4iA5.js → vue-ui-screenshot-cTGWG_q0.js} +1 -1
- package/dist/{vue-ui-skeleton-7EpMEisR.js → vue-ui-skeleton-CZBWPZpy.js} +3 -3
- package/dist/{vue-ui-skeleton-D2fiHeQ-.cjs → vue-ui-skeleton-ilN9FTO6.cjs} +1 -1
- package/dist/{vue-ui-smiley-bp0yYHVC.cjs → vue-ui-smiley-DfgDQnG8.cjs} +1 -1
- package/dist/{vue-ui-smiley-BYMlfZJN.js → vue-ui-smiley-DvDya3We.js} +2 -2
- package/dist/{vue-ui-spark-trend-DxAKSS2H.js → vue-ui-spark-trend-8QHcYdgb.js} +5 -5
- package/dist/{vue-ui-spark-trend-BT3hC8YK.cjs → vue-ui-spark-trend-ChVtimzF.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-C5XBU4Se.cjs → vue-ui-sparkbar-B6n8KYPy.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B4rPY-wi.js → vue-ui-sparkbar-_FtDdeUa.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CqzU6lZq.cjs → vue-ui-sparkgauge-5XOcWXho.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BjWIBcyh.js → vue-ui-sparkgauge-B_j3XcZO.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-122mnka1.js → vue-ui-sparkhistogram-C9p3d3J9.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-w8GowxGd.cjs → vue-ui-sparkhistogram-DmwtHHUR.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DnXzcZfe.js → vue-ui-sparkline-C4Vopkk9.js} +4 -4
- package/dist/{vue-ui-sparkline-DSVfpk0u.cjs → vue-ui-sparkline-_vAuMTEe.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-o25sQU3T.cjs → vue-ui-sparkstackbar-3N5wyfEu.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DgB1H3Qg.js → vue-ui-sparkstackbar-CBRJEeRr.js} +5 -5
- package/dist/{vue-ui-stackbar-rTEU1rP4.js → vue-ui-stackbar-BzbafUmP.js} +13 -13
- package/dist/{vue-ui-stackbar-DcXPnNeB.cjs → vue-ui-stackbar-CrTAjJpl.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Dsvur-Dh.js → vue-ui-strip-plot-BnGNBKdY.js} +11 -11
- package/dist/{vue-ui-strip-plot-DeBGuBRO.cjs → vue-ui-strip-plot-T0bYake6.cjs} +1 -1
- package/dist/{vue-ui-table-qCnANsjT.cjs → vue-ui-table-Csf-GIDz.cjs} +1 -1
- package/dist/{vue-ui-table-DfD1dIuE.js → vue-ui-table-DBC5CyhX.js} +1 -1
- package/dist/{vue-ui-table-heatmap-UzDfjh7W.cjs → vue-ui-table-heatmap-CvAJBKKA.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BmMSuXBl.js → vue-ui-table-heatmap-zoNwnmLR.js} +4 -4
- package/dist/{vue-ui-table-sparkline-KLjn68Pu.js → vue-ui-table-sparkline-C6bJM-f0.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BvNNMcbM.cjs → vue-ui-table-sparkline-zwvphD8h.cjs} +1 -1
- package/dist/{vue-ui-thermometer-_OqrkIS5.js → vue-ui-thermometer-BIYcENnb.js} +7 -7
- package/dist/{vue-ui-thermometer-DaYllSIU.cjs → vue-ui-thermometer-DUxXfiGM.cjs} +1 -1
- package/dist/{vue-ui-timer-BC7RuVRt.cjs → vue-ui-timer-CcLN8TnA.cjs} +1 -1
- package/dist/{vue-ui-timer-B3yM3Zsr.js → vue-ui-timer-MLu40_bj.js} +5 -5
- package/dist/{vue-ui-tiremarks-NeSNx9w7.cjs → vue-ui-tiremarks-C9CecS3O.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-0PA75jsW.js → vue-ui-tiremarks-MFmGeu6B.js} +7 -7
- package/dist/{vue-ui-treemap-Dwq5MOv6.cjs → vue-ui-treemap-DyG27xaQ.cjs} +1 -1
- package/dist/{vue-ui-treemap-BX_X-IAg.js → vue-ui-treemap-ftHRUAk5.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BN4p2KaI.cjs → vue-ui-vertical-bar-DguUw97r.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DtVo0EiM.js → vue-ui-vertical-bar-L0xygeZE.js} +12 -12
- package/dist/{vue-ui-waffle-DyKaHK13.cjs → vue-ui-waffle-B-QYt7UZ.cjs} +1 -1
- package/dist/{vue-ui-waffle-Cpyxl7iK.js → vue-ui-waffle-CIB4Siw3.js} +12 -12
- package/dist/{vue-ui-wheel-DBca990z.js → vue-ui-wheel-CRPNNms-.js} +7 -7
- package/dist/{vue-ui-wheel-CmhC8bdI.cjs → vue-ui-wheel-DywU63kY.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CiUkioYv.cjs → vue-ui-word-cloud-Cuw5VBTB.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DPkgBASF.js → vue-ui-word-cloud-CyrBFbga.js} +10 -10
- package/dist/{vue-ui-xy-DKTy_ODO.cjs → vue-ui-xy-BU8znJsu.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-ByWv8cWZ.js → vue-ui-xy-canvas-CoVdHIGi.js} +11 -11
- package/dist/{vue-ui-xy-canvas-CXCzXCTk.cjs → vue-ui-xy-canvas-FQFE06yk.cjs} +1 -1
- package/dist/{vue-ui-xy-VNRWSrW0.js → vue-ui-xy-db3m5Vm0.js} +14 -14
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6jkeYks.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-DX7QbYMt.cjs"),ve=require("./vue-ui-skeleton-D2fiHeQ-.cjs"),he=require("./Title-Cg-pVkpN.cjs"),Z=require("./useNestedProp-rf0W8kVM.cjs"),me=require("./PackageVersion-DJECkV0A.cjs"),fe=require("./PenAndPaper-BLFX9yTF.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ge={key:0},be=["xmlns","viewBox"],Be=["width","height"],Se=["id"],_e=["stop-color"],xe=["stop-color"],we=["stop-color"],Ce=["id"],Ne=["stdDeviation"],Fe={key:1},Ee=["d","fill","stroke"],ze=["d","fill","stroke"],$e=["d","fill"],Pe=["id","d"],Oe=["fill","font-size","font-weight"],Me=["href","startOffset"],Ve=["x","y","text-anchor","fill","font-size","font-weight"],Xe=["d","filter"],Ie=["stroke","stroke-width"],Ye=["stroke","stroke-width"],Ae=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le={key:8},De=["x","y","text-anchor","font-size","font-weight","fill"],Ge=["x","y","font-size","font-weight","fill"],qe={key:0},je=["x1","y1","x2","y2","stroke","stroke-width"],Te=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke-width","filter"],We={key:1},He=["d","fill","stroke","stroke-width"],Ze=["cx","cy","fill","r","stroke-width","stroke"],Je=["x","y","font-size","fill"],Ke={key:5,class:"vue-data-ui-watermark"},Qe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=s.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),Q=e.ref(null),z=e.ref(0),B=e.ref(null),$=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>Y(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:I}=ye.useUserOptionState({config:t.value});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,q(),V.value+=1},{deep:!0});function Y(){const a=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return a.theme?{...Z.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!_.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(l=>{a.push(l.from||1e-7),a.push(l.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((l,r)=>({...l,color:s.convertColorToHex(l.color)||te.value[r]||s.palette[r],value:((l.to||0)-(l.from||0))/n*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),v=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{j(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,l=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(l)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,l=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI,r=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(l),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(l),y=o.value.pointerRadius,ue=a+y*Math.cos(l+Math.PI/2),ie=n+y*Math.sin(l+Math.PI/2),ce=a+y*Math.cos(l-Math.PI/2),de=n+y*Math.sin(l-Math.PI/2);return isNaN(r)?null:`M ${r},${f} ${ue},${ie} ${ce},${de} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:l,to:r}=k.value.series[a];if(v.value>=l&&v.value<=r)return n}return"#2D353C"}),x=e.ref(null);function q(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(l=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),j(c.dataset.value||0),t.value.responsive){const a=W.throttle(()=>{const{width:n,height:l}=W.useResponsive({chart:B.value,title:t.value.style.chart.title.text?$.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=l,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*l,o.value.bottom=l,o.value.labelFontSize=18/h.value*Math.min(l,n)<10?10:18/h.value*Math.min(l,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(l,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(l,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(l,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,l),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(B.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function j(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const r=Math.abs(a-v.value)/(l*60);function f(){v.value<a?v.value=Math.min(v.value+r,a):v.value>a&&(v.value=Math.max(v.value-r,a)),v.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),ae=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),g=e.computed(()=>d.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),T=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:r}=s.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:l,y2:r}}),U=e.computed(()=>d.value.map(a=>{const{x:n,y:l}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:r,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:l,x2:r,y2:f}}));function le(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const l=50;let r=0;return a.map(f=>(r+=f,`${r/100*l-f/4}%`))}const oe=e.computed(()=>le(d.value.map(a=>a.proportion*100))),re=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),ne=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*o.value.trackSize,centerX:o.value.width/2,centerY:i.value.base,percentage:(v.value+a)/(b.value+a)})}),S=e.ref(!1);function se(a){S.value=a,z.value+=1}const w=e.ref(!1);function E(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:B,id:`vue-ui-gauge_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(X)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(fe.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(I)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(I)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}: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:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,_e),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,we)],8,Se)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,Ne)],8,Ce)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:r,patternId:`pattern_${m.value}_${r}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ee))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:`url(#pattern_${m.value}_${r})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:ne.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,$e)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${r}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[r]},0 a ${g.value[r]},${g.value[r]} 0 1,1 ${2*g.value[r]},0 a ${g.value[r]},${g.value[r]} 0 1,1 -${2*g.value[r]},0`,fill:"transparent"},null,8,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${r}`,startOffset:oe.value[r]},e.toDisplayString(l.name||""),9,Me)],8,Oe))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(ae.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.center.endX,y:l.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(l,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(l.name||""),9,Ve))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(re.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Xe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ie),e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(l,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(l,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:o.value.markerOffset}).y,"text-anchor":l.center.startX<u.value.x1-5?"end":l.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,l.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:l.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",qe,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,je)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,Te)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,Ue)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",We,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,He)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ze)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Je)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,ke))}},et=pe._export_sfc(Qe,[["__scopeId","data-v-dbac9b9f"]]);exports.default=et;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-8TfPi9lB.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-CzqlwBQp.cjs"),ve=require("./vue-ui-skeleton-ilN9FTO6.cjs"),he=require("./Title-C6GY7-tb.cjs"),Z=require("./useNestedProp-BKRkMJ0r.cjs"),me=require("./PackageVersion-CLMnI-8e.cjs"),fe=require("./PenAndPaper-DxTPtHU5.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ke=["id"],ge={key:0},be=["xmlns","viewBox"],Be=["width","height"],Se=["id"],_e=["stop-color"],xe=["stop-color"],we=["stop-color"],Ce=["id"],Ne=["stdDeviation"],Fe={key:1},Ee=["d","fill","stroke"],ze=["d","fill","stroke"],$e=["d","fill"],Pe=["id","d"],Oe=["fill","font-size","font-weight"],Me=["href","startOffset"],Ve=["x","y","text-anchor","fill","font-size","font-weight"],Xe=["d","filter"],Ie=["stroke","stroke-width"],Ye=["stroke","stroke-width"],Ae=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le={key:8},De=["x","y","text-anchor","font-size","font-weight","fill"],Ge=["x","y","font-size","font-weight","fill"],qe={key:0},je=["x1","y1","x2","y2","stroke","stroke-width"],Te=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke-width","filter"],We={key:1},He=["d","fill","stroke","stroke-width"],Ze=["cx","cy","fill","r","stroke-width","stroke"],Je=["x","y","font-size","fill"],Ke={key:5,class:"vue-data-ui-watermark"},Qe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=s.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),Q=e.ref(null),z=e.ref(0),B=e.ref(null),$=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>Y(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:I}=ye.useUserOptionState({config:t.value});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,q(),V.value+=1},{deep:!0});function Y(){const a=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return a.theme?{...Z.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!_.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(l=>{a.push(l.from||1e-7),a.push(l.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((l,r)=>({...l,color:s.convertColorToHex(l.color)||te.value[r]||s.palette[r],value:((l.to||0)-(l.from||0))/n*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),v=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{j(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,l=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(l),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(l)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,l=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI,r=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(l),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(l),y=o.value.pointerRadius,ue=a+y*Math.cos(l+Math.PI/2),ie=n+y*Math.sin(l+Math.PI/2),ce=a+y*Math.cos(l-Math.PI/2),de=n+y*Math.sin(l-Math.PI/2);return isNaN(r)?null:`M ${r},${f} ${ue},${ie} ${ce},${de} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:l,to:r}=k.value.series[a];if(v.value>=l&&v.value<=r)return n}return"#2D353C"}),x=e.ref(null);function q(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(l=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),j(c.dataset.value||0),t.value.responsive){const a=W.throttle(()=>{const{width:n,height:l}=W.useResponsive({chart:B.value,title:t.value.style.chart.title.text?$.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=l,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*l,o.value.bottom=l,o.value.labelFontSize=18/h.value*Math.min(l,n)<10?10:18/h.value*Math.min(l,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(l,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(l,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(l,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,l),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=s.translateSize({relator:Math.min(n,l),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(B.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function j(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let l=t.value.style.chart.animation.speed;const r=Math.abs(a-v.value)/(l*60);function f(){v.value<a?v.value=Math.min(v.value+r,a):v.value>a&&(v.value=Math.max(v.value-r,a)),v.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),ae=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),g=e.computed(()=>d.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),T=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:r}=s.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:l,y2:r}}),U=e.computed(()=>d.value.map(a=>{const{x:n,y:l}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:r,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:l,x2:r,y2:f}}));function le(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const l=50;let r=0;return a.map(f=>(r+=f,`${r/100*l-f/4}%`))}const oe=e.computed(()=>le(d.value.map(a=>a.proportion*100))),re=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),ne=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*o.value.trackSize,centerX:o.value.width/2,centerY:i.value.base,percentage:(v.value+a)/(b.value+a)})}),S=e.ref(!1);function se(a){S.value=a,z.value+=1}const w=e.ref(!1);function E(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:B,id:`vue-ui-gauge_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(X)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(fe.PenAndPaper,{key:0,parent:B.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:$,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(I)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${z.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(I)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}: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:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(me._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,_e),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,we)],8,Se)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,Ne)],8,Ce)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:r,patternId:`pattern_${m.value}_${r}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ee))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:`url(#pattern_${m.value}_${r})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:ne.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,$e)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${r}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[r]},0 a ${g.value[r]},${g.value[r]} 0 1,1 ${2*g.value[r]},0 a ${g.value[r]},${g.value[r]} 0 1,1 -${2*g.value[r]},0`,fill:"transparent"},null,8,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${r}`,startOffset:oe.value[r]},e.toDisplayString(l.name||""),9,Me)],8,Oe))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(ae.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.center.endX,y:l.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(l,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?l.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(l.name||""),9,Ve))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(re.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${r}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Xe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ie),e.createElementVNode("line",e.mergeProps(T.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(l,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ae))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(l,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:l.center.startX,initY:l.center.startY,offset:o.value.markerOffset}).y,"text-anchor":l.center.startX<u.value.x1-5?"end":l.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,l.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:l.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",qe,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,je)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,Te)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,Ue)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",We,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,He)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ze)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Je)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,ke))}},et=pe._export_sfc(Qe,[["__scopeId","data-v-dbac9b9f"]]);exports.default=et;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as b, useSlots as z, onMounted as g, computed as c, watch as G, openBlock as s, createElementBlock as a, normalizeStyle as L, createVNode as N, createElementVNode as t, createCommentVNode as r, Fragment as p, toDisplayString as y, unref as d } from "vue";
|
|
2
|
-
import { u as $, c as F, e as B, i as k, f as m } from "./index-
|
|
3
|
-
import { u as V } from "./useNestedProp-
|
|
4
|
-
import { _ as P } from "./PackageVersion-
|
|
2
|
+
import { u as $, c as F, e as B, i as k, f as m } from "./index-OhfEeW2N.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-Cwjz-hIm.js";
|
|
4
|
+
import { _ as P } from "./PackageVersion-DBbbI7TU.js";
|
|
5
5
|
const U = ["viewBox", "width"], D = { key: 0 }, I = ["id"], M = ["stop-color"], S = ["stop-color"], E = ["stroke"], O = ["stroke"], A = ["width", "fill"], j = ["fill"], T = { key: 0 }, q = ["id"], H = /* @__PURE__ */ t("feGaussianBlur", {
|
|
6
6
|
in: "SourceGraphic",
|
|
7
7
|
stdDeviation: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-8TfPi9lB.cjs"),k=require("./useNestedProp-BKRkMJ0r.cjs"),_=require("./PackageVersion-CLMnI-8e.cjs"),p=["viewBox","width"],g={key:0},v=["id"],y=["stop-color"],N=["stop-color"],C=["stroke"],V=["stroke"],w=["width","fill"],x=["fill"],B={key:0},E=["id"],b=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),L=[b],z=["stroke"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["filter"],P=["stroke","stroke-dasharray","stroke-dashoffset"],$=["fill"],S={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(c){const o=c,{vue_ui_gizmo:f}=r.useConfig(),n=e.ref(r.createUid()),h=e.useSlots();e.onMounted(()=>{i()}),e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiGizmo does not support the #chart-background slot.")});function i(){!o.dataset&&o.dataset!==0&&r.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:a=>a});function d(){return k.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,a=>{t.value=d(),i()},{deep:!0});const u=e.computed(()=>({battery:{width:t.value.showPercentage?140:80,height:50},gauge:{width:80,height:80}})[t.value.type]),l=e.computed(()=>{const s=2*Math.PI*35,m=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:m}});return(a,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",g,[e.createElementVNode("linearGradient",{id:`gizmo_gradient_${n.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.gradientColor},null,8,y),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,N)],8,v)])):e.createCommentVNode("",!0),t.value.type==="battery"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:"M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10",stroke:t.value.stroke,"stroke-width":2,fill:"none"},null,8,C),e.createElementVNode("path",{d:"M 70 16 L 70 34",stroke:t.value.stroke,"stroke-width":2,fill:"none",style:{opacity:"0.5"}},null,8,V),e.createElementVNode("rect",{x:10,y:10,height:30,width:55*(c.dataset/100),fill:t.value.useGradient?`url(#gizmo_gradient_${n.value})`:t.value.color,rx:2},null,8,w),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,x:85,y:32,"text-anchor":"start","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.formatter,o.dataset,e.unref(r.dataLabel)({v:o.dataset,s:"%"}))),9,x)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.type==="gauge"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",B,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},L,8,E)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,z),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.color,"stroke-width":2*4,"stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,"stroke-linecap":"round",fill:"none",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,G),t.value.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${n.value})`},[e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.gradientColor,"stroke-width":1,fill:"none","stroke-dasharray":l.value.dasharray,"stroke-dashoffset":l.value.dashoffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,P)],8,F)):e.createCommentVNode("",!0),t.value.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:2,x:40,y:47,"text-anchor":"middle","font-size":"20",fill:t.value.textColor},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.formatter,o.dataset,e.unref(r.dataLabel)({v:o.dataset,s:"%"}))),9,$)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,p))}};exports.default=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D6jkeYks.cjs"),pe=require("./Title-Cg-pVkpN.cjs"),le=require("./usePrinter-DX7QbYMt.cjs"),he=require("./Tooltip-CFIkSHmH.cjs"),fe=require("./vue-ui-skeleton-D2fiHeQ-.cjs"),ge=require("./BaseIcon-WPy5Rb2H.cjs"),me=require("./vue-ui-accordion-CgkYT3Cq.cjs"),ae=require("./useNestedProp-rf0W8kVM.cjs"),be=require("./PackageVersion-DJECkV0A.cjs"),ke=require("./PenAndPaper-BLFX9yTF.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["width","height"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["x","y","width","height","fill","stroke","stroke-width"],$e=["font-size","font-weight","fill","x","y"],Ee=["x","y","width","height","onMouseover"],Se={key:0},Ae=["font-size","fill","x","y","font-weight"],ze={key:1},Te=["text-anchor","font-size","fill","font-weight","transform"],Oe={key:2},Me=["x","y","width","height","stroke","stroke-width"],Pe={key:3},Fe=["id"],De=["stop-color"],Ie=["stop-color"],Re=["x","y","font-size","fill"],qe=["x","y","height","rx","fill"],Ue=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ge=["fill","d"],Xe={key:4},je={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},We=["stop-color"],Ye=["stop-color"],Ke=["x","y","width","height","rx"],Je=["x","y","font-size","fill"],Qe=["x","y","font-size","fill"],Ze=["stroke","x1","x2","y1","y2"],et=["fill","d"],tt={key:5,class:"vue-data-ui-watermark"},lt={key:6,ref:"source",dir:"auto"},at={class:"vue-ui-data-table"},ot={key:0},st=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"519eaa79":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>W(),set:l=>l}),{userOptionsVisible:O,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function W(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=W(),O.value=!t.value.userOptions.showOnChartHover,M(),G.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:Y,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(M);function M(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),p=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/p.value)),B=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/p.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){v.value.showTable=!v.value.showTable}function te(){v.value.showTooltip=!v.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,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",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(O))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(Y),uid:w.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,isFullscreen:x.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:y.value.width,height:y.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ve),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,$e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,Ee)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Ae)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Te)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ie)],8,Fe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,qe),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,He)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,Ge)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",je,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,We),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ke),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Ze)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",lt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:v.value.showTooltip&&z.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:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:v.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.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>v.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",at,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",ot,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",ut,e.toDisplayString(u),1)],12,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",rt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,nt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},dt=we._export_sfc(it,[["__scopeId","data-v-bc6eca02"]]);exports.default=dt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-8TfPi9lB.cjs"),pe=require("./Title-C6GY7-tb.cjs"),le=require("./usePrinter-CzqlwBQp.cjs"),he=require("./Tooltip-CVzhBGn7.cjs"),fe=require("./vue-ui-skeleton-ilN9FTO6.cjs"),ge=require("./BaseIcon-BdnE2DAH.cjs"),me=require("./vue-ui-accordion-CDyaHBeZ.cjs"),ae=require("./useNestedProp-BKRkMJ0r.cjs"),be=require("./PackageVersion-CLMnI-8e.cjs"),ke=require("./PenAndPaper-DxTPtHU5.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["width","height"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["x","y","width","height","fill","stroke","stroke-width"],$e=["font-size","font-weight","fill","x","y"],Ee=["x","y","width","height","onMouseover"],Se={key:0},Ae=["font-size","fill","x","y","font-weight"],ze={key:1},Te=["text-anchor","font-size","fill","font-weight","transform"],Oe={key:2},Me=["x","y","width","height","stroke","stroke-width"],Pe={key:3},Fe=["id"],De=["stop-color"],Ie=["stop-color"],Re=["x","y","font-size","fill"],qe=["x","y","height","rx","fill"],Ue=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ge=["fill","d"],Xe={key:4},je={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},We=["stop-color"],Ye=["stop-color"],Ke=["x","y","width","height","rx"],Je=["x","y","font-size","fill"],Qe=["x","y","font-size","fill"],Ze=["stroke","x1","x2","y1","y2"],et=["fill","d"],tt={key:5,class:"vue-data-ui-watermark"},lt={key:6,ref:"source",dir:"auto"},at={class:"vue-ui-data-table"},ot={key:0},st=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nt=["data-cell"],rt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"519eaa79":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>W(),set:l=>l}),{userOptionsVisible:O,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function W(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=W(),O.value=!t.value.userOptions.showOnChartHover,M(),G.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>n.dataset,()=>{M()},{deep:!0});const{isPrinting:Y,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(M);function M(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),p=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(p.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,p.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/p.value)),B=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/p.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){v.value.showTable=!v.value.showTable}function te(){v.value.showTooltip=!v.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,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",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(O))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(Y),uid:w.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,isFullscreen:x.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(O)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:y.value.width,height:y.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ve),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,$e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,Ee)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Ae)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Te)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ie)],8,Fe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,qe),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ue),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,He)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,Ge)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",je,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,We),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ke),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(p.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(p.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Ze)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",lt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:v.value.showTooltip&&z.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:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:v.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.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>v.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",at,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",ot,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",ut,e.toDisplayString(u),1)],12,st),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",rt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,nt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},dt=we._export_sfc(it,[["__scopeId","data-v-bc6eca02"]]);exports.default=dt;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Ie, computed as h, ref as p, watch as $e, onMounted as Be, openBlock as o, createElementBlock as n, normalizeClass as K, normalizeStyle as k, unref as u, createBlock as G, createCommentVNode as c, createSlots as Re, withCtx as _, renderSlot as f, normalizeProps as U, guardReactiveProps as H, createVNode as se, Fragment as A, renderList as M, createElementVNode as i, toDisplayString as b, withKeys as Ee, createTextVNode as Ge, nextTick as Ue } from "vue";
|
|
2
|
-
import { u as He, o as Xe, e as Ce, c as ue, t as De, C as je, g as We, O as ne, X as Ye, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-
|
|
3
|
-
import { _ as Ze } from "./Title-
|
|
4
|
-
import { u as et, U as tt } from "./usePrinter-
|
|
5
|
-
import { _ as lt } from "./Tooltip-
|
|
6
|
-
import at from "./vue-ui-skeleton-
|
|
7
|
-
import ot from "./BaseIcon-
|
|
8
|
-
import st from "./vue-ui-accordion-
|
|
9
|
-
import { u as Le } from "./useNestedProp-
|
|
10
|
-
import { _ as ut } from "./PackageVersion-
|
|
11
|
-
import { P as nt } from "./PenAndPaper-
|
|
2
|
+
import { u as He, o as Xe, e as Ce, c as ue, t as De, C as je, g as We, O as ne, X as Ye, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-OhfEeW2N.js";
|
|
3
|
+
import { _ as Ze } from "./Title-hfEOmPlv.js";
|
|
4
|
+
import { u as et, U as tt } from "./usePrinter-stvkbwgz.js";
|
|
5
|
+
import { _ as lt } from "./Tooltip-DvcJ9uFx.js";
|
|
6
|
+
import at from "./vue-ui-skeleton-CZBWPZpy.js";
|
|
7
|
+
import ot from "./BaseIcon-QBIdDtsh.js";
|
|
8
|
+
import st from "./vue-ui-accordion-BH0OU8sD.js";
|
|
9
|
+
import { u as Le } from "./useNestedProp-Cwjz-hIm.js";
|
|
10
|
+
import { _ as ut } from "./PackageVersion-DBbbI7TU.js";
|
|
11
|
+
import { P as nt } from "./PenAndPaper-tV-SbWUa.js";
|
|
12
12
|
import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const vt = ["id"], dt = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as f, onMounted as Ue, onBeforeUnmount as We, watch as He, openBlock as s, createElementBlock as r, normalizeClass as P, normalizeStyle as M, unref as y, renderSlot as x, createBlock as z, createCommentVNode as v, createSlots as Ee, withCtx as m, normalizeProps as Y, guardReactiveProps as j, createVNode as ke, Fragment as b, renderList as k, createElementVNode as A, toDisplayString as L, createTextVNode as Ge, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as E, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as G, x as ot, q as rt, r as nt, F as N } from "./index-
|
|
3
|
-
import { u as $e } from "./useNestedProp-
|
|
4
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
5
|
-
import { _ as ct } from "./PackageVersion-
|
|
6
|
-
import { L as vt } from "./Legend-
|
|
7
|
-
import { _ as ht } from "./Title-
|
|
8
|
-
import { _ as yt } from "./Tooltip-
|
|
9
|
-
import { D as dt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { P as xt } from "./PenAndPaper-
|
|
12
|
-
import pt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as E, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as G, x as ot, q as rt, r as nt, F as N } from "./index-OhfEeW2N.js";
|
|
3
|
+
import { u as $e } from "./useNestedProp-Cwjz-hIm.js";
|
|
4
|
+
import { u as ut, U as it } from "./usePrinter-stvkbwgz.js";
|
|
5
|
+
import { _ as ct } from "./PackageVersion-DBbbI7TU.js";
|
|
6
|
+
import { L as vt } from "./Legend-Qe36RQO1.js";
|
|
7
|
+
import { _ as ht } from "./Title-hfEOmPlv.js";
|
|
8
|
+
import { _ as yt } from "./Tooltip-DvcJ9uFx.js";
|
|
9
|
+
import { D as dt } from "./DataTable-BaW_PF1t.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-BH0OU8sD.js";
|
|
11
|
+
import { P as xt } from "./PenAndPaper-tV-SbWUa.js";
|
|
12
|
+
import pt from "./vue-ui-skeleton-CZBWPZpy.js";
|
|
13
13
|
import { t as mt, u as gt } from "./useResponsive-CoxXLe23.js";
|
|
14
14
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D6jkeYks.cjs"),te=require("./useNestedProp-rf0W8kVM.cjs"),le=require("./usePrinter-DX7QbYMt.cjs"),ke=require("./PackageVersion-DJECkV0A.cjs"),be=require("./Legend-BnISukey.cjs"),Ce=require("./Title-Cg-pVkpN.cjs"),we=require("./Tooltip-CFIkSHmH.cjs"),Be=require("./DataTable-CdUbJy2R.cjs"),Se=require("./vue-ui-accordion-CgkYT3Cq.cjs"),_e=require("./PenAndPaper-BLFX9yTF.cjs"),Ne=require("./vue-ui-skeleton-D2fiHeQ-.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me=["x","y","width","height"],Te={key:1},Ae=["id"],Pe=["stop-color"],Ve=["stop-color"],Fe=["stop-color"],Oe={key:2},De=["x1","x2","y1","y2","stroke","stroke-width"],Ie={key:3},Xe=["x","y","fill","font-size"],Ye=["transform","font-size","fill","font-weight"],qe={key:5},je=["x1","x2","y1","y2","stroke","stroke-width"],Ue={key:6},Re=["transform","fill","font-size","text-anchor"],He=["x","y","font-size","fill","font-weight"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["cx","cy","fill","r"],Qe=["cx","cy","fill","r","stroke","stroke-width"],et={key:1},tt=["x","y","font-size","fill","font-weight"],lt={key:2},at=["x","y","font-size","font-weight","fill"],ot=["cx","cy","r","onMouseenter","onClick"],st={key:5,class:"vue-data-ui-watermark"},rt=["onClick"],nt=["innerHTML"],it={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),O=e.ref(0),w=e.ref(null),D=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:D.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.userOptions.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function me(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function fe(l){B.value=l,O.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={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:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showTooltip=!p.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:D,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,Ae))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,Ye)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,je))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ge)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ze),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Je)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Qe))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,tt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,at))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,f.value=null}),onClick:()=>me(u)},null,40,ot))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,rt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:p.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>p.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},ut=Le._export_sfc(it,[["__scopeId","data-v-398c5a48"]]);exports.default=ut;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-8TfPi9lB.cjs"),te=require("./useNestedProp-BKRkMJ0r.cjs"),le=require("./usePrinter-CzqlwBQp.cjs"),ke=require("./PackageVersion-CLMnI-8e.cjs"),be=require("./Legend-D_1LwKfa.cjs"),Ce=require("./Title-C6GY7-tb.cjs"),we=require("./Tooltip-CVzhBGn7.cjs"),Be=require("./DataTable-D8Jrpq-B.cjs"),Se=require("./vue-ui-accordion-CDyaHBeZ.cjs"),_e=require("./PenAndPaper-DxTPtHU5.cjs"),Ne=require("./vue-ui-skeleton-ilN9FTO6.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me=["x","y","width","height"],Te={key:1},Ae=["id"],Pe=["stop-color"],Ve=["stop-color"],Fe=["stop-color"],Oe={key:2},De=["x1","x2","y1","y2","stroke","stroke-width"],Ie={key:3},Xe=["x","y","fill","font-size"],Ye=["transform","font-size","fill","font-weight"],qe={key:5},je=["x1","x2","y1","y2","stroke","stroke-width"],Ue={key:6},Re=["transform","fill","font-size","text-anchor"],He=["x","y","font-size","fill","font-weight"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["cx","cy","fill","r"],Qe=["cx","cy","fill","r","stroke","stroke-width"],et={key:1},tt=["x","y","font-size","fill","font-weight"],lt={key:2},at=["x","y","font-size","font-weight","fill"],ot=["cx","cy","r","onMouseenter","onClick"],st={key:5,class:"vue-data-ui-watermark"},rt=["onClick"],nt=["innerHTML"],it={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),O=e.ref(0),w=e.ref(null),D=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:D.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.userOptions.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function me(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function fe(l){B.value=l,O.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={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:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showTooltip=!p.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:D,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Pe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,Ae))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,Ye)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,je))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ge)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ze),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Je)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,Ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Qe))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,tt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,at))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,f.value=null}),onClick:()=>me(u)},null,40,ot))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,rt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(we._sfc_main,{show:p.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>p.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},ut=Le._export_sfc(it,[["__scopeId","data-v-398c5a48"]]);exports.default=ut;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as D, useSlots as x, onMounted as g, watch as C, ref as $, openBlock as i, createElementBlock as s, normalizeClass as r, normalizeStyle as u, createElementVNode as k, renderSlot as n, createTextVNode as y, toDisplayString as h, createVNode as z, Fragment as A, unref as b } from "vue";
|
|
2
|
-
import { u as w } from "./useNestedProp-
|
|
3
|
-
import { u as B, i as L, f as M } from "./index-
|
|
4
|
-
import E from "./vue-ui-digits-
|
|
2
|
+
import { u as w } from "./useNestedProp-Cwjz-hIm.js";
|
|
3
|
+
import { u as B, i as L, f as M } from "./index-OhfEeW2N.js";
|
|
4
|
+
import E from "./vue-ui-digits-DVrKHvAx.js";
|
|
5
5
|
const G = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-BKRkMJ0r.cjs"),u=require("./index-8TfPi9lB.cjs"),y=require("./vue-ui-digits-woeBxaRE.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-Cwjz-hIm.js";
|
|
3
|
+
import { u as y, X as L } from "./index-OhfEeW2N.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
|
|
6
6
|
__name: "vue-ui-mini-loader",
|