vue-data-ui 2.7.6-beta.0 → 2.7.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/{Arrow-BPxXpODN.js → Arrow-Ctj8xS7h.js} +1 -1
- package/dist/{Arrow-DMoDyTYq.cjs → Arrow-D4awcL5T.cjs} +1 -1
- package/dist/{BaseIcon-Csib-bFs.cjs → BaseIcon-D4bvnDD1.cjs} +1 -1
- package/dist/{BaseIcon-BRjEohPB.js → BaseIcon-D6JclX-r.js} +4 -3
- package/dist/{ColorPicker-DKHOITuH.js → ColorPicker-BlS6Axza.js} +3 -3
- package/dist/{ColorPicker--FQTMlj_.cjs → ColorPicker-DfU-m7Ql.cjs} +1 -1
- package/dist/{DataTable-DXHBxZCy.js → DataTable-B4wT68nd.js} +2 -2
- package/dist/{DataTable-Bg1jcIr-.cjs → DataTable-DwLexcJ8.cjs} +1 -1
- package/dist/{Legend-DMevrWiD.js → Legend-D9jTaSf1.js} +2 -2
- package/dist/{Legend-UfmoJ4KO.cjs → Legend-DAc_tyUt.cjs} +1 -1
- package/dist/{PackageVersion-C7x2IWLM.js → PackageVersion-B6m7COFD.js} +1 -1
- package/dist/{PackageVersion-DgyGLNuh.cjs → PackageVersion-Cnge5ri6.cjs} +1 -1
- package/dist/{PenAndPaper-8UX21OWr.js → PenAndPaper-BQzJd3R-.js} +3 -3
- package/dist/{PenAndPaper-Cvmkcq22.cjs → PenAndPaper-Co1D2Y2B.cjs} +1 -1
- package/dist/{Shape-CTmzdRqd.js → Shape-Bjzuy7N8.js} +1 -1
- package/dist/{Shape-fqF-okzT.cjs → Shape-DzBJFQA1.cjs} +1 -1
- package/dist/{Slicer-BXhvESja.js → Slicer-C3ACJCl0.js} +2 -2
- package/dist/{Slicer-DmdYZrGS.cjs → Slicer-DPitMvp0.cjs} +1 -1
- package/dist/{Title-L3SvCQfU.js → Title-KQSkCyXD.js} +1 -1
- package/dist/{Title-DUa01RoU.cjs → Title-MfFSxVPO.cjs} +1 -1
- package/dist/{Tooltip-DzsG-nM2.js → Tooltip-ByYvb_h7.js} +1 -1
- package/dist/{Tooltip-DxTkpBZU.cjs → Tooltip-wiyCGglp.cjs} +1 -1
- package/dist/documentation/installation.md +6 -0
- package/dist/{dom-to-png-_Yw7_Zl2.cjs → dom-to-png-BKsCIB7O.cjs} +1 -1
- package/dist/{dom-to-png-pcDdsfUp.js → dom-to-png-CNRGuI4B.js} +1 -1
- package/dist/{img-C_46LUlu.js → img-7vHTByr4.js} +1 -1
- package/dist/{img-D4mtuxkz.cjs → img-DoSFkT2s.cjs} +1 -1
- package/dist/{index-CFNGWoG-.js → index-Be5igjqE.js} +446 -369
- package/dist/index-Dq-Z3H6U.cjs +9 -0
- package/dist/{pdf-BTE2gw1u.js → pdf-BbjLvsfj.js} +1 -1
- package/dist/{pdf-C4WYgi8l.cjs → pdf-Nu-tkOyL.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +89 -5
- package/dist/types/vue-data-ui.d.ts +89 -5
- package/dist/{useNestedProp-DHVUTEIl.js → useNestedProp-BlGgXimH.js} +1 -1
- package/dist/{useNestedProp-BVcjidN0.cjs → useNestedProp-DLtcqrHr.cjs} +1 -1
- package/dist/{usePrinter-uMLnqx4N.cjs → usePrinter-BkNDtpAf.cjs} +1 -1
- package/dist/{usePrinter-DlDdG5QU.js → usePrinter-HUhH1p09.js} +3 -3
- package/dist/{vue-data-ui-DWxtv62P.js → vue-data-ui-BhAZnQY7.js} +73 -71
- package/dist/vue-data-ui-C3gulBRZ.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +18 -17
- package/dist/{vue-ui-3d-bar-DjK5p4-V.js → vue-ui-3d-bar-WYKfbosC.js} +9 -9
- package/dist/{vue-ui-3d-bar-D82lrIe4.cjs → vue-ui-3d-bar-jCqBwlYF.cjs} +1 -1
- package/dist/{vue-ui-accordion-BVInR1D8.js → vue-ui-accordion-BQHr5xZr.js} +3 -3
- package/dist/{vue-ui-accordion-BL55ml0w.cjs → vue-ui-accordion-CfdDVEBk.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CN9pUGnI.js → vue-ui-age-pyramid-6V9PIJ9j.js} +10 -10
- package/dist/{vue-ui-age-pyramid-D5EOO0iJ.cjs → vue-ui-age-pyramid-CRLzMSkq.cjs} +1 -1
- package/dist/{vue-ui-annotator-CAkIFmY8.js → vue-ui-annotator-BuUBWuPO.js} +2 -2
- package/dist/{vue-ui-annotator-CCXZE86s.cjs → vue-ui-annotator-DfMb41Ud.cjs} +1 -1
- package/dist/{vue-ui-bullet-DAtNfo12.js → vue-ui-bullet-02I7GPLx.js} +8 -8
- package/dist/{vue-ui-bullet-DbVipNyo.cjs → vue-ui-bullet-gw1t9Ibi.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DZ8Zu1G0.cjs → vue-ui-candlestick-Da0Umawo.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C4o7KNEQ.js → vue-ui-candlestick-DcWSJrio.js} +11 -11
- package/dist/{vue-ui-carousel-table-GVqoqsHj.js → vue-ui-carousel-table-Bf9Ll_CD.js} +4 -4
- package/dist/{vue-ui-carousel-table-C2fTCZSu.cjs → vue-ui-carousel-table-dd5LBO1w.cjs} +1 -1
- package/dist/{vue-ui-chestnut-E6-YshUN.cjs → vue-ui-chestnut-DBtJcAbB.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DkcYjcFC.js → vue-ui-chestnut-DUJGtKS8.js} +8 -8
- package/dist/{vue-ui-circle-pack-bYWkKSmF.js → vue-ui-circle-pack-D4Okcy6J.js} +9 -9
- package/dist/{vue-ui-circle-pack-Cydk-l4Z.cjs → vue-ui-circle-pack-qT2SaP4h.cjs} +1 -1
- package/dist/{vue-ui-cursor-BV90fevc.cjs → vue-ui-cursor-Bi9Xtyrc.cjs} +1 -1
- package/dist/{vue-ui-cursor-DJqRywjF.js → vue-ui-cursor-kIAHk3pv.js} +2 -2
- package/dist/{vue-ui-dashboard-Awb0TFLb.cjs → vue-ui-dashboard-ChBjAPOR.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CBNKG2IX.js → vue-ui-dashboard-DWdDrGCi.js} +3 -3
- package/dist/{vue-ui-digits--BlLcrsp.js → vue-ui-digits-CSn2-k9M.js} +2 -2
- package/dist/{vue-ui-digits-Bdyd5itD.cjs → vue-ui-digits-OBaldTbA.cjs} +1 -1
- package/dist/{vue-ui-donut-DhyuQfTc.cjs → vue-ui-donut-C9X3llOa.cjs} +1 -1
- package/dist/{vue-ui-donut-BFaZnu4E.js → vue-ui-donut-DC1EWaEl.js} +12 -12
- package/dist/{vue-ui-donut-evolution-u_DgynBq.js → vue-ui-donut-evolution-By920tt3.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BlTz3cM6.cjs → vue-ui-donut-evolution-qYh4tMyv.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-FTQMksov.js → vue-ui-dumbbell-DhYF4Xzq.js} +10 -10
- package/dist/{vue-ui-dumbbell-BPY5ecEW.cjs → vue-ui-dumbbell-gjuLYUtN.cjs} +1 -1
- package/dist/{vue-ui-flow-CiOLP4Bc.cjs → vue-ui-flow-CfOkhfTZ.cjs} +1 -1
- package/dist/{vue-ui-flow-CZZbTaKg.js → vue-ui-flow-CvmxLLDU.js} +9 -9
- package/dist/{vue-ui-funnel-CeKd8ZiW.cjs → vue-ui-funnel-BqvE6kKW.cjs} +1 -1
- package/dist/{vue-ui-funnel-C7emWYtP.js → vue-ui-funnel-aW6gN5M7.js} +9 -9
- package/dist/{vue-ui-galaxy-C0LvpwYA.cjs → vue-ui-galaxy-CjO-feOf.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CbQn6Tai.js → vue-ui-galaxy-DkM5qmQv.js} +11 -11
- package/dist/{vue-ui-gauge-BlIKJvVf.cjs → vue-ui-gauge-as9C8SH5.cjs} +1 -1
- package/dist/{vue-ui-gauge-B5t9OOfc.js → vue-ui-gauge-cl4ABOp8.js} +7 -7
- package/dist/{vue-ui-gizmo-REPSaOFz.js → vue-ui-gizmo-B6H3gQ7i.js} +3 -3
- package/dist/{vue-ui-gizmo--2ZtBKsI.cjs → vue-ui-gizmo-ufF3hoHV.cjs} +1 -1
- package/dist/{vue-ui-heatmap-MgVipAHX.js → vue-ui-heatmap-BNa9N4f-.js} +10 -10
- package/dist/{vue-ui-heatmap-4GiW6lpZ.cjs → vue-ui-heatmap-DvS4AeqV.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BPBubZyO.cjs → vue-ui-history-plot-BGBLouFb.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Be7z_N9m.js → vue-ui-history-plot-SdGR3p3B.js} +11 -11
- package/dist/{vue-ui-kpi-liKRIunp.cjs → vue-ui-kpi-BoIH-1Vn.cjs} +1 -1
- package/dist/{vue-ui-kpi-CIMqIIHx.js → vue-ui-kpi-GIQ6e_RV.js} +3 -3
- package/dist/{vue-ui-mini-loader-BzA198rf.js → vue-ui-mini-loader-5IwteuFG.js} +2 -2
- package/dist/{vue-ui-mini-loader-BLlakDY7.cjs → vue-ui-mini-loader-DPUQ_TVC.cjs} +1 -1
- package/dist/{vue-ui-molecule-BjxKkqRH.js → vue-ui-molecule-BsrPwi8A.js} +11 -11
- package/dist/{vue-ui-molecule-BVJoEq_L.cjs → vue-ui-molecule-n4R9uPbE.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-W0giMhIf.cjs → vue-ui-mood-radar-CvZOsP_c.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DmnVvP9o.js → vue-ui-mood-radar-uCfduDDP.js} +11 -11
- package/dist/{vue-ui-nested-donuts-qdTmCQvc.cjs → vue-ui-nested-donuts-Cga7kCRs.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bjg4j4if.js → vue-ui-nested-donuts-Cup810nX.js} +11 -11
- package/dist/{vue-ui-onion-D64W0CBD.js → vue-ui-onion-DNEkpvUE.js} +11 -11
- package/dist/{vue-ui-onion-6SSfocfE.cjs → vue-ui-onion-DZn5pOZ4.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BjYktxod.cjs → vue-ui-parallel-coordinate-plot-DwyIeUaQ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CkZXOICk.js → vue-ui-parallel-coordinate-plot-MCx1Yq1h.js} +12 -12
- package/dist/{vue-ui-quadrant-DjLnWBnh.cjs → vue-ui-quadrant-DW-HMuCR.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D-jEAMCQ.js → vue-ui-quadrant-gG5ROJGQ.js} +12 -12
- package/dist/{vue-ui-quick-chart-yNuTyEgo.js → vue-ui-quick-chart-BmBj8ixE.js} +9 -9
- package/dist/{vue-ui-quick-chart-BcOY7AIN.cjs → vue-ui-quick-chart-x9ldZsdG.cjs} +1 -1
- package/dist/{vue-ui-radar-CZlEONeD.js → vue-ui-radar-CJzWWq0w.js} +12 -12
- package/dist/{vue-ui-radar-DpHLHWci.cjs → vue-ui-radar-WNtZroUg.cjs} +1 -1
- package/dist/{vue-ui-rating-C1gRL1R3.js → vue-ui-rating-C7hnXZku.js} +2 -2
- package/dist/{vue-ui-rating-Cs3NEmEg.cjs → vue-ui-rating-YIpqTGz4.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CB-YW73a.cjs → vue-ui-relation-circle-C7lb0klv.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-C_FsWiuH.js → vue-ui-relation-circle-C_Red0gA.js} +7 -7
- package/dist/{vue-ui-rings-syJFoH6E.js → vue-ui-rings-5Tx7WOtY.js} +12 -12
- package/dist/{vue-ui-rings-CIYZbHzK.cjs → vue-ui-rings-D_bjcQ-F.cjs} +1 -1
- package/dist/{vue-ui-scatter-Y-bJ5R0J.js → vue-ui-scatter-JwOHzshk.js} +12 -12
- package/dist/{vue-ui-scatter-1jT9ddo6.cjs → vue-ui-scatter-suyqzZ9F.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ByGfybu8.cjs → vue-ui-skeleton-BUAOXVqO.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dexat5oZ.js → vue-ui-skeleton-IitNlkFC.js} +3 -3
- package/dist/{vue-ui-smiley-DPP-2K8T.js → vue-ui-smiley-Co2srnQu.js} +2 -2
- package/dist/{vue-ui-smiley-Cp1Yo8gM.cjs → vue-ui-smiley-UxCOGu6L.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DkM426ut.js → vue-ui-spark-trend-CkhonQlt.js} +5 -5
- package/dist/{vue-ui-spark-trend-DXo1Lafk.cjs → vue-ui-spark-trend-Dnr6Ttk3.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D7-pjVIk.cjs → vue-ui-sparkbar-B_ieMrny.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-F5OoZgjl.js → vue-ui-sparkbar-CVc8zCkq.js} +4 -4
- package/dist/{vue-ui-sparkgauge-LNWcvJQm.js → vue-ui-sparkgauge-C2Qy7q0I.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BV03AxIl.cjs → vue-ui-sparkgauge-Cxu9THOi.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Dp4JmEjl.js → vue-ui-sparkhistogram-BVWIePzy.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CPLjuhd0.cjs → vue-ui-sparkhistogram-Ceb2l2eA.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CUJeIh8E.js → vue-ui-sparkline-BPiXteOw.js} +4 -4
- package/dist/{vue-ui-sparkline-CzaaWz1O.cjs → vue-ui-sparkline-DLkSR7GL.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Byy98s7i.cjs → vue-ui-sparkstackbar-DjHNNLxj.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BTmAuDED.js → vue-ui-sparkstackbar-oSdvBIlr.js} +5 -5
- package/dist/{vue-ui-stackbar-CApy6xE-.cjs → vue-ui-stackbar-CumjkMeZ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-HfGn8Itj.js → vue-ui-stackbar-DKp3QK8C.js} +13 -13
- package/dist/{vue-ui-strip-plot-D8bN2jOd.cjs → vue-ui-strip-plot-Dh4G2Oyx.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Db5fY9l0.js → vue-ui-strip-plot-tqIqG1HH.js} +11 -11
- package/dist/{vue-ui-table-BiEEXfmz.js → vue-ui-table-BNRBtVf2.js} +1 -1
- package/dist/{vue-ui-table-3Pr_BJOn.cjs → vue-ui-table-CO94TVdU.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-tT43AVN1.js → vue-ui-table-heatmap-CksNGmq-.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Dzmilz_6.cjs → vue-ui-table-heatmap-DxpwhWKj.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-r9JbPWm1.cjs → vue-ui-table-sparkline-jBvWJQJy.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CuG3P8Se.js → vue-ui-table-sparkline-zZB3sxij.js} +5 -5
- package/dist/{vue-ui-thermometer-BWakJYXX.cjs → vue-ui-thermometer-Bu0VFxbJ.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BypApwQR.js → vue-ui-thermometer-CY2eIr41.js} +7 -7
- package/dist/{vue-ui-timer-BY89-D5q.cjs → vue-ui-timer-DYaBe4iQ.cjs} +1 -1
- package/dist/{vue-ui-timer-QTTOX3XU.js → vue-ui-timer-DmEJSRjb.js} +5 -5
- package/dist/{vue-ui-tiremarks-C6_AVUY8.cjs → vue-ui-tiremarks-B_Ihi72K.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DhubQXE9.js → vue-ui-tiremarks-au7USSKN.js} +7 -7
- package/dist/{vue-ui-treemap-HL5rG7hw.js → vue-ui-treemap-CBbWvhqq.js} +12 -12
- package/dist/{vue-ui-treemap-ByFdbyS7.cjs → vue-ui-treemap-jyad5RVV.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BP4MwH-K.cjs → vue-ui-vertical-bar-CeOy7Mem.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-__GfqF0O.js → vue-ui-vertical-bar-DowTuusW.js} +12 -12
- package/dist/{vue-ui-waffle-DF34x9Wg.js → vue-ui-waffle-BMl4rq6k.js} +12 -12
- package/dist/{vue-ui-waffle-D9gfi78g.cjs → vue-ui-waffle-Cg1MK6nE.cjs} +1 -1
- package/dist/{vue-ui-wheel-DSofgaQ1.js → vue-ui-wheel-B2635Z3i.js} +7 -7
- package/dist/{vue-ui-wheel-B41qdqzo.cjs → vue-ui-wheel-B8sFwiA6.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CXCBnEZ8.cjs → vue-ui-word-cloud-C6RgZ4OX.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-fFYlm6K2.js → vue-ui-word-cloud-Dsustsn0.js} +10 -10
- package/dist/vue-ui-world-BBf8VUlF.cjs +19 -0
- package/dist/vue-ui-world-icMrF6FD.js +899 -0
- package/dist/{vue-ui-xy-CxNv4m9O.js → vue-ui-xy-D5KaqxbH.js} +16 -16
- package/dist/{vue-ui-xy-BXfgH7v9.cjs → vue-ui-xy-DupY-pxW.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DHn7SPRK.js → vue-ui-xy-canvas-BJtQ43Fd.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DggddiWo.cjs → vue-ui-xy-canvas-COK2iqSu.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-Be2lbQel.cjs +0 -9
- package/dist/vue-data-ui-hYMPv0Dd.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Be2lbQel.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./usePrinter-uMLnqx4N.cjs"),he=require("./vue-ui-skeleton-ByGfybu8.cjs"),me=require("./Title-DUa01RoU.cjs"),J=require("./useNestedProp-BVcjidN0.cjs"),fe=require("./PackageVersion-DgyGLNuh.cjs"),ye=require("./PenAndPaper-Cvmkcq22.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-Dq-Z3H6U.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./usePrinter-BkNDtpAf.cjs"),he=require("./vue-ui-skeleton-BUAOXVqO.cjs"),me=require("./Title-MfFSxVPO.cjs"),J=require("./useNestedProp-DLtcqrHr.cjs"),fe=require("./PackageVersion-Cnge5ri6.cjs"),ye=require("./PenAndPaper-Co1D2Y2B.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,12 +1,12 @@
|
|
|
1
1
|
import { computed as f, ref as y, watch as pe, onMounted as Ge, onBeforeUnmount as Ee, createElementBlock as u, openBlock as s, unref as i, normalizeStyle as B, normalizeClass as ge, createBlock as G, createCommentVNode as c, createElementVNode as p, withCtx as N, toDisplayString as O, createSlots as Ue, renderSlot as x, normalizeProps as E, guardReactiveProps as U, createVNode as We, Fragment as g, renderList as S, mergeProps as X } from "vue";
|
|
2
|
-
import { u as je, c as Te, t as Le, p as ke, a as De, b as Be, o as be, d as Ve, e as W, g as _e, m as V, I as z, N as qe, X as He, s as q, n as Ze, i as H, f as Z, F as J } from "./index-
|
|
2
|
+
import { u as je, c as Te, t as Le, p as ke, a as De, b as Be, o as be, d as Ve, e as W, g as _e, m as V, I as z, N as qe, X as He, s as q, n as Ze, i as H, f as Z, F as J } from "./index-Be5igjqE.js";
|
|
3
3
|
import { t as Je, u as Ke } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { u as Qe, U as et } from "./usePrinter-
|
|
5
|
-
import tt from "./vue-ui-skeleton-
|
|
6
|
-
import { _ as at } from "./Title-
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
8
|
-
import { _ as lt } from "./PackageVersion-
|
|
9
|
-
import { _ as rt } from "./PenAndPaper-
|
|
4
|
+
import { u as Qe, U as et } from "./usePrinter-HUhH1p09.js";
|
|
5
|
+
import tt from "./vue-ui-skeleton-IitNlkFC.js";
|
|
6
|
+
import { _ as at } from "./Title-KQSkCyXD.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-BlGgXimH.js";
|
|
8
|
+
import { _ as lt } from "./PackageVersion-B6m7COFD.js";
|
|
9
|
+
import { _ as rt } from "./PenAndPaper-BQzJd3R-.js";
|
|
10
10
|
import { u as st } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as ot } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -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-Be5igjqE.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-BlGgXimH.js";
|
|
4
|
+
import { _ as P } from "./PackageVersion-B6m7COFD.js";
|
|
5
5
|
const U = ["viewBox", "width"], D = { key: 0 }, I = ["id"], M = ["stop-color"], S = ["stop-color"], E = ["stroke"], O = ["stroke"], A = ["width", "fill"], j = ["fill"], T = { key: 0 }, q = ["id"], H = ["stroke"], J = ["stroke", "stroke-dasharray", "stroke-dashoffset"], K = ["filter"], Q = ["stroke", "stroke-dasharray", "stroke-dashoffset"], R = ["fill"], ee = {
|
|
6
6
|
__name: "vue-ui-gizmo",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Dq-Z3H6U.cjs"),k=require("./useNestedProp-DLtcqrHr.cjs"),p=require("./PackageVersion-Cnge5ri6.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,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Ee, computed as f, ref as b, watch as Te, onMounted as Ge, createElementBlock as i, openBlock as o, unref as r, normalizeStyle as T, normalizeClass as Q, createBlock as D, createCommentVNode as d, createVNode as ie, createSlots as Ue, withCtx as A, renderSlot as m, normalizeProps as R, guardReactiveProps as X, Fragment as _, renderList as z, createElementVNode as v, toDisplayString as x, withKeys as Ye, createTextVNode as He, nextTick as De } from "vue";
|
|
2
|
-
import { u as je, o as We, e as Ae, c as re, a as qe, C as Ke, O as j, g as Je, X as Qe, G as ve, i as S, f as M, v as N, q as Ze, r as el, x as ll, y as tl } from "./index-
|
|
3
|
-
import { _ as al } from "./Title-
|
|
4
|
-
import { u as ol, U as sl } from "./usePrinter-
|
|
5
|
-
import { _ as ul } from "./Tooltip-
|
|
6
|
-
import nl from "./vue-ui-skeleton-
|
|
7
|
-
import il from "./BaseIcon-
|
|
8
|
-
import rl from "./vue-ui-accordion-
|
|
9
|
-
import { u as ze } from "./useNestedProp-
|
|
10
|
-
import { _ as vl } from "./PackageVersion-
|
|
11
|
-
import { _ as yl } from "./PenAndPaper-
|
|
2
|
+
import { u as je, o as We, e as Ae, c as re, a as qe, C as Ke, O as j, g as Je, X as Qe, G as ve, i as S, f as M, v as N, q as Ze, r as el, x as ll, y as tl } from "./index-Be5igjqE.js";
|
|
3
|
+
import { _ as al } from "./Title-KQSkCyXD.js";
|
|
4
|
+
import { u as ol, U as sl } from "./usePrinter-HUhH1p09.js";
|
|
5
|
+
import { _ as ul } from "./Tooltip-ByYvb_h7.js";
|
|
6
|
+
import nl from "./vue-ui-skeleton-IitNlkFC.js";
|
|
7
|
+
import il from "./BaseIcon-D6JclX-r.js";
|
|
8
|
+
import rl from "./vue-ui-accordion-BQHr5xZr.js";
|
|
9
|
+
import { u as ze } from "./useNestedProp-BlGgXimH.js";
|
|
10
|
+
import { _ as vl } from "./PackageVersion-B6m7COFD.js";
|
|
11
|
+
import { _ as yl } from "./PenAndPaper-BQzJd3R-.js";
|
|
12
12
|
import { u as dl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as cl } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { _ as hl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Be2lbQel.cjs"),me=require("./Title-DUa01RoU.cjs"),se=require("./usePrinter-uMLnqx4N.cjs"),be=require("./Tooltip-DxTkpBZU.cjs"),ke=require("./vue-ui-skeleton-ByGfybu8.cjs"),xe=require("./BaseIcon-Csib-bFs.cjs"),we=require("./vue-ui-accordion-BL55ml0w.cjs"),ue=require("./useNestedProp-BVcjidN0.cjs"),Ce=require("./PackageVersion-DgyGLNuh.cjs"),_e=require("./PenAndPaper-Cvmkcq22.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee={key:2,style:"width:100%;background:transparent"},Te=["xmlns","viewBox"],Se=["width","height"],$e=["x","y","height","width","fill","stroke","stroke-width"],Ae=["x","y","height","width","fill","stroke","stroke-width"],ze=["x","y","width","height","fill","stroke","stroke-width"],Me=["x","y","width","height","fill","stroke","stroke-width"],Oe=["font-size","font-weight","fill","x","y"],Pe=["x","y","width","height","onMouseover"],Fe={key:0},De=["font-size","fill","x","y","font-weight"],Ie=["font-size","fill","x","y","font-weight"],Re={key:1},qe=["x","y","width","height","fill","stroke","stroke-width"],He=["x","y","width","height","fill","stroke","stroke-width"],Ue={key:2},Xe=["text-anchor","font-size","fill","font-weight","transform"],Ye=["text-anchor","font-size","fill","font-weight","transform"],Ge={key:4},je=["x","y","width","height","stroke","stroke-width"],We={key:5},Ke=["id"],Je=["stop-color"],Qe=["stop-color"],Ze=["x","y","font-size","fill"],el=["x","y","height","rx","fill"],ll=["x","y","font-size","fill"],tl=["stroke","x1","x2","y1","y2"],al=["fill","d"],ol={key:6},sl={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},ul=["stop-color"],nl=["stop-color"],rl=["x","y","width","height","rx"],il=["x","y","font-size","fill"],cl=["x","y","font-size","fill"],dl=["stroke","x1","x2","y1","y2"],vl=["fill","d"],yl={key:5,class:"vue-data-ui-watermark"},hl={key:6,ref:"source",dir:"auto"},pl={class:"vue-ui-data-table"},gl={key:0},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:ne}){e.useCssVars(t=>({"46dea1a0":t.tdo}));const{vue_ui_heatmap:re}=s.useConfig(),i=_,T=e.computed(()=>!!i.dataset&&i.dataset.length);s.objectIsEmpty(i.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const L=e.ref(s.createUid()),z=e.ref(null),ie=e.ref(null),M=e.ref(!1),O=e.ref(""),H=e.ref(void 0),N=e.ref(null),U=e.ref(0),X=e.ref(null),ce=e.ref(null),Y=e.ref(!1),G=e.ref(0),l=e.computed({get:()=>J(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Le.useUserOptionState({config:l.value}),{svgRef:K}=Ne.useChartAccessibility({config:l.value.style.title});function J(){const t=ue.useNestedProp({userConfig:i.config,defaultConfig:re});let u={};return t.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[t.theme]||i.config,defaultConfig:t})}:u=t,i.config&&s.hasDeepProperty(i.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?u.style.layout.dataLabels.xAxis.showOnlyAtModulo=i.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:u.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,u}e.watch(()=>i.config,t=>{l.value=J(),P.value=!l.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=l.value.table.show,g.value.showTooltip=l.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:le}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:l.value.style.title.text||"vue-ui-heatmap",options:l.value.userOptions.print}),de=e.computed(()=>l.value.userOptions.show&&!l.value.style.title.text),g=e.ref({showTable:l.value.table.show,showTooltip:l.value.style.tooltip.show}),ve=e.computed(()=>l.value.table.responsiveBreakpoint);function ye(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<ve.value})}).observe(X.value)}e.onMounted(F);function F(){ye()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(t=>(t.values||[]).length))),f=e.computed(()=>{const t=l.value.style.layout.padding.top+l.value.style.layout.padding.bottom+i.dataset.length*l.value.style.layout.cells.height,u=l.value.style.layout.padding.left+l.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*l.value.style.layout.cells.height,r=t+(l.value.style.legend.show?l.value.style.legend.position==="right"?0:l.value.style.layout.cells.height*2:0);return{height:t,heightWithLegend:r,width:u}}),S=e.computed(()=>l.value.style.legend.position),a=e.computed(()=>({top:l.value.style.layout.padding.top,left:l.value.style.layout.padding.left,right:f.value.width-l.value.style.layout.padding.right-(S.value==="right"&&l.value.style.legend.show?92:0),bottom:f.value.height-l.value.style.layout.padding.bottom,height:f.value.height-l.value.style.layout.padding.top-l.value.style.layout.padding.bottom,width:f.value.width-l.value.style.layout.padding.right-l.value.style.layout.padding.left-(S.value==="right"&&l.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(t=>t.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(t=>t.values))),w=e.computed(()=>{const t=i.dataset.flatMap(r=>r.values);return t.reduce((r,n)=>r+n,0)/t.length}),o=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<i.dataset.length?i.dataset.length:k.value)})),v=e.computed(()=>{const t=l.value.style.layout.dataLabels.yAxis.values.length?l.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=l.value.style.layout.dataLabels.xAxis.values,r=i.dataset.map(d=>d.values.reduce((h,q)=>h+q,0)),n=Math.max(...r),c=Math.min(...r),y=[];for(let d=0;d<k.value;d+=1)y.push(i.dataset.map(h=>h.values[d]||0).reduce((h,q)=>h+q,0));const p=Math.max(...y),R=Math.min(...y);return{yTotals:r.map(d=>{const h=isNaN(d/n)?0:d/n;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,c,n,d)}}),xTotals:y.map(d=>{const h=isNaN(d/p)?0:d/p;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:t,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((t,u)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(t=>({...t,temperatures:(t.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),ratio:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value))>1?1:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value)),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(u)/Math.abs(w.value))>1?1:Math.abs(1-Math.abs(u)/Math.abs(w.value)),color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function he(t,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=t;H.value=R,b.value=c,B.value={datapoint:t,seriesIndex:u,series:$.value,config:l.value},M.value=!0;let d="";const h=l.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}))?O.value=h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${l.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(l.value.style.layout.cells.value.formatter,c,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:c,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.tooltip.roundingValue}),{datapoint:t,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${l.value.style.tooltip.fontSize}px">${d}</div>`)}const V=e.computed(()=>a.value.top+D.value*(1-b.value/m.value)),E=e.computed(()=>a.value.left+(f.value.width-a.value.left-l.value.style.layout.padding.right)*(b.value/m.value));function pe(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.yTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.yTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[t],rowIndex:t})}function ge(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.xTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.xTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[t],colIndex:t})}e.computed(()=>{const t=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:t,body:u}});function te(){e.nextTick(()=>{const t=["",...i.dataset.map((c,y)=>c.name)],u=[];for(let c=0;c<v.value.xLabels.length;c+=1){const y=[v.value.xLabels[c]];for(let p=0;p<i.dataset.length;p+=1)y.push([i.dataset[p].values[c]]);u.push(y)}const r=[[l.value.style.title.text],[l.value.style.title.subtitle.text],[[""],[""],[""]]].concat([t]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function fe(t){C.value=t,U.value+=1}function ae(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const A=e.ref(!1);function I(){A.value=!A.value}return ne({generatePdf:ee,generateCsv:te,generateImage:le,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${C.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.backgroundColor}`),id:`heatmap__${L.value}`,onMouseenter:u[3]||(u[3]=()=>e.unref(j)(!0)),onMouseleave:u[4]||(u[4]=()=>e.unref(j)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ce,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...l.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...l.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),l.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${U.value}`,backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:z.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(ee),onGenerateCsv:te,onGenerateImage:e.unref(le),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:K,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${f.value.width} ${f.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${l.value.style.color}`)},[e.createVNode(Ce._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:f.value.width,height:f.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.color.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:r.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Ae))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,ze),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:c.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Me),l.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":l.value.style.layout.cells.value.fontSize,"font-weight":l.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.value,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,Oe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n,width:o.value.width,height:o.value.height,fill:"transparent",stroke:"none",onMouseover:p=>he(c,n,a.value.left+o.value.width*y,a.value.top+o.value.height*n),onMouseout:u[0]||(u[0]=p=>{M.value=!1,H.value=void 0,b.value=null,N.value=null})},null,40,Pe)]))),256)),l.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize/3+l.value.style.layout.dataLabels.yAxis.offsetY-(l.value.style.layout.cells.rowTotal.value.show?l.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,De),l.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize+l.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(pe(n)),9,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,qe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,He)])):e.createCommentVNode("",!0)]))),256)),l.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":l.value.style.layout.dataLabels.xAxis.rotation===0?"middle":l.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${a.value.top+l.value.style.layout.dataLabels.xAxis.offsetY-6-(l.value.style.layout.cells.columnTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}), rotate(${l.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,Xe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.value.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("text",{class:"vue-ui-heatmap-col-total","text-anchor":l.value.style.layout.cells.columnTotal.value.rotation===0?"middle":l.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+l.value.style.layout.cells.columnTotal.value.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${(o.value.height+l.value.style.layout.cells.spacing)*(_.dataset.length+1)+l.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${l.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(ge(n)),9,Ye))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:N.value.y-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing,width:o.value.width-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,fill:"transparent",stroke:l.value.style.layout.cells.selected.color,"stroke-width":l.value.style.layout.cells.selected.border,rx:1},null,8,je)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.hot},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.cold},null,8,Qe)],8,Ke)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-l.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:l.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,el),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+l.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,ll),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:V.value,y2:V.value},null,8,tl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${a.value.right+36},${V.value} ${a.value.right+26},${V.value-8} ${a.value.right+26},${V.value+8}z`},null,8,al)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",sl,[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.cold},null,8,ul),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.hot},null,8,nl)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height,width:f.value.width-a.value.left-l.value.style.layout.padding.right,height:l.value.style.layout.cells.height,rx:l.value.style.legend.scaleBorderRadius>l.value.style.layout.cells.height/2?l.value.style.layout.cells.height/2:l.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,rl),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"start","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,il),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"end","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,cl),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:E.value,x2:E.value,y1:a.value.bottom+l.value.style.layout.cells.height,y2:a.value.bottom+l.value.style.layout.cells.height*2},null,8,dl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+l.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+l.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+l.value.style.layout.cells.height-20}z`},null,8,vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:f.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yl,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:7,config:{type:"heatmap",style:{backgroundColor:l.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:l.value.style.tooltip.backgroundColor,color:l.value.style.tooltip.color,borderRadius:l.value.style.tooltip.borderRadius,borderColor:l.value.style.tooltip.borderColor,borderWidth:l.value.style.tooltip.borderWidth,fontSize:l.value.style.tooltip.fontSize,backgroundOpacity:l.value.style.tooltip.backgroundOpacity,position:l.value.style.tooltip.position,offsetY:l.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:l.value.style.tooltip.customFormat&&typeof l.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color},head:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:X,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":Y.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${l.value.table.th.backgroundColor};`),onClick:u[1]||(u[1]=r=>g.value.showTable=!1),onKeypress:u[2]||(u[2]=e.withKeys(r=>g.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:l.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",pl,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${l.value.table.th.backgroundColor};color:${l.value.table.th.color};outline:${l.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(l.value.style.title.text)+" ",1),l.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gl,e.toDisplayString(l.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${l.value.table.th.backgroundColor};color:${l.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},e.toDisplayString(r.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${l.value.table.td.backgroundColor};color:${l.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":l.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",ml,e.toDisplayString(r),1)],12,fl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(c,y)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":_.dataset[y].name,style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",kl,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.values[n],s:l.value.style.layout.dataLabels.suffix,r:l.value.table.td.roundingValue})),1)],12,bl))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},wl=Be._export_sfc(xl,[["__scopeId","data-v-5e5b92b5"]]);exports.default=wl;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Dq-Z3H6U.cjs"),me=require("./Title-MfFSxVPO.cjs"),se=require("./usePrinter-BkNDtpAf.cjs"),be=require("./Tooltip-wiyCGglp.cjs"),ke=require("./vue-ui-skeleton-BUAOXVqO.cjs"),xe=require("./BaseIcon-D4bvnDD1.cjs"),we=require("./vue-ui-accordion-CfdDVEBk.cjs"),ue=require("./useNestedProp-DLtcqrHr.cjs"),Ce=require("./PackageVersion-Cnge5ri6.cjs"),_e=require("./PenAndPaper-Co1D2Y2B.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee={key:2,style:"width:100%;background:transparent"},Te=["xmlns","viewBox"],Se=["width","height"],$e=["x","y","height","width","fill","stroke","stroke-width"],Ae=["x","y","height","width","fill","stroke","stroke-width"],ze=["x","y","width","height","fill","stroke","stroke-width"],Me=["x","y","width","height","fill","stroke","stroke-width"],Oe=["font-size","font-weight","fill","x","y"],Pe=["x","y","width","height","onMouseover"],Fe={key:0},De=["font-size","fill","x","y","font-weight"],Ie=["font-size","fill","x","y","font-weight"],Re={key:1},qe=["x","y","width","height","fill","stroke","stroke-width"],He=["x","y","width","height","fill","stroke","stroke-width"],Ue={key:2},Xe=["text-anchor","font-size","fill","font-weight","transform"],Ye=["text-anchor","font-size","fill","font-weight","transform"],Ge={key:4},je=["x","y","width","height","stroke","stroke-width"],We={key:5},Ke=["id"],Je=["stop-color"],Qe=["stop-color"],Ze=["x","y","font-size","fill"],el=["x","y","height","rx","fill"],ll=["x","y","font-size","fill"],tl=["stroke","x1","x2","y1","y2"],al=["fill","d"],ol={key:6},sl={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},ul=["stop-color"],nl=["stop-color"],rl=["x","y","width","height","rx"],il=["x","y","font-size","fill"],cl=["x","y","font-size","fill"],dl=["stroke","x1","x2","y1","y2"],vl=["fill","d"],yl={key:5,class:"vue-data-ui-watermark"},hl={key:6,ref:"source",dir:"auto"},pl={class:"vue-ui-data-table"},gl={key:0},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:ne}){e.useCssVars(t=>({"46dea1a0":t.tdo}));const{vue_ui_heatmap:re}=s.useConfig(),i=_,T=e.computed(()=>!!i.dataset&&i.dataset.length);s.objectIsEmpty(i.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const L=e.ref(s.createUid()),z=e.ref(null),ie=e.ref(null),M=e.ref(!1),O=e.ref(""),H=e.ref(void 0),N=e.ref(null),U=e.ref(0),X=e.ref(null),ce=e.ref(null),Y=e.ref(!1),G=e.ref(0),l=e.computed({get:()=>J(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Le.useUserOptionState({config:l.value}),{svgRef:K}=Ne.useChartAccessibility({config:l.value.style.title});function J(){const t=ue.useNestedProp({userConfig:i.config,defaultConfig:re});let u={};return t.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[t.theme]||i.config,defaultConfig:t})}:u=t,i.config&&s.hasDeepProperty(i.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?u.style.layout.dataLabels.xAxis.showOnlyAtModulo=i.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:u.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,u}e.watch(()=>i.config,t=>{l.value=J(),P.value=!l.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=l.value.table.show,g.value.showTooltip=l.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:le}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:l.value.style.title.text||"vue-ui-heatmap",options:l.value.userOptions.print}),de=e.computed(()=>l.value.userOptions.show&&!l.value.style.title.text),g=e.ref({showTable:l.value.table.show,showTooltip:l.value.style.tooltip.show}),ve=e.computed(()=>l.value.table.responsiveBreakpoint);function ye(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<ve.value})}).observe(X.value)}e.onMounted(F);function F(){ye()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(t=>(t.values||[]).length))),f=e.computed(()=>{const t=l.value.style.layout.padding.top+l.value.style.layout.padding.bottom+i.dataset.length*l.value.style.layout.cells.height,u=l.value.style.layout.padding.left+l.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*l.value.style.layout.cells.height,r=t+(l.value.style.legend.show?l.value.style.legend.position==="right"?0:l.value.style.layout.cells.height*2:0);return{height:t,heightWithLegend:r,width:u}}),S=e.computed(()=>l.value.style.legend.position),a=e.computed(()=>({top:l.value.style.layout.padding.top,left:l.value.style.layout.padding.left,right:f.value.width-l.value.style.layout.padding.right-(S.value==="right"&&l.value.style.legend.show?92:0),bottom:f.value.height-l.value.style.layout.padding.bottom,height:f.value.height-l.value.style.layout.padding.top-l.value.style.layout.padding.bottom,width:f.value.width-l.value.style.layout.padding.right-l.value.style.layout.padding.left-(S.value==="right"&&l.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(t=>t.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(t=>t.values))),w=e.computed(()=>{const t=i.dataset.flatMap(r=>r.values);return t.reduce((r,n)=>r+n,0)/t.length}),o=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<i.dataset.length?i.dataset.length:k.value)})),v=e.computed(()=>{const t=l.value.style.layout.dataLabels.yAxis.values.length?l.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=l.value.style.layout.dataLabels.xAxis.values,r=i.dataset.map(d=>d.values.reduce((h,q)=>h+q,0)),n=Math.max(...r),c=Math.min(...r),y=[];for(let d=0;d<k.value;d+=1)y.push(i.dataset.map(h=>h.values[d]||0).reduce((h,q)=>h+q,0));const p=Math.max(...y),R=Math.min(...y);return{yTotals:r.map(d=>{const h=isNaN(d/n)?0:d/n;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,c,n,d)}}),xTotals:y.map(d=>{const h=isNaN(d/p)?0:d/p;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:t,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((t,u)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(t=>({...t,temperatures:(t.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),ratio:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value))>1?1:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value)),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(u)/Math.abs(w.value))>1?1:Math.abs(1-Math.abs(u)/Math.abs(w.value)),color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function he(t,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=t;H.value=R,b.value=c,B.value={datapoint:t,seriesIndex:u,series:$.value,config:l.value},M.value=!0;let d="";const h=l.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}))?O.value=h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${l.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(l.value.style.layout.cells.value.formatter,c,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:c,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.tooltip.roundingValue}),{datapoint:t,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${l.value.style.tooltip.fontSize}px">${d}</div>`)}const V=e.computed(()=>a.value.top+D.value*(1-b.value/m.value)),E=e.computed(()=>a.value.left+(f.value.width-a.value.left-l.value.style.layout.padding.right)*(b.value/m.value));function pe(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.yTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.yTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[t],rowIndex:t})}function ge(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.xTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.xTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[t],colIndex:t})}e.computed(()=>{const t=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:t,body:u}});function te(){e.nextTick(()=>{const t=["",...i.dataset.map((c,y)=>c.name)],u=[];for(let c=0;c<v.value.xLabels.length;c+=1){const y=[v.value.xLabels[c]];for(let p=0;p<i.dataset.length;p+=1)y.push([i.dataset[p].values[c]]);u.push(y)}const r=[[l.value.style.title.text],[l.value.style.title.subtitle.text],[[""],[""],[""]]].concat([t]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function fe(t){C.value=t,U.value+=1}function ae(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const A=e.ref(!1);function I(){A.value=!A.value}return ne({generatePdf:ee,generateCsv:te,generateImage:le,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${C.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.backgroundColor}`),id:`heatmap__${L.value}`,onMouseenter:u[3]||(u[3]=()=>e.unref(j)(!0)),onMouseleave:u[4]||(u[4]=()=>e.unref(j)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e._sfc_main,{key:0,svgRef:e.unref(K),backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ce,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...l.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...l.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),l.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${U.value}`,backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:z.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(ee),onGenerateCsv:te,onGenerateImage:e.unref(le),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:K,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${f.value.width} ${f.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${l.value.style.color}`)},[e.createVNode(Ce._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:f.value.width,height:f.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.color.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:r.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Ae))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,ze),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:c.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Me),l.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":l.value.style.layout.cells.value.fontSize,"font-weight":l.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.value,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,Oe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n,width:o.value.width,height:o.value.height,fill:"transparent",stroke:"none",onMouseover:p=>he(c,n,a.value.left+o.value.width*y,a.value.top+o.value.height*n),onMouseout:u[0]||(u[0]=p=>{M.value=!1,H.value=void 0,b.value=null,N.value=null})},null,40,Pe)]))),256)),l.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize/3+l.value.style.layout.dataLabels.yAxis.offsetY-(l.value.style.layout.cells.rowTotal.value.show?l.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,De),l.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize+l.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(pe(n)),9,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,qe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,He)])):e.createCommentVNode("",!0)]))),256)),l.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":l.value.style.layout.dataLabels.xAxis.rotation===0?"middle":l.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${a.value.top+l.value.style.layout.dataLabels.xAxis.offsetY-6-(l.value.style.layout.cells.columnTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}), rotate(${l.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,Xe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.value.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("text",{class:"vue-ui-heatmap-col-total","text-anchor":l.value.style.layout.cells.columnTotal.value.rotation===0?"middle":l.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+l.value.style.layout.cells.columnTotal.value.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${(o.value.height+l.value.style.layout.cells.spacing)*(_.dataset.length+1)+l.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${l.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(ge(n)),9,Ye))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:N.value.y-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing,width:o.value.width-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,fill:"transparent",stroke:l.value.style.layout.cells.selected.color,"stroke-width":l.value.style.layout.cells.selected.border,rx:1},null,8,je)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.hot},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.cold},null,8,Qe)],8,Ke)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-l.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:l.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,el),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+l.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,ll),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:V.value,y2:V.value},null,8,tl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${a.value.right+36},${V.value} ${a.value.right+26},${V.value-8} ${a.value.right+26},${V.value+8}z`},null,8,al)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",sl,[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.cold},null,8,ul),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.hot},null,8,nl)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height,width:f.value.width-a.value.left-l.value.style.layout.padding.right,height:l.value.style.layout.cells.height,rx:l.value.style.legend.scaleBorderRadius>l.value.style.layout.cells.height/2?l.value.style.layout.cells.height/2:l.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,rl),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"start","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,il),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"end","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,cl),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:E.value,x2:E.value,y1:a.value.bottom+l.value.style.layout.cells.height,y2:a.value.bottom+l.value.style.layout.cells.height*2},null,8,dl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+l.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+l.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+l.value.style.layout.cells.height-20}z`},null,8,vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:f.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yl,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:7,config:{type:"heatmap",style:{backgroundColor:l.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:l.value.style.tooltip.backgroundColor,color:l.value.style.tooltip.color,borderRadius:l.value.style.tooltip.borderRadius,borderColor:l.value.style.tooltip.borderColor,borderWidth:l.value.style.tooltip.borderWidth,fontSize:l.value.style.tooltip.fontSize,backgroundOpacity:l.value.style.tooltip.backgroundOpacity,position:l.value.style.tooltip.position,offsetY:l.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:l.value.style.tooltip.customFormat&&typeof l.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color},head:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:X,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":Y.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${l.value.table.th.backgroundColor};`),onClick:u[1]||(u[1]=r=>g.value.showTable=!1),onKeypress:u[2]||(u[2]=e.withKeys(r=>g.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:l.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",pl,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${l.value.table.th.backgroundColor};color:${l.value.table.th.color};outline:${l.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(l.value.style.title.text)+" ",1),l.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gl,e.toDisplayString(l.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${l.value.table.th.backgroundColor};color:${l.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},e.toDisplayString(r.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${l.value.table.td.backgroundColor};color:${l.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":l.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",ml,e.toDisplayString(r),1)],12,fl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(c,y)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":_.dataset[y].name,style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",kl,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.values[n],s:l.value.style.layout.dataLabels.suffix,r:l.value.table.td.roundingValue})),1)],12,bl))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},wl=Be._export_sfc(xl,[["__scopeId","data-v-5e5b92b5"]]);exports.default=wl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Be2lbQel.cjs"),le=require("./useNestedProp-BVcjidN0.cjs"),ae=require("./usePrinter-uMLnqx4N.cjs"),Ce=require("./PackageVersion-DgyGLNuh.cjs"),we=require("./Legend-UfmoJ4KO.cjs"),Be=require("./Title-DUa01RoU.cjs"),Se=require("./Tooltip-DxTkpBZU.cjs"),_e=require("./DataTable-Bg1jcIr-.cjs"),Ne=require("./vue-ui-accordion-BL55ml0w.cjs"),ze=require("./PenAndPaper-Cvmkcq22.cjs"),$e=require("./vue-ui-skeleton-ByGfybu8.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),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-Dq-Z3H6U.cjs"),le=require("./useNestedProp-DLtcqrHr.cjs"),ae=require("./usePrinter-BkNDtpAf.cjs"),Ce=require("./PackageVersion-Cnge5ri6.cjs"),we=require("./Legend-DAc_tyUt.cjs"),Be=require("./Title-MfFSxVPO.cjs"),Se=require("./Tooltip-wiyCGglp.cjs"),_e=require("./DataTable-DwLexcJ8.cjs"),Ne=require("./vue-ui-accordion-CfdDVEBk.cjs"),ze=require("./PenAndPaper-Co1D2Y2B.cjs"),$e=require("./vue-ui-skeleton-BUAOXVqO.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),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;
|