vue-data-ui 2.11.0 → 2.11.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-BSsIs5Aj.js → Arrow-Ch3m7pIz.js} +1 -1
- package/dist/{Arrow-BfdnOsct.cjs → Arrow-Djn3xrHB.cjs} +1 -1
- package/dist/{BaseIcon-BPehVcsN.js → BaseIcon-D9r5PTQj.js} +1 -1
- package/dist/{BaseIcon-dtfVrHa7.cjs → BaseIcon-ljtRuDne.cjs} +1 -1
- package/dist/{ColorPicker-C-nhrZ-J.cjs → ColorPicker-CiQtzrYd.cjs} +1 -1
- package/dist/{ColorPicker-ByaQGf5i.js → ColorPicker-DuOr2Ic4.js} +3 -3
- package/dist/{DataTable-pT39kn0W.cjs → DataTable-CzL8BmEn.cjs} +1 -1
- package/dist/{DataTable-BdekL1Hc.js → DataTable-p1tKJjJU.js} +2 -2
- package/dist/{Legend-HckkoJBL.js → Legend-COUltTuv.js} +2 -2
- package/dist/{Legend-C8PTNFsH.cjs → Legend-m-jOk1o6.cjs} +1 -1
- package/dist/{PackageVersion-B6nxekEz.cjs → PackageVersion-BhpRHJg-.cjs} +1 -1
- package/dist/{PackageVersion-BPCzY_N5.js → PackageVersion-Db8Jk3Yz.js} +1 -1
- package/dist/{PenAndPaper-B3KDT2of.js → PenAndPaper-Bleo21mI.js} +3 -3
- package/dist/{PenAndPaper-BC1d2zL5.cjs → PenAndPaper-Cr_VFW1Y.cjs} +1 -1
- package/dist/{Shape-Cr-Qt6IO.cjs → Shape-3lpxIkGY.cjs} +1 -1
- package/dist/{Shape-B0OqBXWl.js → Shape-DThtou8P.js} +1 -1
- package/dist/{Slicer-BXBqgQau.js → Slicer-BSgrBZJB.js} +2 -2
- package/dist/{Slicer-BWr1nt8v.cjs → Slicer-D5exzdrG.cjs} +1 -1
- package/dist/{Title-Cq5kGGhS.js → Title-C6HOVO5o.js} +1 -1
- package/dist/{Title-GpO-QNhg.cjs → Title-DnNgxDaw.cjs} +1 -1
- package/dist/{Tooltip-eL97y6Ym.cjs → Tooltip-BcRV15Nk.cjs} +1 -1
- package/dist/{Tooltip-CxzDtoXn.js → Tooltip-CkPkykAp.js} +1 -1
- package/dist/{dom-to-png-G_nLlvER.js → dom-to-png-C-xt3eHI.js} +1 -1
- package/dist/{dom-to-png-BeN7LHfC.cjs → dom-to-png-dbkxxccc.cjs} +1 -1
- package/dist/{img-08K-Su3g.cjs → img-B6MWbnlo.cjs} +1 -1
- package/dist/{img-BzMFujbd.js → img-CeyprTwt.js} +1 -1
- package/dist/{index-CG-euAJp.cjs → index-BKWunRAY.cjs} +1 -1
- package/dist/{index-BMcwUsiG.js → index-Ckt5xLw3.js} +1 -1
- package/dist/{pdf-achyloML.cjs → pdf-BoIy0kYM.cjs} +1 -1
- package/dist/{pdf-BJNBeUWV.js → pdf-C8Uc-ViT.js} +1 -1
- package/dist/{useNestedProp-DwQWwt5e.js → useNestedProp-BU5A_H6S.js} +1 -1
- package/dist/{useNestedProp-DYDoE86w.cjs → useNestedProp-swJfhg8O.cjs} +1 -1
- package/dist/{usePrinter-BBqldIVF.cjs → usePrinter-Dhf-GWO2.cjs} +1 -1
- package/dist/{usePrinter-BpCNa5RW.js → usePrinter-Drrm-7ZN.js} +3 -3
- package/dist/{vue-data-ui-BTz28Upr.cjs → vue-data-ui-BwmmF0Rx.cjs} +1 -1
- package/dist/{vue-data-ui-DXciuF6V.js → vue-data-ui-DEFuCGY2.js} +63 -63
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Cv0XQSLU.cjs → vue-ui-3d-bar-B7HO9mUa.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-D-x0k_IG.js → vue-ui-3d-bar-Dejz1jbq.js} +9 -9
- package/dist/{vue-ui-accordion-dJGHfrMl.cjs → vue-ui-accordion-CACZOsPN.cjs} +1 -1
- package/dist/{vue-ui-accordion-DKw3ZQgh.js → vue-ui-accordion-CHWjFAdS.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BKOh2L3c.js → vue-ui-age-pyramid-BCbQzcSN.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DzQ9EYPB.cjs → vue-ui-age-pyramid-BuI0BAu6.cjs} +1 -1
- package/dist/{vue-ui-annotator-BSGf2Uh1.js → vue-ui-annotator-BVkhLQx1.js} +2 -2
- package/dist/{vue-ui-annotator-DJDY5xOf.cjs → vue-ui-annotator-D3WW79fZ.cjs} +1 -1
- package/dist/{vue-ui-bullet-BHaeMobd.cjs → vue-ui-bullet-Cu4QFP97.cjs} +1 -1
- package/dist/{vue-ui-bullet-CJLZA5Lf.js → vue-ui-bullet-Dp-pvoks.js} +8 -8
- package/dist/{vue-ui-candlestick-D5aSctEq.cjs → vue-ui-candlestick-CvzvkTZL.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BLqrtK2S.js → vue-ui-candlestick-PL89PKKX.js} +11 -11
- package/dist/{vue-ui-carousel-table-CvDic9rq.js → vue-ui-carousel-table-CxCDgVti.js} +4 -4
- package/dist/{vue-ui-carousel-table-DoQSiBlh.cjs → vue-ui-carousel-table-pGj3lD-7.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Co3ZtHYQ.js → vue-ui-chestnut-B59bltYj.js} +8 -8
- package/dist/{vue-ui-chestnut-BW9_1uRo.cjs → vue-ui-chestnut-BCLNZl02.cjs} +1 -1
- package/dist/{vue-ui-chord-XU2pSfEx.js → vue-ui-chord-311T5EMM.js} +12 -12
- package/dist/{vue-ui-chord-CUREQYhU.cjs → vue-ui-chord-I12oZYBZ.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-Bdtr6z4Z.cjs → vue-ui-circle-pack-BdEy-F2l.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-DpbWAZFC.js → vue-ui-circle-pack-ckubmbMP.js} +9 -9
- package/dist/{vue-ui-cursor-BAMt5dcz.cjs → vue-ui-cursor-CB9lfY2N.cjs} +1 -1
- package/dist/{vue-ui-cursor-CuvyoiLa.js → vue-ui-cursor-DuaNjqbd.js} +2 -2
- package/dist/{vue-ui-dashboard-Bvrpw4EQ.cjs → vue-ui-dashboard-BYVM2ULB.cjs} +1 -1
- package/dist/{vue-ui-dashboard-_LJuvqRE.js → vue-ui-dashboard-z6r_7oqD.js} +62 -62
- package/dist/{vue-ui-digits-CGzSArOS.cjs → vue-ui-digits-DKjgPEvR.cjs} +1 -1
- package/dist/{vue-ui-digits-CeLZoNoA.js → vue-ui-digits-uhUYI1ca.js} +2 -2
- package/dist/{vue-ui-donut-BegwljuG.js → vue-ui-donut-C0Wl5tdn.js} +12 -12
- package/dist/{vue-ui-donut-BV_QLVp2.cjs → vue-ui-donut-C7VlH0Dm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CQ-1_Xak.js → vue-ui-donut-evolution-BSZYlpQ4.js} +11 -11
- package/dist/{vue-ui-donut-evolution-euIDGiH3.cjs → vue-ui-donut-evolution-DS2dqteq.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CPylAaR8.js → vue-ui-dumbbell-9sEMuWdj.js} +10 -10
- package/dist/{vue-ui-dumbbell-BO0h5wGp.cjs → vue-ui-dumbbell-CTcvX2CT.cjs} +1 -1
- package/dist/{vue-ui-flow-B8fyDK8A.js → vue-ui-flow-Bn6eRbfA.js} +11 -11
- package/dist/{vue-ui-flow-DWiA9yFS.cjs → vue-ui-flow-wAvTzG20.cjs} +1 -1
- package/dist/{vue-ui-funnel-yRS_OJcF.cjs → vue-ui-funnel-DQflekb1.cjs} +1 -1
- package/dist/{vue-ui-funnel-BAa1OwMy.js → vue-ui-funnel-ENbP7k7d.js} +9 -9
- package/dist/{vue-ui-galaxy-DF41DbY7.cjs → vue-ui-galaxy-B6thZdtp.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DEZ-rfXE.js → vue-ui-galaxy-BXBlLF0x.js} +11 -11
- package/dist/{vue-ui-gauge-k3ejBVZj.js → vue-ui-gauge-D-BFLHdh.js} +7 -7
- package/dist/{vue-ui-gauge-CCGMpnvM.cjs → vue-ui-gauge-TLv35WQu.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DGRDcoNW.cjs → vue-ui-gizmo-CIDsbSUq.cjs} +1 -1
- package/dist/{vue-ui-gizmo-uSaL0tgk.js → vue-ui-gizmo-CupuHUJa.js} +3 -3
- package/dist/{vue-ui-heatmap-WgeuA6rb.js → vue-ui-heatmap-Bxy7ffI3.js} +10 -10
- package/dist/{vue-ui-heatmap-dKn60iwF.cjs → vue-ui-heatmap-Df3qLtt5.cjs} +1 -1
- package/dist/{vue-ui-history-plot-jBlXPR4I.js → vue-ui-history-plot-CPbp9vdL.js} +11 -11
- package/dist/{vue-ui-history-plot-Dnb4txKX.cjs → vue-ui-history-plot-CPmQ5Xri.cjs} +1 -1
- package/dist/{vue-ui-kpi-N3ugHMNs.js → vue-ui-kpi-D16IoodO.js} +3 -3
- package/dist/{vue-ui-kpi-C13Zgi4k.cjs → vue-ui-kpi-D6wD01aX.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BnblpH8s.cjs → vue-ui-mini-loader-BczPBX3e.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BukHpIuC.js → vue-ui-mini-loader-CceGVViE.js} +2 -2
- package/dist/{vue-ui-molecule-DQADG59C.js → vue-ui-molecule-CrQakNH_.js} +11 -11
- package/dist/{vue-ui-molecule-zkjb68lX.cjs → vue-ui-molecule-uQWB-9XK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-oO1NjJsj.cjs → vue-ui-mood-radar-BG9otX9u.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BdpZWnM1.js → vue-ui-mood-radar-DahDca5w.js} +11 -11
- package/dist/{vue-ui-nested-donuts-8PBCRUKI.cjs → vue-ui-nested-donuts-DTNxPtmB.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-6EYydl-l.js → vue-ui-nested-donuts-XJH9z_wF.js} +11 -11
- package/dist/{vue-ui-onion-Dqfii-y3.js → vue-ui-onion-BJvveHv1.js} +11 -11
- package/dist/{vue-ui-onion-D0Y-pJox.cjs → vue-ui-onion-rmq2wvkV.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-yUVuNHbG.js → vue-ui-parallel-coordinate-plot-C1A6OGCv.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-cETB0SSp.cjs → vue-ui-parallel-coordinate-plot-DUG7AQBu.cjs} +1 -1
- package/dist/{vue-ui-quadrant-Bk24QzXW.js → vue-ui-quadrant-CPUtUNLW.js} +12 -12
- package/dist/{vue-ui-quadrant-C2Z9igq-.cjs → vue-ui-quadrant-wz9ILTxc.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BNYO7nMz.cjs → vue-ui-quick-chart-BUCAhqff.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BTBzFVVt.js → vue-ui-quick-chart-D5GV86FD.js} +9 -9
- package/dist/{vue-ui-radar-DpJ6BjWE.cjs → vue-ui-radar-DEJQlniz.cjs} +1 -1
- package/dist/{vue-ui-radar-d5WGxBWb.js → vue-ui-radar-DgxnT6Ia.js} +12 -12
- package/dist/{vue-ui-rating-DHP9cn7v.js → vue-ui-rating-YhL9VCJu.js} +2 -2
- package/dist/{vue-ui-rating-DlpuX8_4.cjs → vue-ui-rating-oHYSjb-S.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DFFnj0G-.js → vue-ui-relation-circle-CuN880Sz.js} +7 -7
- package/dist/{vue-ui-relation-circle-C9r2L_By.cjs → vue-ui-relation-circle-fvzrVyeW.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-CWcW0CKH.cjs → vue-ui-ridgeline-0N6HCsbx.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-B6SmiN8e.js → vue-ui-ridgeline-DcJqJ4Br.js} +12 -12
- package/dist/{vue-ui-rings-BZ6huPcE.cjs → vue-ui-rings-B3NvRyTt.cjs} +1 -1
- package/dist/{vue-ui-rings-07YzKS3V.js → vue-ui-rings-CWVbql32.js} +12 -12
- package/dist/{vue-ui-scatter-DZZtUBuf.js → vue-ui-scatter-BomRqjIY.js} +12 -12
- package/dist/{vue-ui-scatter-DYRw6p9i.cjs → vue-ui-scatter-pm9MRNSF.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BoZyBfQF.js → vue-ui-skeleton-Buze5CJ9.js} +3 -3
- package/dist/{vue-ui-skeleton-LYOlEoA_.cjs → vue-ui-skeleton-D5NShLgw.cjs} +1 -1
- package/dist/{vue-ui-smiley-C9Au0iXl.cjs → vue-ui-smiley-2dUYrT8i.cjs} +1 -1
- package/dist/{vue-ui-smiley-D3A8OqM8.js → vue-ui-smiley-BwfJxJz1.js} +2 -2
- package/dist/{vue-ui-spark-trend-BfR_RtZy.js → vue-ui-spark-trend-C7iY_86w.js} +5 -5
- package/dist/{vue-ui-spark-trend-DnoxMeF3.cjs → vue-ui-spark-trend-CEisuf9v.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CJUkmhnj.js → vue-ui-sparkbar-CRuTBzCm.js} +4 -4
- package/dist/{vue-ui-sparkbar-CAHDM61K.cjs → vue-ui-sparkbar-CYBJuXyQ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DngkG6ub.cjs → vue-ui-sparkgauge-BXiL-H2G.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CXt_UXa0.js → vue-ui-sparkgauge-DlQVyQjt.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-e1KLP3lx.js → vue-ui-sparkhistogram-B0dDhsh7.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BGSXZdYJ.cjs → vue-ui-sparkhistogram-dRHZS69c.cjs} +1 -1
- package/dist/{vue-ui-sparkline-4HHF_g27.cjs → vue-ui-sparkline--7FAyaV6.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C1c0gnoE.js → vue-ui-sparkline-BPYP_3F7.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-WWHBMDoc.js → vue-ui-sparkstackbar-CW8EOoq6.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CYI8Q-A7.cjs → vue-ui-sparkstackbar-DIIJj1wV.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Dswh_YhD.js → vue-ui-stackbar-C7VZ5PHn.js} +13 -13
- package/dist/{vue-ui-stackbar-LROMB081.cjs → vue-ui-stackbar-Ck1yeR-g.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BHLCEMtE.cjs → vue-ui-strip-plot-C2YMIwOm.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CkTMHioN.js → vue-ui-strip-plot-DZMIliYA.js} +11 -11
- package/dist/{vue-ui-table-ClPvrWk1.cjs → vue-ui-table-BR32W2JW.cjs} +1 -1
- package/dist/{vue-ui-table-BQLFbWJu.js → vue-ui-table-DggvYyBd.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CzXQ_Jyj.cjs → vue-ui-table-heatmap-Bl8BJlrP.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Cq0Ayqw9.js → vue-ui-table-heatmap-Co86evBH.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CrWRDJhv.cjs → vue-ui-table-sparkline-CR4Xo17N.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-kApN7-VK.js → vue-ui-table-sparkline-bpl24ydD.js} +5 -5
- package/dist/{vue-ui-thermometer-BqtB3WF_.js → vue-ui-thermometer-9fpJItF7.js} +7 -7
- package/dist/{vue-ui-thermometer-DYo8ZTAM.cjs → vue-ui-thermometer-C03In60a.cjs} +1 -1
- package/dist/{vue-ui-timer-DprIzsAY.cjs → vue-ui-timer-B-GRZP1F.cjs} +1 -1
- package/dist/{vue-ui-timer-DcHNiJK0.js → vue-ui-timer-Jei5BiD_.js} +5 -5
- package/dist/{vue-ui-tiremarks-fEn67LmT.js → vue-ui-tiremarks-B8WG2ok9.js} +7 -7
- package/dist/{vue-ui-tiremarks-Dpn0SavO.cjs → vue-ui-tiremarks-CtojdnkW.cjs} +1 -1
- package/dist/{vue-ui-treemap-Cq5QKrAX.js → vue-ui-treemap-6KYCNZho.js} +12 -12
- package/dist/{vue-ui-treemap-C8uX5Ilw.cjs → vue-ui-treemap-Cb7cgmml.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BctpxL75.js → vue-ui-vertical-bar-BEFnicAy.js} +12 -12
- package/dist/{vue-ui-vertical-bar-Bj-tNmvd.cjs → vue-ui-vertical-bar-U38k297l.cjs} +1 -1
- package/dist/{vue-ui-waffle-B3XGM76l.cjs → vue-ui-waffle-BiDUa_mf.cjs} +1 -1
- package/dist/{vue-ui-waffle-inmP6xJa.js → vue-ui-waffle-DkmwDnZR.js} +12 -12
- package/dist/{vue-ui-wheel-BExyiteC.js → vue-ui-wheel-DP7fvbGp.js} +7 -7
- package/dist/{vue-ui-wheel-D4quM69U.cjs → vue-ui-wheel-_n8mecg5.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-D3O3LDR0.cjs → vue-ui-word-cloud-D7AN_XSy.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CO6OX7uL.js → vue-ui-word-cloud-QJS8wmHH.js} +10 -10
- package/dist/vue-ui-world-BKjsYsNe.js +931 -0
- package/dist/{vue-ui-world-BWv7KvDY.cjs → vue-ui-world-Cwu0_sO2.cjs} +1 -1
- package/dist/{vue-ui-xy-BLnXnpd-.js → vue-ui-xy-B31mVrV8.js} +16 -16
- package/dist/{vue-ui-xy-CnLejNy1.cjs → vue-ui-xy-DrSTGIwE.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-t3XI0Z_d.cjs → vue-ui-xy-canvas-Cb-SSn4j.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-2hhjtxZN.js → vue-ui-xy-canvas-CcYTS3qd.js} +12 -12
- package/package.json +1 -1
- package/dist/vue-ui-world-j_aAVyB8.js +0 -1112
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CG-euAJp.cjs"),H=require("./useResponsive-BBkmXXaa.cjs"),Z=require("./usePrinter-BBqldIVF.cjs"),he=require("./vue-ui-skeleton-LYOlEoA_.cjs"),me=require("./Title-GpO-QNhg.cjs"),J=require("./useNestedProp-DYDoE86w.cjs"),fe=require("./PackageVersion-B6nxekEz.cjs"),ye=require("./PenAndPaper-BC1d2zL5.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),d=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*((d.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*((d.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),ve=a+y*Math.cos(r-Math.PI/2),de=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${ve},${de} 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(d.value>=r&&d.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-d.value)/(r*60);function f(){d.value<a?d.value=Math.min(d.value+l,a):d.value>a&&(d.value=Math.max(d.value-l,a)),d.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}}),v=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(()=>v.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:v.value[0].firstSeparator.x,initY:v.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:v.value[0].startX,initY:v.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(()=>v.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(v.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:(d.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._sfc_main,{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(v.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(v.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(v.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(v.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(v.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(v.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:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.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,d.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":""),v:d.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-BKWunRAY.cjs"),H=require("./useResponsive-BBkmXXaa.cjs"),Z=require("./usePrinter-Dhf-GWO2.cjs"),he=require("./vue-ui-skeleton-D5NShLgw.cjs"),me=require("./Title-DnNgxDaw.cjs"),J=require("./useNestedProp-swJfhg8O.cjs"),fe=require("./PackageVersion-BhpRHJg-.cjs"),ye=require("./PenAndPaper-Cr_VFW1Y.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),d=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*((d.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*((d.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),ve=a+y*Math.cos(r-Math.PI/2),de=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${ve},${de} 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(d.value>=r&&d.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-d.value)/(r*60);function f(){d.value<a?d.value=Math.min(d.value+l,a):d.value>a&&(d.value=Math.max(d.value-l,a)),d.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}}),v=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(()=>v.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:v.value[0].firstSeparator.x,initY:v.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:v.value[0].startX,initY:v.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(()=>v.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(v.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:(d.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._sfc_main,{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(v.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(v.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(v.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(v.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(v.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(v.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:v.value.at(-1).endX,initY:v.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:v.value.at(-1).endX,initY:v.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,d.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&d.value>0?"+":""),v:d.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-BKWunRAY.cjs"),k=require("./useNestedProp-swJfhg8O.cjs"),p=require("./PackageVersion-BhpRHJg-.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-Ckt5xLw3.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-BU5A_H6S.js";
|
|
4
|
+
import { _ as P } from "./PackageVersion-Db8Jk3Yz.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,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Ue, computed as f, ref as b, watch as Te, onMounted as Ye, createElementBlock as i, openBlock as o, unref as r, normalizeStyle as T, normalizeClass as Q, createBlock as H, createCommentVNode as c, createVNode as ie, createSlots as He, 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 je, createTextVNode as We, nextTick as qe } from "vue";
|
|
2
|
-
import { u as Ke, o as Je, e as Ae, c as re, a as Qe, C as Ze, N as j, g as el, X as ll, G as ve, i as O, f as M, v as N, q as tl, r as al, x as ol, y as sl } from "./index-
|
|
3
|
-
import { _ as ul } from "./Title-
|
|
4
|
-
import { u as nl, U as il } from "./usePrinter-
|
|
5
|
-
import { _ as rl } from "./Tooltip-
|
|
6
|
-
import vl from "./vue-ui-skeleton-
|
|
7
|
-
import yl from "./BaseIcon-
|
|
8
|
-
import dl from "./vue-ui-accordion-
|
|
9
|
-
import { u as ze } from "./useNestedProp-
|
|
10
|
-
import { _ as cl } from "./PackageVersion-
|
|
11
|
-
import { _ as hl } from "./PenAndPaper-
|
|
2
|
+
import { u as Ke, o as Je, e as Ae, c as re, a as Qe, C as Ze, N as j, g as el, X as ll, G as ve, i as O, f as M, v as N, q as tl, r as al, x as ol, y as sl } from "./index-Ckt5xLw3.js";
|
|
3
|
+
import { _ as ul } from "./Title-C6HOVO5o.js";
|
|
4
|
+
import { u as nl, U as il } from "./usePrinter-Drrm-7ZN.js";
|
|
5
|
+
import { _ as rl } from "./Tooltip-CkPkykAp.js";
|
|
6
|
+
import vl from "./vue-ui-skeleton-Buze5CJ9.js";
|
|
7
|
+
import yl from "./BaseIcon-D9r5PTQj.js";
|
|
8
|
+
import dl from "./vue-ui-accordion-CHWjFAdS.js";
|
|
9
|
+
import { u as ze } from "./useNestedProp-BU5A_H6S.js";
|
|
10
|
+
import { _ as cl } from "./PackageVersion-Db8Jk3Yz.js";
|
|
11
|
+
import { _ as hl } from "./PenAndPaper-Bleo21mI.js";
|
|
12
12
|
import { u as gl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as pl } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { _ as fl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CG-euAJp.cjs"),xe=require("./Title-GpO-QNhg.cjs"),se=require("./usePrinter-BBqldIVF.cjs"),we=require("./Tooltip-eL97y6Ym.cjs"),Ce=require("./vue-ui-skeleton-LYOlEoA_.cjs"),_e=require("./BaseIcon-dtfVrHa7.cjs"),Le=require("./vue-ui-accordion-dJGHfrMl.cjs"),ue=require("./useNestedProp-DYDoE86w.cjs"),Ne=require("./PackageVersion-B6nxekEz.cjs"),Be=require("./PenAndPaper-BC1d2zL5.cjs"),Ve=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],$e={key:2,style:"width:100%;background:transparent"},Ae=["xmlns","viewBox"],ze=["width","height"],Me=["x","y","height","width","fill","stroke","stroke-width"],Oe=["x","y","height","width","fill","stroke","stroke-width"],Pe=["x","y","width","height","fill","stroke","stroke-width"],Fe=["x","y","width","height","fill","stroke","stroke-width"],De=["font-size","font-weight","fill","x","y"],Ie=["x","y","width","height","onMouseover","onClick"],Re={key:0},qe=["font-size","fill","x","y","font-weight"],He=["font-size","fill","x","y","font-weight"],Ue={key:1},Xe=["x","y","width","height","fill","stroke","stroke-width"],Ye=["x","y","width","height","fill","stroke","stroke-width"],Ge={key:2},je=["text-anchor","font-size","fill","font-weight","transform"],We=["text-anchor","font-size","fill","font-weight","transform"],Ke={key:4},Je=["x","y","width","height","stroke","stroke-width"],Qe={key:5},Ze=["id"],et=["stop-color"],tt=["stop-color"],lt=["x","y","font-size","fill"],at=["x","y","height","rx","fill"],ot=["x","y","font-size","fill"],st=["stroke","x1","x2","y1","y2"],ut=["fill","d"],nt={key:6},rt={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},it=["stop-color"],ct=["stop-color"],dt=["x","y","width","height","rx"],vt=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],ht=["stroke","x1","x2","y1","y2"],pt=["fill","d"],gt={key:5,class:"vue-data-ui-watermark"},ft={key:6,ref:"source",dir:"auto"},mt={class:"vue-ui-data-table"},bt={key:0},kt=["data-cell"],xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wt=["data-cell"],Ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_t={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(_,{expose:ne,emit:re}){e.useCssVars(l=>({"6b84a214":l.tdo}));const{vue_ui_heatmap:ie}=s.useConfig(),i=_,ce=re,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),de=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),ve=e.ref(null),Y=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>J(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Ve.useUserOptionState({config:t.value}),{svgRef:K}=Ee.useChartAccessibility({config:t.value.style.title});function J(){const l=ue.useNestedProp({userConfig:i.config,defaultConfig:ie});let u={};return l.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||i.config,defaultConfig:l})}:u=l,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,l=>{t.value=J(),P.value=!t.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=t.value.table.show,g.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:te}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap",options:t.value.userOptions.print}),ye=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),he=e.computed(()=>t.value.table.responsiveBreakpoint);function pe(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<he.value})}).observe(X.value)}e.onMounted(F);function F(){pe()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(l=>(l.values||[]).length))),f=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+i.dataset.length*t.value.style.layout.cells.height,u=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*t.value.style.layout.cells.height,r=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:r,width:u}}),S=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:f.value.width-t.value.style.layout.padding.right-(S.value==="right"&&t.value.style.legend.show?92:0),bottom:f.value.height-t.value.style.layout.padding.bottom,height:f.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:f.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(S.value==="right"&&t.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(l=>l.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(l=>l.values))),w=e.computed(()=>{const l=i.dataset.flatMap(r=>r.values);return l.reduce((r,n)=>r+n,0)/l.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 l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=t.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(t.value.style.layout.cells.colors.cold,t.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(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:l,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((l,u)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(l=>({...l,temperatures:(l.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.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:l.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(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:l.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function ge(l,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=l;H.value=R,b.value=c,B.value={datapoint:l,seriesIndex:u,series:$.value,config:t.value},M.value=!0;let d="";const h=t.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:l,seriesIndex:u,series:$.value,config:t.value}))?O.value=h({datapoint:l,seriesIndex:u,series:$.value,config:t.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,c,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:c,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${t.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-t.value.style.layout.padding.right)*(b.value/m.value));function fe(l){return s.applyDataLabel(t.value.style.layout.cells.value.formatter,v.value.yTotals[l].total,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:v.value.yTotals[l].total,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[l],rowIndex:l})}function me(l){return s.applyDataLabel(t.value.style.layout.cells.value.formatter,v.value.xTotals[l].total,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:v.value.xTotals[l].total,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[l],colIndex:l})}e.computed(()=>{const l=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:l,body:u}});function le(){e.nextTick(()=>{const l=["",...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=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function be(l){C.value=l,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}function ke(l){ce("selectDatapoint",l)}return ne({generatePdf:ee,generateCsv:le,generateImage:te,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(l,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:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.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))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ye.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ve,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:de,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:z.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(ee),onGenerateCsv:le,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),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:r,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(l.$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:${t.value.style.color}`)},[e.createVNode(Ne._sfc_main),l.$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(l.$slots,"chart-background",{},void 0,!0)],8,ze)):e.createCommentVNode("",!0),t.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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-t.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Me))),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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-t.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-t.value.style.layout.cells.spacing,fill:r.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Oe))),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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.width-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Pe),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.width-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing,fill:c.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Fe),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:c.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,De)):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+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.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=>ge(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}),onClick:()=>ke(c)},null,40,Ie)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY-(t.value.style.layout.cells.rowTotal.value.show?t.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,qe),t.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(fe(n)),9,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Xe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-t.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ye)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6-(t.value.style.layout.cells.columnTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,je)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.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":t.value.style.layout.cells.columnTotal.value.rotation===0?"middle":t.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX+t.value.style.layout.cells.columnTotal.value.offsetX+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}, ${(o.value.height+t.value.style.layout.cells.spacing)*(_.dataset.length+1)+t.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${t.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(me(n)),9,We))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:N.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:o.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Je)])):e.createCommentVNode("",!0),t.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,et),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,tt)],8,Ze)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,lt),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,at),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,ot),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,st)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",rt,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,it),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,ct)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:f.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,dt),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,vt),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,yt),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+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,ht)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+t.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,pt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:f.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ft,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(we._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$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(Le.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref: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:${t.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(_e.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",mt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",bt,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.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:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",xt,e.toDisplayString(r),1)],12,kt),(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:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ct,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:c.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,wt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Se))}},Lt=Te._export_sfc(_t,[["__scopeId","data-v-cd2b0b4d"]]);exports.default=Lt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BKWunRAY.cjs"),xe=require("./Title-DnNgxDaw.cjs"),se=require("./usePrinter-Dhf-GWO2.cjs"),we=require("./Tooltip-BcRV15Nk.cjs"),Ce=require("./vue-ui-skeleton-D5NShLgw.cjs"),_e=require("./BaseIcon-ljtRuDne.cjs"),Le=require("./vue-ui-accordion-CACZOsPN.cjs"),ue=require("./useNestedProp-swJfhg8O.cjs"),Ne=require("./PackageVersion-BhpRHJg-.cjs"),Be=require("./PenAndPaper-Cr_VFW1Y.cjs"),Ve=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],$e={key:2,style:"width:100%;background:transparent"},Ae=["xmlns","viewBox"],ze=["width","height"],Me=["x","y","height","width","fill","stroke","stroke-width"],Oe=["x","y","height","width","fill","stroke","stroke-width"],Pe=["x","y","width","height","fill","stroke","stroke-width"],Fe=["x","y","width","height","fill","stroke","stroke-width"],De=["font-size","font-weight","fill","x","y"],Ie=["x","y","width","height","onMouseover","onClick"],Re={key:0},qe=["font-size","fill","x","y","font-weight"],He=["font-size","fill","x","y","font-weight"],Ue={key:1},Xe=["x","y","width","height","fill","stroke","stroke-width"],Ye=["x","y","width","height","fill","stroke","stroke-width"],Ge={key:2},je=["text-anchor","font-size","fill","font-weight","transform"],We=["text-anchor","font-size","fill","font-weight","transform"],Ke={key:4},Je=["x","y","width","height","stroke","stroke-width"],Qe={key:5},Ze=["id"],et=["stop-color"],tt=["stop-color"],lt=["x","y","font-size","fill"],at=["x","y","height","rx","fill"],ot=["x","y","font-size","fill"],st=["stroke","x1","x2","y1","y2"],ut=["fill","d"],nt={key:6},rt={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},it=["stop-color"],ct=["stop-color"],dt=["x","y","width","height","rx"],vt=["x","y","font-size","fill"],yt=["x","y","font-size","fill"],ht=["stroke","x1","x2","y1","y2"],pt=["fill","d"],gt={key:5,class:"vue-data-ui-watermark"},ft={key:6,ref:"source",dir:"auto"},mt={class:"vue-ui-data-table"},bt={key:0},kt=["data-cell"],xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wt=["data-cell"],Ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_t={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(_,{expose:ne,emit:re}){e.useCssVars(l=>({"6b84a214":l.tdo}));const{vue_ui_heatmap:ie}=s.useConfig(),i=_,ce=re,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),de=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),ve=e.ref(null),Y=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>J(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Ve.useUserOptionState({config:t.value}),{svgRef:K}=Ee.useChartAccessibility({config:t.value.style.title});function J(){const l=ue.useNestedProp({userConfig:i.config,defaultConfig:ie});let u={};return l.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||i.config,defaultConfig:l})}:u=l,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,l=>{t.value=J(),P.value=!t.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=t.value.table.show,g.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:te}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap",options:t.value.userOptions.print}),ye=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),he=e.computed(()=>t.value.table.responsiveBreakpoint);function pe(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<he.value})}).observe(X.value)}e.onMounted(F);function F(){pe()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(l=>(l.values||[]).length))),f=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+i.dataset.length*t.value.style.layout.cells.height,u=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*t.value.style.layout.cells.height,r=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:r,width:u}}),S=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:f.value.width-t.value.style.layout.padding.right-(S.value==="right"&&t.value.style.legend.show?92:0),bottom:f.value.height-t.value.style.layout.padding.bottom,height:f.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:f.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(S.value==="right"&&t.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(l=>l.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(l=>l.values))),w=e.computed(()=>{const l=i.dataset.flatMap(r=>r.values);return l.reduce((r,n)=>r+n,0)/l.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 l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=t.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(t.value.style.layout.cells.colors.cold,t.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(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:l,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((l,u)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(l=>({...l,temperatures:(l.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.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:l.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(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:l.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function ge(l,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=l;H.value=R,b.value=c,B.value={datapoint:l,seriesIndex:u,series:$.value,config:t.value},M.value=!0;let d="";const h=t.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:l,seriesIndex:u,series:$.value,config:t.value}))?O.value=h({datapoint:l,seriesIndex:u,series:$.value,config:t.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,c,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:c,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${t.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-t.value.style.layout.padding.right)*(b.value/m.value));function fe(l){return s.applyDataLabel(t.value.style.layout.cells.value.formatter,v.value.yTotals[l].total,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:v.value.yTotals[l].total,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[l],rowIndex:l})}function me(l){return s.applyDataLabel(t.value.style.layout.cells.value.formatter,v.value.xTotals[l].total,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:v.value.xTotals[l].total,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[l],colIndex:l})}e.computed(()=>{const l=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:l,body:u}});function le(){e.nextTick(()=>{const l=["",...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=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function be(l){C.value=l,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}function ke(l){ce("selectDatapoint",l)}return ne({generatePdf:ee,generateCsv:le,generateImage:te,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(l,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:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.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))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ye.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ve,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:de,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:z.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(ee),onGenerateCsv:le,onGenerateImage:e.unref(te),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),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:r,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(l.$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:${t.value.style.color}`)},[e.createVNode(Ne._sfc_main),l.$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(l.$slots,"chart-background",{},void 0,!0)],8,ze)):e.createCommentVNode("",!0),t.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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-t.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Me))),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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-t.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-t.value.style.layout.cells.spacing,fill:r.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Oe))),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+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.width-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Pe),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+t.value.style.layout.cells.spacing/2+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.width-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing,fill:c.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Fe),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:c.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,De)):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+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.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=>ge(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}),onClick:()=>ke(c)},null,40,Ie)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY-(t.value.style.layout.cells.rowTotal.value.show?t.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,qe),t.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(fe(n)),9,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Ue,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Xe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+t.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-t.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Ye)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6-(t.value.style.layout.cells.columnTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,je)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.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":t.value.style.layout.cells.columnTotal.value.rotation===0?"middle":t.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX+t.value.style.layout.cells.columnTotal.value.offsetX+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0)}, ${(o.value.height+t.value.style.layout.cells.spacing)*(_.dataset.length+1)+t.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${t.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(me(n)),9,We))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing+(t.value.style.layout.cells.rowTotal.color.show?o.value.height/3+t.value.style.layout.cells.spacing:0),y:N.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:o.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:o.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Je)])):e.createCommentVNode("",!0),t.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,et),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,tt)],8,Ze)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,lt),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,at),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,ot),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,st)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.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,ut)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",rt,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,it),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,ct)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:f.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,dt),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,vt),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,yt),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+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,ht)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+t.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,pt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:f.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",gt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ft,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(we._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$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(Le.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref: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:${t.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(_e.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",mt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",bt,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.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:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",xt,e.toDisplayString(r),1)],12,kt),(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:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ct,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:c.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,wt))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Se))}},Lt=Te._export_sfc(_t,[["__scopeId","data-v-cd2b0b4d"]]);exports.default=Lt;
|
|
@@ -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 A, 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 { _ 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-Ckt5xLw3.js";
|
|
3
|
+
import { u as Me } from "./useNestedProp-BU5A_H6S.js";
|
|
4
|
+
import { u as ct, U as vt } from "./usePrinter-Drrm-7ZN.js";
|
|
5
|
+
import { _ as ht } from "./PackageVersion-Db8Jk3Yz.js";
|
|
6
|
+
import { L as yt } from "./Legend-COUltTuv.js";
|
|
7
|
+
import { _ as dt } from "./Title-C6HOVO5o.js";
|
|
8
|
+
import { _ as ft } from "./Tooltip-CkPkykAp.js";
|
|
9
|
+
import { D as xt } from "./DataTable-p1tKJjJU.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-CHWjFAdS.js";
|
|
11
|
+
import { _ as mt } from "./PenAndPaper-Bleo21mI.js";
|
|
12
|
+
import gt from "./vue-ui-skeleton-Buze5CJ9.js";
|
|
13
13
|
import { t as bt, u as kt } from "./useResponsive-JZ9xq-JV.js";
|
|
14
14
|
import { u as wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Ct } from "./useChartAccessibility-BWojgys7.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CG-euAJp.cjs"),le=require("./useNestedProp-DYDoE86w.cjs"),ae=require("./usePrinter-BBqldIVF.cjs"),Ce=require("./PackageVersion-B6nxekEz.cjs"),we=require("./Legend-C8PTNFsH.cjs"),Be=require("./Title-GpO-QNhg.cjs"),Se=require("./Tooltip-eL97y6Ym.cjs"),_e=require("./DataTable-pT39kn0W.cjs"),Ne=require("./vue-ui-accordion-dJGHfrMl.cjs"),ze=require("./PenAndPaper-BC1d2zL5.cjs"),$e=require("./vue-ui-skeleton-LYOlEoA_.cjs"),oe=require("./useResponsive-BBkmXXaa.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),p=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 me(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:me(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"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function 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},p.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(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function 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._sfc_main,{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:p.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:p.value===null||p.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:p.value===null||p.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,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,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:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.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:pe.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-BKWunRAY.cjs"),le=require("./useNestedProp-swJfhg8O.cjs"),ae=require("./usePrinter-Dhf-GWO2.cjs"),Ce=require("./PackageVersion-BhpRHJg-.cjs"),we=require("./Legend-m-jOk1o6.cjs"),Be=require("./Title-DnNgxDaw.cjs"),Se=require("./Tooltip-BcRV15Nk.cjs"),_e=require("./DataTable-CzL8BmEn.cjs"),Ne=require("./vue-ui-accordion-CACZOsPN.cjs"),ze=require("./PenAndPaper-Cr_VFW1Y.cjs"),$e=require("./vue-ui-skeleton-D5NShLgw.cjs"),oe=require("./useResponsive-BBkmXXaa.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),p=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 me(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:me(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"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function 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},p.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(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function 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._sfc_main,{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:p.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:p.value===null||p.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:p.value===null||p.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,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:p.value===null||p.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,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:m=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,p.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:pe.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;
|