vue-data-ui 2.4.52 → 2.4.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CFlFdPC5.cjs → Arrow-BGjtcB03.cjs} +1 -1
- package/dist/{Arrow-BuBoE64l.js → Arrow-XbzVXHDF.js} +1 -1
- package/dist/{BaseIcon-zmxwsaLW.js → BaseIcon-CiQzR1fE.js} +1 -1
- package/dist/{BaseIcon-CfhoS_qC.cjs → BaseIcon-DGRZS55E.cjs} +1 -1
- package/dist/{DataTable-CwAdpLng.cjs → DataTable-DWQiMziO.cjs} +1 -1
- package/dist/{DataTable-COkA4Nyz.js → DataTable-jvL0XGWl.js} +2 -2
- package/dist/{Legend-CR9ydX8N.cjs → Legend-BstxUr4T.cjs} +1 -1
- package/dist/{Legend-bYlSC7I7.js → Legend-DcIfRSNC.js} +1 -1
- package/dist/{PackageVersion-C1F3QLoY.cjs → PackageVersion-CeJ2R9gK.cjs} +1 -1
- package/dist/{PackageVersion-Dz3KcTL4.js → PackageVersion-Ve0s76sL.js} +1 -1
- package/dist/{PenAndPaper-DDheVRNG.cjs → PenAndPaper-DQPbe0G_.cjs} +1 -1
- package/dist/{PenAndPaper-BycdTwSP.js → PenAndPaper-IHG7xTmx.js} +3 -3
- package/dist/{Shape-BBp5EwJH.cjs → Shape-Bzx4qKcd.cjs} +1 -1
- package/dist/{Shape-BDJJ38uM.js → Shape-Rg6yW7m3.js} +1 -1
- package/dist/{Slicer-D_DaIThC.js → Slicer-CP2Z31Lc.js} +2 -2
- package/dist/{Slicer-7oTpm-cZ.cjs → Slicer-CPp7_WWa.cjs} +1 -1
- package/dist/{Title-B7ruS8yl.cjs → Title-CSyDhu3S.cjs} +1 -1
- package/dist/{Title-aMb2ETf7.js → Title-DLo3Zo2_.js} +1 -1
- package/dist/{Tooltip-BRZ3DT4p.js → Tooltip-CA1QhFeE.js} +1 -1
- package/dist/{Tooltip-BqSN71SL.cjs → Tooltip-D88h1zvE.cjs} +1 -1
- package/dist/{index-BkXYJDpD.cjs → index-C3wsuQ2C.cjs} +1 -1
- package/dist/{index-K5uyh1gA.js → index-DhxnZ6ZS.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DifqJZAs.js → useNestedProp-BcqToEU0.js} +1 -1
- package/dist/{useNestedProp-C6IvqE-r.cjs → useNestedProp-CFwQtnNB.cjs} +1 -1
- package/dist/{usePrinter-DHv-BwME.cjs → usePrinter-Dglf1bsw.cjs} +1 -1
- package/dist/{usePrinter-p_ZZlGc9.js → usePrinter-mDGfOQZA.js} +1 -1
- package/dist/{vue-data-ui-M0E2b8Dw.cjs → vue-data-ui-BM5qFlPf.cjs} +1 -1
- package/dist/{vue-data-ui-3PlAeIlX.js → vue-data-ui-C6tJVggL.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-PrijRaoI.js → vue-ui-3d-bar-BFzCyxbR.js} +9 -9
- package/dist/{vue-ui-3d-bar-VQyMytda.cjs → vue-ui-3d-bar-DiL5x37F.cjs} +1 -1
- package/dist/{vue-ui-accordion-CsJT7Az3.js → vue-ui-accordion-DDp8hUlk.js} +3 -3
- package/dist/{vue-ui-accordion-kr18wKfc.cjs → vue-ui-accordion-kv5FuXqU.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DFYykOow.js → vue-ui-age-pyramid-ORFLMq65.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BV1MgH8J.cjs → vue-ui-age-pyramid-xYMc6DPS.cjs} +1 -1
- package/dist/{vue-ui-annotator-Blg3LdqF.js → vue-ui-annotator-CYyuSx8D.js} +1 -1
- package/dist/{vue-ui-annotator-DffUZR4a.cjs → vue-ui-annotator-J_Ssv585.cjs} +1 -1
- package/dist/{vue-ui-bullet-DSampkai.cjs → vue-ui-bullet-BbOqOHbK.cjs} +1 -1
- package/dist/{vue-ui-bullet-Ybz4qPWl.js → vue-ui-bullet-D8w5qQKc.js} +8 -8
- package/dist/{vue-ui-candlestick-DsVBdCz_.js → vue-ui-candlestick-B7jJlgII.js} +11 -11
- package/dist/{vue-ui-candlestick-BxcwK8UI.cjs → vue-ui-candlestick-BbKj6Lt5.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-C2ThrWYt.js → vue-ui-carousel-table-3ntrCePt.js} +4 -4
- package/dist/{vue-ui-carousel-table-DkWNe0mJ.cjs → vue-ui-carousel-table-Cazhvs3E.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Cw8LKuZG.cjs → vue-ui-chestnut-DyFTfNZi.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BacH0ZYK.js → vue-ui-chestnut-apUInPn_.js} +8 -8
- package/dist/{vue-ui-cursor-CMKSCQ-v.js → vue-ui-cursor-CFTO66GQ.js} +2 -2
- package/dist/{vue-ui-cursor-D2kQNFWy.cjs → vue-ui-cursor-CsNO0-Tw.cjs} +1 -1
- package/dist/{vue-ui-dashboard-9PYl4mWC.js → vue-ui-dashboard-C-pDSWwi.js} +2 -2
- package/dist/{vue-ui-dashboard-BHwlhK33.cjs → vue-ui-dashboard-DddJvm7i.cjs} +1 -1
- package/dist/{vue-ui-digits-2yacgzrJ.cjs → vue-ui-digits-DSqN9pA7.cjs} +1 -1
- package/dist/{vue-ui-digits-CyTjq_oN.js → vue-ui-digits-DWAbSFx3.js} +2 -2
- package/dist/{vue-ui-donut-BxLlCBhU.js → vue-ui-donut-DSeDfu4H.js} +11 -11
- package/dist/{vue-ui-donut-BNv1eGiu.cjs → vue-ui-donut-DrAes-Cb.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DGjHfyq8.cjs → vue-ui-donut-evolution-CYtTDj7r.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bw9hfwuO.js → vue-ui-donut-evolution-D7h33-ti.js} +11 -11
- package/dist/{vue-ui-dumbbell-CjHcgzti.cjs → vue-ui-dumbbell-DAK7iUrl.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-D0PjpD19.js → vue-ui-dumbbell-LF5uy2pG.js} +10 -10
- package/dist/{vue-ui-flow-BuTJcn6b.js → vue-ui-flow-ClPKB4R5.js} +9 -9
- package/dist/{vue-ui-flow-Dc-KV4a3.cjs → vue-ui-flow-u3UVnWTH.cjs} +1 -1
- package/dist/{vue-ui-funnel-CxO1aav3.js → vue-ui-funnel-BIXUXI8z.js} +8 -8
- package/dist/{vue-ui-funnel-QQGqK4OD.cjs → vue-ui-funnel-BY7rqfpW.cjs} +1 -1
- package/dist/{vue-ui-galaxy-B2uwYVgz.js → vue-ui-galaxy-CEnGrqn3.js} +11 -11
- package/dist/{vue-ui-galaxy-CABgAX76.cjs → vue-ui-galaxy-DBnbXO8c.cjs} +1 -1
- package/dist/{vue-ui-gauge-CqhJx__t.js → vue-ui-gauge-C7Qchm0R.js} +7 -7
- package/dist/{vue-ui-gauge-CTEPbzWe.cjs → vue-ui-gauge-CJYWRyeq.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DlQOItIS.cjs → vue-ui-gizmo-C9_Ciat_.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D7G-8Al-.js → vue-ui-gizmo-CKZRt29V.js} +3 -3
- package/dist/{vue-ui-heatmap-DLNzJh--.js → vue-ui-heatmap-BlbOJnS0.js} +10 -10
- package/dist/{vue-ui-heatmap-BOwY6qNR.cjs → vue-ui-heatmap-olBNo_Ui.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CH2mN74k.js → vue-ui-history-plot-CBpL_OyR.js} +11 -11
- package/dist/{vue-ui-history-plot-EiYWpITj.cjs → vue-ui-history-plot-Cyd53pxt.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cb3fLQlS.js → vue-ui-kpi-C2XDua17.js} +3 -3
- package/dist/{vue-ui-kpi-DB00TrXv.cjs → vue-ui-kpi-CkcQ40VT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DAaZwOTE.cjs → vue-ui-mini-loader-CpeOqmXd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Czn2u6m3.js → vue-ui-mini-loader-DXF2Zpi6.js} +2 -2
- package/dist/{vue-ui-molecule-BAwzIU19.js → vue-ui-molecule-ekgpnwl8.js} +11 -11
- package/dist/{vue-ui-molecule-DZ6Z4eru.cjs → vue-ui-molecule-qQjh4AkD.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BXOWHB57.js → vue-ui-mood-radar-CV30YU_f.js} +11 -11
- package/dist/{vue-ui-mood-radar-BL3vQzMq.cjs → vue-ui-mood-radar-KoW8hhxL.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D1EF5IEw.cjs → vue-ui-nested-donuts-AkaYvLCi.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-F1pwFa1Y.js → vue-ui-nested-donuts-DZ_eS-bB.js} +11 -11
- package/dist/{vue-ui-onion-nA8sXxh-.cjs → vue-ui-onion-Bl1UUCFU.cjs} +1 -1
- package/dist/{vue-ui-onion-C9dEaRbc.js → vue-ui-onion-YfHn7AeD.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Cgc8JHMy.js → vue-ui-parallel-coordinate-plot-BEqbS5A6.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DL4DOhyh.cjs → vue-ui-parallel-coordinate-plot-Dv_UD2bi.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C_hJHr9T.js → vue-ui-quadrant-BU_pD15l.js} +12 -12
- package/dist/{vue-ui-quadrant-DJGxKeBq.cjs → vue-ui-quadrant-DO6afeTp.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C5v_8Kpw.cjs → vue-ui-quick-chart-ByDBV3lo.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D4k-zSan.js → vue-ui-quick-chart-U-1paiOI.js} +9 -9
- package/dist/{vue-ui-radar-WKQ-TavD.js → vue-ui-radar-B5FUXS1e.js} +12 -12
- package/dist/{vue-ui-radar-BeGVGueh.cjs → vue-ui-radar-DLsIiPBR.cjs} +1 -1
- package/dist/{vue-ui-rating-DI3L8UYN.cjs → vue-ui-rating-D4-ebrWA.cjs} +1 -1
- package/dist/{vue-ui-rating-BrSnMkzF.js → vue-ui-rating-DcCUrP6L.js} +2 -2
- package/dist/{vue-ui-relation-circle-DzZ5H4og.js → vue-ui-relation-circle-2i7B4Yf-.js} +7 -7
- package/dist/{vue-ui-relation-circle-BJ_TOhIp.cjs → vue-ui-relation-circle-jPx6gmw1.cjs} +1 -1
- package/dist/{vue-ui-rings-1qwg2E0O.cjs → vue-ui-rings-6JF72UH8.cjs} +1 -1
- package/dist/{vue-ui-rings-43dY-4_7.js → vue-ui-rings-DG0DQD21.js} +11 -11
- package/dist/{vue-ui-scatter-cTK10i0K.cjs → vue-ui-scatter-CfbMuDQy.cjs} +1 -1
- package/dist/{vue-ui-scatter-q6Sfqa4W.js → vue-ui-scatter-j6SU-TUb.js} +12 -12
- package/dist/{vue-ui-screenshot-CEy169Mc.js → vue-ui-screenshot-B6hhgFz_.js} +1 -1
- package/dist/{vue-ui-screenshot-gOGGT_ti.cjs → vue-ui-screenshot-BKfP266_.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BTN1PKkz.cjs → vue-ui-skeleton-99lBQ_mF.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BhA2lIT6.js → vue-ui-skeleton-pdtGfiV6.js} +3 -3
- package/dist/{vue-ui-smiley-BIEXWWWa.cjs → vue-ui-smiley-8UembS7P.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAFdctGJ.js → vue-ui-smiley-fOlIEhGS.js} +2 -2
- package/dist/{vue-ui-spark-trend-Deg6oJxD.js → vue-ui-spark-trend-BkPSkOrh.js} +5 -5
- package/dist/{vue-ui-spark-trend-LqnAP3mZ.cjs → vue-ui-spark-trend-CV5Uq241.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CJR8pSqp.cjs → vue-ui-sparkbar-DUNqm_AP.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Dm393iij.js → vue-ui-sparkbar-qB9reaJo.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DpP1XF6C.cjs → vue-ui-sparkgauge-D0hLQuMH.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-WTo7H8eC.js → vue-ui-sparkgauge-Mmm3mt-c.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DNVBeCU9.js → vue-ui-sparkhistogram-9yQ-E0co.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CEvdVaLZ.cjs → vue-ui-sparkhistogram-CuB-M26R.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Bcn_JAfC.js → vue-ui-sparkline-D_QkkgS-.js} +4 -4
- package/dist/{vue-ui-sparkline-B87AKRMY.cjs → vue-ui-sparkline-Du8Hm28x.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DPPTp1Tm.js → vue-ui-sparkstackbar-BDubVDPN.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-Cmafq74u.cjs → vue-ui-sparkstackbar-B_I1tmuS.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DeFiDh8a.cjs → vue-ui-stackbar-DHnilreT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BeXW23yH.js → vue-ui-stackbar-rNiqr7aF.js} +12 -12
- package/dist/{vue-ui-strip-plot-CG-wp65N.js → vue-ui-strip-plot-DPn3qgdB.js} +11 -11
- package/dist/{vue-ui-strip-plot-5n6Om5PH.cjs → vue-ui-strip-plot-DlRej1u9.cjs} +1 -1
- package/dist/{vue-ui-table-BzuWkWse.js → vue-ui-table-BrZ__Cd2.js} +1 -1
- package/dist/{vue-ui-table-Bbfdq7B8.cjs → vue-ui-table-DLcFdjyM.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap--Uj5nFcF.cjs → vue-ui-table-heatmap-DIkXPyqe.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-obAYC2HB.js → vue-ui-table-heatmap-DQXI2uPZ.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CW0-ubzl.js → vue-ui-table-sparkline-BUNsAEVY.js} +77 -76
- package/dist/vue-ui-table-sparkline-BazGMr3R.cjs +1 -0
- package/dist/{vue-ui-thermometer-BmgPuIr6.js → vue-ui-thermometer-DMkD9fS8.js} +7 -7
- package/dist/{vue-ui-thermometer-DW10BlzG.cjs → vue-ui-thermometer-_gbnwB1j.cjs} +1 -1
- package/dist/{vue-ui-timer-CKp_yNVJ.cjs → vue-ui-timer-BTfgxjIc.cjs} +1 -1
- package/dist/{vue-ui-timer-6eWSNYld.js → vue-ui-timer-Dv-GSUf1.js} +5 -5
- package/dist/{vue-ui-tiremarks-DeEI5TAa.js → vue-ui-tiremarks-CEMrBJPF.js} +7 -7
- package/dist/{vue-ui-tiremarks-nb8r7akm.cjs → vue-ui-tiremarks-Ct9y13Sl.cjs} +1 -1
- package/dist/{vue-ui-treemap-B54QUZ46.cjs → vue-ui-treemap-D7SBHWJ2.cjs} +1 -1
- package/dist/{vue-ui-treemap-tlPZye6M.js → vue-ui-treemap-D8AkLDqM.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BIst1a32.js → vue-ui-vertical-bar-BnhysoC9.js} +11 -11
- package/dist/{vue-ui-vertical-bar-CCXF79YU.cjs → vue-ui-vertical-bar-_EQI8SXm.cjs} +1 -1
- package/dist/{vue-ui-waffle-Dctw-uNI.cjs → vue-ui-waffle-DOhi1BWD.cjs} +1 -1
- package/dist/{vue-ui-waffle-iJT4g4Ht.js → vue-ui-waffle-DfRmWfrG.js} +11 -11
- package/dist/{vue-ui-wheel-DnCpgZZo.cjs → vue-ui-wheel-BbDtndmW.cjs} +1 -1
- package/dist/{vue-ui-wheel-v1_jsNWp.js → vue-ui-wheel-CU6-VBD1.js} +7 -7
- package/dist/{vue-ui-word-cloud-BXa6XzUJ.cjs → vue-ui-word-cloud-CRarnngT.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DR8E1ArH.js → vue-ui-word-cloud-CbuHwEkP.js} +10 -10
- package/dist/{vue-ui-xy-CvFWhRR-.cjs → vue-ui-xy-BRTegbdr.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-hPcU2SBK.js → vue-ui-xy-canvas-DsTqLLWp.js} +11 -11
- package/dist/{vue-ui-xy-canvas-BVw3zOIC.cjs → vue-ui-xy-canvas-hn3ncIFk.cjs} +1 -1
- package/dist/{vue-ui-xy-BZ3lbw6i.js → vue-ui-xy-pSvq591u.js} +14 -14
- package/package.json +1 -1
- package/dist/vue-ui-table-sparkline-Buh41Ovt.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BkXYJDpD.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-DHv-BwME.cjs"),ve=require("./vue-ui-skeleton-BTN1PKkz.cjs"),de=require("./Title-B7ruS8yl.cjs"),Z=require("./useNestedProp-C6IvqE-r.cjs"),he=require("./PackageVersion-C1F3QLoY.cjs"),me=require("./PenAndPaper-DDheVRNG.cjs"),fe=require("./useUserOptionState-BgepsfED.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],ke={key:0},ge=["xmlns","viewBox"],be=["id"],xe=["stop-color"],Se=["stop-color"],_e=["stop-color"],Be=["id"],we=["stdDeviation"],Ce=["d","fill","stroke"],Ne=["id","d"],Fe=["fill","font-size","font-weight"],ze=["href","startOffset"],Pe=["x","y","text-anchor","fill","font-size","font-weight"],Ee=["d","filter"],$e=["stroke","stroke-width"],Oe=["stroke","stroke-width"],Me=["stroke","stroke-width"],Ve=["stroke","stroke-width"],Xe={key:4},Ye=["x","y","text-anchor","font-size","font-weight","fill"],Ie=["x","y","font-size","font-weight","fill"],Ae={key:6},Re=["x1","y1","x2","y2","stroke","stroke-width"],Le=["x1","y1","x2","y2","stroke","stroke-width"],De=["x1","y1","x2","y2","stroke-width","filter"],Ge={key:7},qe=["d","fill","stroke","stroke-width"],Te=["cx","cy","fill","r","stroke-width","stroke"],Ue=["x","y","font-size","fill"],je={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=n.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(n.createUid()),Q=e.ref(null),P=e.ref(0),g=e.ref(null),E=e.ref(null),$=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:Y}=fe.useUserOptionState({config:t.value});e.watch(()=>c.config,o=>{t.value=I(),N.value=!t.value.showOnChartHover,q(),V.value+=1},{deep:!0});function I(){const o=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return o.theme?{...Z.useNestedProp({userConfig:n.themes.vue_ui_gauge[o.theme]||c.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!_.value||n.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(c.dataset.series||[]).forEach(a=>{o.push(a.from||1e-7),o.push(a.to||1e-7)});const r=Math.max(...o);return{...c.dataset,series:(c.dataset.series||[]).map((a,s)=>({...a,color:n.convertColorToHex(a.color)||te.value[s]||n.palette[s],value:((a.to||0)-(a.from||0))/r*100}))}}),h=e.ref(512),l=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),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:o,y1:r,x2:o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),y2:r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a)}}),G=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,s=o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),m=r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a),f=l.value.pointerRadius,se=o+f*Math.cos(a+Math.PI/2),ue=r+f*Math.sin(a+Math.PI/2),ie=o+f*Math.cos(a-Math.PI/2),ce=r+f*Math.sin(a-Math.PI/2);return isNaN(s)?null:`M ${s},${m} ${se},${ue} ${ie},${ce} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:r,from:a,to:s}=p.value.series[o];if(v.value>=a&&v.value<=s)return r}return"#2D353C"}),B=e.ref(null);function q(){if(n.objectIsEmpty(c.dataset)?n.error({componentName:"VueUiGauge",type:"dataset"}):(n.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(o=>{n.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(a=>{n.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:r})})}):n.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const o=W.throttle(()=>{const{width:r,height:a}=W.useResponsive({chart:g.value,title:t.value.style.chart.title.text?E.value:null,legend:$.value,source:O.value,noTitle:M.value});l.value.width=r,l.value.height=a,l.value.centerX=r/2,l.value.centerY=h.value/2/358.4*a,l.value.bottom=a,l.value.labelFontSize=18/h.value*Math.min(a,r)<10?10:18/h.value*Math.min(a,r),l.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,r)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,r),l.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,r),l.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,r),l.value.pointerStrokeWidth=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),l.value.markerOffset=n.translateSize({relator:Math.max(r,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),l.value.segmentFontSize=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(o),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function T(o){const r=[];(p.value.series||[]).forEach(f=>{r.push(f.from||0),r.push(f.to||0)}),b.value=Math.max(...r),x.value=Math.min(...r);let a=t.value.style.chart.animation.speed;const s=Math.abs(o-v.value)/(a*60);function m(){v.value<o?v.value=Math.min(v.value+s,o):v.value>o&&(v.value=Math.max(v.value-s,o)),v.value!==o&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(l.value.width,l.value.height):l.value.width,r=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:o/r,gradients:o/(r*1.1),base:t.value.responsive?l.value.height/2:l.value.height*.7,ratingBase:t.value.responsive?l.value.height/2+l.value.height/4:l.value.height*.9,pointerSize:t.value.responsive?Math.min(l.value.width,l.value.height)/3:l.value.width/3.2}}),d=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*l.value.trackSize)),ae=e.computed(()=>n.makeDonut({series:p.value.series},l.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*l.value.trackSize)),k=e.computed(()=>d.value.map(o=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(o.nameOffsetRatio||1))),U=e.computed(()=>{const{x:o,y:r}=n.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:s}=n.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:o,y1:r,x2:a,y2:s}}),j=e.computed(()=>d.value.map(o=>{const{x:r,y:a}=n.offsetFromCenterPoint({initX:o.separator.x,initY:o.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:s,y:m}=n.offsetFromCenterPoint({initX:o.endX,initY:o.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:r,y1:a,x2:s,y2:m}}));function oe(o){if(o.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let s=0;return o.map(m=>(s+=m,`${s/100*a-m/4}%`))}const le=e.computed(()=>oe(d.value.map(o=>o.proportion*100))),re=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*l.value.trackSize)),S=e.ref(!1);function ne(o){S.value=o,P.value+=1}const w=e.ref(!1);function z(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:z}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.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:r[0]||(r[0]=()=>e.unref(X)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(Y)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,_e)],8,be)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.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,we)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ce))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${s}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 ${2*k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 -${2*k.value[s]},0`,fill:"transparent"},null,8,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${s}`,startOffset:le.value[s]},e.toDisplayString(a.name||""),9,ze)],8,Fe))),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:1},e.renderList(ae.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(n.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Pe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(re.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ee))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[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,$e),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,Oe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":l.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(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).y,"text-anchor":"start","font-size":l.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(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(n.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,Ie)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ae,[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":l.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Re)),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":l.value.pointerStrokeWidth*.7},null,8,Le)),!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":l.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,De)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ge,[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,qe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:l.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:l.value.pointerRadius<=0?1e-4:l.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Te),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:l.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":l.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Ue)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,pe))}},He=ye._export_sfc(We,[["__scopeId","data-v-8de26327"]]);exports.default=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-C3wsuQ2C.cjs"),W=require("./useResponsive-BJ7DTGpm.cjs"),H=require("./usePrinter-Dglf1bsw.cjs"),ve=require("./vue-ui-skeleton-99lBQ_mF.cjs"),de=require("./Title-CSyDhu3S.cjs"),Z=require("./useNestedProp-CFwQtnNB.cjs"),he=require("./PackageVersion-CeJ2R9gK.cjs"),me=require("./PenAndPaper-DQPbe0G_.cjs"),fe=require("./useUserOptionState-BgepsfED.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],ke={key:0},ge=["xmlns","viewBox"],be=["id"],xe=["stop-color"],Se=["stop-color"],_e=["stop-color"],Be=["id"],we=["stdDeviation"],Ce=["d","fill","stroke"],Ne=["id","d"],Fe=["fill","font-size","font-weight"],ze=["href","startOffset"],Pe=["x","y","text-anchor","fill","font-size","font-weight"],Ee=["d","filter"],$e=["stroke","stroke-width"],Oe=["stroke","stroke-width"],Me=["stroke","stroke-width"],Ve=["stroke","stroke-width"],Xe={key:4},Ye=["x","y","text-anchor","font-size","font-weight","fill"],Ie=["x","y","font-size","font-weight","fill"],Ae={key:6},Re=["x1","y1","x2","y2","stroke","stroke-width"],Le=["x1","y1","x2","y2","stroke","stroke-width"],De=["x1","y1","x2","y2","stroke-width","filter"],Ge={key:7},qe=["d","fill","stroke","stroke-width"],Te=["cx","cy","fill","r","stroke-width","stroke"],Ue=["x","y","font-size","fill"],je={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(C,{expose:J}){const c=C,{vue_ui_gauge:K}=n.useConfig(),_=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),y=e.ref(n.createUid()),Q=e.ref(null),P=e.ref(0),g=e.ref(null),E=e.ref(null),$=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:N,setUserOptionsVisibility:X,keepUserOptionState:Y}=fe.useUserOptionState({config:t.value});e.watch(()=>c.config,o=>{t.value=I(),N.value=!t.value.showOnChartHover,q(),V.value+=1},{deep:!0});function I(){const o=Z.useNestedProp({userConfig:c.config,defaultConfig:K});return o.theme?{...Z.useNestedProp({userConfig:n.themes.vue_ui_gauge[o.theme]||c.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}const{isPrinting:A,isImaging:R,generatePdf:L,generateImage:D}=H.usePrinter({elementId:`vue-ui-gauge_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.computed(()=>{if(!_.value||n.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const o=[];(c.dataset.series||[]).forEach(a=>{o.push(a.from||1e-7),o.push(a.to||1e-7)});const r=Math.max(...o);return{...c.dataset,series:(c.dataset.series||[]).map((a,s)=>({...a,color:n.convertColorToHex(a.color)||te.value[s]||n.palette[s],value:((a.to||0)-(a.from||0))/r*100}))}}),h=e.ref(512),l=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),x=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI;return{x1:o,y1:r,x2:o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),y2:r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a)}}),G=e.computed(()=>{const o=l.value.width/2,r=i.value.base,a=Math.PI*((v.value+0-x.value)/(b.value-x.value))+Math.PI,s=o+i.value.pointerSize*l.value.pointerSize*.9*Math.cos(a),m=r+i.value.pointerSize*l.value.pointerSize*.9*Math.sin(a),f=l.value.pointerRadius,se=o+f*Math.cos(a+Math.PI/2),ue=r+f*Math.sin(a+Math.PI/2),ie=o+f*Math.cos(a-Math.PI/2),ce=r+f*Math.sin(a-Math.PI/2);return isNaN(s)?null:`M ${s},${m} ${se},${ue} ${ie},${ce} Z`}),F=e.computed(()=>{for(let o=0;o<p.value.series.length;o+=1){const{color:r,from:a,to:s}=p.value.series[o];if(v.value>=a&&v.value<=s)return r}return"#2D353C"}),B=e.ref(null);function q(){if(n.objectIsEmpty(c.dataset)?n.error({componentName:"VueUiGauge",type:"dataset"}):(n.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(o=>{n.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((o,r)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(a=>{n.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:a,index:r})})}):n.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const o=W.throttle(()=>{const{width:r,height:a}=W.useResponsive({chart:g.value,title:t.value.style.chart.title.text?E.value:null,legend:$.value,source:O.value,noTitle:M.value});l.value.width=r,l.value.height=a,l.value.centerX=r/2,l.value.centerY=h.value/2/358.4*a,l.value.bottom=a,l.value.labelFontSize=18/h.value*Math.min(a,r)<10?10:18/h.value*Math.min(a,r),l.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(a,r)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(a,r),l.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(a,r),l.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(a,r),l.value.pointerStrokeWidth=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),l.value.markerOffset=n.translateSize({relator:Math.max(r,a),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),l.value.segmentFontSize=n.translateSize({relator:Math.min(r,a),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})});B.value=new ResizeObserver(o),B.value.observe(g.value.parentNode)}}e.onMounted(()=>{q()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function T(o){const r=[];(p.value.series||[]).forEach(f=>{r.push(f.from||0),r.push(f.to||0)}),b.value=Math.max(...r),x.value=Math.min(...r);let a=t.value.style.chart.animation.speed;const s=Math.abs(o-v.value)/(a*60);function m(){v.value<o?v.value=Math.min(v.value+s,o):v.value>o&&(v.value=Math.max(v.value-s,o)),v.value!==o&&requestAnimationFrame(m)}m()}const i=e.computed(()=>{const o=t.value.responsive?Math.min(l.value.width,l.value.height):l.value.width,r=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:o/r,gradients:o/(r*1.1),base:t.value.responsive?l.value.height/2:l.value.height*.7,ratingBase:t.value.responsive?l.value.height/2+l.value.height/4:l.value.height*.9,pointerSize:t.value.responsive?Math.min(l.value.width,l.value.height)/3:l.value.width/3.2}}),d=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*l.value.trackSize)),ae=e.computed(()=>n.makeDonut({series:p.value.series},l.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*l.value.trackSize)),k=e.computed(()=>d.value.map(o=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(o.nameOffsetRatio||1))),U=e.computed(()=>{const{x:o,y:r}=n.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:a,y:s}=n.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:o,y1:r,x2:a,y2:s}}),j=e.computed(()=>d.value.map(o=>{const{x:r,y:a}=n.offsetFromCenterPoint({initX:o.separator.x,initY:o.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:s,y:m}=n.offsetFromCenterPoint({initX:o.endX,initY:o.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:r,y1:a,x2:s,y2:m}}));function oe(o){if(o.reduce((m,f)=>m+f,0)>100)throw new Error("Total % must not exceed 100");const a=50;let s=0;return o.map(m=>(s+=m,`${s/100*a-m/4}%`))}const le=e.computed(()=>oe(d.value.map(o=>o.proportion*100))),re=e.computed(()=>n.makeDonut({series:p.value.series},l.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*l.value.trackSize)),S=e.ref(!1);function ne(o){S.value=o,P.value+=1}const w=e.ref(!1);function z(){w.value=!w.value}return J({generatePdf:L,generateImage:D,toggleAnnotator:z}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:g,id:`vue-ui-gauge_${y.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:r[0]||(r[0]=()=>e.unref(X)(!0)),onMouseleave:r[1]||(r[1]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&C.dataset.base?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(C.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&_.value&&(e.unref(Y)||e.unref(N))?(e.openBlock(),e.createBlock(H.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(A),uid:y.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(L),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:s})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${l.value.width<=0?10:l.value.width} ${l.value.height<=0?10:l.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(he._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${y.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(n.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)("#FFFFFF",1)},null,8,_e)],8,be)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.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,we)],8,Be)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:a.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Ce))),128)),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${y.value}_${s}`,d:`M ${u.value.x1},${u.value.y1} m -${k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 ${2*k.value[s]},0 a ${k.value[s]},${k.value[s]} 0 1,1 -${2*k.value[s]},0`,fill:"transparent"},null,8,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${y.value}_${s}`,startOffset:le.value[s]},e.toDisplayString(a.name||""),9,ze)],8,Fe))),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:1},e.renderList(ae.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:a.center.endX,y:a.center.endY,"text-anchor":e.unref(n.calcMarkerOffsetX)(a,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?a.color:t.value.style.chart.layout.segmentNames.color,"font-size":l.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(a.name||""),9,Pe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(re.value,(a,s)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${s}`,d:a.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${y.value})`},null,8,Ee))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[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,$e),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,Oe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,a=>(e.openBlock(),e.createElementBlock("line",e.mergeProps(a,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a,s)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:a.center.startX,initY:a.center.startY,offset:l.value.markerOffset}).y,"text-anchor":a.center.startX<u.value.x1-5?"end":a.center.startX>u.value.x1+5?"start":"middle","font-size":l.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(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,a.from,e.unref(n.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:a.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).x,y:e.unref(n.offsetFromCenterPoint)({centerX:l.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:l.value.markerOffset}).y,"text-anchor":"start","font-size":l.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(n.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(n.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,Ie)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Ae,[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":l.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Re)),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":l.value.pointerStrokeWidth*.7},null,8,Le)),!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":l.value.pointerStrokeWidth*.3,filter:`url(#blur_${y.value})`},null,8,De)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ge,[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,qe)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:l.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:l.value.pointerRadius<=0?1e-4:l.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Te),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:8,x:l.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":l.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Ue)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:p.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,pe))}},He=ye._export_sfc(We,[["__scopeId","data-v-8de26327"]]);exports.default=He;
|
|
@@ -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-C3wsuQ2C.cjs"),m=require("./useNestedProp-CFwQtnNB.cjs"),_=require("./PackageVersion-CeJ2R9gK.cjs"),k=["viewBox","width"],p={key:0},g=["id"],v=["stop-color"],y=["stop-color"],N=["stroke"],C=["stroke"],V=["width","fill"],w=["fill"],x={key:0},B=["id"],E=e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:1},null,-1),b=[E],L=["stroke"],z=["stroke","stroke-dasharray","stroke-dashoffset"],G=["filter"],F=["stroke","stroke-dasharray","stroke-dashoffset"],P=["fill"],$={__name:"vue-ui-gizmo",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(i){const o=i,{vue_ui_gizmo:f}=a.useConfig(),n=e.ref(a.createUid());e.onMounted(()=>{c()});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:r=>r});function d(){return m.useNestedProp({userConfig:o.config,defaultConfig:f})}e.watch(()=>o.config,r=>{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 s=2*Math.PI*35,h=s-o.dataset/100*s;return{dasharray:`${s} ${s}`,dashoffset:h}});return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{class:"vue-ui-gizmo",viewBox:`0 0 ${u.value.width} ${u.value.height}`,width:t.value.size,style:e.normalizeStyle({background:"transparent",fontFamily:t.value.fontFamily})},[e.createVNode(_._sfc_main),t.value.useGradient?(e.openBlock(),e.createElementBlock("defs",p,[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,v),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.color},null,8,y)],8,g)])):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,N),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,C),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,V),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,w)):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",x,[e.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},b,8,B)])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:40,cy:40,r:35,stroke:t.value.stroke,"stroke-width":2*4,fill:"none"},null,8,L),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,z),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,F)],8,G)):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,P)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],12,k))}};exports.default=$;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as x, onMounted as C, computed as c, watch as z, openBlock as a, createElementBlock as s, normalizeStyle as G, createVNode as L, createElementVNode as t, createCommentVNode as r, Fragment as g, toDisplayString as y, unref as d } from "vue";
|
|
2
|
-
import { u as b, c as N, e as $, i as p, f as m } from "./index-
|
|
3
|
-
import { u as F } from "./useNestedProp-
|
|
4
|
-
import { _ as B } from "./PackageVersion-
|
|
2
|
+
import { u as b, c as N, e as $, i as p, f as m } from "./index-DhxnZ6ZS.js";
|
|
3
|
+
import { u as F } from "./useNestedProp-BcqToEU0.js";
|
|
4
|
+
import { _ as B } from "./PackageVersion-Ve0s76sL.js";
|
|
5
5
|
const P = ["viewBox", "width"], V = { key: 0 }, D = ["id"], I = ["stop-color"], M = ["stop-color"], U = ["stroke"], E = ["stroke"], O = ["width", "fill"], S = ["fill"], A = { key: 0 }, j = ["id"], T = /* @__PURE__ */ t("feGaussianBlur", {
|
|
6
6
|
in: "SourceGraphic",
|
|
7
7
|
stdDeviation: 1
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as Ie, computed as h, ref as p, watch as $e, onMounted as Be, openBlock as o, createElementBlock as n, normalizeClass as K, normalizeStyle as x, unref as u, createBlock as U, createCommentVNode as c, createSlots as Re, withCtx as w, renderSlot as f, normalizeProps as E, guardReactiveProps as H, createVNode as se, Fragment as A, renderList as O, createElementVNode as i, toDisplayString as b, withKeys as Ge, createTextVNode as Ue, nextTick as Ee } from "vue";
|
|
2
|
-
import { u as He, o as Xe, e as Ce, c as ue, t as De, C as Ye, g as je, N as ne, X as We, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-
|
|
3
|
-
import { _ as Ze } from "./Title-
|
|
4
|
-
import { u as et, U as tt } from "./usePrinter-
|
|
5
|
-
import { _ as lt } from "./Tooltip-
|
|
6
|
-
import at from "./vue-ui-skeleton-
|
|
7
|
-
import ot from "./BaseIcon-
|
|
8
|
-
import st from "./vue-ui-accordion-
|
|
9
|
-
import { u as Le } from "./useNestedProp-
|
|
10
|
-
import { _ as ut } from "./PackageVersion-
|
|
11
|
-
import { P as nt } from "./PenAndPaper-
|
|
2
|
+
import { u as He, o as Xe, e as Ce, c as ue, t as De, C as Ye, g as je, N as ne, X as We, G as ie, i as V, f as S, v as T, x as qe, y as Ke, q as Je, r as Qe } from "./index-DhxnZ6ZS.js";
|
|
3
|
+
import { _ as Ze } from "./Title-DLo3Zo2_.js";
|
|
4
|
+
import { u as et, U as tt } from "./usePrinter-mDGfOQZA.js";
|
|
5
|
+
import { _ as lt } from "./Tooltip-CA1QhFeE.js";
|
|
6
|
+
import at from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
7
|
+
import ot from "./BaseIcon-CiQzR1fE.js";
|
|
8
|
+
import st from "./vue-ui-accordion-DDp8hUlk.js";
|
|
9
|
+
import { u as Le } from "./useNestedProp-BcqToEU0.js";
|
|
10
|
+
import { _ as ut } from "./PackageVersion-Ve0s76sL.js";
|
|
11
|
+
import { P as nt } from "./PenAndPaper-IHG7xTmx.js";
|
|
12
12
|
import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const vt = ["id"], dt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkXYJDpD.cjs"),pe=require("./Title-B7ruS8yl.cjs"),le=require("./usePrinter-DHv-BwME.cjs"),he=require("./Tooltip-BqSN71SL.cjs"),fe=require("./vue-ui-skeleton-BTN1PKkz.cjs"),ge=require("./BaseIcon-CfhoS_qC.cjs"),me=require("./vue-ui-accordion-kr18wKfc.cjs"),ae=require("./useNestedProp-C6IvqE-r.cjs"),be=require("./PackageVersion-C1F3QLoY.cjs"),ke=require("./PenAndPaper-DDheVRNG.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["x","y","width","height","fill","stroke","stroke-width"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["font-size","font-weight","fill","x","y"],$e=["x","y","width","height","onMouseover"],Ee={key:0},Se=["font-size","fill","x","y","font-weight"],Ae={key:0},ze=["text-anchor","font-size","fill","font-weight","transform"],Te={key:1},Me=["x","y","width","height","stroke","stroke-width"],Oe={key:2},Pe=["id"],Fe=["stop-color"],De=["stop-color"],Ie=["x","y","font-size","fill"],Re=["x","y","height","rx","fill"],qe=["x","y","font-size","fill"],Ue=["stroke","x1","x2","y1","y2"],He=["fill","d"],Ge={key:3},Xe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},je=["stop-color"],Ye=["stop-color"],We=["x","y","width","height","rx"],Ke=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],Qe=["stroke","x1","x2","y1","y2"],Ze=["fill","d"],et={key:5,class:"vue-data-ui-watermark"},tt={key:6,ref:"source",dir:"auto"},lt={class:"vue-ui-data-table"},at={key:0},ot=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"144dc876":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function Y(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=Y(),M.value=!t.value.showOnChartHover,O(),G.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{O()},{deep:!0});const{isPrinting:W,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(O);function O(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>o.value.left+(p.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){y.value.showTable=!y.value.showTable}function te(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(M))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(W),uid:w.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Be),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,Ve)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,$e)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Se)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,De)],8,Pe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Re),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Ue)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Xe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:p.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,We),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ke),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Qe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>y.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",lt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",at,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",st,e.toDisplayString(u),1)],12,ot),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",nt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,ut))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},it=we._export_sfc(rt,[["__scopeId","data-v-e8a5fa5f"]]);exports.default=it;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-C3wsuQ2C.cjs"),pe=require("./Title-CSyDhu3S.cjs"),le=require("./usePrinter-Dglf1bsw.cjs"),he=require("./Tooltip-D88h1zvE.cjs"),fe=require("./vue-ui-skeleton-99lBQ_mF.cjs"),ge=require("./BaseIcon-DGRZS55E.cjs"),me=require("./vue-ui-accordion-kv5FuXqU.cjs"),ae=require("./useNestedProp-CFwQtnNB.cjs"),be=require("./PackageVersion-CeJ2R9gK.cjs"),ke=require("./PenAndPaper-DQPbe0G_.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],_e={key:2,style:"width:100%;background:transparent"},Ne=["xmlns","viewBox"],Be=["x","y","width","height","fill","stroke","stroke-width"],Le=["x","y","width","height","fill","stroke","stroke-width"],Ve=["font-size","font-weight","fill","x","y"],$e=["x","y","width","height","onMouseover"],Ee={key:0},Se=["font-size","fill","x","y","font-weight"],Ae={key:0},ze=["text-anchor","font-size","fill","font-weight","transform"],Te={key:1},Me=["x","y","width","height","stroke","stroke-width"],Oe={key:2},Pe=["id"],Fe=["stop-color"],De=["stop-color"],Ie=["x","y","font-size","fill"],Re=["x","y","height","rx","fill"],qe=["x","y","font-size","fill"],Ue=["stroke","x1","x2","y1","y2"],He=["fill","d"],Ge={key:3},Xe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},je=["stop-color"],Ye=["stop-color"],We=["x","y","width","height","rx"],Ke=["x","y","font-size","fill"],Je=["x","y","font-size","fill"],Qe=["stroke","x1","x2","y1","y2"],Ze=["fill","d"],et={key:5,class:"vue-data-ui-watermark"},tt={key:6,ref:"source",dir:"auto"},lt={class:"vue-ui-data-table"},at={key:0},ot=["data-cell"],st={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ut=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(L,{expose:oe}){const n=L;e.useCssVars(l=>({"144dc876":l.tdo}));const{vue_ui_heatmap:se}=s.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const w=e.ref(s.createUid()),$=e.ref(null),ue=e.ref(null),z=e.ref(!1),T=e.ref(""),R=e.ref(void 0),C=e.ref(null),q=e.ref(0),U=e.ref(null),ne=e.ref(null),H=e.ref(!1),G=e.ref(0),t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:M,setUserOptionsVisibility:X,keepUserOptionState:j}=xe.useUserOptionState({config:t.value});function Y(){const l=ae.useNestedProp({userConfig:n.config,defaultConfig:se});let a={};return l.theme?a={...ae.useNestedProp({userConfig:s.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:a=l,n.config&&s.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?a.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:a.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,a}e.watch(()=>n.config,l=>{t.value=Y(),M.value=!t.value.showOnChartHover,O(),G.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{O()},{deep:!0});const{isPrinting:W,isImaging:K,generatePdf:J,generateImage:Q}=le.usePrinter({elementId:`heatmap__${w.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),re=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),ie=e.computed(()=>t.value.table.responsiveBreakpoint);function de(){new ResizeObserver(a=>{a.forEach(u=>{H.value=u.contentRect.width<ie.value})}).observe(U.value)}e.onMounted(O);function O(){de()}const k=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(k.value<n.dataset.length?n.dataset.length:k.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:a}}),E=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-(E.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-(E.value==="right"&&t.value.style.legend.show?92:0)})),P=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:o.value.width/k.value,height:o.value.width/(k.value<n.dataset.length?n.dataset.length:k.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,k.value)}}),S=e.computed(()=>(n.dataset.forEach((l,a)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,u)=>a>=b.value?{side:"up",color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),ratio:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(a-b.value)/Math.abs(v.value-b.value)),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(b.value)),color:s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,a),value:a,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),f=e.ref(null),_=e.ref(null);function ce(l,a,u,r){C.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:g,id:ye}=l;R.value=ye,f.value=d,_.value={datapoint:l,seriesIndex:a,series:S.value,config:t.value},z.value=!0;let D="";const I=t.value.style.tooltip.customFormat;s.isFunction(I)&&s.functionReturnsString(()=>I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}))?T.value=I({datapoint:l,seriesIndex:a,series:S.value,config:t.value}):(D+=`<div>${c} ${g?`${g}`:""}</div>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":s.applyDataLabel(t.value.style.layout.cells.value.formatter,d,s.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${D}</div>`)}const N=e.computed(()=>o.value.top+P.value*(1-f.value/v.value)),B=e.computed(()=>o.value.left+(p.value.width-o.value.left-t.value.style.layout.padding.right)*(f.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),a=n.dataset.map(u=>u.values);return{head:l,body:a}});function Z(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let g=0;g<n.dataset.length;g+=1)c.push([n.dataset[g].values[d]]);a.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),r=s.createCsvContent(u);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function ve(l){x.value=l,q.value+=1}function ee(){y.value.showTable=!y.value.showTable}function te(){y.value.showTooltip=!y.value.showTooltip}const A=e.ref(!1);function F(){A.value=!A.value}return oe({generatePdf:J,generateCsv:Z,generateImage:Q,toggleTable:ee,toggleTooltip:te,toggleAnnotator:F}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:$,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor}`),id:`heatmap__${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(X)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:A.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ne,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value&&(e.unref(j)||e.unref(M))?(e.openBlock(),e.createBlock(le.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${q.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(W),uid:w.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:ve,onGeneratePdf:e.unref(J),onGenerateCsv:Z,onGenerateImage:e.unref(Q),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:u,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:u,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(be._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Be),e.createElementVNode("rect",{x:o.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,Le),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(d.color),x:o.value.left+i.value.width*c+i.value.width/2,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,Ve)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+i.value.width*c,y:o.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:g=>ce(d,r,o.value.left+i.value.width*c,o.value.top+i.value.height*r),onMouseout:a[0]||(a[0]=g=>{z.value=!1,R.value=void 0,f.value=null,C.value=null})},null,40,$e)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,Se)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${o.value.left+i.value.width/2+o.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:C.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:C.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Me)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="right"?(e.openBlock(),e.createElementBlock("g",Oe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${w.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,De)],8,Pe)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ie),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:P.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${w.value})`},null,8,Re),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+P.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:N.value,y2:N.value},null,8,Ue)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${N.value} ${o.value.right+26},${N.value-8} ${o.value.right+26},${N.value+8}z`},null,8,He)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&E.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Xe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ye)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:p.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,We),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ke),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(v.value),e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Je),f.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:B.value,x2:B.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,Qe)):e.createCommentVNode("",!0),f.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${B.value},${o.value.bottom+t.value.style.layout.cells.height} ${B.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${B.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ze)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:7,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(he._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:$.value,content:T.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),V.value?(e.openBlock(),e.createBlock(me.default,{key:8,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=u=>y.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(ge.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",lt,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",at,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",st,e.toDisplayString(u),1)],12,ot),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":L.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",nt,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(s.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,ut))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},it=we._export_sfc(rt,[["__scopeId","data-v-e8a5fa5f"]]);exports.default=it;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as c, computed as f, onMounted as Ue, onBeforeUnmount as We, watch as He, openBlock as s, createElementBlock as r, normalizeClass as O, normalizeStyle as $, unref as y, renderSlot as p, createBlock as z, createCommentVNode as v, createSlots as Ge, withCtx as m, normalizeProps as Y, guardReactiveProps as j, createVNode as ke, Fragment as b, renderList as k, createElementVNode as T, toDisplayString as L, createTextVNode as Ee, nextTick as Ve } from "vue";
|
|
2
|
-
import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as G, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as E, x as ot, q as rt, r as nt, F as N } from "./index-
|
|
3
|
-
import { u as $e } from "./useNestedProp-
|
|
4
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
5
|
-
import { _ as ct } from "./PackageVersion-
|
|
6
|
-
import { L as vt } from "./Legend-
|
|
7
|
-
import { _ as ht } from "./Title-
|
|
8
|
-
import { _ as yt } from "./Tooltip-
|
|
9
|
-
import { D as dt } from "./DataTable-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { P as xt } from "./PenAndPaper-
|
|
12
|
-
import pt from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Re, c as we, o as qe, e as Ce, g as Ze, b as Je, d as Ke, p as G, D as _e, i as I, f as F, X as Qe, l as et, h as tt, G as lt, t as at, a as st, C as E, x as ot, q as rt, r as nt, F as N } from "./index-DhxnZ6ZS.js";
|
|
3
|
+
import { u as $e } from "./useNestedProp-BcqToEU0.js";
|
|
4
|
+
import { u as ut, U as it } from "./usePrinter-mDGfOQZA.js";
|
|
5
|
+
import { _ as ct } from "./PackageVersion-Ve0s76sL.js";
|
|
6
|
+
import { L as vt } from "./Legend-DcIfRSNC.js";
|
|
7
|
+
import { _ as ht } from "./Title-DLo3Zo2_.js";
|
|
8
|
+
import { _ as yt } from "./Tooltip-CA1QhFeE.js";
|
|
9
|
+
import { D as dt } from "./DataTable-jvL0XGWl.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-DDp8hUlk.js";
|
|
11
|
+
import { P as xt } from "./PenAndPaper-IHG7xTmx.js";
|
|
12
|
+
import pt from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
13
13
|
import { t as mt, u as gt } from "./useResponsive-CoxXLe23.js";
|
|
14
14
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkXYJDpD.cjs"),te=require("./useNestedProp-C6IvqE-r.cjs"),le=require("./usePrinter-DHv-BwME.cjs"),ke=require("./PackageVersion-C1F3QLoY.cjs"),be=require("./Legend-CR9ydX8N.cjs"),Ce=require("./Title-B7ruS8yl.cjs"),Be=require("./Tooltip-BqSN71SL.cjs"),we=require("./DataTable-CwAdpLng.cjs"),Se=require("./vue-ui-accordion-kr18wKfc.cjs"),_e=require("./PenAndPaper-DDheVRNG.cjs"),Ne=require("./vue-ui-skeleton-BTN1PKkz.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me={key:0},Te=["id"],Ae=["stop-color"],Pe=["stop-color"],Ve=["stop-color"],Fe={key:1},De=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:2},Ie=["x","y","fill","font-size"],Xe=["transform","font-size","fill","font-weight"],Ye={key:4},qe=["x1","x2","y1","y2","stroke","stroke-width"],je={key:5},Ue=["transform","fill","font-size","text-anchor"],Re=["x","y","font-size","fill","font-weight"],He=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["d","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["cx","cy","fill","r"],Ke=["cx","cy","fill","r","stroke","stroke-width"],Qe={key:1},et=["x","y","font-size","fill","font-weight"],tt={key:2},lt=["x","y","font-size","font-weight","fill"],at=["cx","cy","r","onMouseenter","onClick"],ot={key:5,class:"vue-data-ui-watermark"},st=["onClick"],rt=["innerHTML"],nt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),D=e.ref(0),B=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),w=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=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}),i=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}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function me(l){w.value=l,D.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(p=>[[p.seriesName],[p.label],[p.valueX],[p.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){m.value.showTable=!m.value.showTable}function ee(){m.value.showTooltip=!m.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":w.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref: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:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Me,[(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,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ve)],8,Te))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.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,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.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,Xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.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("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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.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,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,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":n.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,Re)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ge),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,Ze)],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:n.value.plots,stroke:"none"},null,8,Je))),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:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ke))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(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+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,et))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,lt))),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:n.value.plots,stroke:"none",onMouseenter:p=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,at))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,st)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:m.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:w.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:m.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(we.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,rt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},it=Le._export_sfc(nt,[["__scopeId","data-v-d26cf9ea"]]);exports.default=it;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C3wsuQ2C.cjs"),te=require("./useNestedProp-CFwQtnNB.cjs"),le=require("./usePrinter-Dglf1bsw.cjs"),ke=require("./PackageVersion-CeJ2R9gK.cjs"),be=require("./Legend-BstxUr4T.cjs"),Ce=require("./Title-CSyDhu3S.cjs"),Be=require("./Tooltip-D88h1zvE.cjs"),we=require("./DataTable-DWQiMziO.cjs"),Se=require("./vue-ui-accordion-kv5FuXqU.cjs"),_e=require("./PenAndPaper-DQPbe0G_.cjs"),Ne=require("./vue-ui-skeleton-99lBQ_mF.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),ze=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],Me={key:0},Te=["id"],Ae=["stop-color"],Pe=["stop-color"],Ve=["stop-color"],Fe={key:1},De=["x1","x2","y1","y2","stroke","stroke-width"],Oe={key:2},Ie=["x","y","fill","font-size"],Xe=["transform","font-size","fill","font-weight"],Ye={key:4},qe=["x1","x2","y1","y2","stroke","stroke-width"],je={key:5},Ue=["transform","fill","font-size","text-anchor"],Re=["x","y","font-size","fill","font-weight"],He=["x1","x2","y1","y2","stroke","stroke-width"],We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["d","stroke","stroke-width"],Ze=["d","stroke","stroke-width"],Je=["cx","cy","fill","r"],Ke=["cx","cy","fill","r","stroke","stroke-width"],Qe={key:1},et=["x","y","font-size","fill","font-weight"],tt={key:2},lt=["x","y","font-size","font-weight","fill"],at=["cx","cy","r","onMouseenter","onClick"],ot={key:5,class:"vue-data-ui-watermark"},st=["onClick"],rt=["innerHTML"],nt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:M}){const c=oe,{vue_ui_history_plot:re}=r.useConfig(),k=e.ref(null),T=e.ref(null),A=e.ref(0),P=e.ref(null),V=e.ref(0),F=e.ref(0),D=e.ref(0),B=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),w=e.ref(!1),f=e.ref(null),C=e.ref(!1),I=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l});e.onMounted(X),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?T.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?P.value:null,source:I.value});v.value.width=o,v.value.height=a,n.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),n.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),n.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),n.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),n.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),n.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})});B.value=new ResizeObserver(l),B.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:re});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=ze.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.showOnChartHover,X(),A.value+=1,F.value+=1,V.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,n.value.plots=t.value.style.chart.plots.radius,n.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,n.value.labels=t.value.style.chart.plots.labels.fontSize,n.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,n.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,n.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,n.value.yAxisName=t.value.style.chart.axes.y.name.fontSize},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ie=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),m=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}),i=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}}),n=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ie.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ue=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ce=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ce.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ue.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?de.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?ve.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:i.value.left+(a-l.min)/(l.max-l.min)*i.value.width,y1:i.value.top,y2:i.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:i.value.bottom-(a-o.min)/(o.max-o.min)*i.value.height,x1:i.value.left,x2:i.value.right,value:a}))}});function he(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return i.value.left+((l||0)+o)/(d.value.x.max+o)*i.value.width}function ye(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return i.value.bottom-((l||0)+o)/(d.value.y.max+o)*i.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:he(s.x),y:ye(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),pe=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){M("selectDatapoint",l)}function J(l){M("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function me(l){w.value=l,D.value+=1}const $=e.ref(null);function xe({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(p=>[[p.seriesName],[p.label],[p.valueX],[p.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){m.value.showTable=!m.value.showTable}function ee(){m.value.showTooltip=!m.value.showTooltip}function ge(){return g.value}return se({getData:ge,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":w.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref: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:T,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${D.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:m.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Me,[(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,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Pe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ve)],8,Te))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,De))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:i.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+n.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":n.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,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:3,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+n.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":n.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,Xe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.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("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,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${i.value.bottom+t.value.style.chart.axes.x.labels.offsetY+n.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":n.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,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:6,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":n.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,Re)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:7,x1:i.value.left,x2:i.value.left+i.value.width,y1:i.value.bottom,y2:i.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:i.value.left,x2:i.value.left,y1:i.value.top,y2:i.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ge),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,Ze)],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:n.value.plots,stroke:"none"},null,8,Je))),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:n.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,Ke))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",Qe,[(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+n.value.plots+n.value.labels,"font-size":n.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,et))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+n.value.indexLabels/3,"font-size":n.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,lt))),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:n.value.plots,stroke:"none",onMouseenter:p=>xe({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,at))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ne.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(be.Legend,{key:`legend_${V.value}`,legendSet:Z.value,config:pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,st)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:m.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:w.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:m.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(we.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>m.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,rt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,$e))}},it=Le._export_sfc(nt,[["__scopeId","data-v-d26cf9ea"]]);exports.default=it;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
|
|
2
|
-
import { u as z } from "./useNestedProp-
|
|
3
|
-
import { u as A, i as w, f as B } from "./index-
|
|
4
|
-
import L from "./vue-ui-digits-
|
|
2
|
+
import { u as z } from "./useNestedProp-BcqToEU0.js";
|
|
3
|
+
import { u as A, i as w, f as B } from "./index-DhxnZ6ZS.js";
|
|
4
|
+
import L from "./vue-ui-digits-DWAbSFx3.js";
|
|
5
5
|
const T = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-CFwQtnNB.cjs"),u=require("./index-C3wsuQ2C.cjs"),p=require("./vue-ui-digits-DSqN9pA7.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CFwQtnNB.cjs"),n=require("./index-C3wsuQ2C.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|