vue-data-ui 2.7.0 → 2.7.1
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-Tcvy-1tf.js → Arrow-BTKw6r9B.js} +1 -1
- package/dist/{Arrow-q4elsfyi.cjs → Arrow-sEenfS8R.cjs} +1 -1
- package/dist/{BaseIcon-BSkS89RT.js → BaseIcon-DnLYMp6l.js} +1 -1
- package/dist/{BaseIcon-wuetMnRj.cjs → BaseIcon-DnyvDfd_.cjs} +1 -1
- package/dist/{ColorPicker-BsF6StNh.cjs → ColorPicker-9DFhTw_f.cjs} +1 -1
- package/dist/{ColorPicker-B-UF8Xdm.js → ColorPicker-C6lNE5YG.js} +3 -3
- package/dist/{DataTable-CxPPog04.cjs → DataTable-CngiZztx.cjs} +1 -1
- package/dist/{DataTable-DRB6Rt3T.js → DataTable-CqmM6dKK.js} +2 -2
- package/dist/{Legend-DACz926s.js → Legend-2egPeIm_.js} +2 -2
- package/dist/{Legend-BiZSIl_8.cjs → Legend-CYRB328N.cjs} +1 -1
- package/dist/{PackageVersion-iM0N7imM.js → PackageVersion-CwdFBcJ8.js} +3 -3
- package/dist/PackageVersion-yffL-jfv.cjs +1 -0
- package/dist/{PenAndPaper-Cnh7VAnd.js → PenAndPaper--UiqgX9J.js} +3 -3
- package/dist/{PenAndPaper-D4YVLZC3.cjs → PenAndPaper-CN2oty-x.cjs} +1 -1
- package/dist/{Shape-BlqLhJkb.js → Shape-BpeBdbVN.js} +1 -1
- package/dist/{Shape-fiDmogTF.cjs → Shape-CUqYvf42.cjs} +1 -1
- package/dist/{Slicer-BxsQavxP.cjs → Slicer-BgcqkoSq.cjs} +1 -1
- package/dist/{Slicer-B6gtffPg.js → Slicer-D1W5yNMr.js} +2 -2
- package/dist/{Title-BnbtlZuQ.js → Title-D-MrSzZ9.js} +1 -1
- package/dist/{Title-ftVcKm8j.cjs → Title-DIthuQxK.cjs} +1 -1
- package/dist/{Tooltip-BaCjRGR8.js → Tooltip-CB3FSZI5.js} +1 -1
- package/dist/{Tooltip-Dvq8qMfG.cjs → Tooltip-D43-t32P.cjs} +1 -1
- package/dist/{dom-to-png-DkmDo75x.js → dom-to-png-5VOUqviC.js} +1 -1
- package/dist/{dom-to-png-DBqUgTmu.cjs → dom-to-png-BJwSQsyy.cjs} +1 -1
- package/dist/{img-DQpd_5yO.cjs → img-BfzPdY_5.cjs} +1 -1
- package/dist/{img-U95ptFho.js → img-DuSrtdjC.js} +1 -1
- package/dist/{index-D-HIb4Mn.js → index-A6avPZLy.js} +1 -1
- package/dist/{index-D5k9fip1.cjs → index-BkB2NdNK.cjs} +1 -1
- package/dist/{pdf-XZ9tIX1c.cjs → pdf-BgE_moLQ.cjs} +1 -1
- package/dist/{pdf-D2ouSvO-.js → pdf-DjL_T4XI.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CpW5Z_Ke.cjs → useNestedProp-BPS6WHYi.cjs} +1 -1
- package/dist/{useNestedProp-qC6DmhPQ.js → useNestedProp-CcohWUPI.js} +1 -1
- package/dist/{usePrinter-Dur-51db.js → usePrinter-B6swu4OY.js} +3 -3
- package/dist/{usePrinter-DCjcVk63.cjs → usePrinter-Bn2DXY9B.cjs} +1 -1
- package/dist/{vue-data-ui-fow8gtsn.js → vue-data-ui-B80lDfFi.js} +60 -60
- package/dist/{vue-data-ui-ozZctcYD.cjs → vue-data-ui-BsseA1is.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-C_JTgO_-.js → vue-ui-3d-bar-CcFHL1qI.js} +106 -106
- package/dist/{vue-ui-3d-bar-DTlVayO8.cjs → vue-ui-3d-bar-DcrMP_O7.cjs} +2 -2
- package/dist/{vue-ui-accordion-qmHz6V_f.js → vue-ui-accordion-B_xjSc0r.js} +3 -3
- package/dist/{vue-ui-accordion-BiVdHPDv.cjs → vue-ui-accordion-CGoz8eg6.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BtqOmeDs.js → vue-ui-age-pyramid-AXVyoK6L.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DbCnCy8z.cjs → vue-ui-age-pyramid-BCNi5bGZ.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsZ_WLwo.js → vue-ui-annotator-BXvnhWt_.js} +2 -2
- package/dist/{vue-ui-annotator-DX-Zq2VD.cjs → vue-ui-annotator-BtNdaDFA.cjs} +1 -1
- package/dist/{vue-ui-bullet-BqOvmlj_.cjs → vue-ui-bullet-CQxs2TaZ.cjs} +1 -1
- package/dist/{vue-ui-bullet-DtYQOm8x.js → vue-ui-bullet-DRXo5EpT.js} +8 -8
- package/dist/{vue-ui-candlestick-CY0LcjNv.cjs → vue-ui-candlestick-3nGxvy8S.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Bpd4Brzf.js → vue-ui-candlestick-BpqYCJVJ.js} +11 -11
- package/dist/{vue-ui-carousel-table-CddMetKf.cjs → vue-ui-carousel-table-BYXPK4gh.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-C8_Ps2Zt.js → vue-ui-carousel-table-YrKkEqX7.js} +4 -4
- package/dist/{vue-ui-chestnut-BpSKsoin.js → vue-ui-chestnut-C25jWRRE.js} +8 -8
- package/dist/{vue-ui-chestnut-BwXukm4F.cjs → vue-ui-chestnut-FQoFMnGd.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BUlUJ_wP.cjs → vue-ui-circle-pack-CD8-rMNk.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-CfED_zMB.js → vue-ui-circle-pack-PLHydEfP.js} +9 -9
- package/dist/{vue-ui-cursor-B5oQgTgE.js → vue-ui-cursor-CRb53VBn.js} +2 -2
- package/dist/{vue-ui-cursor-wiDFjlo1.cjs → vue-ui-cursor-nwZ7x8lx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-By0Ava-e.js → vue-ui-dashboard-5frkuD5u.js} +3 -3
- package/dist/{vue-ui-dashboard-tFgwPorT.cjs → vue-ui-dashboard-Bh3_EFPN.cjs} +1 -1
- package/dist/{vue-ui-digits-DVhsYo-l.js → vue-ui-digits-CDviNXaL.js} +2 -2
- package/dist/{vue-ui-digits-C8E4WW3j.cjs → vue-ui-digits-DoTiNrVN.cjs} +1 -1
- package/dist/{vue-ui-donut-DuJGngc8.cjs → vue-ui-donut-BcszyS6r.cjs} +1 -1
- package/dist/{vue-ui-donut-D03p4xQ2.js → vue-ui-donut-CNNRNtzQ.js} +12 -12
- package/dist/{vue-ui-donut-evolution-Ck8bjo-j.js → vue-ui-donut-evolution-CHik7Z_g.js} +11 -11
- package/dist/{vue-ui-donut-evolution-jBUX8vo1.cjs → vue-ui-donut-evolution-DfPyKT8R.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-B1jv_9OG.js → vue-ui-dumbbell-CgwlIofy.js} +10 -10
- package/dist/{vue-ui-dumbbell-DDDCgty2.cjs → vue-ui-dumbbell-D2UJtygq.cjs} +1 -1
- package/dist/{vue-ui-flow-CjlFZAXS.cjs → vue-ui-flow-D6JFBrIX.cjs} +1 -1
- package/dist/{vue-ui-flow-DW_Yxbmf.js → vue-ui-flow-rDb1-sH0.js} +9 -9
- package/dist/{vue-ui-funnel-rUNRbe1S.js → vue-ui-funnel-B6bLvPa_.js} +9 -9
- package/dist/{vue-ui-funnel-CdXskLpT.cjs → vue-ui-funnel-BY0tWmrS.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DZRdJjEL.cjs → vue-ui-galaxy-B_52sAx2.cjs} +1 -1
- package/dist/{vue-ui-galaxy-D-d6BrEQ.js → vue-ui-galaxy-DckvTL3q.js} +11 -11
- package/dist/{vue-ui-gauge-CJqfHd1V.js → vue-ui-gauge-C2LiUQBN.js} +7 -7
- package/dist/{vue-ui-gauge-utVziwmC.cjs → vue-ui-gauge-Cs7mUhqe.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BSYmNV2r.cjs → vue-ui-gizmo-BpzuY03-.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BJeFSq_h.js → vue-ui-gizmo-WAsThdrY.js} +3 -3
- package/dist/{vue-ui-heatmap-AOtOaNf0.cjs → vue-ui-heatmap-CGK5-uSo.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BYWReIi3.js → vue-ui-heatmap-DJB3RODU.js} +10 -10
- package/dist/{vue-ui-history-plot-BORIs9Ia.cjs → vue-ui-history-plot-CZCGVMtm.cjs} +1 -1
- package/dist/{vue-ui-history-plot-OJbA6a9W.js → vue-ui-history-plot-UwqNF7IY.js} +11 -11
- package/dist/{vue-ui-kpi-mzJ2Wwsd.cjs → vue-ui-kpi-COSK1X00.cjs} +1 -1
- package/dist/{vue-ui-kpi-ZRPbK9Xb.js → vue-ui-kpi-DGwMrY-1.js} +3 -3
- package/dist/{vue-ui-mini-loader-BDpn3tU3.cjs → vue-ui-mini-loader-CiDr-Ata.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BpF3Gk95.js → vue-ui-mini-loader-wC1Se-5k.js} +2 -2
- package/dist/{vue-ui-molecule-BNKBlCuv.js → vue-ui-molecule-DB8vn7Ud.js} +11 -11
- package/dist/{vue-ui-molecule-n2XcQwWm.cjs → vue-ui-molecule-R-yZGvaP.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D7i4XkJ7.cjs → vue-ui-mood-radar-B4V2v62P.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DkDCTTGe.js → vue-ui-mood-radar-DeLXvSPU.js} +11 -11
- package/dist/{vue-ui-nested-donuts-COztgojn.cjs → vue-ui-nested-donuts-CsvNzTz6.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B10sUIYh.js → vue-ui-nested-donuts-PgGg2Jah.js} +11 -11
- package/dist/{vue-ui-onion-DS8IMdbv.cjs → vue-ui-onion-DCHNA84o.cjs} +1 -1
- package/dist/{vue-ui-onion-Dm0gIaEo.js → vue-ui-onion-DZAkMkto.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-BARHF8if.js → vue-ui-parallel-coordinate-plot-Bxjxz4LI.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DxyZ61ji.cjs → vue-ui-parallel-coordinate-plot-Drm4BFOT.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CwRmXD1e.cjs → vue-ui-quadrant-D5anVEqh.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DEy0EDw0.js → vue-ui-quadrant-nheekDou.js} +12 -12
- package/dist/{vue-ui-quick-chart-cQQXRntN.cjs → vue-ui-quick-chart-2-oPKc1z.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CIukip1j.js → vue-ui-quick-chart-BpQr6koy.js} +9 -9
- package/dist/{vue-ui-radar-bY3aBAJt.js → vue-ui-radar-BH3cHleE.js} +12 -12
- package/dist/{vue-ui-radar-BBW5S8Yt.cjs → vue-ui-radar-Crx4uENB.cjs} +1 -1
- package/dist/{vue-ui-rating-BrcdA_Ez.cjs → vue-ui-rating-CHbI6v-k.cjs} +1 -1
- package/dist/{vue-ui-rating-oiBRruzk.js → vue-ui-rating-lZe0UltX.js} +2 -2
- package/dist/{vue-ui-relation-circle-Cz4V-P4-.js → vue-ui-relation-circle-D3dCS2lC.js} +7 -7
- package/dist/{vue-ui-relation-circle-BIwMG6fK.cjs → vue-ui-relation-circle-DMuA1Jqp.cjs} +1 -1
- package/dist/{vue-ui-rings-D2Xkr-UM.cjs → vue-ui-rings-CCePZEmj.cjs} +1 -1
- package/dist/{vue-ui-rings-B9v-QBUD.js → vue-ui-rings-CL5eq_lr.js} +12 -12
- package/dist/{vue-ui-scatter-B8njCxdy.js → vue-ui-scatter-DhWpisoX.js} +12 -12
- package/dist/{vue-ui-scatter-Dax4tsln.cjs → vue-ui-scatter-DrWHtQ7A.cjs} +1 -1
- package/dist/{vue-ui-skeleton-WO50lQWb.js → vue-ui-skeleton-CDtUy7-2.js} +3 -3
- package/dist/{vue-ui-skeleton-Cxg_LxBB.cjs → vue-ui-skeleton-CyD0WfiB.cjs} +1 -1
- package/dist/{vue-ui-smiley-CZc9x6AH.cjs → vue-ui-smiley-CYAJ1Yz6.cjs} +1 -1
- package/dist/{vue-ui-smiley-CydE1BoA.js → vue-ui-smiley-CxC_mXgi.js} +2 -2
- package/dist/{vue-ui-spark-trend-CW8LzMy4.cjs → vue-ui-spark-trend-DqJoZswk.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-sNLwMXHr.js → vue-ui-spark-trend-W6ET0LN0.js} +5 -5
- package/dist/{vue-ui-sparkbar-CdEIQGlO.cjs → vue-ui-sparkbar-BaL4aiR2.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BIw5YHYN.js → vue-ui-sparkbar-DFk4vX4T.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BGv31zUU.cjs → vue-ui-sparkgauge-C0XL80YM.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BY1Db4u6.js → vue-ui-sparkgauge-DaCbYvsy.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B2qXSmE6.js → vue-ui-sparkhistogram-DO4EtsIl.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-C5aVsaeV.cjs → vue-ui-sparkhistogram-yHLpPhmY.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B-ROydCI.js → vue-ui-sparkline-BT2uzkRB.js} +4 -4
- package/dist/{vue-ui-sparkline-nv_hBl_Q.cjs → vue-ui-sparkline-_3p0ZMii.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B_fyArxJ.js → vue-ui-sparkstackbar-CvPROcMS.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-Dc7akbeI.cjs → vue-ui-sparkstackbar-D87hGVto.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CR-D8XTf.js → vue-ui-stackbar-CF1ZciKz.js} +13 -13
- package/dist/{vue-ui-stackbar-DPheM1P1.cjs → vue-ui-stackbar-pZS4uclE.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BP_ZBS7j.js → vue-ui-strip-plot-DbJmyFzD.js} +11 -11
- package/dist/{vue-ui-strip-plot-Bqcuuu2h.cjs → vue-ui-strip-plot-DqPSiGXm.cjs} +1 -1
- package/dist/{vue-ui-table-C_ARRjn7.js → vue-ui-table-BvlGS9xl.js} +1 -1
- package/dist/{vue-ui-table-D6zyqYhW.cjs → vue-ui-table-_lP4IT01.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B1wpFAy-.cjs → vue-ui-table-heatmap-DVZ4FKcO.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-5kssrpIQ.js → vue-ui-table-heatmap-I3d1FZkm.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DqiWxSfS.cjs → vue-ui-table-sparkline-DxgxuYn1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DQb6dKDF.js → vue-ui-table-sparkline-KTwO8xf0.js} +5 -5
- package/dist/{vue-ui-thermometer-CzAL7se5.js → vue-ui-thermometer-CacmwD1Y.js} +7 -7
- package/dist/{vue-ui-thermometer-CmktvEk5.cjs → vue-ui-thermometer-DbOYeE4L.cjs} +1 -1
- package/dist/{vue-ui-timer-CoxSVJEi.cjs → vue-ui-timer-CE_E850f.cjs} +1 -1
- package/dist/{vue-ui-timer-CN4LNkYi.js → vue-ui-timer-CPDwkxN8.js} +5 -5
- package/dist/{vue-ui-tiremarks-CcHbgSJS.js → vue-ui-tiremarks-C0_iMDa_.js} +7 -7
- package/dist/{vue-ui-tiremarks-G4phSmYS.cjs → vue-ui-tiremarks-CjEVWJs3.cjs} +1 -1
- package/dist/{vue-ui-treemap-X6ai1vvz.cjs → vue-ui-treemap-Cz8zJOFx.cjs} +1 -1
- package/dist/{vue-ui-treemap-Cd0QURmy.js → vue-ui-treemap-DwXyhU2O.js} +12 -12
- package/dist/{vue-ui-vertical-bar-DkkUwBFF.cjs → vue-ui-vertical-bar-CElDAKiI.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Bwb6qh-e.js → vue-ui-vertical-bar-RbZ1m7aH.js} +12 -12
- package/dist/{vue-ui-waffle-CuqNVHpO.cjs → vue-ui-waffle-CqnW-IzI.cjs} +1 -1
- package/dist/{vue-ui-waffle-BLFwSujO.js → vue-ui-waffle-D2Olsiof.js} +12 -12
- package/dist/{vue-ui-wheel-BF8y9DBh.cjs → vue-ui-wheel-DDllncND.cjs} +1 -1
- package/dist/{vue-ui-wheel-BMKwq-xH.js → vue-ui-wheel-DJbSOnmZ.js} +7 -7
- package/dist/{vue-ui-word-cloud-2YUfi3uy.js → vue-ui-word-cloud-BVjlvTWA.js} +10 -10
- package/dist/{vue-ui-word-cloud-B4OWtLLG.cjs → vue-ui-word-cloud-Cw03GidN.cjs} +1 -1
- package/dist/{vue-ui-xy-CC8PUupn.cjs → vue-ui-xy-CpTEJDag.cjs} +2 -2
- package/dist/{vue-ui-xy-B_rfc8IL.js → vue-ui-xy-CvM6YBcJ.js} +16 -16
- package/dist/{vue-ui-xy-canvas-CQhMzfiO.cjs → vue-ui-xy-canvas-BwtGqNbz.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-ta12fbOW.js → vue-ui-xy-canvas-CPwKMu2P.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-K_dIfu_1.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D5k9fip1.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./usePrinter-DCjcVk63.cjs"),he=require("./vue-ui-skeleton-Cxg_LxBB.cjs"),me=require("./Title-ftVcKm8j.cjs"),J=require("./useNestedProp-CpW5Z_Ke.cjs"),fe=require("./PackageVersion-K_dIfu_1.cjs"),ye=require("./PenAndPaper-D4YVLZC3.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},Se=["xmlns","viewBox"],_e=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],$e={key:1},ze=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Ie=["href","startOffset"],Xe=["x","y","text-anchor","fill","font-size","font-weight"],Ae=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:K}){const{vue_ui_gauge:Q}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),ee=e.ref(null),$=e.ref(0),_=e.ref(null),z=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:I,keepUserOptionState:X}=pe.useUserOptionState({config:t.value}),{svgRef:A}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,j(),V.value+=1},{deep:!0});function Y(){const a=J.useNestedProp({userConfig:c.config,defaultConfig:Q});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:R,isImaging:L,generatePdf:D,generateImage:q}=Z.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(r=>{a.push(r.from||1e-7),a.push(r.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((r,l)=>({...r,color:s.convertColorToHex(r.color)||ae.value[l]||s.palette[l],value:((r.to||0)-(r.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,()=>{T(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=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(r),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI,l=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r),y=o.value.pointerRadius,ie=a+y*Math.cos(r+Math.PI/2),ce=n+y*Math.sin(r+Math.PI/2),de=a+y*Math.cos(r-Math.PI/2),ve=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${de},${ve} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:r,to:l}=k.value.series[a];if(v.value>=r&&v.value<=l)return n}return"#2D353C"}),x=e.ref(null);function j(){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(r=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:r,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const a=H.throttle(()=>{const{width:n,height:r}=H.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=r,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*r,o.value.bottom=r,o.value.labelFontSize=18/h.value*Math.min(r,n)<10?10:18/h.value*Math.min(r,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(r,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(r,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(r,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(r,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,r),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,r),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function T(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 r=t.value.style.chart.animation.speed;const l=Math.abs(a-v.value)/(r*60);function f(){v.value<a?v.value=Math.min(v.value+l,a):v.value>a&&(v.value=Math.max(v.value-l,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)),re=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))),U=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:r,y:l}=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:r,y2:l}}),W=e.computed(()=>d.value.map(a=>{const{x:n,y:r}=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:l,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:r,x2:l,y2:f}}));function oe(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const r=50;let l=0;return a.map(f=>(l+=f,`${l/100*r-f/4}%`))}const le=e.computed(()=>oe(d.value.map(a=>a.proportion*100))),ne=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)),se=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)})}),B=e.ref(!1);function ue(a){B.value=a,$.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return K({generatePdf:D,generateImage:q,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:_,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(I)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.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:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._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&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(X)||e.unref(N))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(R),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(q),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:l})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:l})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:l})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:l})),void 0,!0)]),key:"3"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:l})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.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(fe._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,_e)):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,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),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,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l,patternId:`pattern_${m.value}_${l}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:r.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:`url(#pattern_${m.value}_${l})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):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,(r,l)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${l}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 ${2*g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 -${2*g.value[l]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.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}_${l}`,startOffset:le.value[l]},e.toDisplayString(r.name||""),9,Ie)],8,Ve))),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(re.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:r.center.endX,y:r.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(r,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.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(r.name||""),9,Xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ae))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).y,"text-anchor":r.center.startX<u.value.x1-5?"end":r.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,r.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:r.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),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,je)):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",Te,[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,Ue)),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,We)),!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,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[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,Je)):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,Ke)],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,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.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,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-d85f8f4f"]]);exports.default=at;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkB2NdNK.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./usePrinter-Bn2DXY9B.cjs"),he=require("./vue-ui-skeleton-CyD0WfiB.cjs"),me=require("./Title-DIthuQxK.cjs"),J=require("./useNestedProp-BPS6WHYi.cjs"),fe=require("./PackageVersion-yffL-jfv.cjs"),ye=require("./PenAndPaper-CN2oty-x.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},Se=["xmlns","viewBox"],_e=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],$e={key:1},ze=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Ie=["href","startOffset"],Xe=["x","y","text-anchor","fill","font-size","font-weight"],Ae=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:K}){const{vue_ui_gauge:Q}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),ee=e.ref(null),$=e.ref(0),_=e.ref(null),z=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:I,keepUserOptionState:X}=pe.useUserOptionState({config:t.value}),{svgRef:A}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,j(),V.value+=1},{deep:!0});function Y(){const a=J.useNestedProp({userConfig:c.config,defaultConfig:Q});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:R,isImaging:L,generatePdf:D,generateImage:q}=Z.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(r=>{a.push(r.from||1e-7),a.push(r.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((r,l)=>({...r,color:s.convertColorToHex(r.color)||ae.value[l]||s.palette[l],value:((r.to||0)-(r.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,()=>{T(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=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(r),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI,l=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r),y=o.value.pointerRadius,ie=a+y*Math.cos(r+Math.PI/2),ce=n+y*Math.sin(r+Math.PI/2),de=a+y*Math.cos(r-Math.PI/2),ve=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${de},${ve} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:r,to:l}=k.value.series[a];if(v.value>=r&&v.value<=l)return n}return"#2D353C"}),x=e.ref(null);function j(){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(r=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:r,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const a=H.throttle(()=>{const{width:n,height:r}=H.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=r,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*r,o.value.bottom=r,o.value.labelFontSize=18/h.value*Math.min(r,n)<10?10:18/h.value*Math.min(r,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(r,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(r,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(r,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(r,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,r),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,r),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function T(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 r=t.value.style.chart.animation.speed;const l=Math.abs(a-v.value)/(r*60);function f(){v.value<a?v.value=Math.min(v.value+l,a):v.value>a&&(v.value=Math.max(v.value-l,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)),re=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))),U=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:r,y:l}=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:r,y2:l}}),W=e.computed(()=>d.value.map(a=>{const{x:n,y:r}=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:l,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:r,x2:l,y2:f}}));function oe(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const r=50;let l=0;return a.map(f=>(l+=f,`${l/100*r-f/4}%`))}const le=e.computed(()=>oe(d.value.map(a=>a.proportion*100))),ne=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)),se=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)})}),B=e.ref(!1);function ue(a){B.value=a,$.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return K({generatePdf:D,generateImage:q,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:_,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(I)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.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:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._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&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(X)||e.unref(N))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(R),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(q),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:l})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:l})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:l})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:l})),void 0,!0)]),key:"3"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:l})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.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(fe._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,_e)):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,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),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,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l,patternId:`pattern_${m.value}_${l}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:r.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:`url(#pattern_${m.value}_${l})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):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,(r,l)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${l}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 ${2*g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 -${2*g.value[l]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.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}_${l}`,startOffset:le.value[l]},e.toDisplayString(r.name||""),9,Ie)],8,Ve))),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(re.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:r.center.endX,y:r.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(r,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.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(r.name||""),9,Xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ae))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).y,"text-anchor":r.center.startX<u.value.x1-5?"end":r.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,r.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:r.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),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,je)):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",Te,[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,Ue)),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,We)),!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,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[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,Je)):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,Ke)],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,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.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,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-d85f8f4f"]]);exports.default=at;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BkB2NdNK.cjs"),k=require("./useNestedProp-BPS6WHYi.cjs"),p=require("./PackageVersion-yffL-jfv.cjs"),g=["viewBox","width"],v={key:0},_=["id"],y=["stop-color"],N=["stop-color"],C=["stroke"],V=["stroke"],w=["width","fill"],x=["fill"],B={key:0},E=["id"],b=["stroke"],L=["stroke","stroke-dasharray","stroke-dashoffset"],z=["filter"],G=["stroke","stroke-dasharray","stroke-dashoffset"],F=["fill"],P={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const{vue_ui_gizmo:f}=a.useConfig(),o=i,n=e.ref(a.createUid()),h=e.useSlots();e.onMounted(()=>{c()}),e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiGizmo does not support the #chart-background slot.")});function c(){!o.dataset&&o.dataset!==0&&a.error({componentName:"VueUiGizmo",type:"dataset"}),o.dataset<0&&console.warn("VueUiGizmo: dataset cannot be negative.")}const t=e.computed({get:()=>d(),set:s=>s});function d(){return k.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,s=>{t.value=d(),c()},{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 r=2*Math.PI*35,m=r-o.dataset/100*r;return{dasharray:`${r} ${r}`,dashoffset:m}});return(s,r)=>(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(p._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",v,[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,_)])):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*(i.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(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.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%"},r[0]||(r[0]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1)]),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,b),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,L),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,G)],8,z)):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(a.applyDataLabel)(t.value.formatter,o.dataset,e.unref(a.dataLabel)({v:o.dataset,s:"%"}))),9,F)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,g))}};exports.default=P;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as b, useSlots as z, onMounted as g, computed as c, watch as G, createElementBlock as a, openBlock as s, normalizeStyle as L, createVNode as N, createCommentVNode as i, createElementVNode as t, 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-A6avPZLy.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-CcohWUPI.js";
|
|
4
|
+
import { _ as P } from "./PackageVersion-CwdFBcJ8.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 = ["stroke"], J = ["stroke", "stroke-dasharray", "stroke-dashoffset"], K = ["filter"], Q = ["stroke", "stroke-dasharray", "stroke-dashoffset"], R = ["fill"], ee = {
|
|
6
6
|
__name: "vue-ui-gizmo",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-D5k9fip1.cjs"),me=require("./Title-ftVcKm8j.cjs"),se=require("./usePrinter-DCjcVk63.cjs"),be=require("./Tooltip-Dvq8qMfG.cjs"),ke=require("./vue-ui-skeleton-Cxg_LxBB.cjs"),xe=require("./BaseIcon-wuetMnRj.cjs"),we=require("./vue-ui-accordion-BiVdHPDv.cjs"),ue=require("./useNestedProp-CpW5Z_Ke.cjs"),Ce=require("./PackageVersion-K_dIfu_1.cjs"),_e=require("./PenAndPaper-D4YVLZC3.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee={key:2,style:"width:100%;background:transparent"},Te=["xmlns","viewBox"],Se=["width","height"],$e=["x","y","height","width","fill","stroke","stroke-width"],Ae=["x","y","height","width","fill","stroke","stroke-width"],ze=["x","y","width","height","fill","stroke","stroke-width"],Me=["x","y","width","height","fill","stroke","stroke-width"],Oe=["font-size","font-weight","fill","x","y"],Pe=["x","y","width","height","onMouseover"],Fe={key:0},De=["font-size","fill","x","y","font-weight"],Ie=["font-size","fill","x","y","font-weight"],Re={key:1},qe=["x","y","width","height","fill","stroke","stroke-width"],He=["x","y","width","height","fill","stroke","stroke-width"],Ue={key:2},Xe=["text-anchor","font-size","fill","font-weight","transform"],Ye=["text-anchor","font-size","fill","font-weight","transform"],Ge={key:4},je=["x","y","width","height","stroke","stroke-width"],We={key:5},Ke=["id"],Je=["stop-color"],Qe=["stop-color"],Ze=["x","y","font-size","fill"],el=["x","y","height","rx","fill"],ll=["x","y","font-size","fill"],tl=["stroke","x1","x2","y1","y2"],al=["fill","d"],ol={key:6},sl={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},ul=["stop-color"],nl=["stop-color"],rl=["x","y","width","height","rx"],il=["x","y","font-size","fill"],cl=["x","y","font-size","fill"],dl=["stroke","x1","x2","y1","y2"],vl=["fill","d"],yl={key:5,class:"vue-data-ui-watermark"},hl={key:6,ref:"source",dir:"auto"},pl={class:"vue-ui-data-table"},gl={key:0},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:ne}){e.useCssVars(t=>({"46dea1a0":t.tdo}));const{vue_ui_heatmap:re}=s.useConfig(),i=_,T=e.computed(()=>!!i.dataset&&i.dataset.length);s.objectIsEmpty(i.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const L=e.ref(s.createUid()),z=e.ref(null),ie=e.ref(null),M=e.ref(!1),O=e.ref(""),H=e.ref(void 0),N=e.ref(null),U=e.ref(0),X=e.ref(null),ce=e.ref(null),Y=e.ref(!1),G=e.ref(0),l=e.computed({get:()=>J(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Le.useUserOptionState({config:l.value}),{svgRef:K}=Ne.useChartAccessibility({config:l.value.style.title});function J(){const t=ue.useNestedProp({userConfig:i.config,defaultConfig:re});let u={};return t.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[t.theme]||i.config,defaultConfig:t})}:u=t,i.config&&s.hasDeepProperty(i.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?u.style.layout.dataLabels.xAxis.showOnlyAtModulo=i.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:u.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,u}e.watch(()=>i.config,t=>{l.value=J(),P.value=!l.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=l.value.table.show,g.value.showTooltip=l.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:le}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:l.value.style.title.text||"vue-ui-heatmap",options:l.value.userOptions.print}),de=e.computed(()=>l.value.userOptions.show&&!l.value.style.title.text),g=e.ref({showTable:l.value.table.show,showTooltip:l.value.style.tooltip.show}),ve=e.computed(()=>l.value.table.responsiveBreakpoint);function ye(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<ve.value})}).observe(X.value)}e.onMounted(F);function F(){ye()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(t=>(t.values||[]).length))),f=e.computed(()=>{const t=l.value.style.layout.padding.top+l.value.style.layout.padding.bottom+i.dataset.length*l.value.style.layout.cells.height,u=l.value.style.layout.padding.left+l.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*l.value.style.layout.cells.height,r=t+(l.value.style.legend.show?l.value.style.legend.position==="right"?0:l.value.style.layout.cells.height*2:0);return{height:t,heightWithLegend:r,width:u}}),S=e.computed(()=>l.value.style.legend.position),a=e.computed(()=>({top:l.value.style.layout.padding.top,left:l.value.style.layout.padding.left,right:f.value.width-l.value.style.layout.padding.right-(S.value==="right"&&l.value.style.legend.show?92:0),bottom:f.value.height-l.value.style.layout.padding.bottom,height:f.value.height-l.value.style.layout.padding.top-l.value.style.layout.padding.bottom,width:f.value.width-l.value.style.layout.padding.right-l.value.style.layout.padding.left-(S.value==="right"&&l.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(t=>t.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(t=>t.values))),w=e.computed(()=>{const t=i.dataset.flatMap(r=>r.values);return t.reduce((r,n)=>r+n,0)/t.length}),o=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<i.dataset.length?i.dataset.length:k.value)})),v=e.computed(()=>{const t=l.value.style.layout.dataLabels.yAxis.values.length?l.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=l.value.style.layout.dataLabels.xAxis.values,r=i.dataset.map(d=>d.values.reduce((h,q)=>h+q,0)),n=Math.max(...r),c=Math.min(...r),y=[];for(let d=0;d<k.value;d+=1)y.push(i.dataset.map(h=>h.values[d]||0).reduce((h,q)=>h+q,0));const p=Math.max(...y),R=Math.min(...y);return{yTotals:r.map(d=>{const h=isNaN(d/n)?0:d/n;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,c,n,d)}}),xTotals:y.map(d=>{const h=isNaN(d/p)?0:d/p;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:t,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((t,u)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(t=>({...t,temperatures:(t.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),ratio:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value))>1?1:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value)),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(u)/Math.abs(w.value))>1?1:Math.abs(1-Math.abs(u)/Math.abs(w.value)),color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function he(t,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=t;H.value=R,b.value=c,B.value={datapoint:t,seriesIndex:u,series:$.value,config:l.value},M.value=!0;let d="";const h=l.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}))?O.value=h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${l.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(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(l.value.style.layout.cells.value.formatter,c,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:c,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.tooltip.roundingValue}),{datapoint:t,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${l.value.style.tooltip.fontSize}px">${d}</div>`)}const V=e.computed(()=>a.value.top+D.value*(1-b.value/m.value)),E=e.computed(()=>a.value.left+(f.value.width-a.value.left-l.value.style.layout.padding.right)*(b.value/m.value));function pe(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.yTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.yTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[t],rowIndex:t})}function ge(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.xTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.xTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[t],colIndex:t})}e.computed(()=>{const t=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:t,body:u}});function te(){e.nextTick(()=>{const t=["",...i.dataset.map((c,y)=>c.name)],u=[];for(let c=0;c<v.value.xLabels.length;c+=1){const y=[v.value.xLabels[c]];for(let p=0;p<i.dataset.length;p+=1)y.push([i.dataset[p].values[c]]);u.push(y)}const r=[[l.value.style.title.text],[l.value.style.title.subtitle.text],[[""],[""],[""]]].concat([t]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function fe(t){C.value=t,U.value+=1}function ae(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const A=e.ref(!1);function I(){A.value=!A.value}return ne({generatePdf:ee,generateCsv:te,generateImage:le,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${C.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.backgroundColor}`),id:`heatmap__${L.value}`,onMouseenter:u[3]||(u[3]=()=>e.unref(j)(!0)),onMouseleave:u[4]||(u[4]=()=>e.unref(j)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(K),backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ce,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...l.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...l.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),l.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${U.value}`,backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:z.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(ee),onGenerateCsv:te,onGenerateImage:e.unref(le),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:n})),void 0,!0)]),key:"7"}: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),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:K,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${f.value.width} ${f.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${l.value.style.color}`)},[e.createVNode(Ce._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:f.value.width,height:f.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.color.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:r.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Ae))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,ze),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:c.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Me),l.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":l.value.style.layout.cells.value.fontSize,"font-weight":l.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.value,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,Oe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n,width:o.value.width,height:o.value.height,fill:"transparent",stroke:"none",onMouseover:p=>he(c,n,a.value.left+o.value.width*y,a.value.top+o.value.height*n),onMouseout:u[0]||(u[0]=p=>{M.value=!1,H.value=void 0,b.value=null,N.value=null})},null,40,Pe)]))),256)),l.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize/3+l.value.style.layout.dataLabels.yAxis.offsetY-(l.value.style.layout.cells.rowTotal.value.show?l.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,De),l.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize+l.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(pe(n)),9,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,qe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,He)])):e.createCommentVNode("",!0)]))),256)),l.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":l.value.style.layout.dataLabels.xAxis.rotation===0?"middle":l.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${a.value.top+l.value.style.layout.dataLabels.xAxis.offsetY-6-(l.value.style.layout.cells.columnTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}), rotate(${l.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,Xe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.value.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("text",{class:"vue-ui-heatmap-col-total","text-anchor":l.value.style.layout.cells.columnTotal.value.rotation===0?"middle":l.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+l.value.style.layout.cells.columnTotal.value.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${(o.value.height+l.value.style.layout.cells.spacing)*(_.dataset.length+1)+l.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${l.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(ge(n)),9,Ye))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:N.value.y-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing,width:o.value.width-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,fill:"transparent",stroke:l.value.style.layout.cells.selected.color,"stroke-width":l.value.style.layout.cells.selected.border,rx:1},null,8,je)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.hot},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.cold},null,8,Qe)],8,Ke)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-l.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:l.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,el),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+l.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,ll),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:V.value,y2:V.value},null,8,tl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${a.value.right+36},${V.value} ${a.value.right+26},${V.value-8} ${a.value.right+26},${V.value+8}z`},null,8,al)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",sl,[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.cold},null,8,ul),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.hot},null,8,nl)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height,width:f.value.width-a.value.left-l.value.style.layout.padding.right,height:l.value.style.layout.cells.height,rx:l.value.style.legend.scaleBorderRadius>l.value.style.layout.cells.height/2?l.value.style.layout.cells.height/2:l.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,rl),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"start","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,il),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"end","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,cl),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:E.value,x2:E.value,y1:a.value.bottom+l.value.style.layout.cells.height,y2:a.value.bottom+l.value.style.layout.cells.height*2},null,8,dl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+l.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+l.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+l.value.style.layout.cells.height-20}z`},null,8,vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:f.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yl,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:7,config:{type:"heatmap",style:{backgroundColor:l.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:l.value.style.tooltip.backgroundColor,color:l.value.style.tooltip.color,borderRadius:l.value.style.tooltip.borderRadius,borderColor:l.value.style.tooltip.borderColor,borderWidth:l.value.style.tooltip.borderWidth,fontSize:l.value.style.tooltip.fontSize,backgroundOpacity:l.value.style.tooltip.backgroundOpacity,position:l.value.style.tooltip.position,offsetY:l.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:l.value.style.tooltip.customFormat&&typeof l.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color},head:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:X,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":Y.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:${l.value.table.th.backgroundColor};`),onClick:u[1]||(u[1]=r=>g.value.showTable=!1),onKeypress:u[2]||(u[2]=e.withKeys(r=>g.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:l.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",pl,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${l.value.table.th.backgroundColor};color:${l.value.table.th.color};outline:${l.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(l.value.style.title.text)+" ",1),l.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gl,e.toDisplayString(l.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${l.value.table.th.backgroundColor};color:${l.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},e.toDisplayString(r.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${l.value.table.td.backgroundColor};color:${l.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":l.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",ml,e.toDisplayString(r),1)],12,fl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(c,y)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":_.dataset[y].name,style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",kl,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.values[n],s:l.value.style.layout.dataLabels.suffix,r:l.value.table.td.roundingValue})),1)],12,bl))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},wl=Be._export_sfc(xl,[["__scopeId","data-v-5e5b92b5"]]);exports.default=wl;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkB2NdNK.cjs"),me=require("./Title-DIthuQxK.cjs"),se=require("./usePrinter-Bn2DXY9B.cjs"),be=require("./Tooltip-D43-t32P.cjs"),ke=require("./vue-ui-skeleton-CyD0WfiB.cjs"),xe=require("./BaseIcon-DnyvDfd_.cjs"),we=require("./vue-ui-accordion-CGoz8eg6.cjs"),ue=require("./useNestedProp-BPS6WHYi.cjs"),Ce=require("./PackageVersion-yffL-jfv.cjs"),_e=require("./PenAndPaper-CN2oty-x.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee={key:2,style:"width:100%;background:transparent"},Te=["xmlns","viewBox"],Se=["width","height"],$e=["x","y","height","width","fill","stroke","stroke-width"],Ae=["x","y","height","width","fill","stroke","stroke-width"],ze=["x","y","width","height","fill","stroke","stroke-width"],Me=["x","y","width","height","fill","stroke","stroke-width"],Oe=["font-size","font-weight","fill","x","y"],Pe=["x","y","width","height","onMouseover"],Fe={key:0},De=["font-size","fill","x","y","font-weight"],Ie=["font-size","fill","x","y","font-weight"],Re={key:1},qe=["x","y","width","height","fill","stroke","stroke-width"],He=["x","y","width","height","fill","stroke","stroke-width"],Ue={key:2},Xe=["text-anchor","font-size","fill","font-weight","transform"],Ye=["text-anchor","font-size","fill","font-weight","transform"],Ge={key:4},je=["x","y","width","height","stroke","stroke-width"],We={key:5},Ke=["id"],Je=["stop-color"],Qe=["stop-color"],Ze=["x","y","font-size","fill"],el=["x","y","height","rx","fill"],ll=["x","y","font-size","fill"],tl=["stroke","x1","x2","y1","y2"],al=["fill","d"],ol={key:6},sl={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},ul=["stop-color"],nl=["stop-color"],rl=["x","y","width","height","rx"],il=["x","y","font-size","fill"],cl=["x","y","font-size","fill"],dl=["stroke","x1","x2","y1","y2"],vl=["fill","d"],yl={key:5,class:"vue-data-ui-watermark"},hl={key:6,ref:"source",dir:"auto"},pl={class:"vue-ui-data-table"},gl={key:0},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:ne}){e.useCssVars(t=>({"46dea1a0":t.tdo}));const{vue_ui_heatmap:re}=s.useConfig(),i=_,T=e.computed(()=>!!i.dataset&&i.dataset.length);s.objectIsEmpty(i.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const L=e.ref(s.createUid()),z=e.ref(null),ie=e.ref(null),M=e.ref(!1),O=e.ref(""),H=e.ref(void 0),N=e.ref(null),U=e.ref(0),X=e.ref(null),ce=e.ref(null),Y=e.ref(!1),G=e.ref(0),l=e.computed({get:()=>J(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Le.useUserOptionState({config:l.value}),{svgRef:K}=Ne.useChartAccessibility({config:l.value.style.title});function J(){const t=ue.useNestedProp({userConfig:i.config,defaultConfig:re});let u={};return t.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[t.theme]||i.config,defaultConfig:t})}:u=t,i.config&&s.hasDeepProperty(i.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?u.style.layout.dataLabels.xAxis.showOnlyAtModulo=i.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:u.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,u}e.watch(()=>i.config,t=>{l.value=J(),P.value=!l.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=l.value.table.show,g.value.showTooltip=l.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:le}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:l.value.style.title.text||"vue-ui-heatmap",options:l.value.userOptions.print}),de=e.computed(()=>l.value.userOptions.show&&!l.value.style.title.text),g=e.ref({showTable:l.value.table.show,showTooltip:l.value.style.tooltip.show}),ve=e.computed(()=>l.value.table.responsiveBreakpoint);function ye(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<ve.value})}).observe(X.value)}e.onMounted(F);function F(){ye()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(t=>(t.values||[]).length))),f=e.computed(()=>{const t=l.value.style.layout.padding.top+l.value.style.layout.padding.bottom+i.dataset.length*l.value.style.layout.cells.height,u=l.value.style.layout.padding.left+l.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*l.value.style.layout.cells.height,r=t+(l.value.style.legend.show?l.value.style.legend.position==="right"?0:l.value.style.layout.cells.height*2:0);return{height:t,heightWithLegend:r,width:u}}),S=e.computed(()=>l.value.style.legend.position),a=e.computed(()=>({top:l.value.style.layout.padding.top,left:l.value.style.layout.padding.left,right:f.value.width-l.value.style.layout.padding.right-(S.value==="right"&&l.value.style.legend.show?92:0),bottom:f.value.height-l.value.style.layout.padding.bottom,height:f.value.height-l.value.style.layout.padding.top-l.value.style.layout.padding.bottom,width:f.value.width-l.value.style.layout.padding.right-l.value.style.layout.padding.left-(S.value==="right"&&l.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(t=>t.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(t=>t.values))),w=e.computed(()=>{const t=i.dataset.flatMap(r=>r.values);return t.reduce((r,n)=>r+n,0)/t.length}),o=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<i.dataset.length?i.dataset.length:k.value)})),v=e.computed(()=>{const t=l.value.style.layout.dataLabels.yAxis.values.length?l.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=l.value.style.layout.dataLabels.xAxis.values,r=i.dataset.map(d=>d.values.reduce((h,q)=>h+q,0)),n=Math.max(...r),c=Math.min(...r),y=[];for(let d=0;d<k.value;d+=1)y.push(i.dataset.map(h=>h.values[d]||0).reduce((h,q)=>h+q,0));const p=Math.max(...y),R=Math.min(...y);return{yTotals:r.map(d=>{const h=isNaN(d/n)?0:d/n;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,c,n,d)}}),xTotals:y.map(d=>{const h=isNaN(d/p)?0:d/p;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:t,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((t,u)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(t=>({...t,temperatures:(t.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),ratio:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value))>1?1:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value)),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(u)/Math.abs(w.value))>1?1:Math.abs(1-Math.abs(u)/Math.abs(w.value)),color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function he(t,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=t;H.value=R,b.value=c,B.value={datapoint:t,seriesIndex:u,series:$.value,config:l.value},M.value=!0;let d="";const h=l.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}))?O.value=h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${l.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(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(l.value.style.layout.cells.value.formatter,c,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:c,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.tooltip.roundingValue}),{datapoint:t,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${l.value.style.tooltip.fontSize}px">${d}</div>`)}const V=e.computed(()=>a.value.top+D.value*(1-b.value/m.value)),E=e.computed(()=>a.value.left+(f.value.width-a.value.left-l.value.style.layout.padding.right)*(b.value/m.value));function pe(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.yTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.yTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[t],rowIndex:t})}function ge(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.xTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.xTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[t],colIndex:t})}e.computed(()=>{const t=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:t,body:u}});function te(){e.nextTick(()=>{const t=["",...i.dataset.map((c,y)=>c.name)],u=[];for(let c=0;c<v.value.xLabels.length;c+=1){const y=[v.value.xLabels[c]];for(let p=0;p<i.dataset.length;p+=1)y.push([i.dataset[p].values[c]]);u.push(y)}const r=[[l.value.style.title.text],[l.value.style.title.subtitle.text],[[""],[""],[""]]].concat([t]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function fe(t){C.value=t,U.value+=1}function ae(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const A=e.ref(!1);function I(){A.value=!A.value}return ne({generatePdf:ee,generateCsv:te,generateImage:le,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${C.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.backgroundColor}`),id:`heatmap__${L.value}`,onMouseenter:u[3]||(u[3]=()=>e.unref(j)(!0)),onMouseleave:u[4]||(u[4]=()=>e.unref(j)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(K),backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ce,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...l.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...l.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),l.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${U.value}`,backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:z.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(ee),onGenerateCsv:te,onGenerateImage:e.unref(le),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:n})),void 0,!0)]),key:"7"}: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),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:K,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${f.value.width} ${f.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${l.value.style.color}`)},[e.createVNode(Ce._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:f.value.width,height:f.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.color.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:r.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Ae))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,ze),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:c.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Me),l.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":l.value.style.layout.cells.value.fontSize,"font-weight":l.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.value,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,Oe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n,width:o.value.width,height:o.value.height,fill:"transparent",stroke:"none",onMouseover:p=>he(c,n,a.value.left+o.value.width*y,a.value.top+o.value.height*n),onMouseout:u[0]||(u[0]=p=>{M.value=!1,H.value=void 0,b.value=null,N.value=null})},null,40,Pe)]))),256)),l.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize/3+l.value.style.layout.dataLabels.yAxis.offsetY-(l.value.style.layout.cells.rowTotal.value.show?l.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,De),l.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize+l.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(pe(n)),9,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,qe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,He)])):e.createCommentVNode("",!0)]))),256)),l.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":l.value.style.layout.dataLabels.xAxis.rotation===0?"middle":l.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${a.value.top+l.value.style.layout.dataLabels.xAxis.offsetY-6-(l.value.style.layout.cells.columnTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}), rotate(${l.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,Xe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.value.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("text",{class:"vue-ui-heatmap-col-total","text-anchor":l.value.style.layout.cells.columnTotal.value.rotation===0?"middle":l.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+l.value.style.layout.cells.columnTotal.value.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${(o.value.height+l.value.style.layout.cells.spacing)*(_.dataset.length+1)+l.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${l.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(ge(n)),9,Ye))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:N.value.y-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing,width:o.value.width-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,fill:"transparent",stroke:l.value.style.layout.cells.selected.color,"stroke-width":l.value.style.layout.cells.selected.border,rx:1},null,8,je)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.hot},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.cold},null,8,Qe)],8,Ke)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-l.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:l.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,el),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+l.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,ll),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:V.value,y2:V.value},null,8,tl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${a.value.right+36},${V.value} ${a.value.right+26},${V.value-8} ${a.value.right+26},${V.value+8}z`},null,8,al)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",sl,[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.cold},null,8,ul),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.hot},null,8,nl)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height,width:f.value.width-a.value.left-l.value.style.layout.padding.right,height:l.value.style.layout.cells.height,rx:l.value.style.legend.scaleBorderRadius>l.value.style.layout.cells.height/2?l.value.style.layout.cells.height/2:l.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,rl),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"start","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,il),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"end","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,cl),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:E.value,x2:E.value,y1:a.value.bottom+l.value.style.layout.cells.height,y2:a.value.bottom+l.value.style.layout.cells.height*2},null,8,dl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+l.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+l.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+l.value.style.layout.cells.height-20}z`},null,8,vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:f.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yl,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:7,config:{type:"heatmap",style:{backgroundColor:l.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:l.value.style.tooltip.backgroundColor,color:l.value.style.tooltip.color,borderRadius:l.value.style.tooltip.borderRadius,borderColor:l.value.style.tooltip.borderColor,borderWidth:l.value.style.tooltip.borderWidth,fontSize:l.value.style.tooltip.fontSize,backgroundOpacity:l.value.style.tooltip.backgroundOpacity,position:l.value.style.tooltip.position,offsetY:l.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:l.value.style.tooltip.customFormat&&typeof l.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color},head:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:X,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":Y.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:${l.value.table.th.backgroundColor};`),onClick:u[1]||(u[1]=r=>g.value.showTable=!1),onKeypress:u[2]||(u[2]=e.withKeys(r=>g.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:l.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",pl,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${l.value.table.th.backgroundColor};color:${l.value.table.th.color};outline:${l.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(l.value.style.title.text)+" ",1),l.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gl,e.toDisplayString(l.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${l.value.table.th.backgroundColor};color:${l.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},e.toDisplayString(r.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${l.value.table.td.backgroundColor};color:${l.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":l.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",ml,e.toDisplayString(r),1)],12,fl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(c,y)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":_.dataset[y].name,style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",kl,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.values[n],s:l.value.style.layout.dataLabels.suffix,r:l.value.table.td.roundingValue})),1)],12,bl))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},wl=Be._export_sfc(xl,[["__scopeId","data-v-5e5b92b5"]]);exports.default=wl;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Ee, computed as f, ref as b, watch as Te, onMounted as Ge, createElementBlock as i, openBlock as o, unref as r, normalizeStyle as T, normalizeClass as Q, createBlock as D, createCommentVNode as d, createVNode as ie, createSlots as Ue, withCtx as A, renderSlot as m, normalizeProps as R, guardReactiveProps as X, Fragment as _, renderList as z, createElementVNode as v, toDisplayString as x, withKeys as Ye, createTextVNode as He, nextTick as De } from "vue";
|
|
2
|
-
import { u as je, o as We, e as Ae, c as re, a as qe, C as Ke, O as j, g as Je, X as Qe, G as ve, i as S, f as M, v as N, q as Ze, r as el, x as ll, y as tl } from "./index-
|
|
3
|
-
import { _ as al } from "./Title-
|
|
4
|
-
import { u as ol, U as sl } from "./usePrinter-
|
|
5
|
-
import { _ as ul } from "./Tooltip-
|
|
6
|
-
import nl from "./vue-ui-skeleton-
|
|
7
|
-
import il from "./BaseIcon-
|
|
8
|
-
import rl from "./vue-ui-accordion-
|
|
9
|
-
import { u as ze } from "./useNestedProp-
|
|
10
|
-
import { _ as vl } from "./PackageVersion-
|
|
11
|
-
import { P as yl } from "./PenAndPaper
|
|
2
|
+
import { u as je, o as We, e as Ae, c as re, a as qe, C as Ke, O as j, g as Je, X as Qe, G as ve, i as S, f as M, v as N, q as Ze, r as el, x as ll, y as tl } from "./index-A6avPZLy.js";
|
|
3
|
+
import { _ as al } from "./Title-D-MrSzZ9.js";
|
|
4
|
+
import { u as ol, U as sl } from "./usePrinter-B6swu4OY.js";
|
|
5
|
+
import { _ as ul } from "./Tooltip-CB3FSZI5.js";
|
|
6
|
+
import nl from "./vue-ui-skeleton-CDtUy7-2.js";
|
|
7
|
+
import il from "./BaseIcon-DnLYMp6l.js";
|
|
8
|
+
import rl from "./vue-ui-accordion-B_xjSc0r.js";
|
|
9
|
+
import { u as ze } from "./useNestedProp-CcohWUPI.js";
|
|
10
|
+
import { _ as vl } from "./PackageVersion-CwdFBcJ8.js";
|
|
11
|
+
import { P as yl } from "./PenAndPaper--UiqgX9J.js";
|
|
12
12
|
import { u as dl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as cl } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { _ as hl } 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-D5k9fip1.cjs"),le=require("./useNestedProp-CpW5Z_Ke.cjs"),ae=require("./usePrinter-DCjcVk63.cjs"),Ce=require("./PackageVersion-K_dIfu_1.cjs"),we=require("./Legend-BiZSIl_8.cjs"),Be=require("./Title-ftVcKm8j.cjs"),Se=require("./Tooltip-Dvq8qMfG.cjs"),_e=require("./DataTable-CxPPog04.cjs"),Ne=require("./vue-ui-accordion-BiVdHPDv.cjs"),ze=require("./PenAndPaper-D4YVLZC3.cjs"),$e=require("./vue-ui-skeleton-Cxg_LxBB.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),m=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;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=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.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 q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.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:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.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,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=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):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):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.x)));return l<0?l:0}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=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?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.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?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.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 fe(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 pe(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,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:pe(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 Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),me=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 xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},m.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 Q(){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(p=>[[p.seriesName],[p.label],[p.valueX],[p.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 ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,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(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${T.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(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),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:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}: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,ref_key:"svgRef",ref:j,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(Ce._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,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(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,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(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,Re))),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,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(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,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(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,Ge))),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,Ze)):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,Je)):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,Ke)):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:m.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,Qe),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,et)],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,tt))),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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,rt))),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:p=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,m.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.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:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:me.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.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({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.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(Ne.default,{key:8,hideDetails:"",config:{open:f.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(_e.DataTable,{key:`table_${V.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=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ct)]),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,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-56983f81"]]);exports.default=dt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkB2NdNK.cjs"),le=require("./useNestedProp-BPS6WHYi.cjs"),ae=require("./usePrinter-Bn2DXY9B.cjs"),Ce=require("./PackageVersion-yffL-jfv.cjs"),we=require("./Legend-CYRB328N.cjs"),Be=require("./Title-DIthuQxK.cjs"),Se=require("./Tooltip-D43-t32P.cjs"),_e=require("./DataTable-CngiZztx.cjs"),Ne=require("./vue-ui-accordion-CGoz8eg6.cjs"),ze=require("./PenAndPaper-CN2oty-x.cjs"),$e=require("./vue-ui-skeleton-CyD0WfiB.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),m=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;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=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.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 q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.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:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.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,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=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):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):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.x)));return l<0?l:0}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=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?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.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?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.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 fe(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 pe(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,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:pe(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 Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),me=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 xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},m.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 Q(){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(p=>[[p.seriesName],[p.label],[p.valueX],[p.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 ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,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(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,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:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${T.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(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),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:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}: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:"6"}: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:"7"}: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,ref_key:"svgRef",ref:j,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(Ce._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,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(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,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(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,Re))),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,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(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,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(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,Ge))),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,Ze)):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,Je)):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,Ke)):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:m.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,Qe),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,et)],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,tt))),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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(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:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,rt))),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:p=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,m.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.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:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:me.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.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({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.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(Ne.default,{key:8,hideDetails:"",config:{open:f.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(_e.DataTable,{key:`table_${V.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=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ct)]),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,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-56983f81"]]);exports.default=dt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as f, onMounted as We, onBeforeUnmount as He, watch as Ee, createElementBlock as r, openBlock as s, unref as h, normalizeStyle as M, normalizeClass as O, renderSlot as x, createBlock as z, createCommentVNode as v, createElementVNode as T, createVNode as we, createSlots as Ge, withCtx as m, normalizeProps as I, guardReactiveProps as P, Fragment as b, renderList as k, toDisplayString as L, createTextVNode as Ve, nextTick as qe } from "vue";
|
|
2
|
-
import { u as Ze, c as Ce, o as Je, e as _e, g as Ke, b as Qe, d as et, p as H, D as $e, i as F, f as X, X as tt, l as lt, h as at, G as st, F as N, t as ot, a as rt, C as E, q as nt, r as ut, x as it } from "./index-
|
|
3
|
-
import { u as Me } from "./useNestedProp-
|
|
4
|
-
import { u as ct, U as vt } from "./usePrinter-
|
|
5
|
-
import { _ as ht } from "./PackageVersion-
|
|
6
|
-
import { L as yt } from "./Legend-
|
|
7
|
-
import { _ as dt } from "./Title-
|
|
8
|
-
import { _ as ft } from "./Tooltip-
|
|
9
|
-
import { D as xt } from "./DataTable-
|
|
10
|
-
import pt from "./vue-ui-accordion-
|
|
11
|
-
import { P as mt } from "./PenAndPaper
|
|
12
|
-
import gt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Ze, c as Ce, o as Je, e as _e, g as Ke, b as Qe, d as et, p as H, D as $e, i as F, f as X, X as tt, l as lt, h as at, G as st, F as N, t as ot, a as rt, C as E, q as nt, r as ut, x as it } from "./index-A6avPZLy.js";
|
|
3
|
+
import { u as Me } from "./useNestedProp-CcohWUPI.js";
|
|
4
|
+
import { u as ct, U as vt } from "./usePrinter-B6swu4OY.js";
|
|
5
|
+
import { _ as ht } from "./PackageVersion-CwdFBcJ8.js";
|
|
6
|
+
import { L as yt } from "./Legend-2egPeIm_.js";
|
|
7
|
+
import { _ as dt } from "./Title-D-MrSzZ9.js";
|
|
8
|
+
import { _ as ft } from "./Tooltip-CB3FSZI5.js";
|
|
9
|
+
import { D as xt } from "./DataTable-CqmM6dKK.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-B_xjSc0r.js";
|
|
11
|
+
import { P as mt } from "./PenAndPaper--UiqgX9J.js";
|
|
12
|
+
import gt from "./vue-ui-skeleton-CDtUy7-2.js";
|
|
13
13
|
import { t as bt, u as kt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
14
14
|
import { u as wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
|