vue-data-ui 2.6.40 → 2.6.42
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-DczKng-K.cjs → Arrow-C6-3JiKs.cjs} +1 -1
- package/dist/{Arrow-CKYmYJHq.js → Arrow-i50QW7Eq.js} +1 -1
- package/dist/{BaseIcon-rw8rKNKS.js → BaseIcon-BYl8WVrn.js} +1 -1
- package/dist/{BaseIcon-Db1HIrAt.cjs → BaseIcon-CGjwy6WD.cjs} +1 -1
- package/dist/{ColorPicker-oA_W-jVk.cjs → ColorPicker-Cpi--TbY.cjs} +1 -1
- package/dist/{ColorPicker-DyZK3Mhl.js → ColorPicker-rv2BDrXO.js} +3 -3
- package/dist/{DataTable-DvwmNjb-.js → DataTable-B_PZ5EQ5.js} +2 -2
- package/dist/{DataTable-Be-eTBzq.cjs → DataTable-Dp7g_Ei4.cjs} +1 -1
- package/dist/{Legend-Be8mrJpb.js → Legend-BB51QBPV.js} +2 -2
- package/dist/{Legend-j3YoAtEf.cjs → Legend-BB6S3gBp.cjs} +1 -1
- package/dist/{PackageVersion-D9Lm1C1X.js → PackageVersion-Cz-oD7U6.js} +1 -1
- package/dist/{PackageVersion-D_gJvbGU.cjs → PackageVersion-Dj3KQ8Ax.cjs} +1 -1
- package/dist/{PenAndPaper-DR58HO_U.js → PenAndPaper-DOTH2X_u.js} +3 -3
- package/dist/{PenAndPaper-DWG9pfri.cjs → PenAndPaper-OCjAJH70.cjs} +1 -1
- package/dist/{Shape-BuwIrUMv.js → Shape-CGBgd_EH.js} +1 -1
- package/dist/{Shape-BF6K6die.cjs → Shape-DCTTj5cs.cjs} +1 -1
- package/dist/{Slicer-bY7XVDi5.cjs → Slicer-BHKFOTCG.cjs} +1 -1
- package/dist/{Slicer-CUm2ijlc.js → Slicer-Dhto2Wym.js} +2 -2
- package/dist/{Title-BP4K_GLE.cjs → Title-BkwZ_rBI.cjs} +1 -1
- package/dist/{Title-D_MGglyN.js → Title-y0r2c8bY.js} +1 -1
- package/dist/{Tooltip-HRgkF8HD.js → Tooltip-CbWEnMUw.js} +1 -1
- package/dist/{Tooltip-KXn1rQhr.cjs → Tooltip-DhhX9jKQ.cjs} +1 -1
- package/dist/{html2canvas.esm-D53btDlk.cjs → html2canvas.esm-BA_v9SIU.cjs} +2 -2
- package/dist/{html2canvas.esm-Dr4iCOK6.js → html2canvas.esm-DgdJBc_o.js} +196 -196
- package/dist/img-BIeSHu0f.js +15 -0
- package/dist/img-D6uvziU0.cjs +1 -0
- package/dist/index-Crz6y51C.cjs +9 -0
- package/dist/{index-BaaDnc4F.js → index-DWsIpwzs.js} +426 -384
- package/dist/{index.es-RWt7DWPC.js → index.es-BloWY6jv.js} +1285 -1285
- package/dist/{index.es-DvaaoatM.cjs → index.es-HygMioe_.cjs} +6 -6
- package/dist/{jspdf.es.min-Rw70uifz.cjs → jspdf.es.min-C518mmma.cjs} +57 -57
- package/dist/{jspdf.es.min-eTA26cmm.js → jspdf.es.min-t_OLULUR.js} +3038 -3038
- package/dist/pdf-BpXLKlRx.cjs +1 -0
- package/dist/{pdf-DVWl3Adn.js → pdf-H8Iw_Wax.js} +6 -6
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +16 -0
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-0jJvFRhK.cjs → useNestedProp-B8CE091o.cjs} +1 -1
- package/dist/{useNestedProp-D8vQcOps.js → useNestedProp-Bole8bsm.js} +1 -1
- package/dist/{usePrinter-y4-4tCWT.js → usePrinter-B8LELMkA.js} +125 -122
- package/dist/{usePrinter-C1Rlqzcj.cjs → usePrinter-Cqxw0sR7.cjs} +1 -1
- package/dist/{vue-data-ui-XwZHx4pB.js → vue-data-ui-BHNNKB7k.js} +61 -61
- package/dist/{vue-data-ui-CF4CU0e2.cjs → vue-data-ui-Dizs9qYs.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +8 -8
- package/dist/{vue-ui-3d-bar-BOMvMoht.cjs → vue-ui-3d-bar-D-jstByg.cjs} +8 -8
- package/dist/{vue-ui-3d-bar-BYV4-yM3.js → vue-ui-3d-bar-D1DTuPTJ.js} +55 -54
- package/dist/{vue-ui-accordion-C5C3XQ8f.cjs → vue-ui-accordion-10T9IdE-.cjs} +1 -1
- package/dist/{vue-ui-accordion-CF9kQTXq.js → vue-ui-accordion-WrimcQK1.js} +3 -3
- package/dist/vue-ui-age-pyramid-0uO95dEL.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-8KtaPkny.js → vue-ui-age-pyramid-vSOQxYMZ.js} +13 -12
- package/dist/{vue-ui-annotator-Dq1h3MZY.cjs → vue-ui-annotator-CzqmXArP.cjs} +1 -1
- package/dist/{vue-ui-annotator-KiLEzFIU.js → vue-ui-annotator-DuX2lvw8.js} +3 -3
- package/dist/vue-ui-bullet-hJsuFbdK.cjs +34 -0
- package/dist/{vue-ui-bullet-DBEuIuyH.js → vue-ui-bullet-ni1A0wmE.js} +11 -10
- package/dist/{vue-ui-candlestick-C13zgiOI.js → vue-ui-candlestick-CtFOtkuX.js} +14 -13
- package/dist/{vue-ui-candlestick-VazI0lag.cjs → vue-ui-candlestick-JSYKg3QU.cjs} +2 -2
- package/dist/vue-ui-carousel-table-BJsBlOAu.cjs +1 -0
- package/dist/{vue-ui-carousel-table-CoA9OyeC.js → vue-ui-carousel-table-Bc8SG-3_.js} +7 -6
- package/dist/{vue-ui-chestnut-V0eah1wF.cjs → vue-ui-chestnut-EPeVQvs_.cjs} +2 -2
- package/dist/{vue-ui-chestnut-kAdb7Jpi.js → vue-ui-chestnut-VR_UxBpO.js} +37 -36
- package/dist/{vue-ui-circle-pack-B0CreTV1.js → vue-ui-circle-pack-ECXVp4H4.js} +14 -13
- package/dist/vue-ui-circle-pack-NstojV4G.cjs +1 -0
- package/dist/{vue-ui-cursor-sHfZ-rR3.js → vue-ui-cursor-DRP_eOrg.js} +2 -2
- package/dist/{vue-ui-cursor-oLpASwAy.cjs → vue-ui-cursor-IZ28NWCv.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CB7KJEOi.cjs → vue-ui-dashboard-BVoasjGP.cjs} +1 -1
- package/dist/{vue-ui-dashboard-D2ZQBDuk.js → vue-ui-dashboard-Bg4eu3bx.js} +3 -3
- package/dist/{vue-ui-digits-CiV3V0ry.js → vue-ui-digits-B2qzXXO6.js} +2 -2
- package/dist/{vue-ui-digits-e7EBKTDv.cjs → vue-ui-digits-BKR62-KQ.cjs} +1 -1
- package/dist/{vue-ui-donut-CrjqZ1ji.js → vue-ui-donut-BWbLJHC5.js} +15 -14
- package/dist/vue-ui-donut-Bnc5n4vE.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-D_F3H8Oa.js → vue-ui-donut-evolution-Cpmdg9Na.js} +45 -44
- package/dist/vue-ui-donut-evolution-DyQPblkZ.cjs +1 -0
- package/dist/vue-ui-dumbbell-BjGLUyTB.cjs +9 -0
- package/dist/{vue-ui-dumbbell-POvEBmaZ.js → vue-ui-dumbbell-kOEJnUNy.js} +43 -42
- package/dist/vue-ui-flow-BxqHFumu.cjs +1 -0
- package/dist/{vue-ui-flow-BIfoibps.js → vue-ui-flow-DVvxwHKl.js} +53 -52
- package/dist/vue-ui-funnel-CPGQJsTE.cjs +1 -0
- package/dist/{vue-ui-funnel-DfF9uQGX.js → vue-ui-funnel-Dh9Zio3k.js} +13 -12
- package/dist/{vue-ui-galaxy-D6sV6X5K.js → vue-ui-galaxy-DBrUSx1b.js} +31 -30
- package/dist/vue-ui-galaxy-S4L3B76T.cjs +1 -0
- package/dist/vue-ui-gauge-Cs-ypQfN.cjs +1 -0
- package/dist/{vue-ui-gauge-CvbPkLM2.js → vue-ui-gauge-tZvlIU-S.js} +36 -35
- package/dist/{vue-ui-gizmo-DMsTB4ES.cjs → vue-ui-gizmo-CCSsG2_b.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DUi7lRRe.js → vue-ui-gizmo-Dci5soUk.js} +3 -3
- package/dist/vue-ui-heatmap-DJ7wdUPo.cjs +1 -0
- package/dist/{vue-ui-heatmap-Dg8XejgT.js → vue-ui-heatmap-DOcrZCVa.js} +73 -72
- package/dist/vue-ui-history-plot-Cdbru79N.cjs +1 -0
- package/dist/{vue-ui-history-plot-BSd5bL15.js → vue-ui-history-plot-qtdp25Sg.js} +33 -32
- package/dist/{vue-ui-kpi-BAMbt0nE.js → vue-ui-kpi-DTXy_HfT.js} +3 -3
- package/dist/{vue-ui-kpi-m4GUxnZu.cjs → vue-ui-kpi-vLsne_Vi.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DiBQaEPy.js → vue-ui-mini-loader-B1MEbk8x.js} +2 -2
- package/dist/{vue-ui-mini-loader-BqVkQxqo.cjs → vue-ui-mini-loader-CuWWrNo9.cjs} +1 -1
- package/dist/vue-ui-molecule-BwO_9sCz.js +830 -0
- package/dist/vue-ui-molecule-huq_1VnO.cjs +1 -0
- package/dist/vue-ui-mood-radar-B4k3k2q7.cjs +1 -0
- package/dist/{vue-ui-mood-radar-INGk_0vz.js → vue-ui-mood-radar-CLiiGRyR.js} +14 -13
- package/dist/{vue-ui-nested-donuts-BABAXqTX.js → vue-ui-nested-donuts-CxAFaOns.js} +14 -13
- package/dist/{vue-ui-nested-donuts-COy2x2EF.cjs → vue-ui-nested-donuts-t_TWJrWV.cjs} +2 -2
- package/dist/{vue-ui-onion-B1NZLFqG.cjs → vue-ui-onion-DIQLewG_.cjs} +2 -2
- package/dist/{vue-ui-onion-CJkmj1Nh.js → vue-ui-onion-gweww1Nd.js} +14 -13
- package/dist/{vue-ui-parallel-coordinate-plot-CtpGIUKU.cjs → vue-ui-parallel-coordinate-plot-B48BZpEc.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-DTUIv9ah.js → vue-ui-parallel-coordinate-plot-Dos2dhCW.js} +35 -34
- package/dist/vue-ui-quadrant-BYDJYypD.cjs +1 -0
- package/dist/{vue-ui-quadrant-CxNnHjD9.js → vue-ui-quadrant-fXKeOjn-.js} +43 -42
- package/dist/{vue-ui-quick-chart-BaHq9DyU.cjs → vue-ui-quick-chart-BVVVrJyc.cjs} +2 -2
- package/dist/{vue-ui-quick-chart-CJnwyWdJ.js → vue-ui-quick-chart-BojZdQHp.js} +12 -11
- package/dist/vue-ui-radar-C5mA8lGM.cjs +1 -0
- package/dist/{vue-ui-radar-CsvmcspN.js → vue-ui-radar-D4mB15zr.js} +15 -14
- package/dist/{vue-ui-rating-D7kDYc6s.js → vue-ui-rating-BG_CF73W.js} +10 -10
- package/dist/{vue-ui-rating-C-ef3ayK.cjs → vue-ui-rating-P9KkC2lE.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CfNGeO3G.cjs +1 -0
- package/dist/{vue-ui-relation-circle-CY8ZIPpL.js → vue-ui-relation-circle-xYqp0Vj9.js} +13 -12
- package/dist/{vue-ui-rings-DEuJ9t0h.cjs → vue-ui-rings-Ba7xV0bh.cjs} +2 -2
- package/dist/{vue-ui-rings-Cxf9NoYT.js → vue-ui-rings-CTw5Guq9.js} +15 -14
- package/dist/{vue-ui-scatter-CiO-B7Jh.js → vue-ui-scatter-CMhOzUfw.js} +45 -44
- package/dist/vue-ui-scatter-UeHQSMn_.cjs +1 -0
- package/dist/{vue-ui-screenshot-BMuBV3BB.js → vue-ui-screenshot-DkB1LMw4.js} +2 -2
- package/dist/{vue-ui-screenshot--OYVY1cw.cjs → vue-ui-screenshot-Dqiqn0Tt.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CM4wEsYA.cjs → vue-ui-skeleton-BZsFiqo5.cjs} +1 -1
- package/dist/{vue-ui-skeleton-6RiQNJSb.js → vue-ui-skeleton-DDZb9FFJ.js} +57 -57
- package/dist/{vue-ui-smiley-CUDVroKW.js → vue-ui-smiley-BgS5Przf.js} +2 -2
- package/dist/{vue-ui-smiley-DMzfsrun.cjs → vue-ui-smiley-CUmfLZx6.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-fnRrg8Jj.js → vue-ui-spark-trend-NRIFklnc.js} +5 -5
- package/dist/{vue-ui-spark-trend-CTI98gTQ.cjs → vue-ui-spark-trend-w10yXsJZ.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-HhcSqSxf.cjs → vue-ui-sparkbar-aigBoTy2.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-msGI6wfO.js → vue-ui-sparkbar-ejr7X72c.js} +4 -4
- package/dist/{vue-ui-sparkgauge-C3obUsLf.js → vue-ui-sparkgauge-BOf5aBj9.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DRpIVDwy.cjs → vue-ui-sparkgauge-CkefH_Q3.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DOVSl-l-.js → vue-ui-sparkhistogram-C64SJzGD.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-OtRll6_F.cjs → vue-ui-sparkhistogram-Dtn7OLFq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Dyd6TPTP.cjs → vue-ui-sparkline-BKGLvlLw.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DkX9L35W.js → vue-ui-sparkline-POZCJkr9.js} +15 -15
- package/dist/{vue-ui-sparkstackbar-Cfn7LKpJ.cjs → vue-ui-sparkstackbar-BxeVbtHZ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Cq7MW3Jk.js → vue-ui-sparkstackbar-C7v5flng.js} +5 -5
- package/dist/{vue-ui-stackbar-BNy2XBmJ.js → vue-ui-stackbar-DUvKoTiT.js} +16 -15
- package/dist/{vue-ui-stackbar-DDbZ-_sO.cjs → vue-ui-stackbar-OS-G2tRA.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-Cq9CqXxr.js → vue-ui-strip-plot-DvQPyqtk.js} +14 -13
- package/dist/vue-ui-strip-plot-IcTvmihM.cjs +1 -0
- package/dist/{vue-ui-table-js0Gdfqi.cjs → vue-ui-table-Bo5KWUa-.cjs} +2 -2
- package/dist/{vue-ui-table-BowZcUb5.js → vue-ui-table-C8zG8WTp.js} +1 -1
- package/dist/vue-ui-table-heatmap-DvRBb7Za.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-BmObY7ZK.js → vue-ui-table-heatmap-N2a-kKWJ.js} +9 -8
- package/dist/{vue-ui-table-sparkline-BKDgWukC.js → vue-ui-table-sparkline-DOYmxyiy.js} +9 -8
- package/dist/vue-ui-table-sparkline-DVhyXHjb.cjs +1 -0
- package/dist/vue-ui-thermometer-CshBwaty.cjs +1 -0
- package/dist/{vue-ui-thermometer-BOF4YYvE.js → vue-ui-thermometer-DsFTU7hy.js} +26 -25
- package/dist/{vue-ui-timer-D6WS06mW.js → vue-ui-timer-BazkEbRz.js} +5 -5
- package/dist/{vue-ui-timer-BVoMdC97.cjs → vue-ui-timer-b4eSKrHr.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BD81LT9b.js → vue-ui-tiremarks-LjeTpuwu.js} +20 -19
- package/dist/vue-ui-tiremarks-tCyisBN-.cjs +1 -0
- package/dist/{vue-ui-treemap-CKETyAhh.js → vue-ui-treemap-CkPWe6se.js} +14 -13
- package/dist/vue-ui-treemap-o4rsDy3h.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-nq74gMNu.cjs → vue-ui-vertical-bar-D3vjiqvq.cjs} +3 -3
- package/dist/{vue-ui-vertical-bar-D4RH4OTK.js → vue-ui-vertical-bar-ViFIMQc9.js} +16 -15
- package/dist/vue-ui-waffle-4Wpu2k9B.cjs +1 -0
- package/dist/{vue-ui-waffle-BHP27c7Q.js → vue-ui-waffle-D8uQiqvC.js} +15 -14
- package/dist/{vue-ui-wheel-BpEPqKp-.js → vue-ui-wheel-DgJ52HhJ.js} +10 -9
- package/dist/vue-ui-wheel-Wkp_TkAj.cjs +1 -0
- package/dist/{vue-ui-word-cloud-JH_eHxVf.js → vue-ui-word-cloud-BmX0SdIe.js} +39 -38
- package/dist/vue-ui-word-cloud-CtR6FmsK.cjs +1 -0
- package/dist/vue-ui-xy-B68466-C.cjs +3 -0
- package/dist/{vue-ui-xy-BGOtOn8w.js → vue-ui-xy-CnNugA_v.js} +52 -50
- package/dist/{vue-ui-xy-canvas-DLZANhlq.cjs → vue-ui-xy-canvas-D7IJkVz1.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DVzzeUmj.js → vue-ui-xy-canvas-DRbFpLFp.js} +134 -133
- package/package.json +2 -2
- package/dist/img-BPGizWpM.cjs +0 -1
- package/dist/img-itj0Vdmx.js +0 -15
- package/dist/index-CBRI5uwl.cjs +0 -9
- package/dist/pdf-DSkQT5iH.cjs +0 -1
- package/dist/vue-ui-age-pyramid-Cm10v1iS.cjs +0 -1
- package/dist/vue-ui-bullet-yeUQYuwe.cjs +0 -34
- package/dist/vue-ui-carousel-table-Dkqumt0q.cjs +0 -1
- package/dist/vue-ui-circle-pack-CnYgigzx.cjs +0 -1
- package/dist/vue-ui-donut-DL51Fl9m.cjs +0 -1
- package/dist/vue-ui-donut-evolution-mCx3HfHW.cjs +0 -1
- package/dist/vue-ui-dumbbell-BIDzrdGX.cjs +0 -9
- package/dist/vue-ui-flow-D8CWkD2E.cjs +0 -1
- package/dist/vue-ui-funnel-DNQKb-CW.cjs +0 -1
- package/dist/vue-ui-galaxy-CXAhWSW2.cjs +0 -1
- package/dist/vue-ui-gauge-CODDDBdK.cjs +0 -1
- package/dist/vue-ui-heatmap-DDo0YoPA.cjs +0 -1
- package/dist/vue-ui-history-plot-Wb0vm3oN.cjs +0 -1
- package/dist/vue-ui-molecule-SgHDaN5w.cjs +0 -1
- package/dist/vue-ui-molecule-kryFDlxX.js +0 -826
- package/dist/vue-ui-mood-radar-p2yhGTuV.cjs +0 -1
- package/dist/vue-ui-quadrant-ZmF2s1_3.cjs +0 -1
- package/dist/vue-ui-radar-BgeUqzpX.cjs +0 -1
- package/dist/vue-ui-relation-circle-DRkjUqb1.cjs +0 -1
- package/dist/vue-ui-scatter-BlBNhmJ4.cjs +0 -1
- package/dist/vue-ui-strip-plot-t6_CVzQF.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BAczw65J.cjs +0 -1
- package/dist/vue-ui-table-sparkline-HE8HXlhe.cjs +0 -1
- package/dist/vue-ui-thermometer-2RqSKVQ8.cjs +0 -1
- package/dist/vue-ui-tiremarks-CiZUYcuP.cjs +0 -1
- package/dist/vue-ui-treemap-BQeFDdrJ.cjs +0 -1
- package/dist/vue-ui-waffle-atvdP-Pb.cjs +0 -1
- package/dist/vue-ui-wheel-Diad5HyF.cjs +0 -1
- package/dist/vue-ui-word-cloud-B_ykSDTr.cjs +0 -1
- package/dist/vue-ui-xy-Csz1n4M-.cjs +0 -3
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as pe } from "./DataTable-
|
|
3
|
-
import { _ as Me } from "./Title-
|
|
4
|
-
import { u as ze, _ as Te } from "./Tooltip-
|
|
5
|
-
import { U as Pe } from "./usePrinter-
|
|
6
|
-
import { _ as Ve } from "./Shape-
|
|
7
|
-
import Re from "./BaseIcon-
|
|
8
|
-
import He from "./vue-ui-table-sparkline-
|
|
9
|
-
import De from "./vue-ui-skeleton-
|
|
10
|
-
import { S as Be } from "./Slicer-
|
|
11
|
-
import Ee from "./vue-ui-accordion-
|
|
12
|
-
import { u as Z } from "./useNestedProp-
|
|
13
|
-
import { _ as
|
|
14
|
-
import { P as
|
|
15
|
-
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as x, normalizeClass as B, createBlock as D, createCommentVNode as u, createVNode as
|
|
1
|
+
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-DWsIpwzs.js";
|
|
2
|
+
import { D as pe } from "./DataTable-B_PZ5EQ5.js";
|
|
3
|
+
import { _ as Me } from "./Title-y0r2c8bY.js";
|
|
4
|
+
import { u as ze, _ as Te } from "./Tooltip-CbWEnMUw.js";
|
|
5
|
+
import { U as Pe } from "./usePrinter-B8LELMkA.js";
|
|
6
|
+
import { _ as Ve } from "./Shape-CGBgd_EH.js";
|
|
7
|
+
import Re from "./BaseIcon-BYl8WVrn.js";
|
|
8
|
+
import He from "./vue-ui-table-sparkline-DOYmxyiy.js";
|
|
9
|
+
import De from "./vue-ui-skeleton-DDZb9FFJ.js";
|
|
10
|
+
import { S as Be } from "./Slicer-Dhto2Wym.js";
|
|
11
|
+
import Ee from "./vue-ui-accordion-WrimcQK1.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-Bole8bsm.js";
|
|
13
|
+
import { _ as Ye } from "./PackageVersion-Cz-oD7U6.js";
|
|
14
|
+
import { P as We } from "./PenAndPaper-DOTH2X_u.js";
|
|
15
|
+
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as x, normalizeClass as B, createBlock as D, createCommentVNode as u, createVNode as W, createSlots as qe, withCtx as P, renderSlot as S, normalizeProps as E, guardReactiveProps as Y, createElementVNode as f, createTextVNode as J, Fragment as d, renderList as I, toDisplayString as T, mergeProps as Q, withDirectives as Xe, vModelCheckbox as Ue } from "vue";
|
|
16
16
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
-
const Je = X(),
|
|
17
|
+
const Je = X(), Qe = {
|
|
18
18
|
name: "vue-ui-xy",
|
|
19
19
|
props: {
|
|
20
20
|
config: {
|
|
@@ -41,8 +41,8 @@ const Je = X(), Ke = {
|
|
|
41
41
|
Skeleton: De,
|
|
42
42
|
Slicer: Be,
|
|
43
43
|
Accordion: Ee,
|
|
44
|
-
PackageVersion:
|
|
45
|
-
PenAndPaper:
|
|
44
|
+
PackageVersion: Ye,
|
|
45
|
+
PenAndPaper: We
|
|
46
46
|
},
|
|
47
47
|
data() {
|
|
48
48
|
this.dataset.forEach((g, l) => {
|
|
@@ -451,10 +451,10 @@ const Je = X(), Ke = {
|
|
|
451
451
|
max: t.scaleMax || Math.max(...t.absoluteValues) || 1,
|
|
452
452
|
min: t.scaleMin || (Math.min(...t.absoluteValues) > 0 ? 0 : Math.min(...t.absoluteValues))
|
|
453
453
|
}, e = t.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = 1.0000001, N = this.calculateNiceScaleWithExactExtremes(l.min, l.max === l.min ? l.max * A : l.max, e), m = this.calculateNiceScaleWithExactExtremes(g.valueMin, g.valueMax === g.valueMin ? g.valueMax * A : g.valueMax, e), L = N.min >= 0 ? 0 : Math.abs(N.min), G = 0, w = N.max + Math.abs(L), v = m.max + Math.abs(G), O = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - t.cumulatedStackRatio) : 0, b = this.mutableConfig.isStacked ? this.drawingArea.height * t.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, C = this.drawingArea.bottom - O - b * L / w, p = this.drawingArea.bottom - O - b * G / v, V = t.series.map((y, k) => {
|
|
454
|
-
const
|
|
454
|
+
const K = this.mutableConfig.useIndividualScale ? (t.absoluteValues[k] + Math.abs(L)) / w : this.ratioToMax(y);
|
|
455
455
|
return {
|
|
456
456
|
x: this.checkNaN(this.drawingArea.left + this.slot.line / 2 + this.slot.line * k),
|
|
457
|
-
y: this.checkNaN(this.drawingArea.bottom - O - b *
|
|
457
|
+
y: this.checkNaN(this.drawingArea.bottom - O - b * K),
|
|
458
458
|
value: t.absoluteValues[k],
|
|
459
459
|
comment: t.comments && t.comments.slice(this.slicer.start, this.slicer.end)[k] || ""
|
|
460
460
|
};
|
|
@@ -1103,10 +1103,11 @@ const Je = X(), Ke = {
|
|
|
1103
1103
|
async generatePdf() {
|
|
1104
1104
|
this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
|
|
1105
1105
|
try {
|
|
1106
|
-
const { default: t } = await import("./pdf-
|
|
1106
|
+
const { default: t } = await import("./pdf-H8Iw_Wax.js");
|
|
1107
1107
|
await t({
|
|
1108
1108
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1109
|
-
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy"
|
|
1109
|
+
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
1110
|
+
options: this.FINAL_CONFIG.chart.userOptions.print
|
|
1110
1111
|
});
|
|
1111
1112
|
} catch (t) {
|
|
1112
1113
|
console.error("Error generating PDF:", t);
|
|
@@ -1125,11 +1126,12 @@ const Je = X(), Ke = {
|
|
|
1125
1126
|
async generateImage() {
|
|
1126
1127
|
this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
|
|
1127
1128
|
try {
|
|
1128
|
-
const { default: t } = await import("./img-
|
|
1129
|
+
const { default: t } = await import("./img-BIeSHu0f.js");
|
|
1129
1130
|
await t({
|
|
1130
1131
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1131
1132
|
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
1132
|
-
format: "png"
|
|
1133
|
+
format: "png",
|
|
1134
|
+
options: this.FINAL_CONFIG.chart.userOptions.print
|
|
1133
1135
|
});
|
|
1134
1136
|
} catch (t) {
|
|
1135
1137
|
console.error("Error generating image:", t);
|
|
@@ -1139,12 +1141,12 @@ const Je = X(), Ke = {
|
|
|
1139
1141
|
}, 100);
|
|
1140
1142
|
}
|
|
1141
1143
|
}
|
|
1142
|
-
},
|
|
1144
|
+
}, Ke = ["id"], je = {
|
|
1143
1145
|
key: 1,
|
|
1144
1146
|
ref: "noTitle",
|
|
1145
1147
|
class: "vue-data-ui-no-title-space",
|
|
1146
1148
|
style: "height:36px; width: 100%; background:transparent"
|
|
1147
|
-
}, $e = ["viewBox", "aria-label"], et = ["x", "y", "width", "height"], tt = { key: 1 }, lt = { class: "vue-ui-xy-grid" }, at = ["stroke", "x1", "x2", "y1", "y2"], rt = ["stroke", "x1", "x2", "y1", "y2"], it = { key: 1 }, st = ["x1", "x2", "y1", "y2", "stroke"], nt = ["x1", "x2", "y1", "y2", "stroke"], ct = ["x1", "x2", "y1", "y2", "stroke"], ot = { key: 3 }, ht = ["x1", "x2", "y1", "y2", "stroke"], ut = ["id"], dt = ["stop-color"], gt = ["stop-color"], ft = ["stop-color"], It = ["id"], mt = ["stop-color"], Nt = ["stop-color"], xt = ["stop-color"], bt = ["id"], Ft = ["stop-color"], _t = ["stop-color"], yt = ["id"], At = ["stop-color"], Lt = ["stop-color"], Ct = ["id"], St = ["stop-color"], kt = ["stop-color"], wt = ["x", "y", "height", "width", "fill"], Ot = ["x", "y", "width"], Gt = ["x", "y", "height", "width", "fill"], vt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], pt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Mt = ["width", "x", "y"], zt = { key: 0 }, Tt = ["id"], Pt = ["fill"], Vt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Rt = ["x", "y", "font-size", "fill"], Ht = ["stroke", "x1", "x2", "y1", "y2"], Dt = { key: 2 }, Bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Et = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"],
|
|
1149
|
+
}, $e = ["viewBox", "aria-label"], et = ["x", "y", "width", "height"], tt = { key: 1 }, lt = { class: "vue-ui-xy-grid" }, at = ["stroke", "x1", "x2", "y1", "y2"], rt = ["stroke", "x1", "x2", "y1", "y2"], it = { key: 1 }, st = ["x1", "x2", "y1", "y2", "stroke"], nt = ["x1", "x2", "y1", "y2", "stroke"], ct = ["x1", "x2", "y1", "y2", "stroke"], ot = { key: 3 }, ht = ["x1", "x2", "y1", "y2", "stroke"], ut = ["id"], dt = ["stop-color"], gt = ["stop-color"], ft = ["stop-color"], It = ["id"], mt = ["stop-color"], Nt = ["stop-color"], xt = ["stop-color"], bt = ["id"], Ft = ["stop-color"], _t = ["stop-color"], yt = ["id"], At = ["stop-color"], Lt = ["stop-color"], Ct = ["id"], St = ["stop-color"], kt = ["stop-color"], wt = ["x", "y", "height", "width", "fill"], Ot = ["x", "y", "width"], Gt = ["x", "y", "height", "width", "fill"], vt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], pt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Mt = ["width", "x", "y"], zt = { key: 0 }, Tt = ["id"], Pt = ["fill"], Vt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Rt = ["x", "y", "font-size", "fill"], Ht = ["stroke", "x1", "x2", "y1", "y2"], Dt = { key: 2 }, Bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Et = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Yt = { key: 4 }, Wt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], qt = ["fill", "font-size", "transform"], Xt = ["x1", "x2", "y1", "y2", "stroke"], Ut = ["x", "y", "font-size", "fill"], Zt = ["x1", "x2", "y1", "y2", "stroke"], Jt = ["x", "y", "font-size", "fill"], Qt = ["width", "x", "y"], Kt = { style: { width: "100%" } }, jt = { key: 0 }, $t = ["id"], el = ["fill"], tl = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ll = ["x", "y", "font-size", "fill"], al = ["d", "stroke", "stroke-width", "stroke-dasharray"], rl = ["d", "stroke", "stroke-width", "stroke-dasharray"], il = { key: 5 }, sl = { key: 0 }, nl = ["d", "fill"], cl = ["d", "fill"], ol = ["d", "fill"], hl = ["d", "fill"], ul = ["d", "stroke", "stroke-width", "stroke-dasharray"], dl = ["d", "stroke", "stroke-width", "stroke-dasharray"], gl = ["width", "x", "y"], fl = { style: { width: "100%" } }, Il = { key: 3 }, ml = ["id"], Nl = ["fill"], xl = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], bl = ["x", "y", "font-size", "fill"], Fl = { key: 6 }, _l = ["x", "y", "font-size", "fill"], yl = ["x", "y", "font-size", "fill", "font-weight"], Al = { key: 7 }, Ll = ["x", "y", "font-size", "fill"], Cl = { key: 8 }, Sl = ["x", "y"], kl = ["innerHTML"], wl = ["x", "y"], Ol = ["innerHTML"], Gl = ["x1", "x2", "y1", "y2", "stroke"], vl = { key: 9 }, pl = ["x", "y", "font-size", "fill"], Ml = { key: 10 }, zl = ["x", "y"], Tl = ["innerHTML"], Pl = ["x", "y"], Vl = ["innerHTML"], Rl = ["x1", "x2", "y1", "y2", "stroke"], Hl = ["x", "y", "font-size", "fill", "innerHTML"], Dl = ["x", "y", "font-size", "fill", "innerHTML"], Bl = ["x", "y", "font-size", "fill", "innerHTML"], El = ["x", "y", "font-size", "fill", "innerHTML"], Yl = ["id"], Wl = ["stop-color"], ql = ["stop-color"], Xl = ["x", "y", "width", "height", "fill", "onMouseenter"], Ul = ["font-size", "fill", "transform"], Zl = ["x", "y", "font-size", "fill"], Jl = { key: 12 }, Ql = ["text-anchor", "font-size", "fill", "transform", "onClick"], Kl = ["x", "y", "height", "width", "onMouseenter", "onClick"], jl = {
|
|
1148
1150
|
key: 13,
|
|
1149
1151
|
style: { "pointer-events": "none" }
|
|
1150
1152
|
}, $l = ["x", "y"], ea = ["cx", "cy", "r", "fill"], ta = {
|
|
@@ -1275,7 +1277,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1275
1277
|
t.$slots.menuIcon ? {
|
|
1276
1278
|
name: "menuIcon",
|
|
1277
1279
|
fn: P(({ isOpen: a, color: c }) => [
|
|
1278
|
-
S(t.$slots, "menuIcon", E(
|
|
1280
|
+
S(t.$slots, "menuIcon", E(Y({ isOpen: a, color: c })), void 0, !0)
|
|
1279
1281
|
]),
|
|
1280
1282
|
key: "0"
|
|
1281
1283
|
} : void 0,
|
|
@@ -1331,14 +1333,14 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1331
1333
|
t.$slots.optionFullscreen ? {
|
|
1332
1334
|
name: "optionFullscreen",
|
|
1333
1335
|
fn: P(({ toggleFullscreen: a, isFullscreen: c }) => [
|
|
1334
|
-
S(t.$slots, "optionFullscreen", E(
|
|
1336
|
+
S(t.$slots, "optionFullscreen", E(Y({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
|
|
1335
1337
|
]),
|
|
1336
1338
|
key: "8"
|
|
1337
1339
|
} : void 0,
|
|
1338
1340
|
t.$slots.optionAnnotator ? {
|
|
1339
1341
|
name: "optionAnnotator",
|
|
1340
1342
|
fn: P(({ toggleAnnotator: a, isAnnotator: c }) => [
|
|
1341
|
-
S(t.$slots, "optionAnnotator", E(
|
|
1343
|
+
S(t.$slots, "optionAnnotator", E(Y({ toggleAnnotator: a, isAnnotator: c })), void 0, !0)
|
|
1342
1344
|
]),
|
|
1343
1345
|
key: "9"
|
|
1344
1346
|
} : void 0
|
|
@@ -1355,7 +1357,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1355
1357
|
role: "img",
|
|
1356
1358
|
"aria-live": "polite"
|
|
1357
1359
|
}, [
|
|
1358
|
-
|
|
1360
|
+
W(L),
|
|
1359
1361
|
t.$slots["chart-background"] ? (r(), i("foreignObject", {
|
|
1360
1362
|
key: 0,
|
|
1361
1363
|
x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
|
|
@@ -1695,7 +1697,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1695
1697
|
"stroke-linejoin": e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,
|
|
1696
1698
|
"stroke-dasharray": e.FINAL_CONFIG.chart.grid.frame.strokeDasharray
|
|
1697
1699
|
}, null, 8, Et)) : u("", !0),
|
|
1698
|
-
e.FINAL_CONFIG.chart.grid.labels.show ? (r(), i("g",
|
|
1700
|
+
e.FINAL_CONFIG.chart.grid.labels.show ? (r(), i("g", Yt, [
|
|
1699
1701
|
l.mutableConfig.useIndividualScale ? (r(), i(d, { key: 0 }, [
|
|
1700
1702
|
(r(!0), i(d, null, I(e.allScales, (a) => (r(), i("g", null, [
|
|
1701
1703
|
f("line", {
|
|
@@ -1707,7 +1709,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1707
1709
|
"stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
|
|
1708
1710
|
"stroke-linecap": "round",
|
|
1709
1711
|
style: x(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
1710
|
-
}, null, 12,
|
|
1712
|
+
}, null, 12, Wt)
|
|
1711
1713
|
]))), 256)),
|
|
1712
1714
|
(r(!0), i(d, null, I(e.allScales, (a) => (r(), i("g", {
|
|
1713
1715
|
style: x(`opacity:${l.selectedScale ? l.selectedScale === a.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
@@ -1802,12 +1804,12 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1802
1804
|
x: n.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
|
|
1803
1805
|
y: n.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
|
|
1804
1806
|
}, [
|
|
1805
|
-
f("div",
|
|
1807
|
+
f("div", Kt, [
|
|
1806
1808
|
S(t.$slots, "plot-comment", {
|
|
1807
1809
|
plot: { ...n, color: a.color, seriesIndex: c, datapointIndex: h }
|
|
1808
1810
|
}, void 0, !0)
|
|
1809
1811
|
])
|
|
1810
|
-
], 8,
|
|
1812
|
+
], 8, Qt)) : u("", !0)
|
|
1811
1813
|
]))), 128)),
|
|
1812
1814
|
Object.hasOwn(a, "useProgression") && a.useProgression === !0 && !isNaN(e.calcLinearProgression(a.plots).trend) ? (r(), i("g", jt, [
|
|
1813
1815
|
f("defs", null, [
|
|
@@ -1874,7 +1876,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
1874
1876
|
}, null, 8, rl)) : u("", !0)
|
|
1875
1877
|
], 6))), 128)),
|
|
1876
1878
|
t.$slots.pattern ? (r(), i("defs", il, [
|
|
1877
|
-
(r(!0), i(d, null, I(e.safeDataset, (a, c) => S(t.$slots, "pattern",
|
|
1879
|
+
(r(!0), i(d, null, I(e.safeDataset, (a, c) => S(t.$slots, "pattern", Q({
|
|
1878
1880
|
key: `serie_pattern_slot_${c}`,
|
|
1879
1881
|
ref_for: !0
|
|
1880
1882
|
}, { ...a, seriesIndex: a.slotAbsoluteIndex, patternId: `pattern_${l.uniqueId}_${c}` }), void 0, !0)), 128))
|
|
@@ -2332,13 +2334,13 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2332
2334
|
offset: "0%",
|
|
2333
2335
|
"stop-color": e.FINAL_CONFIG.chart.backgroundColor,
|
|
2334
2336
|
"stop-opacity": "0"
|
|
2335
|
-
}, null, 8,
|
|
2337
|
+
}, null, 8, Wl),
|
|
2336
2338
|
f("stop", {
|
|
2337
2339
|
offset: "100%",
|
|
2338
2340
|
"stop-color": a.color,
|
|
2339
2341
|
"stop-opacity": "0.2"
|
|
2340
2342
|
}, null, 8, ql)
|
|
2341
|
-
], 8,
|
|
2343
|
+
], 8, Yl))), 256))
|
|
2342
2344
|
]),
|
|
2343
2345
|
(r(!0), i(d, null, I(e.allScales, (a, c) => (r(), i("rect", {
|
|
2344
2346
|
x: a.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + e.xPadding,
|
|
@@ -2370,7 +2372,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2370
2372
|
]),
|
|
2371
2373
|
s[9] || (s[9] = J('v-for="(label, i) in timeLabels" :key="`time_label_${i}`" ')),
|
|
2372
2374
|
e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (r(), i("g", Jl, [
|
|
2373
|
-
t.$slots["time-label"] ? (r(!0), i(d, { key: 0 }, I(e.timeLabels, (a, c) => S(t.$slots, "time-label",
|
|
2375
|
+
t.$slots["time-label"] ? (r(!0), i(d, { key: 0 }, I(e.timeLabels, (a, c) => S(t.$slots, "time-label", Q({
|
|
2374
2376
|
key: `time_label_${c}`,
|
|
2375
2377
|
ref_for: !0
|
|
2376
2378
|
}, {
|
|
@@ -2396,7 +2398,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2396
2398
|
cursor: "pointer"
|
|
2397
2399
|
},
|
|
2398
2400
|
onClick: () => e.selectTimeLabel(a, c)
|
|
2399
|
-
}, T(a.text || ""), 9,
|
|
2401
|
+
}, T(a.text || ""), 9, Ql)) : u("", !0)
|
|
2400
2402
|
]))), 128))
|
|
2401
2403
|
])) : u("", !0),
|
|
2402
2404
|
f("g", null, [
|
|
@@ -2410,7 +2412,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2410
2412
|
onMouseenter: (n) => e.toggleTooltipVisibility(!0, c),
|
|
2411
2413
|
onMouseleave: s[1] || (s[1] = (n) => e.toggleTooltipVisibility(!1)),
|
|
2412
2414
|
onClick: (n) => e.selectX(c)
|
|
2413
|
-
}, null, 40,
|
|
2415
|
+
}, null, 40, Kl))), 128))
|
|
2414
2416
|
]),
|
|
2415
2417
|
e.FINAL_CONFIG.chart.timeTag.show && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (r(), i("g", jl, [
|
|
2416
2418
|
(r(), i("foreignObject", {
|
|
@@ -2436,7 +2438,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2436
2438
|
S(t.$slots, "svg", { svg: e.svg }, void 0, !0)
|
|
2437
2439
|
], 14, $e)) : u("", !0),
|
|
2438
2440
|
t.$slots.watermark ? (r(), i("div", ta, [
|
|
2439
|
-
S(t.$slots, "watermark", E(
|
|
2441
|
+
S(t.$slots, "watermark", E(Y({ isPrinting: l.isPrinting || l.isImaging })), void 0, !0)
|
|
2440
2442
|
])) : u("", !0),
|
|
2441
2443
|
(r(!0), i(d, null, I(e.lineSet, (a, c) => (r(), i(d, {
|
|
2442
2444
|
key: `tag_line_${c}`
|
|
@@ -2717,7 +2719,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2717
2719
|
onTrapMouse: e.selectMinimapIndex
|
|
2718
2720
|
}, {
|
|
2719
2721
|
"reset-action": P(({ reset: a }) => [
|
|
2720
|
-
S(t.$slots, "reset-action", E(
|
|
2722
|
+
S(t.$slots, "reset-action", E(Y({ reset: a })), void 0, !0)
|
|
2721
2723
|
]),
|
|
2722
2724
|
_: 3
|
|
2723
2725
|
}, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "onReset", "onTrapMouse"])) : u("", !0),
|
|
@@ -2743,7 +2745,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2743
2745
|
width: "20",
|
|
2744
2746
|
fill: a.color
|
|
2745
2747
|
}, null, 8, ma),
|
|
2746
|
-
|
|
2748
|
+
W(G, {
|
|
2747
2749
|
plot: { x: 10, y: 9 },
|
|
2748
2750
|
radius: 4,
|
|
2749
2751
|
color: a.color,
|
|
@@ -2773,7 +2775,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2773
2775
|
fill: t.$slots.pattern ? `url(#pattern_${l.uniqueId}_${a.slotAbsoluteIndex})` : a.color
|
|
2774
2776
|
}, null, 8, ba)) : u("", !0)
|
|
2775
2777
|
])) : (r(), i("svg", Fa, [
|
|
2776
|
-
|
|
2778
|
+
W(G, {
|
|
2777
2779
|
plot: { x: 6, y: 6 },
|
|
2778
2780
|
radius: 5,
|
|
2779
2781
|
color: a.color,
|
|
@@ -2790,7 +2792,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2790
2792
|
t.$slots.source ? (r(), i("div", ya, [
|
|
2791
2793
|
S(t.$slots, "source", {}, void 0, !0)
|
|
2792
2794
|
], 512)) : u("", !0),
|
|
2793
|
-
|
|
2795
|
+
W(O, {
|
|
2794
2796
|
show: l.mutableConfig.showTooltip && l.isTooltip,
|
|
2795
2797
|
backgroundColor: e.FINAL_CONFIG.chart.tooltip.backgroundColor,
|
|
2796
2798
|
color: e.FINAL_CONFIG.chart.tooltip.color,
|
|
@@ -2807,10 +2809,10 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2807
2809
|
isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
|
|
2808
2810
|
}, {
|
|
2809
2811
|
"tooltip-before": P(() => [
|
|
2810
|
-
S(t.$slots, "tooltip-before", E(
|
|
2812
|
+
S(t.$slots, "tooltip-before", E(Y({ ...e.dataTooltipSlot })), void 0, !0)
|
|
2811
2813
|
]),
|
|
2812
2814
|
"tooltip-after": P(() => [
|
|
2813
|
-
S(t.$slots, "tooltip-after", E(
|
|
2815
|
+
S(t.$slots, "tooltip-after", E(Y({ ...e.dataTooltipSlot })), void 0, !0)
|
|
2814
2816
|
]),
|
|
2815
2817
|
_: 3
|
|
2816
2818
|
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
@@ -2845,7 +2847,7 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2845
2847
|
onClick: s[5] || (s[5] = (a) => l.showSparklineTable = !l.showSparklineTable),
|
|
2846
2848
|
style: { cursor: "pointer" }
|
|
2847
2849
|
}, [
|
|
2848
|
-
|
|
2850
|
+
W(b, {
|
|
2849
2851
|
name: "chartLine",
|
|
2850
2852
|
size: 20,
|
|
2851
2853
|
stroke: e.FINAL_CONFIG.chart.color
|
|
@@ -2882,9 +2884,9 @@ function Ca(t, s, o, g, l, e) {
|
|
|
2882
2884
|
]),
|
|
2883
2885
|
_: 1
|
|
2884
2886
|
}, 8, ["config"])) : u("", !0)
|
|
2885
|
-
], 46,
|
|
2887
|
+
], 46, Ke);
|
|
2886
2888
|
}
|
|
2887
|
-
const Ea = /* @__PURE__ */ Ze(
|
|
2889
|
+
const Ea = /* @__PURE__ */ Ze(Qe, [["render", Ca], ["__scopeId", "data-v-0ccd7c1c"]]);
|
|
2888
2890
|
export {
|
|
2889
2891
|
Ea as default
|
|
2890
2892
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-CBRI5uwl.cjs"),p=require("./useResponsive-N8jl0-aC.cjs"),vt=require("./Tooltip-KXn1rQhr.cjs"),dt=require("./Legend-j3YoAtEf.cjs"),ht=require("./Title-BP4K_GLE.cjs"),ft=require("./Slicer-bY7XVDi5.cjs"),Ye=require("./usePrinter-C1Rlqzcj.cjs"),yt=require("./vue-ui-accordion-C5C3XQ8f.cjs"),pt=require("./DataTable-Be-eTBzq.cjs"),gt=require("./vue-ui-skeleton-CM4wEsYA.cjs"),He=require("./useNestedProp-0jJvFRhK.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-Db1HIrAt.cjs"),xt=require("./ColorPicker-oA_W-jVk.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-1ffe1d80"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-Crz6y51C.cjs"),p=require("./useResponsive-N8jl0-aC.cjs"),vt=require("./Tooltip-DhhX9jKQ.cjs"),dt=require("./Legend-BB6S3gBp.cjs"),ht=require("./Title-BkwZ_rBI.cjs"),ft=require("./Slicer-BHKFOTCG.cjs"),Ye=require("./usePrinter-Cqxw0sR7.cjs"),yt=require("./vue-ui-accordion-10T9IdE-.cjs"),pt=require("./DataTable-Dp7g_Ei4.cjs"),gt=require("./vue-ui-skeleton-BZsFiqo5.cjs"),He=require("./useNestedProp-B8CE091o.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-CGjwy6WD.cjs"),xt=require("./ColorPicker-Cpi--TbY.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-1ffe1d80"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas",options:t.value.userOptions.print}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
<span>${e.name?e.name+": ":""}</span>
|
|
7
7
|
<span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
|
|
8
8
|
</div>
|
|
9
|
-
`)),le=l.computed(()=>x.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(H,e=>{e&&Te()});const L=l.computed(()=>u.assignStackRatios(le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,y=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===y&&(r=r>=0?y-1:r,y=y>=0?y:r+1),e.series.filter(W=>![null,void 0].includes(W)).map(W=>(W-r)/(y-r));const b={valueMin:r,valueMax:y},R=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=u.calculateNiceScale(b.valueMin,b.valueMax,R):m=u.calculateNiceScale(b.valueMin<0?b.valueMin:0,b.valueMax<=0?0:b.valueMax,R);const w=i.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,J=i.value.stacked?a.value.height/t.value.style.chart.stackGap:0,O=i.value.stacked?a.value.height*e.stackRatio-J:a.value.height,Q=m.min<0?Math.abs(m.min):0;let K;e.autoScaling&&i.value.stacked&&y<=0?K=a.value.bottom-w-O:K=a.value.bottom-w-O*(Q/(m.max+Q));const se=m.ticks.map((W,ct)=>({y:a.value.bottom-w-O*(ct/(m.ticks.length-1)),x:a.value.left-8,value:W})),ie=qe({hasAutoScale:i.value.stacked&&e.autoScaling,series:e.series,min:i.value.stacked?r:z.value.min,max:i.value.stacked?y:z.value.max,scale:i.value.stacked?m:z.value.scale,yOffset:w,individualHeight:O,stackIndex:i.value.stacked?o:null});return{...e,coordinatesLine:ie,min:r,max:y,localScale:m,localZero:K,localMin:Q,localYLabels:se,yOffset:w,individualHeight:O}})),n=l.ref({start:0,end:H.value});function Te(){Be()}const ae=l.ref(null);async function Be(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&ae.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setEndValue(Ze(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:H.value},ee.value+=1)}function Ze(e){const o=H.value;return e>o?o:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const _e=l.computed(()=>L.value.filter(e=>["line","plot",void 0].includes(e.type))),N=l.computed(()=>L.value.filter(e=>e.type==="bar"));function Ge(){if(!B.value)return;const e=V.value.offsetWidth,o=V.value.offsetHeight;B.value.width=e*q.value*2,B.value.height=o*q.value*2,k.value=e*q.value*2,F.value=o*q.value*2,c.value.scale(q.value,q.value),ne()}function je(){if(c.value.clearRect(0,0,1e4,1e4),c.value.fillStyle=t.value.style.chart.backgroundColor,c.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),i.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?L.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)p.line(c.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&L.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):L.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{p.line(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),p.line(c.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),L.value.forEach(e=>{p.text(c.value,e.name,k.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)p.line(c.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?z.value.yLabels.forEach((e,o)=>{o<z.value.yLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:z.value.yLabels[o+1].y},{x:a.value.left,y:z.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):z.value.yLabels.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&p.line(c.value,[{x:a.value.left,y:z.value.zero},{x:a.value.right,y:z.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}t.value.style.chart.grid.y.axisName&&p.text(c.value,t.value.style.chart.grid.y.axisName,k.value-k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&p.text(c.value,t.value.style.chart.grid.x.axisName,k.value/2,F.value,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?k.value/150:t.value.style.chart.line.plots.show?k.value/200:0)*t.value.style.chart.line.plots.radiusRatio;p.circle(c.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}}function Je(){L.value.forEach(e=>{e.showYMarker&&ue(e)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,ue(e).value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:ue(e).value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:ue(e),seriesIndex:null}),a.value.left-8+t.value.style.chart.grid.y.axisLabels.offsetX,ue(e).y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}function Ke(){t.value.style.chart.grid.y.axisLabels.show&&(i.value.stacked?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(f.value)?.2:1})})}):z.value.yLabels.forEach((e,o)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color,globalAlpha:L.value.some(r=>r.showYMarker)&&![null,void 0].includes(f.value)?.2:1})}))}function et(e){for(let o=0;o<e.coordinatesLine.length;o+=1)p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${t.value.style.chart.dataLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color})}function tt(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start&&t.value.style.chart.grid.y.timeLabels.showMarker))&&p.text(c.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+k.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${t.value.style.chart.grid.y.timeLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.timeLabels.showMarker?u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100):t.value.style.chart.grid.y.timeLabels.color,rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Ie(){p.line(c.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function lt(){g.value&&p.line(c.value,[{x:a.value.left,y:g.value},{x:a.value.right,y:g.value}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function at(){N.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)p.rect(c.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:i.value.stacked?e.localZero:z.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:t.value.style.chart.bar.gradient.show?u.lightenHexColor(e.color,.5):e.color}]}}),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.4/(i.value.stacked?1:N.value.length),(e.coordinatesLine[r].value<0?i.value.stacked?e.localZero:z.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function ot(e){e.useArea?i.value.stacked?p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:z.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:z.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.line(c.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function rt(){L.value.forEach((e,o)=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ne(){je(),Y.value?(f.value!==null&&t.value.style.chart.selector.show&&Ie(),at(),i.value.stacked&&t.value.style.chart.grid.x.showAxis&&rt(),_e.value.forEach(e=>{(e.type==="line"||!e.type)&&ot(e),G.value&&(Qe(e),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&et(e))}),oe.value=p.cloneCanvas(B.value)):(oe.value&&(c.value.clearRect(0,0,1e4,1e4),c.value.drawImage(oe.value,0,0)),f.value!==null&&t.value.style.chart.selector.show&&Ie(),f.value!==null&&L.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&p.circle(c.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},k.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}})),t.value.style.chart.grid.y.timeLabels.show&&tt(),t.value.style.chart.selector.show&&t.value.style.chart.selector.showHorizontalSelector&<(),Ke(),Je(),Y.value=!1}const he=p.debounce(()=>{G.value=!0,Ge()},H.value>200?10:1,!G.value);function ue(e){if([null,void 0].includes(f.value)||!e.coordinatesLine[f.value])return!1;const{y:o,value:r}=e.coordinatesLine[f.value];return{y:o,value:r}}function nt(e){const{left:o,top:r}=B.value.getBoundingClientRect(),y=e.clientX-o;if(g.value=(e.clientY-r)*2,(g.value<a.value.top||g.value>a.value.bottom)&&(g.value=null),y*2<a.value.left||y*2>a.value.right){U.value=!1,f.value=null;return}const b=y*2-a.value.left;if(f.value=Math.floor(b/a.value.slot),U.value=!0,!G.value)return;let R="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}))?A.value=m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(R+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),R+=We.value.join(""),A.value=R),G.value=!1}l.watch(()=>f.value,e=>{he()}),l.watch(()=>n.value,e=>{Y.value=!0,ne()},{deep:!0}),l.watch(()=>i.value.showDataLabels,e=>{Y.value=!0,ne()}),l.watch(()=>g.value,e=>{e&&ne()}),l.watch(()=>i.value.stacked,e=>{Y.value=!0,G.value=!0,he()});function ut(){U.value=!1,f.value=null,A.value="",g.value=null,ne()}const fe=l.ref(null),ye=l.ref(null);l.onMounted(()=>{ke()});function ke(){if(u.objectIsEmpty(x.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):B.value&&(c.value=B.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=p.throttle(()=>{const{width:o,height:r}=p.useResponsive({chart:Z.value,title:t.value.style.chart.title.text?ce.value:null,legend:t.value.style.chart.legend.show?ve.value:null,slicer:t.value.style.chart.zoom.show&&H.value>1?de.value:null,source:h.value});requestAnimationFrame(()=>{Ce.value=`${o} / ${r}`})});fe.value=new ResizeObserver(e),fe.value.observe(Z.value.parentNode)}ye.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&V.value&&(Y.value=!0,he())}),ye.value.observe(V.value),Be()}l.onBeforeUnmount(()=>{ye.value&&ye.value.disconnect(),fe.value&&fe.value.disconnect()});function Ee(e){S("selectLegend",L.value.find(o=>o.absoluteIndex===e)),I.value.includes(e)?I.value=I.value.filter(o=>o!==e):I.value.push(e),Y.value=!0,he()}const Ne=l.computed(()=>le.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:I.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ee(e.absoluteIndex),isSegregated:I.value.includes(e.absoluteIndex)}))),st=l.computed(()=>({cy:"donut-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":""})),pe=l.computed(()=>{const e=[""].concat(L.value.map(b=>b.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let o=[];for(let b=0;b<H.value;b+=1){const R=L.value.map(m=>m.series[b]??0).reduce((m,w)=>m+w,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[b]??b+1].concat(L.value.map(m=>(m.series[b]??0).toFixed(t.value.table.rounding))).concat((R??0).toFixed(t.value.table.rounding)))}const r={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},y=[t.value.table.columnNames.period].concat(L.value.map(b=>b.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:y}}),Re=l.computed(()=>{if(L.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=L.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const y=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];L.value.forEach(b=>{y.push(Number((b.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(y)}return{head:e,body:o}});function Fe(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Re.value.head.map(R=>R.label)],r=Re.value.body,y=e.concat([o]).concat(r),b=u.createCsvContent(y);u.downloadCsv({csvContent:b,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function it(){return L.value}function Oe(){i.value.showTable=!i.value.showTable}function De(){i.value.showDataLabels=!i.value.showDataLabels}function Ve(){i.value.stacked=!i.value.stacked}function Ae(){i.value.showTooltip=!i.value.showTooltip}const ge=l.ref(!1);function Le(){ge.value=!ge.value}return be({getData:it,generateCsv:Fe,generatePdf:$e,generateImage:ze,toggleTable:Oe,toggleLabels:De,toggleStack:Ve,toggleTooltip:Ae,toggleAnnotator:Le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:Z,id:`xy_canvas_${D.value}`,class:l.normalizeClass(`vue-ui-donut ${te.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:o[5]||(o[5]=()=>l.unref(P)(!0)),onMouseleave:o[6]||(o[6]=()=>l.unref(P)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(ht._sfc_main,{key:`title_${v.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(l.unref(T)||l.unref(M))?(l.openBlock(),l.createBlock(Ye.UserOptions,{ref:"details",key:`user_option_${re.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(we),isImaging:l.unref(Se),uid:D.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:$.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:te.value,isTooltip:i.value.showTooltip,isStacked:i.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:Z.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:ge.value,onToggleFullscreen:Ue,onGeneratePdf:l.unref($e),onGenerateCsv:Fe,onGenerateImage:l.unref(ze),onToggleTable:Oe,onToggleLabels:De,onToggleStack:Ve,onToggleTooltip:Ae,onToggleAnnotator:Le,style:l.normalizeStyle({visibility:l.unref(T)?l.unref(M)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.menuIcon?{name:"menuIcon",fn:l.withCtx(({isOpen:r,color:y})=>[l.renderSlot(e.$slots,"menuIcon",l.normalizeProps(l.guardReactiveProps({isOpen:r,color:y})),void 0,!0)]),key:"0"}:void 0,e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:y})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:y})),void 0,!0)]),key:"8"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:y})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:y})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${Ce.value}`),ref_key:"container",ref:V},[C.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:B,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>nt(r)),onMouseleave:ut},null,544)):(l.openBlock(),l.createBlock(gt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(vt._sfc_main,{show:i.value.showTooltip&&U.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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.unref(B),content:A.value,isFullscreen:te.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:de,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&H.value>1?(l.openBlock(),l.createBlock(ft.Slicer,{ref_key:"slicerComponent",ref:ae,key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:H.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:H.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Te},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ve},[t.value.style.chart.legend.show&&C.value?(l.openBlock(),l.createBlock(dt.Legend,{legendSet:Ne.value,config:st.value,key:`legend_${d.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ee(r))},{item:l.withCtx(({legend:r,index:y})=>[l.createElementVNode("div",{onClick:b=>r.segregate(),style:l.normalizeStyle(`opacity:${I.value.includes(y)?.5:1}`)},l.toDisplayString(r.name),13,Tt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:Ne.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",Bt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(we)||l.unref(Se)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:h,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(yt.default,{key:4,hideDetails:"",config:{open:i.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(pt.DataTable,{key:`table_${s.value}`,colNames:pe.value.colNames,head:pe.value.head,body:pe.value.body,config:pe.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[4]||(o[4]=r=>i.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,It)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&L.value.length?(l.openBlock(),l.createBlock(Mt,{key:5,parent:Z.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:ge.value,onClose:Le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,Pt))}},Nt=Xe._export_sfc(Et,[["__scopeId","data-v-73b06dd8"]]);exports.default=Nt;
|
|
9
|
+
`)),le=l.computed(()=>x.dataset.map((e,o)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:o,color:u.convertColorToHex(e.color||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length])})));l.watch(H,e=>{e&&Te()});const L=l.computed(()=>u.assignStackRatios(le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex))).map((e,o)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,o)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,y=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===y&&(r=r>=0?y-1:r,y=y>=0?y:r+1),e.series.filter(W=>![null,void 0].includes(W)).map(W=>(W-r)/(y-r));const b={valueMin:r,valueMax:y},R=e.scaleSteps||t.value.style.chart.scale.ticks;let m;e.autoScaling?m=u.calculateNiceScale(b.valueMin,b.valueMax,R):m=u.calculateNiceScale(b.valueMin<0?b.valueMin:0,b.valueMax<=0?0:b.valueMax,R);const w=i.value.stacked?a.value.height*(1-e.cumulatedStackRatio):0,J=i.value.stacked?a.value.height/t.value.style.chart.stackGap:0,O=i.value.stacked?a.value.height*e.stackRatio-J:a.value.height,Q=m.min<0?Math.abs(m.min):0;let K;e.autoScaling&&i.value.stacked&&y<=0?K=a.value.bottom-w-O:K=a.value.bottom-w-O*(Q/(m.max+Q));const se=m.ticks.map((W,ct)=>({y:a.value.bottom-w-O*(ct/(m.ticks.length-1)),x:a.value.left-8,value:W})),ie=qe({hasAutoScale:i.value.stacked&&e.autoScaling,series:e.series,min:i.value.stacked?r:z.value.min,max:i.value.stacked?y:z.value.max,scale:i.value.stacked?m:z.value.scale,yOffset:w,individualHeight:O,stackIndex:i.value.stacked?o:null});return{...e,coordinatesLine:ie,min:r,max:y,localScale:m,localZero:K,localMin:Q,localYLabels:se,yOffset:w,individualHeight:O}})),n=l.ref({start:0,end:H.value});function Te(){Be()}const ae=l.ref(null);async function Be(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&ae.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),ae.value&&ae.value.setEndValue(Ze(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:H.value},ee.value+=1)}function Ze(e){const o=H.value;return e>o?o:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const _e=l.computed(()=>L.value.filter(e=>["line","plot",void 0].includes(e.type))),N=l.computed(()=>L.value.filter(e=>e.type==="bar"));function Ge(){if(!B.value)return;const e=V.value.offsetWidth,o=V.value.offsetHeight;B.value.width=e*q.value*2,B.value.height=o*q.value*2,k.value=e*q.value*2,F.value=o*q.value*2,c.value.scale(q.value,q.value),ne()}function je(){if(c.value.clearRect(0,0,1e4,1e4),c.value.fillStyle=t.value.style.chart.backgroundColor,c.value.fillRect(0,0,a.value.canvasWidth,a.value.canvasHeight),i.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?L.value.forEach(e=>{for(let o=0;o<n.value.end-n.value.start+1;o+=1)p.line(c.value,[{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*o,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&L.value.forEach(e=>{for(let o=n.value.start;o<n.value.end;o+=1)o%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset-e.individualHeight},{x:a.value.left+a.value.slot*(o-n.value.start)+a.value.slot/2,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{r<e.localYLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y},{x:a.value.right,y:e.localYLabels[r+1].y},{x:a.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):L.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(o=>{p.line(c.value,[{x:a.value.left,y:o.y},{x:a.value.right,y:o.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.localZero},{x:a.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&L.value.forEach(e=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.left,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),p.line(c.value,[{x:a.value.right,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset-e.individualHeight}],{color:e.color})}),L.value.forEach(e=>{p.text(c.value,e.name,k.value/35,a.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)p.line(c.value,[{x:a.value.left+a.value.slot*e,y:a.value.top},{x:a.value.left+a.value.slot*e,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&p.line(c.value,[{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?z.value.yLabels.forEach((e,o)=>{o<z.value.yLabels.length-1&&p.rect(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y},{x:a.value.right,y:z.value.yLabels[o+1].y},{x:a.value.left,y:z.value.yLabels[o+1].y}],{fillColor:o%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):z.value.yLabels.forEach(e=>{p.line(c.value,[{x:a.value.left,y:e.y},{x:a.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.top},{x:a.value.left,y:a.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&p.line(c.value,[{x:a.value.left,y:a.value.bottom},{x:a.value.right,y:a.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&p.line(c.value,[{x:a.value.left,y:z.value.zero},{x:a.value.right,y:z.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}t.value.style.chart.grid.y.axisName&&p.text(c.value,t.value.style.chart.grid.y.axisName,k.value-k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,a.value.bottom-a.value.height/2,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&p.text(c.value,t.value.style.chart.grid.x.axisName,k.value/2,F.value,{font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Qe(e){for(let o=0;o<e.coordinatesLine.length;o+=1){const r=(f.value===o?k.value/150:t.value.style.chart.line.plots.show?k.value/200:0)*t.value.style.chart.line.plots.radiusRatio;p.circle(c.value,{x:e.coordinatesLine[o].x,y:e.coordinatesLine[o].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}}function Je(){L.value.forEach(e=>{e.showYMarker&&ue(e)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,ue(e).value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:ue(e).value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:ue(e),seriesIndex:null}),a.value.left-8+t.value.style.chart.grid.y.axisLabels.offsetX,ue(e).y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}function Ke(){t.value.style.chart.grid.y.axisLabels.show&&(i.value.stacked?L.value.forEach(e=>{e.localYLabels.forEach((o,r)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,o.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:o.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:o,seriesIndex:r}),o.x+t.value.style.chart.grid.y.axisLabels.offsetX,o.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color,globalAlpha:e.showYMarker&&![null,void 0].includes(f.value)?.2:1})})}):z.value.yLabels.forEach((e,o)=>{p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:o}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${t.value.style.chart.grid.y.axisLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color,globalAlpha:L.value.some(r=>r.showYMarker)&&![null,void 0].includes(f.value)?.2:1})}))}function et(e){for(let o=0;o<e.coordinatesLine.length;o+=1)p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[o].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[o].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[o],seriesIndex:o}),e.coordinatesLine[o].x,e.coordinatesLine[o].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${t.value.style.chart.dataLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color})}function tt(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start&&t.value.style.chart.grid.y.timeLabels.showMarker))&&p.text(c.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,a.value.left+a.value.slot*(e-n.value.start)+a.value.slot/2,a.value.bottom+k.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${t.value.style.chart.grid.y.timeLabels.bold?"bold ":""}${Math.round(k.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.timeLabels.showMarker?u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100):t.value.style.chart.grid.y.timeLabels.color,rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Ie(){p.line(c.value,[{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.top},{x:a.value.left+a.value.slot*f.value+a.value.slot/2,y:a.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function lt(){g.value&&p.line(c.value,[{x:a.value.left,y:g.value},{x:a.value.right,y:g.value}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2})}function at(){N.value.forEach((e,o)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)p.rect(c.value,[{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:i.value.stacked?e.localZero:z.value.zero},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.8/(i.value.stacked?1:N.value.length),y:e.coordinatesLine[r].y},{x:a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:i.value.stacked?e.localZero:z.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:t.value.style.chart.bar.gradient.show?u.lightenHexColor(e.color,.5):e.color}]}}),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&p.text(c.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),a.value.left+a.value.slot*r+a.value.slot/10+(i.value.stacked?0:a.value.slot/N.value.length*o-(o===0?0:a.value.slot/(5*N.value.length)*o))+a.value.slot*.4/(i.value.stacked?1:N.value.length),(e.coordinatesLine[r].value<0?i.value.stacked?e.localZero:z.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(k.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function ot(e){e.useArea?i.value.stacked?p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.polygon(c.value,[{x:e.coordinatesLine[0].x,y:z.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:z.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):p.line(c.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function rt(){L.value.forEach((e,o)=>{p.line(c.value,[{x:a.value.left,y:a.value.bottom-e.yOffset},{x:a.value.right,y:a.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function ne(){je(),Y.value?(f.value!==null&&t.value.style.chart.selector.show&&Ie(),at(),i.value.stacked&&t.value.style.chart.grid.x.showAxis&&rt(),_e.value.forEach(e=>{(e.type==="line"||!e.type)&&ot(e),G.value&&(Qe(e),i.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&et(e))}),oe.value=p.cloneCanvas(B.value)):(oe.value&&(c.value.clearRect(0,0,1e4,1e4),c.value.drawImage(oe.value,0,0)),f.value!==null&&t.value.style.chart.selector.show&&Ie(),f.value!==null&&L.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&p.circle(c.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},k.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color})}})),t.value.style.chart.grid.y.timeLabels.show&&tt(),t.value.style.chart.selector.show&&t.value.style.chart.selector.showHorizontalSelector&<(),Ke(),Je(),Y.value=!1}const he=p.debounce(()=>{G.value=!0,Ge()},H.value>200?10:1,!G.value);function ue(e){if([null,void 0].includes(f.value)||!e.coordinatesLine[f.value])return!1;const{y:o,value:r}=e.coordinatesLine[f.value];return{y:o,value:r}}function nt(e){const{left:o,top:r}=B.value.getBoundingClientRect(),y=e.clientX-o;if(g.value=(e.clientY-r)*2,(g.value<a.value.top||g.value>a.value.bottom)&&(g.value=null),y*2<a.value.left||y*2>a.value.right){U.value=!1,f.value=null;return}const b=y*2-a.value.left;if(f.value=Math.floor(b/a.value.slot),U.value=!0,!G.value)return;let R="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}))?A.value=m({seriesIndex:f.value,datapoint:L.value.map(w=>({shape:w.shape||null,name:w.name,color:w.color,type:w.type||"line",value:w.series.find((J,O)=>O===f.value)})),series:L.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(R+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),R+=We.value.join(""),A.value=R),G.value=!1}l.watch(()=>f.value,e=>{he()}),l.watch(()=>n.value,e=>{Y.value=!0,ne()},{deep:!0}),l.watch(()=>i.value.showDataLabels,e=>{Y.value=!0,ne()}),l.watch(()=>g.value,e=>{e&&ne()}),l.watch(()=>i.value.stacked,e=>{Y.value=!0,G.value=!0,he()});function ut(){U.value=!1,f.value=null,A.value="",g.value=null,ne()}const fe=l.ref(null),ye=l.ref(null);l.onMounted(()=>{ke()});function ke(){if(u.objectIsEmpty(x.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):B.value&&(c.value=B.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=p.throttle(()=>{const{width:o,height:r}=p.useResponsive({chart:Z.value,title:t.value.style.chart.title.text?ce.value:null,legend:t.value.style.chart.legend.show?ve.value:null,slicer:t.value.style.chart.zoom.show&&H.value>1?de.value:null,source:h.value});requestAnimationFrame(()=>{Ce.value=`${o} / ${r}`})});fe.value=new ResizeObserver(e),fe.value.observe(Z.value.parentNode)}ye.value=new ResizeObserver(e=>{for(const o of e)o.contentBoxSize&&V.value&&(Y.value=!0,he())}),ye.value.observe(V.value),Be()}l.onBeforeUnmount(()=>{ye.value&&ye.value.disconnect(),fe.value&&fe.value.disconnect()});function Ee(e){S("selectLegend",L.value.find(o=>o.absoluteIndex===e)),I.value.includes(e)?I.value=I.value.filter(o=>o!==e):I.value.push(e),Y.value=!0,he()}const Ne=l.computed(()=>le.value.map((e,o)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||Me.value[o]||u.palette[o]||u.palette[o%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:I.value.includes(e.absoluteIndex)?.5:1,segregate:()=>Ee(e.absoluteIndex),isSegregated:I.value.includes(e.absoluteIndex)}))),st=l.computed(()=>({cy:"donut-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":""})),pe=l.computed(()=>{const e=[""].concat(L.value.map(b=>b.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let o=[];for(let b=0;b<H.value;b+=1){const R=L.value.map(m=>m.series[b]??0).reduce((m,w)=>m+w,0);o.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[b]??b+1].concat(L.value.map(m=>(m.series[b]??0).toFixed(t.value.table.rounding))).concat((R??0).toFixed(t.value.table.rounding)))}const r={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},y=[t.value.table.columnNames.period].concat(L.value.map(b=>b.name)).concat(t.value.table.columnNames.total);return{head:e,body:o.slice(0,n.value.end-n.value.start),config:r,colNames:y}}),Re=l.computed(()=>{if(L.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=L.value.map(r=>({label:r.name,color:r.color,type:r.type})),o=[];for(let r=n.value.start;r<n.value.end;r+=1){const y=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];L.value.forEach(b=>{y.push(Number((b.series[r]||0).toFixed(t.value.table.rounding)))}),o.push(y)}return{head:e,body:o}});function Fe(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=["",...Re.value.head.map(R=>R.label)],r=Re.value.body,y=e.concat([o]).concat(r),b=u.createCsvContent(y);u.downloadCsv({csvContent:b,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function it(){return L.value}function Oe(){i.value.showTable=!i.value.showTable}function De(){i.value.showDataLabels=!i.value.showDataLabels}function Ve(){i.value.stacked=!i.value.stacked}function Ae(){i.value.showTooltip=!i.value.showTooltip}const ge=l.ref(!1);function Le(){ge.value=!ge.value}return be({getData:it,generateCsv:Fe,generatePdf:$e,generateImage:ze,toggleTable:Oe,toggleLabels:De,toggleStack:Ve,toggleTooltip:Ae,toggleAnnotator:Le}),(e,o)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:Z,id:`xy_canvas_${D.value}`,class:l.normalizeClass(`vue-ui-donut ${te.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:o[5]||(o[5]=()=>l.unref(P)(!0)),onMouseleave:o[6]||(o[6]=()=>l.unref(P)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ce,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(ht._sfc_main,{key:`title_${v.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(l.unref(T)||l.unref(M))?(l.openBlock(),l.createBlock(Ye.UserOptions,{ref:"details",key:`user_option_${re.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(we),isImaging:l.unref(Se),uid:D.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:$.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:te.value,isTooltip:i.value.showTooltip,isStacked:i.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:Z.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:ge.value,onToggleFullscreen:Ue,onGeneratePdf:l.unref($e),onGenerateCsv:Fe,onGenerateImage:l.unref(ze),onToggleTable:Oe,onToggleLabels:De,onToggleStack:Ve,onToggleTooltip:Ae,onToggleAnnotator:Le,style:l.normalizeStyle({visibility:l.unref(T)?l.unref(M)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.menuIcon?{name:"menuIcon",fn:l.withCtx(({isOpen:r,color:y})=>[l.renderSlot(e.$slots,"menuIcon",l.normalizeProps(l.guardReactiveProps({isOpen:r,color:y})),void 0,!0)]),key:"0"}:void 0,e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"7"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:y})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:y})),void 0,!0)]),key:"8"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:y})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:y})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${Ce.value}`),ref_key:"container",ref:V},[C.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:B,style:{width:"100%",height:"100%"},onMousemove:o[0]||(o[0]=r=>nt(r)),onMouseleave:ut},null,544)):(l.openBlock(),l.createBlock(gt.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(vt._sfc_main,{show:i.value.showTooltip&&U.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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.unref(B),content:A.value,isFullscreen:te.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:de,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&H.value>1?(l.openBlock(),l.createBlock(ft.Slicer,{ref_key:"slicerComponent",ref:ae,key:`slicer_${ee.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:H.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":o[1]||(o[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":o[2]||(o[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:H.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Te},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ve},[t.value.style.chart.legend.show&&C.value?(l.openBlock(),l.createBlock(dt.Legend,{legendSet:Ne.value,config:st.value,key:`legend_${d.value}`,onClickMarker:o[3]||(o[3]=({i:r})=>Ee(r))},{item:l.withCtx(({legend:r,index:y})=>[l.createElementVNode("div",{onClick:b=>r.segregate(),style:l.normalizeStyle(`opacity:${I.value.includes(y)?.5:1}`)},l.toDisplayString(r.name),13,Tt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:Ne.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",Bt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(we)||l.unref(Se)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:h,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(yt.default,{key:4,hideDetails:"",config:{open:i.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:l.withCtx(()=>[(l.openBlock(),l.createBlock(pt.DataTable,{key:`table_${s.value}`,colNames:pe.value.colNames,head:pe.value.head,body:pe.value.body,config:pe.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[4]||(o[4]=r=>i.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,It)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&L.value.length?(l.openBlock(),l.createBlock(Mt,{key:5,parent:Z.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:ge.value,onClose:Le},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,Pt))}},Nt=Xe._export_sfc(Et,[["__scopeId","data-v-9fd65fd2"]]);exports.default=Nt;
|