vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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.
Files changed (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,2980 +0,0 @@
1
- import { defineAsyncComponent as Fe, useSlots as It, getCurrentInstance as Tt, ref as _, computed as A, onMounted as ea, toRefs as Ot, onBeforeUnmount as Fa, watch as Cl, nextTick as Se, createElementBlock as r, openBlock as u, normalizeStyle as z, normalizeClass as Ke, createBlock as Ie, createCommentVNode as d, createVNode as ml, unref as c, createSlots as Nt, withCtx as se, renderSlot as U, normalizeProps as Qe, guardReactiveProps as je, createElementVNode as g, Fragment as h, renderList as m, toDisplayString as j, mergeProps as la, withDirectives as Vt, vModelCheckbox as Pt, createTextVNode as Ht } from "vue";
2
- import { u as Rt, c as aa, e as ta, A as Bt, a5 as Ee, b as Yt, D as yl, ab as el, d as Ft, p as Et, ac as Il, ad as Wt, v as T, ae as Ea, V as Wa, af as Ga, U as Xa, ag as Gt, ah as Xt, ai as Da, x as Dt, y as Ut, _ as Ua, R as Te, i as ne, f as me, aa as H, w as ll, s as $e, a8 as W, L as qt, F as We, aj as Tl, I as Zt, ak as Ge, C as ul, t as Jt, a as Kt, o as qa, q as Qt, r as jt, E as il } from "./index-Cg-RjxqH.js";
3
- import { u as oa } from "./useNestedProp-C_G5E08Y.js";
4
- import { u as eo } from "./useTimeLabels-Mrr0jrpL.js";
5
- import { S as lo } from "./Slicer-BD8Z8VCW.js";
6
- import ao from "./Title-B7Xb3YuE.js";
7
- import { _ as Ol } from "./Shape-C2qH26wh.js";
8
- import to from "./img-D72yZNUg.js";
9
- import { u as oo } from "./usePrinter-BUzmyQf9.js";
10
- import { u as so, B as uo } from "./useLoading-Bt5Doa8m.js";
11
- import { _ as io } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- const ro = ["id"], no = ["width", "viewBox", "aria-label"], co = ["x", "y", "width", "height"], vo = { key: 1 }, ho = { class: "vue-ui-xy-grid" }, fo = ["stroke", "x1", "x2", "y1", "y2"], go = ["stroke", "x1", "x2", "y1", "y2"], xo = { key: 1 }, bo = ["x1", "x2", "y1", "y2", "stroke"], mo = ["x1", "x2", "y1", "y2", "stroke"], yo = ["x1", "x2", "y1", "y2", "stroke"], po = { key: 3 }, ko = ["x1", "x2", "y1", "y2", "stroke"], _o = { key: 4 }, wo = ["y1", "y2", "x1", "x2", "stroke"], So = ["id"], $o = ["stop-color"], Lo = ["stop-color"], Ao = ["stop-color"], Mo = ["id"], zo = ["stop-color"], Co = ["stop-color"], Io = ["stop-color"], To = ["id"], Oo = ["stop-color"], No = ["stop-color"], Vo = ["id"], Po = ["stop-color"], Ho = ["stop-color"], Ro = ["id"], Bo = ["stop-color"], Yo = ["stop-color"], Fo = ["x", "y", "height", "width", "fill"], Eo = ["x", "y", "width"], Wo = ["x", "y", "height", "width", "fill"], Go = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Xo = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Do = ["width", "x", "y"], Uo = { key: 0 }, qo = ["id"], Zo = ["fill"], Jo = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Ko = ["x", "y", "font-size", "fill"], Qo = ["stroke", "x1", "x2", "y1", "y2"], jo = { key: 2 }, es = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ls = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], as = {
13
- key: 4,
14
- ref: "scaleLabels"
15
- }, ts = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], os = ["fill", "font-size", "transform"], ss = ["x1", "x2", "y1", "y2", "stroke"], us = ["x", "y", "font-size", "fill"], is = ["x1", "x2", "y1", "y2", "stroke"], rs = ["x", "y", "font-size", "fill"], ns = ["width", "x", "y"], cs = { style: { width: "100%" } }, vs = { key: 0 }, ds = ["id"], hs = ["fill"], fs = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], gs = ["x", "y", "font-size", "fill"], xs = ["d", "stroke", "stroke-width", "stroke-dasharray"], bs = ["d", "stroke", "stroke-width", "stroke-dasharray"], ms = { key: 5 }, ys = { key: 0 }, ps = ["d", "fill"], ks = ["d", "fill"], _s = ["d", "fill"], ws = ["d", "fill"], Ss = ["d", "stroke", "stroke-width", "stroke-dasharray"], $s = ["d", "stroke", "stroke-width", "stroke-dasharray"], Ls = ["width", "x", "y"], As = { style: { width: "100%" } }, Ms = { key: 3 }, zs = ["id"], Cs = ["fill"], Is = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Ts = ["x", "y", "font-size", "fill"], Os = { key: 6 }, Ns = ["x", "y", "font-size", "fill"], Vs = ["x", "y", "font-size", "fill", "font-weight"], Ps = { key: 7 }, Hs = ["x", "y", "font-size", "fill"], Rs = { key: 8 }, Bs = ["x", "y"], Ys = ["innerHTML"], Fs = ["x", "y"], Es = ["innerHTML"], Ws = ["x1", "x2", "y1", "y2", "stroke"], Gs = { key: 9 }, Xs = ["x", "y", "font-size", "fill"], Ds = { key: 10 }, Us = ["x", "y"], qs = ["innerHTML"], Zs = ["x", "y"], Js = ["innerHTML"], Ks = ["x1", "x2", "y1", "y2", "stroke"], Qs = ["x", "y", "font-size", "fill", "innerHTML"], js = ["x", "y", "font-size", "fill", "innerHTML"], eu = ["x", "y", "font-size", "fill", "innerHTML"], lu = ["x", "y", "font-size", "fill", "innerHTML"], au = ["id"], tu = ["stop-color"], ou = ["stop-color"], su = ["x", "y", "width", "height", "fill", "onMouseenter"], uu = ["font-size", "fill", "transform"], iu = ["x", "y", "font-size", "fill"], ru = ["text-anchor", "font-size", "fill", "transform", "onClick"], nu = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], cu = { key: 13 }, vu = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], du = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], hu = ["y", "x", "width", "height", "fill"], fu = ["id", "x", "y", "font-size", "fill", "text-anchor"], gu = ["x", "y", "height", "width", "onMouseenter", "onClick"], xu = {
16
- key: 14,
17
- style: { "pointer-events": "none" }
18
- }, bu = ["x", "y"], mu = ["cx", "cy", "r", "fill"], yu = {
19
- key: 4,
20
- class: "vue-data-ui-watermark"
21
- }, pu = {
22
- class: "vue-ui-xy-tag-arrow",
23
- height: "20",
24
- viewBox: "0 0 10 20",
25
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
26
- }, ku = ["fill"], _u = ["innerHTML"], wu = {
27
- class: "vue-ui-xy-tag-arrow",
28
- height: "100%",
29
- viewBox: "0 0 10 20",
30
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
31
- }, Su = ["fill"], $u = ["innerHTML"], Lu = {
32
- class: "vue-ui-xy-tag-arrow",
33
- height: "20",
34
- viewBox: "0 0 10 20",
35
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
36
- }, Au = ["fill"], Mu = ["innerHTML"], zu = {
37
- class: "vue-ui-xy-tag-arrow",
38
- height: "100%",
39
- viewBox: "0 0 10 20",
40
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
41
- }, Cu = ["fill"], Iu = ["innerHTML"], Tu = ["onClick"], Ou = {
42
- key: 0,
43
- viewBox: "0 0 20 12",
44
- height: "14",
45
- width: "20"
46
- }, Nu = ["stroke", "fill"], Vu = {
47
- key: 1,
48
- viewBox: "0 0 40 40",
49
- height: "14",
50
- width: "14"
51
- }, Pu = ["fill"], Hu = ["fill"], Ru = {
52
- key: 2,
53
- viewBox: "0 0 12 12",
54
- height: "14",
55
- width: "14"
56
- }, Bu = {
57
- style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
58
- "data-dom-to-png-ignore": ""
59
- }, Yu = ["innerHTML"], Fu = {
60
- __name: "vue-ui-xy",
61
- props: {
62
- config: {
63
- type: Object,
64
- default() {
65
- return {};
66
- }
67
- },
68
- dataset: {
69
- type: Array,
70
- default() {
71
- return [];
72
- }
73
- }
74
- },
75
- emits: ["selectTimeLabel", "selectX", "selectLegend"],
76
- setup(Nl, { expose: Za, emit: Ja }) {
77
- const y = Nl, Ka = Fe(() => import("./DataTable-mQ6Wd-rR.js")), Qa = Fe(() => import("./Tooltip-BidRoM5E.js")), ja = Fe(() => import("./UserOptions-0tvMM8PF.js")), et = Fe(() => import("./BaseIcon-BCZfTCeM.js")), lt = Fe(() => import("./vue-ui-table-sparkline-BXMPUEpN.js")), at = Fe(() => import("./vue-ui-accordion-CRomxzaL.js")), tt = Fe(() => import("./PackageVersion-CeEYZfaH.js")), ot = Fe(() => import("./PenAndPaper-DhSxfUrQ.js")), Vl = Ja, sa = It(), st = Tt(), { vue_ui_xy: Pl } = Rt(), ge = _(null), rl = _(null), Le = _(null), al = _(null), nl = _(null), cl = _(null), ua = _(null), Hl = _(null), Rl = _(null), Bl = _(null), Xe = _(null), Yl = _(null), Fl = _(0), M = _(null), ia = _(!0), ue = _(600), Z = _(1e3), De = _("0 0 1000 600"), ut = _({ x: 0, y: 0 }), vl = _({ line: "line", bar: "bar", plot: "plot" }), pl = _(!1), tl = _(!1), ra = _(!1), k = _(null), Ue = _(null), ae = _([]), q = _(aa()), na = _(0), ca = _(0), va = _(0), dl = _(!0), El = _(0), O = _(null), da = _(!1), Wl = _(!0), kl = _(!0), ye = _(null), Oe = _({}), _l = _(null), ha = _(0), it = _(1), rt = A(() => ({
78
- height: ue.value,
79
- width: Z.value
80
- })), nt = y.config.downsample && y.config.downsample.threshold ? y.config.downsample.threshold : 500, f = _({
81
- dataLabels: { show: !0 },
82
- showTooltip: !0,
83
- showTable: !1,
84
- isStacked: !1,
85
- useIndividualScale: !1
86
- }), x = _({
87
- xAxis: 18,
88
- yAxis: 12,
89
- dataLabels: 20,
90
- plotLabels: 10
91
- }), Ae = _({ plot: 3, line: 3 });
92
- ea(() => {
93
- y.dataset.length && y.dataset.forEach((a, v) => {
94
- [null, void 0].includes(a.series) && ta({
95
- componentName: "VueUiXy",
96
- type: "datasetSerieAttribute",
97
- property: "series (number[])",
98
- index: v,
99
- debug: xl.value
100
- });
101
- });
102
- });
103
- function Gl() {
104
- if (!Object.keys(y.config || {}).length)
105
- return Pl;
106
- const a = oa({
107
- userConfig: y.config,
108
- defaultConfig: Pl
109
- });
110
- return y.config && ul(y.config, "chart.highlightArea") && (Array.isArray(y.config.chart.highlightArea) ? a.chart.highlightArea = y.config.chart.highlightArea : a.chart.highlightArea = [y.config.chart.highlightArea]), y.config && ul(y.config, "chart.grid.labels.yAxis.scaleMin") ? a.chart.grid.labels.yAxis.scaleMin = y.config.chart.grid.labels.yAxis.scaleMin : a.chart.grid.labels.yAxis.scaleMin = null, y.config && ul(y.config, "chart.grid.labels.yAxis.scaleMax") ? a.chart.grid.labels.yAxis.scaleMax = y.config.chart.grid.labels.yAxis.scaleMax : a.chart.grid.labels.yAxis.scaleMax = null, y.config && ul(y.config, "chart.zoom.startIndex") ? a.chart.zoom.startIndex = y.config.chart.zoom.startIndex : a.chart.zoom.startIndex = null, y.config && ul(y.config, "chart.zoom.endIndex") ? a.chart.zoom.endIndex = y.config.chart.zoom.endIndex : a.chart.zoom.endIndex = null, y.config && ul(y.config, "chart.grid.labels.yAxis.groupColor") ? a.chart.grid.labels.yAxis.groupColor = y.config.chart.grid.labels.yAxis.groupColor : a.chart.grid.labels.yAxis.groupColor = null, y.config && y.config.chart.annotations && Array.isArray(y.config.chart.annotations) && y.config.chart.annotations.length ? a.chart.annotations = y.config.chart.annotations.map((v) => oa({
111
- defaultConfig: Pl.chart.annotations[0],
112
- userConfig: v
113
- })) : a.chart.annotations = [], y.config && y.config.autoSize && (y.config && y.config.debug && (y.config.chart.padding.top && console.warn("Vue Data UI - VueUiXy - autoSize mode ignores chart.padding.top, set a 0 value to remove this warning"), y.config.chart.padding.right && console.warn("Vue Data UI - VueUiXy - autoSize mode ignores chart.padding.right, set a 0 value to remove this warning"), y.config.chart.padding.bottom && console.warn("Vue Data UI - VueUiXy - autoSize mode ignores chart.padding.bottom, set a 0 value to remove this warning"), y.config.chart.padding.left && console.warn("Vue Data UI - VueUiXy - autoSize mode ignores chart.padding.left, set a 0 value to remove this warning")), a.chart.padding = {
114
- top: 0,
115
- right: 0,
116
- bottom: 0,
117
- left: 0
118
- }), a.theme ? {
119
- ...oa({
120
- userConfig: Kt.vue_ui_xy[a.theme] || y.config,
121
- defaultConfig: a
122
- }),
123
- customPalette: Jt[a.theme] || y.palette
124
- } : a;
125
- }
126
- const Xl = A({
127
- get() {
128
- return !!y.dataset && y.dataset.length;
129
- },
130
- set(a) {
131
- return a;
132
- }
133
- }), e = _(Gl()), { loading: Dl, FINAL_DATASET: Ne, manualLoading: wl } = so({
134
- ...Ot(y),
135
- FINAL_CONFIG: e,
136
- prepareConfig: Gl,
137
- callback: () => {
138
- Promise.resolve().then(async () => {
139
- await jl(), e.value.autoSize && (ol(), Kl());
140
- });
141
- },
142
- skeletonDataset: [
143
- {
144
- name: "",
145
- series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
146
- type: "line",
147
- smooth: !0,
148
- color: "#BABABA"
149
- },
150
- {
151
- name: "",
152
- series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
153
- type: "bar",
154
- color: "#CACACA"
155
- }
156
- ],
157
- skeletonConfig: Bt({
158
- defaultConfig: e.value,
159
- userConfig: {
160
- autoSize: !1,
161
- useCssAnimation: !1,
162
- showTable: !1,
163
- chart: {
164
- annotations: [],
165
- highlightArea: [],
166
- backgroundColor: "#999999",
167
- grid: {
168
- stroke: "#6A6A6A",
169
- labels: {
170
- show: !1,
171
- axis: {
172
- yLabel: "",
173
- xLabel: ""
174
- },
175
- xAxisLabels: { show: !1 },
176
- yAxis: {
177
- commonScaleSteps: 10,
178
- useNiceScale: !0,
179
- stacked: !1,
180
- scaleMin: 0,
181
- scaleMax: 134
182
- },
183
- zeroLine: { show: !0 }
184
- }
185
- },
186
- legend: { show: !1 },
187
- padding: {
188
- top: 12,
189
- bottom: 24,
190
- left: 24,
191
- right: 24
192
- },
193
- userOptions: { show: !1 },
194
- zoom: { show: !1 }
195
- },
196
- bar: {
197
- serieName: { show: !1 },
198
- labels: { show: !1 },
199
- border: {
200
- useSerieColor: !1,
201
- stroke: "#999999"
202
- }
203
- },
204
- line: {
205
- dot: {
206
- useSerieColor: !1,
207
- fill: "#8A8A8A"
208
- },
209
- labels: { show: !1 }
210
- }
211
- }
212
- })
213
- }), He = A({
214
- get: () => Math.max(...Ne.value.map((a) => Ee({ data: a.series, threshold: nt }).length)),
215
- set: (a) => a
216
- }), S = _({ start: 0, end: He.value }), { isPrinting: Ul, isImaging: fa, generatePdf: ga, generateImage: xa } = oo({
217
- elementId: `vue-ui-xy_${q.value}`,
218
- fileName: e.value.chart.title.text || "vue-ui-xy",
219
- options: e.value.chart.userOptions.print
220
- }), G = A(() => e.value.autoSize), ql = A(() => {
221
- const [a, v, l, s] = De.value.split(" ").map(Number);
222
- return { x: a, y: v, width: l, height: s };
223
- }), ba = A(() => Yt(e.value.customPalette)), Sl = A(() => e.value.chart.grid.labels.yAxis.scaleMax ? e.value.chart.grid.labels.yAxis.scaleMax : Math.max(...Ve.value.filter((a) => !ae.value.includes(a.id)).map((a) => Math.max(...a.series)))), Zl = A(() => {
224
- if (e.value.chart.grid.labels.yAxis.scaleMin !== null)
225
- return e.value.chart.grid.labels.yAxis.scaleMin;
226
- const a = Math.min(...Ve.value.filter((v) => !ae.value.includes(v.id)).map((v) => Math.min(...v.series)));
227
- return a > 0 ? 0 : a;
228
- }), pe = A(() => e.value.chart.grid.labels.yAxis.useNiceScale ? yl(Zl.value, Sl.value < 0 ? 0 : Sl.value, e.value.chart.grid.labels.yAxis.commonScaleSteps) : el(Zl.value, Sl.value < 0 ? 0 : Sl.value, e.value.chart.grid.labels.yAxis.commonScaleSteps)), hl = A(() => [null, void 0].includes(e.value.chart.grid.labels.yAxis.scaleMin) ? pe.value.min >= 0 ? 0 : Math.abs(pe.value.min) : -pe.value.min), Ve = A(() => ia.value ? Ne.value.map((a, v) => {
229
- const l = Ee({
230
- data: a.series,
231
- threshold: e.value.downsample.threshold
232
- }), s = `uniqueId_${v}`;
233
- return {
234
- ...a,
235
- slotAbsoluteIndex: v,
236
- series: l.map((t) => Il(t) ? t : null).slice(S.value.start, S.value.end),
237
- color: Ft(a.color ? a.color : ba.value[v] ? ba.value[v] : Et[v]),
238
- id: s,
239
- scaleLabel: a.scaleLabel || s
240
- };
241
- }) : Ne.value), Me = A(() => Ve.value.map((a, v) => ({
242
- absoluteIndex: v,
243
- ...a,
244
- series: a.series.map((l) => l + hl.value),
245
- absoluteValues: a.series,
246
- segregate: () => Ma(a),
247
- isSegregated: ae.value.includes(a.id)
248
- }))), ke = A(() => Ve.value.map((a, v) => ({
249
- ...a,
250
- series: a.series.map((l) => l + hl.value),
251
- absoluteValues: a.series
252
- })).filter((a) => !ae.value.includes(a.id))), i = A(() => {
253
- function a(s) {
254
- const t = /* @__PURE__ */ new Set();
255
- return s.forEach((n) => {
256
- const o = n.scaleLabel || "__noScaleLabel__";
257
- t.add(o);
258
- }), t.size;
259
- }
260
- const v = a(Me.value.filter((s) => !ae.value.includes(s.id))), l = f.value.useIndividualScale && e.value.chart.grid.labels.show ? v * (f.value.isStacked ? 0 : e.value.chart.grid.labels.yAxis.labelWidth) : 0;
261
- return {
262
- top: G.value ? 0 : e.value.chart.padding.top,
263
- right: G.value ? Z.value : Z.value - e.value.chart.padding.right,
264
- bottom: G.value ? ue.value : ue.value - e.value.chart.padding.bottom,
265
- left: G.value ? l : e.value.chart.padding.left + l,
266
- height: G.value ? ue.value : ue.value - (e.value.chart.padding.top + e.value.chart.padding.bottom),
267
- width: G.value ? Z.value - l : Z.value - (e.value.chart.padding.right + e.value.chart.padding.left + l)
268
- };
269
- });
270
- function ma() {
271
- return !!st?.vnode.props?.onSelectTimeLabel;
272
- }
273
- function ct(a, v, l) {
274
- if (!_l.value) {
275
- const s = document.createElement("canvas");
276
- _l.value = s.getContext("2d");
277
- }
278
- return _l.value.font = `normal ${a}px sans-serif`, _l.value;
279
- }
280
- function ya() {
281
- const a = ge.value.querySelectorAll(".vue-ui-xy-tag");
282
- a.length && Array.from(a).forEach((v) => v.style.opacity = "0");
283
- }
284
- function $l(a, v, l, s, t) {
285
- l && (Oe.value[`${a}_${v}_${s}_${t}`] = l);
286
- }
287
- function pa(a = !1) {
288
- da.value && (kl.value = a);
289
- }
290
- function Jl() {
291
- pl.value = !pl.value;
292
- }
293
- const de = A(() => {
294
- const a = Math.max(...Ne.value.map((v) => Ee({ data: v.series, threshold: e.value.downsample.threshold }).length));
295
- return eo({
296
- values: e.value.chart.grid.labels.xAxisLabels.values,
297
- maxDatapoints: a,
298
- formatter: e.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
299
- start: S.value.start,
300
- end: S.value.end
301
- });
302
- });
303
- function ka(a, v) {
304
- const l = ke.value.map((s) => ({
305
- shape: s.shape || null,
306
- name: s.name,
307
- color: s.color,
308
- type: s.type,
309
- value: s.absoluteValues.find((t, n) => n === v),
310
- comments: s.comments || [],
311
- prefix: s.prefix || e.value.chart.labels.prefix,
312
- suffix: s.suffix || e.value.chart.labels.suffix
313
- }));
314
- Vl("selectTimeLabel", {
315
- datapoint: l,
316
- absoluteIndex: a.absoluteIndex,
317
- label: a.text
318
- });
319
- }
320
- const b = A(() => S.value.end - S.value.start);
321
- async function vt() {
322
- if (!Hl.value) return;
323
- await Se();
324
- let a = i.value.bottom;
325
- Bl.value && (a += Bl.value.getBBox().height), Hl.value.setAttribute("y", a + x.value.xAxis * 1.3 + e.value.chart.grid.labels.axis.xLabelOffsetY);
326
- }
327
- async function dt() {
328
- Rl.value && (await Se(), Rl.value.setAttribute("transform", `translate(${ql.value.x + e.value.chart.grid.labels.axis.yLabelOffsetX + x.value.yAxis}, ${i.value.top + i.value.height / 2}) rotate(-90)`));
329
- }
330
- async function ol() {
331
- await Se();
332
- const a = ua.value;
333
- if (!a) return;
334
- De.value = `0 0 ${e.value.chart.width} ${e.value.chart.height}`, vt(), await Se(), dt();
335
- const v = a.getBBox();
336
- De.value = `${v.x} ${v.y - x.value.plotLabels} ${v.width + e.value.chart.padding.left} ${v.height + x.value.plotLabels + e.value.chart.padding.top}`, await Se(), ge.value.classList.remove("no-transition");
337
- }
338
- function Kl() {
339
- if (e.value.responsive && ge.value) {
340
- const a = ge.value.parentNode;
341
- if (a) {
342
- const v = a.getBoundingClientRect().width;
343
- a.style.width = v - 0.1 + "px", setTimeout(() => {
344
- a.style.width = v + "px";
345
- }, 0);
346
- }
347
- }
348
- }
349
- function ht(a) {
350
- O.value = a;
351
- }
352
- function _a() {
353
- f.value.isStacked = !f.value.isStacked, f.value.isStacked ? f.value.useIndividualScale = !0 : f.value.useIndividualScale = e.value.chart.grid.labels.yAxis.useIndividualScale;
354
- }
355
- function Ql(a) {
356
- xl.value && a.autoScaling && (e.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), e.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${a.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
357
- }
358
- function ft(a, v) {
359
- let l = Array(a).fill(0);
360
- for (let s = 0; s < v.length && s < a; s += 1)
361
- l[s] = v[s];
362
- return l;
363
- }
364
- function gt(a) {
365
- const v = Math.max(...Ne.value.map((l) => Ee({ data: l.series, threshold: e.value.downsample.threshold }).length));
366
- return a > v ? v : a < 0 || e.value.chart.zoom.startIndex !== null && a < e.value.chart.zoom.startIndex ? e.value.chart.zoom.startIndex !== null ? e.value.chart.zoom.startIndex + 1 : 1 : a;
367
- }
368
- async function jl() {
369
- (e.value.chart.zoom.startIndex !== null || e.value.chart.zoom.endIndex !== null) && Le.value ? (e.value.chart.zoom.startIndex !== null && (await Se(), await Se(), Le.value.setStartValue(e.value.chart.zoom.startIndex)), e.value.chart.zoom.endIndex !== null && (await Se(), await Se(), Le.value.setEndValue(gt(e.value.chart.zoom.endIndex + 1)))) : (S.value = {
370
- start: 0,
371
- end: Math.max(...Ne.value.map((a) => Ee({ data: a.series, threshold: e.value.downsample.threshold }).length))
372
- }, Fl.value += 1);
373
- }
374
- function xt() {
375
- jl();
376
- }
377
- function xe(a) {
378
- return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(a);
379
- }
380
- const wa = A(() => pe.value.max + hl.value);
381
- function qe(a) {
382
- return a / (xe(wa.value) ? wa.value : 1);
383
- }
384
- const ie = A(() => isNaN(qe(hl.value)) ? i.value.bottom : i.value.bottom - i.value.height * qe(hl.value));
385
- function Sa(a) {
386
- const v = ![null, void 0].includes(e.value.chart.grid.labels.yAxis.scaleMin) && e.value.chart.grid.labels.yAxis.scaleMin > 0 && Zl.value >= 0 ? i.value.bottom : ie.value;
387
- return a.value >= 0 ? T(v - a.y <= 0 ? 1e-5 : v - a.y) : T(a.y - ie.value <= 0 ? 1e-5 : a.y - ie.value);
388
- }
389
- function $a(a) {
390
- return a.value >= 0 ? T(a.zeroPosition - a.y <= 0 ? 1e-5 : a.zeroPosition - a.y) : T(a.y - a.zeroPosition <= 0 ? 1e-5 : a.zeroPosition - a.y);
391
- }
392
- const J = A(() => ({
393
- bar: i.value.width / b.value / Ve.value.filter((a) => a.type === "bar").filter((a) => !ae.value.includes(a.id)).length,
394
- plot: i.value.width / b.value,
395
- line: i.value.width / b.value
396
- }));
397
- function _e() {
398
- return f.value.useIndividualScale && f.value.isStacked ? J.value.line - i.value.width / b.value * 0.1 : J.value.bar;
399
- }
400
- function Ll(a) {
401
- return f.value.useIndividualScale && f.value.isStacked ? a.x + i.value.width / b.value * 0.05 : a.x + J.value.bar / 2;
402
- }
403
- function La(a) {
404
- return a.value >= 0 ? a.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(ie.value) ? i.bottom.value : ie.value;
405
- }
406
- function Aa(a) {
407
- return a.value >= 0 ? a.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(a.zeroPosition) ? 0 : a.zeroPosition;
408
- }
409
- function bt(a) {
410
- Vl(
411
- "selectX",
412
- {
413
- dataset: ke.value.map((v) => ({
414
- name: v.name,
415
- value: [null, void 0, NaN].includes(v.absoluteValues[a]) ? null : v.absoluteValues[a],
416
- color: v.color,
417
- type: v.type
418
- })),
419
- index: a,
420
- indexLabel: e.value.chart.grid.labels.xAxisLabels.values[a]
421
- }
422
- );
423
- }
424
- function mt() {
425
- return Me.value.map((a) => ({
426
- values: a.absoluteValues,
427
- color: a.color,
428
- name: a.name,
429
- type: a.type
430
- }));
431
- }
432
- async function yt({ scale: a = 2 } = {}) {
433
- if (!ge.value) return;
434
- const { width: v, height: l } = ge.value.getBoundingClientRect(), s = v / l, { imageUri: t, base64: n } = await to({ domElement: ge.value, base64: !0, img: !0, scale: a });
435
- return {
436
- imageUri: t,
437
- base64: n,
438
- title: e.value.chart.title.text,
439
- width: v,
440
- height: l,
441
- aspectRatio: s
442
- };
443
- }
444
- function Ma(a) {
445
- if (ae.value.includes(a.id))
446
- ae.value = ae.value.filter((v) => v !== a.id);
447
- else {
448
- if (ae.value.length + 1 === Ve.value.length) return;
449
- ae.value.push(a.id);
450
- }
451
- Vl("selectLegend", ke.value.map((v) => ({
452
- name: v.name,
453
- values: v.absoluteValues,
454
- color: v.color,
455
- type: v.type
456
- }))), El.value += 1;
457
- }
458
- const pt = A(() => {
459
- const a = e.value.chart.title.text || "Chart visualization", v = e.value.chart.title.subtitle.text || "";
460
- return `${a}. ${v}`;
461
- }), za = A(() => ({
462
- linePlot: b.value > e.value.line.dot.hideAboveMaxSerieLength
463
- })), kt = A(() => e.value.chart.userOptions.show && (!e.value.chart.title.show || !e.value.chart.title.text)), _t = A(() => {
464
- if (Array.isArray(e.value.chart.highlightArea))
465
- return e.value.chart.highlightArea.map((v) => {
466
- const l = Math.min(v.to, He.value - 1);
467
- return {
468
- ...v,
469
- span: v.from === l ? 1 : l < v.from ? 0 : l - v.from + 1
470
- };
471
- });
472
- const a = {
473
- ...e.value.chart.highlightArea,
474
- to: Math.min(e.value.chart.highlightArea.to, He.value - 1)
475
- };
476
- return [{ ...a, span: a.from === a.to ? 1 : a.to < a.from ? 0 : a.to - a.from + 1 }];
477
- }), wt = A(() => ia.value ? Ne.value.map((a, v) => ({
478
- ...a,
479
- series: Ee({
480
- data: a.series,
481
- threshold: e.value.downsample.threshold
482
- }),
483
- id: `uniqueId_${v}`
484
- })) : Ne.value), St = A(() => ke.value.map((a) => {
485
- const v = a.absoluteValues.map((l) => [void 0, null].includes(l) ? 0 : l);
486
- return {
487
- id: a.id,
488
- name: a.name,
489
- color: a.color,
490
- values: ft(b.value, v)
491
- };
492
- })), $t = A(() => ({
493
- responsiveBreakpoint: e.value.table.responsiveBreakpoint,
494
- roundingValues: e.value.table.rounding,
495
- showAverage: !1,
496
- showMedian: !1,
497
- showTotal: !1,
498
- fontFamily: e.value.chart.fontFamily,
499
- prefix: e.value.chart.labels.prefix,
500
- suffix: e.value.chart.labels.suffix,
501
- colNames: de.value.map((a) => a.text),
502
- thead: {
503
- backgroundColor: e.value.table.th.backgroundColor,
504
- color: e.value.table.th.color,
505
- outline: e.value.table.th.outline
506
- },
507
- tbody: {
508
- backgroundColor: e.value.table.td.backgroundColor,
509
- color: e.value.table.td.color,
510
- outline: e.value.table.td.outline
511
- },
512
- userOptions: {
513
- show: !1
514
- }
515
- })), B = A(() => e.value.chart.grid.position === "middle" ? 0 : i.value.width / b.value / 2), Ze = A(() => Wt(Me.value.filter((a) => !ae.value.includes(a.id)))), p = A(() => {
516
- const a = Object.groupBy(Ze.value, (l) => l.scaleLabel), v = {};
517
- for (const [l, s] of Object.entries(a)) {
518
- const t = s.flatMap((n) => n.absoluteValues);
519
- v[l] = {
520
- min: Math.min(...t) || 0,
521
- max: Math.max(...t) || 1,
522
- groupId: `scale_group_${aa()}`
523
- };
524
- }
525
- return v;
526
- }), Lt = A(() => {
527
- const a = Ve.value.filter((v) => v.type === "bar").filter((v) => !ae.value.includes(v.id)).length;
528
- return i.value.width / b.value / a - Pe.value * a;
529
- }), Pe = A(() => J.value.line * e.value.bar.periodGap), At = A(() => {
530
- if (!e.value.chart.zoom.minimap.show) return [];
531
- const a = wt.value.filter((t) => !ae.value.includes(t.id)), v = Math.max(...a.map((t) => t.series.length)), l = [];
532
- for (let t = 0; t < v; t += 1)
533
- l.push(a.map((n) => n.series[t] || 0).reduce((n, o) => (n || 0) + (o || 0), 0));
534
- const s = Math.min(...l);
535
- return l.map((t) => t + (s < 0 ? Math.abs(s) : 0));
536
- }), fl = A(() => ke.value.map((a) => ({
537
- slotAbsoluteIndex: a.slotAbsoluteIndex,
538
- shape: a.shape || null,
539
- name: a.name,
540
- color: a.color,
541
- type: a.type,
542
- value: a.absoluteValues.find((v, l) => l === k.value),
543
- comments: a.comments || [],
544
- prefix: a.prefix || e.value.chart.labels.prefix,
545
- suffix: a.suffix || e.value.chart.labels.suffix
546
- }))), Ca = A(() => pe.value.ticks.map((a) => ({
547
- y: a >= 0 ? ie.value - i.value.height * qe(a) : ie.value + i.value.height * qe(Math.abs(a)),
548
- value: a,
549
- prefix: e.value.chart.labels.prefix,
550
- suffix: e.value.chart.labels.suffix
551
- }))), Ia = A(() => {
552
- const a = e.value.chart.annotations;
553
- if (!a || !Array.isArray(a) || a.every(($) => !$.show)) return [];
554
- const v = a.filter(
555
- ($) => $.show && ($.yAxis.yTop != null || $.yAxis.yBottom != null)
556
- );
557
- if (!v.length) return [];
558
- const { left: l, right: s } = i.value, t = ie.value, n = i.value.height, o = pe.value.min, F = pe.value.max - o, ee = ($) => {
559
- const I = ($ - 0) / F;
560
- return t - I * n;
561
- };
562
- return v.map(($) => {
563
- const { yAxis: { yTop: I, yBottom: X, label: w } } = $, R = I != null && X != null && I !== X, L = I == null ? null : ee(I), te = X == null ? null : ee(X), re = ct(w.fontSize);
564
- re.font = `${w.fontSize}px sans-serif`;
565
- const D = re.measureText(w.text).width, be = w.fontSize, Ce = (w.position === "start" ? l + w.padding.left : s - w.padding.right) + w.offsetX, he = (L != null && te != null ? Math.min(L, te) : L ?? te) - w.fontSize / 3 + w.offsetY - w.padding.top;
566
- let V;
567
- w.textAnchor === "middle" ? V = Ce - D / 2 - w.padding.left : w.textAnchor === "end" ? V = Ce - D - w.padding.right : V = Ce - w.padding.left;
568
- const P = he - be * 0.75 - w.padding.top;
569
- return {
570
- show: ![L, te, P].includes(NaN),
571
- id: `annotation_y_${aa()}`,
572
- hasArea: R,
573
- areaHeight: R ? Math.abs(L - te) : 0,
574
- yTop: L,
575
- yBottom: te,
576
- config: $.yAxis,
577
- x1: l,
578
- x2: s,
579
- _text: { x: Ce, y: he },
580
- _box: {
581
- x: V,
582
- y: P,
583
- width: D + w.padding.left + w.padding.right,
584
- height: be + w.padding.top + w.padding.bottom,
585
- fill: w.backgroundColor,
586
- stroke: w.border.stroke,
587
- rx: w.border.rx,
588
- ry: w.border.ry,
589
- strokeWidth: w.border.strokeWidth
590
- }
591
- };
592
- });
593
- }), Re = A(() => {
594
- const a = Ze.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), v = a.length, l = e.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? l * (v - 1) : 0, n = i.value.height - t;
595
- return a.filter((o) => o.type === "bar").map((o, Y) => {
596
- Ql(o);
597
- const F = p.value[o.scaleLabel].min, ee = p.value[o.scaleLabel].max;
598
- o.absoluteValues.filter((N) => ![null, void 0].includes(N)).map((N) => (N - F) / (ee - F));
599
- const $ = {
600
- valueMin: F,
601
- valueMax: ee < 0 ? 0 : ee
602
- }, I = {
603
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
604
- min: o.scaleMin || Math.min(...o.absoluteValues.filter((N) => ![void 0, null].includes(N))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((N) => ![null, void 0].includes(N)))
605
- }, X = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, w = 1.0000001, R = e.value.chart.grid.labels.yAxis.useNiceScale ? yl(I.min, I.max === I.min ? I.max * w : I.max, X) : el(I.min, I.max === I.min ? I.max * w : I.max, X), L = e.value.chart.grid.labels.yAxis.useNiceScale ? yl($.valueMin, $.valueMax === $.valueMin ? $.valueMax * w : $.valueMax, X) : el($.valueMin, $.valueMax === $.valueMin ? $.valueMax * w : $.valueMax, X), te = R.min >= 0 ? 0 : Math.abs(R.min), re = 0, D = R.max + te, be = L.max + Math.abs(re), Ce = o.stackIndex, sl = v - 1 - Ce, he = s ? 1 - o.cumulatedStackRatio : 0, V = s ? n * he + l * sl : 0, P = s ? n * o.stackRatio : i.value.height, K = i.value.bottom - V - P * te / D, fe = i.value.bottom - V - P * re / be, ce = Me.value.filter((N) => N.type === "bar").filter((N) => !ae.value.includes(N.id)).length, bl = o.series.map((N, le) => {
606
- const Ye = f.value.useIndividualScale ? (o.absoluteValues[le] + te) / D : qe(N), Je = f.value.useIndividualScale && f.value.isStacked ? i.value.left + i.value.width / b.value * le : i.value.left + J.value.bar * Y + J.value.bar * le * ce - Lt.value / 2 - Y * Pe.value;
607
- return {
608
- yOffset: T(V),
609
- individualHeight: T(P),
610
- x: T(Je),
611
- y: i.value.bottom - V - P * Ye,
612
- value: o.absoluteValues[le],
613
- zeroPosition: T(K),
614
- individualMax: T(D),
615
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[le] || ""
616
- };
617
- }), ve = o.absoluteValues.map((N) => L.min >= 0 ? (N - Math.abs(L.min)) / (L.max - Math.abs(L.min)) : (N + Math.abs(L.min)) / (L.max + Math.abs(L.min))), Be = o.series.map((N, le) => {
618
- const Ye = f.value.useIndividualScale && f.value.isStacked ? i.value.left + i.value.width / b.value * le : i.value.left - J.value.bar / 2 + J.value.bar * Y + J.value.bar * le * Me.value.filter((Je) => Je.type === "bar").filter((Je) => !ae.value.includes(Je.id)).length;
619
- return {
620
- yOffset: T(V),
621
- individualHeight: T(P),
622
- x: T(Ye),
623
- y: T(i.value.bottom - T(V) - (T(P) * ve[le] || 0)),
624
- value: o.absoluteValues[le],
625
- zeroPosition: T(K),
626
- individualMax: T(D),
627
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[le] || ""
628
- };
629
- }), E = R.ticks.map((N) => ({
630
- y: N >= 0 ? K - P * (N / D) : K + P * Math.abs(N) / D,
631
- value: N,
632
- prefix: o.prefix || e.value.chart.labels.prefix,
633
- suffix: o.suffix || e.value.chart.labels.suffix,
634
- datapoint: o
635
- })), Q = L.ticks.map((N) => {
636
- const le = (N - L.min) / (L.max - L.min);
637
- return {
638
- y: N >= 0 ? fe - P * le : fe + P * le,
639
- value: N,
640
- prefix: o.prefix || e.value.chart.labels.prefix,
641
- suffix: o.suffix || e.value.chart.labels.suffix,
642
- datapoint: o
643
- };
644
- });
645
- return p.value[o.scaleLabel].name = o.name, p.value[o.scaleLabel].groupName = o.scaleLabel, p.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, p.value[o.scaleLabel].color = o.color, p.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Q : E, p.value[o.scaleLabel].zeroPosition = o.autoScaling ? fe : K, p.value[o.scaleLabel].individualMax = o.autoScaling ? be : D, p.value[o.scaleLabel].scaleLabel = o.scaleLabel, p.value[o.scaleLabel].id = o.id, p.value[o.scaleLabel].yOffset = V, p.value[o.scaleLabel].individualHeight = P, p.value[o.scaleLabel].autoScaleYLabels = Q, p.value[o.scaleLabel].unique = Ze.value.filter((N) => N.scaleLabel === o.scaleLabel).length === 1, {
646
- ...o,
647
- yOffset: V,
648
- autoScaleYLabels: Q,
649
- individualHeight: P,
650
- scaleYLabels: o.autoScaling ? Q : E,
651
- individualScale: o.autoScaling ? L : R,
652
- individualMax: o.autoScaling ? be : D,
653
- zeroPosition: o.autoScaling ? fe : K,
654
- plots: o.autoScaling ? Be : bl,
655
- groupId: p.value[o.scaleLabel].groupId
656
- };
657
- });
658
- }), we = A(() => {
659
- const a = Ze.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), v = a.length, l = e.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? l * (v - 1) : 0, n = i.value.height - t;
660
- return a.filter((o) => o.type === "line").map((o, Y) => {
661
- Ql(o);
662
- const F = p.value[o.scaleLabel].min, ee = p.value[o.scaleLabel].max;
663
- o.absoluteValues.filter((C) => ![null, void 0].includes(C)).map((C) => (C - F) / (ee - F));
664
- const $ = {
665
- valueMin: F,
666
- valueMax: ee
667
- }, I = {
668
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
669
- min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
670
- }, X = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, w = 1.0000001, R = e.value.chart.grid.labels.yAxis.useNiceScale ? yl(I.min, I.max === I.min ? I.max * w : I.max, X) : el(I.min, I.max === I.min ? I.max * w : I.max, X), L = e.value.chart.grid.labels.yAxis.useNiceScale ? yl($.valueMin, $.valueMax === $.valueMin ? $.valueMax * w : $.valueMax, X) : el($.valueMin, $.valueMax === $.valueMin ? $.valueMax * w : $.valueMax, X), te = R.min >= 0 ? 0 : Math.abs(R.min), re = 0, D = R.max + Math.abs(te), be = L.max + Math.abs(re), Ce = o.stackIndex, sl = v - 1 - Ce, he = s ? 1 - o.cumulatedStackRatio : 0, V = s ? n * he + l * sl : 0, P = s ? n * o.stackRatio : i.value.height, K = i.value.bottom - V - P * te / D, fe = i.value.bottom - V - P * re / be, ce = o.series.map((C, oe) => {
671
- const Ct = f.value.useIndividualScale ? (o.absoluteValues[oe] + Math.abs(te)) / D : qe(C);
672
- return {
673
- x: T(i.value.left + J.value.line / 2 + J.value.line * oe),
674
- y: T(i.value.bottom - V - P * Ct),
675
- value: o.absoluteValues[oe],
676
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[oe] || ""
677
- };
678
- }), bl = o.absoluteValues.map((C) => L.min >= 0 ? (C - Math.abs(L.min)) / (L.max - Math.abs(L.min)) : (C + Math.abs(L.min)) / (L.max + Math.abs(L.min))), ve = o.series.map((C, oe) => [void 0, null].includes(o.absoluteValues[oe]) ? {
679
- x: T(i.value.left + J.value.line / 2 + J.value.line * oe),
680
- y: K,
681
- value: o.absoluteValues[oe],
682
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[oe] || ""
683
- } : {
684
- x: T(i.value.left + J.value.line / 2 + J.value.line * oe),
685
- y: T(i.value.bottom - V - (P * bl[oe] || 0)),
686
- value: o.absoluteValues[oe],
687
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[oe] || ""
688
- }), Be = e.value.line.cutNullValues ? Ea(ce) : Wa(ce.filter((C) => C.value !== null)), E = e.value.line.cutNullValues ? Ea(ve) : Wa(ve.filter((C) => C.value !== null)), Q = e.value.line.cutNullValues ? Ga(ce) : Xa(ce.filter((C) => C.value !== null)), N = e.value.line.cutNullValues ? Ga(ve) : Xa(ve.filter((C) => C.value !== null)), le = R.ticks.map((C) => ({
689
- y: C >= 0 ? K - P * (C / D) : K + P * Math.abs(C) / D,
690
- value: C,
691
- prefix: o.prefix || e.value.chart.labels.prefix,
692
- suffix: o.suffix || e.value.chart.labels.suffix,
693
- datapoint: o
694
- })), Ye = L.ticks.map((C) => {
695
- const oe = (C - L.min) / (L.max - L.min);
696
- return {
697
- y: C >= 0 ? fe - P * oe : fe + P * oe,
698
- value: C,
699
- prefix: o.prefix || e.value.chart.labels.prefix,
700
- suffix: o.suffix || e.value.chart.labels.suffix,
701
- datapoint: o
702
- };
703
- });
704
- p.value[o.scaleLabel].name = o.name, p.value[o.scaleLabel].groupName = o.scaleLabel, p.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, p.value[o.scaleLabel].color = o.color, p.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Ye : le, p.value[o.scaleLabel].zeroPosition = o.autoScaling ? fe : K, p.value[o.scaleLabel].individualMax = o.autoScaling ? be : D, p.value[o.scaleLabel].scaleLabel = o.scaleLabel, p.value[o.scaleLabel].id = o.id, p.value[o.scaleLabel].yOffset = V, p.value[o.scaleLabel].individualHeight = P, p.value[o.scaleLabel].autoScaleYLabels = Ye, p.value[o.scaleLabel].unique = Ze.value.filter((C) => C.scaleLabel === o.scaleLabel).length === 1;
705
- const Je = f.value.useIndividualScale ? o.autoScaling ? fe : K : ie.value, zl = Math.max(Math.max(o.autoScaling ? fe : le.at(-1).y || 0, i.value.top), Je);
706
- return {
707
- ...o,
708
- yOffset: V,
709
- autoScaleYLabels: Ye,
710
- individualHeight: P,
711
- scaleYLabels: o.autoScaling ? Ye : le,
712
- individualScale: o.autoScaling ? L : R,
713
- individualMax: o.autoScaling ? be : D,
714
- zeroPosition: o.autoScaling ? fe : K,
715
- curve: o.autoScaling ? E : Be,
716
- plots: o.autoScaling ? ve : ce,
717
- area: o.useArea ? f.value.useIndividualScale ? e.value.line.cutNullValues ? Xt(
718
- o.autoScaling ? ve : ce,
719
- zl
720
- ) : Da(
721
- o.autoScaling ? ve.filter((C) => C.value !== null) : ce.filter((C) => C.value !== null),
722
- zl
723
- ) : Da(ce.filter((C) => C.value !== null), zl) : "",
724
- curveAreas: o.useArea ? Gt(
725
- o.autoScaling ? e.value.line.cutNullValues ? ve : ve.filter((C) => C.value !== null) : e.value.line.cutNullValues ? ce : ce.filter((C) => C.value !== null),
726
- zl,
727
- e.value.line.cutNullValues
728
- ) : [],
729
- straight: o.autoScaling ? N : Q,
730
- groupId: p.value[o.scaleLabel].groupId
731
- };
732
- });
733
- }), ze = A(() => {
734
- const a = Ze.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), v = a.length, l = e.value.chart.grid.labels.yAxis.gap, s = f.value.isStacked, t = s ? l * (v - 1) : 0, n = i.value.height - t;
735
- return a.filter((o) => o.type === "plot").map((o) => {
736
- Ql(o);
737
- const Y = p.value[o.scaleLabel].min, F = p.value[o.scaleLabel].max;
738
- o.absoluteValues.filter((E) => ![null, void 0].includes(E)).map((E) => (E - Y) / (F - Y));
739
- const ee = {
740
- valueMin: Y,
741
- valueMax: F
742
- }, $ = {
743
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
744
- min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
745
- }, I = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, X = 1.0000001, w = el($.min, $.max === $.min ? $.max * X : $.max, I), R = el(ee.valueMin, ee.valueMax === ee.valueMin ? ee.valueMax * X : ee.valueMax, I), L = w.min >= 0 ? 0 : Math.abs(w.min), te = 0, re = w.max + L, D = R.max + Math.abs(te), be = o.stackIndex, Ce = v - 1 - be, sl = s ? 1 - o.cumulatedStackRatio : 0, he = s ? n * sl + l * Ce : 0, V = s ? n * o.stackRatio : i.value.height, P = i.value.bottom - he - V * L / re, K = i.value.bottom - he - V * te / D, fe = o.series.map((E, Q) => {
746
- const N = f.value.useIndividualScale ? (o.absoluteValues[Q] + Math.abs(L)) / re : qe(E);
747
- return {
748
- x: T(i.value.left + J.value.plot / 2 + J.value.plot * Q),
749
- y: T(i.value.bottom - he - V * N),
750
- value: o.absoluteValues[Q],
751
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[Q] || ""
752
- };
753
- }), ce = o.absoluteValues.map((E) => R.min >= 0 ? (E - Math.abs(R.min)) / (R.max - Math.abs(R.min)) : (E + Math.abs(R.min)) / (R.max + Math.abs(R.min))), bl = o.series.map((E, Q) => ({
754
- x: T(i.value.left + J.value.plot / 2 + J.value.plot * Q),
755
- y: T(i.value.bottom - he - (V * ce[Q] || 0)),
756
- value: o.absoluteValues[Q],
757
- comment: o.comments && o.comments.slice(S.value.start, S.value.end)[Q] || ""
758
- })), ve = w.ticks.map((E) => ({
759
- y: E >= 0 ? P - V * (E / re) : P + V * Math.abs(E) / re,
760
- value: E,
761
- prefix: o.prefix || e.value.chart.labels.prefix,
762
- suffix: o.suffix || e.value.chart.labels.suffix,
763
- datapoint: o
764
- })), Be = R.ticks.map((E) => {
765
- const Q = (E - R.min) / (R.max - R.min);
766
- return {
767
- y: E >= 0 ? K - V * Q : K + V * Q,
768
- value: E,
769
- prefix: o.prefix || e.value.chart.labels.prefix,
770
- suffix: o.suffix || e.value.chart.labels.suffix,
771
- datapoint: o
772
- };
773
- });
774
- return p.value[o.scaleLabel].name = o.name, p.value[o.scaleLabel].groupName = o.scaleLabel, p.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, p.value[o.scaleLabel].color = o.color, p.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Be : ve, p.value[o.scaleLabel].zeroPosition = o.autoScaling ? K : P, p.value[o.scaleLabel].individualMax = o.autoScaling ? D : re, p.value[o.scaleLabel].scaleLabel = o.scaleLabel, p.value[o.scaleLabel].id = o.id, p.value[o.scaleLabel].yOffset = he, p.value[o.scaleLabel].individualHeight = V, p.value[o.scaleLabel].autoScaleYLabels = Be, p.value[o.scaleLabel].unique = Ze.value.filter((E) => E.scaleLabel === o.scaleLabel).length === 1, {
775
- ...o,
776
- yOffset: he,
777
- autoScaleYLabels: Be,
778
- individualHeight: V,
779
- scaleYLabels: o.autoScaling ? Be : ve,
780
- individualScale: o.autoScaling ? R : w,
781
- individualMax: o.autoScaling ? D : re,
782
- zeroPosition: o.autoScaling ? K : P,
783
- plots: o.autoScaling ? bl : fe,
784
- groupId: p.value[o.scaleLabel].groupId
785
- };
786
- });
787
- }), gl = A(() => {
788
- const a = we.value.map((n) => ({
789
- name: n.name,
790
- color: n.color,
791
- scale: n.individualScale,
792
- scaleYLabels: n.scaleYLabels,
793
- zero: n.zeroPosition,
794
- max: n.individualMax,
795
- scaleLabel: n.scaleLabel || "",
796
- id: n.id,
797
- yOffset: n.yOffset || 0,
798
- individualHeight: n.individualHeight || i.value.height,
799
- autoScaleYLabels: n.autoScaleYLabels
800
- })), v = Re.value.map((n) => ({
801
- name: n.name,
802
- color: n.color,
803
- scale: n.individualScale,
804
- scaleYLabels: n.scaleYLabels,
805
- zero: n.zeroPosition,
806
- max: n.individualMax,
807
- scaleLabel: n.scaleLabel || "",
808
- id: n.id,
809
- yOffset: n.yOffset || 0,
810
- individualHeight: n.individualHeight || i.value.height
811
- })), l = ze.value.map((n) => ({
812
- name: n.name,
813
- color: n.color,
814
- scale: n.individualScale,
815
- scaleYLabels: n.scaleYLabels,
816
- // FIX
817
- zero: n.zeroPosition,
818
- max: n.individualMax,
819
- scaleLabel: n.scaleLabel || "",
820
- id: n.id,
821
- yOffset: n.yOffset || 0,
822
- individualHeight: n.individualHeight || i.value.height
823
- })), s = f.value.useIndividualScale && !f.value.isStacked ? Object.values(p.value) : [...a, ...v, ...l], t = s.flatMap((n) => n).length;
824
- return s.flatMap((n, o) => {
825
- let Y = 0;
826
- return G.value ? Y = f.value.isStacked ? i.value.left : i.value.left - o * (e.value.chart.grid.labels.yAxis.labelWidth + x.value.dataLabels * 2) : Y = f.value.isStacked ? i.value.left : i.value.left / t * (o + 1), {
827
- unique: n.unique,
828
- id: n.id,
829
- groupId: n.groupId,
830
- scaleLabel: n.scaleLabel,
831
- name: f.value.useIndividualScale && !f.value.isStacked ? n.unique ? n.name : n.groupName : n.name,
832
- color: f.value.useIndividualScale && !f.value.isStacked ? n.unique ? n.color : n.groupColor : n.color,
833
- scale: n.scale,
834
- yOffset: n.yOffset,
835
- individualHeight: n.individualHeight,
836
- x: Y,
837
- yLabels: n.scaleYLabels || n.scale.ticks.map((F) => ({
838
- y: F >= 0 ? n.zero - n.individualHeight * (F / n.max) : n.zero + n.individualHeight * Math.abs(F) / n.max,
839
- value: F
840
- }))
841
- };
842
- });
843
- }), Ta = A(() => ({
844
- datapoint: fl.value,
845
- seriesIndex: k.value,
846
- series: Me.value,
847
- bars: Re.value,
848
- lines: we.value,
849
- plots: ze.value,
850
- config: e.value
851
- })), Mt = A(() => {
852
- let a = "", v = fl.value.map((t) => t.value).filter((t) => Il(t) && t !== null).reduce((t, n) => Math.abs(t) + Math.abs(n), 0);
853
- const l = de.value[k.value], s = e.value.chart.tooltip.customFormat;
854
- return Dt(s) && Ut(() => s({
855
- seriesIndex: k.value,
856
- datapoint: fl.value,
857
- series: Me.value,
858
- bars: Re.value,
859
- lines: we.value,
860
- plots: ze.value,
861
- config: e.value
862
- })) ? s({
863
- seriesIndex: k.value,
864
- datapoint: fl.value,
865
- series: Me.value,
866
- bars: Re.value,
867
- lines: we.value,
868
- plots: ze.value,
869
- config: e.value
870
- }) : (l && l.text && e.value.chart.tooltip.showTimeLabel && (a += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${e.value.chart.tooltip.borderColor}; width:100%">${l.text}</div>`), fl.value.forEach((t) => {
871
- if (Il(t.value)) {
872
- let n = "", o = "";
873
- switch (vl.value[t.type]) {
874
- case "bar":
875
- n = `<svg viewBox="0 0 40 40" height="14" width="14">${sa.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${t.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${sa.pattern ? `url(#pattern_${q.value}_${t.slotAbsoluteIndex}` : t.color}" /></svg>`;
876
- break;
877
- case "line":
878
- !t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${t.color}" />` : t.shape === "triangle" ? o = `<path d="${Te({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "square" ? o = `<path d="${Te({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "diamond" ? o = `<path d="${Te({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "pentagon" ? o = `<path d="${Te({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "hexagon" ? o = `<path d="${Te({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : t.shape === "star" && (o = `<polygon stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${t.color}" points="${Ua({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), n = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${t.color}" />${o}</svg>`;
879
- break;
880
- case "plot":
881
- if (!t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape)) {
882
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" /></svg>`;
883
- break;
884
- }
885
- if (t.shape === "star") {
886
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" points="${Ua({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
887
- break;
888
- }
889
- if (t.shape === "triangle") {
890
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Te({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
891
- break;
892
- }
893
- if (t.shape === "square") {
894
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Te({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
895
- break;
896
- }
897
- if (t.shape === "diamond") {
898
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Te({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
899
- break;
900
- }
901
- if (t.shape === "pentagon") {
902
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Te({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
903
- break;
904
- }
905
- if (t.shape === "hexagon") {
906
- n = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Te({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
907
- break;
908
- }
909
- }
910
- a += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${n}</div> ${t.name}: <b>${e.value.chart.tooltip.showValue ? ne(
911
- t.type === "line" ? e.value.line.labels.formatter : t.type === "bar" ? e.value.bar.labels.formatter : e.value.plot.labels.formatter,
912
- t.value,
913
- me({
914
- p: t.prefix,
915
- v: t.value,
916
- s: t.suffix,
917
- r: e.value.chart.tooltip.roundingValue
918
- }),
919
- { datapoint: t }
920
- ) : ""}</b> ${e.value.chart.tooltip.showPercentage ? `(${me({
921
- v: T(Math.abs(t.value) / v * 100),
922
- s: "%",
923
- r: e.value.chart.tooltip.roundingPercentage
924
- })})` : ""}</div>`, e.value.chart.comments.showInTooltip && t.comments.length && t.comments.slice(S.value.start, S.value.end)[k.value] && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${t.color}">${t.comments.slice(S.value.start, S.value.end)[k.value]}</div>`);
925
- }
926
- }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${e.value.chart.tooltip.color}">${a}</div>`);
927
- });
928
- A(() => {
929
- if (Ve.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
930
- const a = ke.value.map((l) => ({
931
- label: l.name,
932
- color: l.color,
933
- type: l.type
934
- })), v = [];
935
- return de.value.forEach((l, s) => {
936
- const t = [l.text];
937
- ke.value.forEach((n) => {
938
- t.push(xe(n.absoluteValues[s]) ? Number(n.absoluteValues[s].toFixed(e.value.table.rounding)) : "");
939
- }), v.push(t);
940
- }), { head: a, body: v };
941
- });
942
- const Al = A(() => {
943
- const a = e.value.table.showSum;
944
- let v = [""].concat(ke.value.map((n) => n.name));
945
- a && (v = v.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>'));
946
- let l = [];
947
- for (let n = 0; n < b.value; n += 1) {
948
- const o = ke.value.map((Y) => Y.absoluteValues[n] ?? 0).reduce((Y, F) => Y + F, 0);
949
- l.push(
950
- [
951
- de.value[n].text ?? "-"
952
- ].concat(ke.value.map(
953
- (Y) => ne(
954
- Y.type === "line" ? e.value.line.labels.formatter : Y.type === "bar" ? e.value.bar.labels.formatter : e.value.plot.labels.formatter,
955
- Y.absoluteValues[n] ?? 0,
956
- me({
957
- p: Y.prefix || e.value.chart.labels.prefix,
958
- v: Y.absoluteValues[n] ?? 0,
959
- s: Y.suffix || e.value.chart.labels.suffix,
960
- r: e.value.table.rounding
961
- })
962
- )
963
- )).concat(a ? (o ?? 0).toFixed(e.value.table.rounding) : [])
964
- );
965
- }
966
- const s = {
967
- th: {
968
- backgroundColor: e.value.table.th.backgroundColor,
969
- color: e.value.table.th.color,
970
- outline: e.value.table.th.outline
971
- },
972
- td: {
973
- backgroundColor: e.value.table.td.backgroundColor,
974
- color: e.value.table.td.color,
975
- outline: e.value.table.td.outline
976
- },
977
- breakpoint: e.value.table.responsiveBreakpoint
978
- }, t = [e.value.table.columnNames.period].concat(ke.value.map((n) => n.name)).concat(e.value.table.columnNames.total);
979
- return { head: v, body: l, config: s, colNames: t };
980
- });
981
- function Oa(a = null) {
982
- const v = [[e.value.chart.title.text], [e.value.chart.title.subtitle.text], [""]], l = ["", ...t.value.head.map((o) => o.label)], s = t.value.body, t = v.concat([l]).concat(s), n = Qt(t);
983
- a ? a(n) : jt({ csvContent: n, title: e.value.chart.title.text || "vue-ui-xy" });
984
- }
985
- function Na(a, v = null) {
986
- ra.value = a, a ? k.value = v : k.value = null;
987
- }
988
- function Va() {
989
- f.value.showTable = !f.value.showTable;
990
- }
991
- function Pa() {
992
- f.value.dataLabels.show = !f.value.dataLabels.show;
993
- }
994
- function Ha() {
995
- f.value.showTooltip = !f.value.showTooltip;
996
- }
997
- function Ra(a) {
998
- tl.value = a, na.value += 1;
999
- }
1000
- function Ba() {
1001
- if (!e.value.responsiveProportionalSizing) {
1002
- x.value.dataLabels = e.value.chart.grid.labels.fontSize, x.value.yAxis = e.value.chart.grid.labels.axis.fontSize, x.value.xAxis = e.value.chart.grid.labels.xAxisLabels.fontSize, x.value.plotLabels = e.value.chart.labels.fontSize, Ae.value.plot = e.value.plot.radius, Ae.value.line = e.value.line.radius;
1003
- return;
1004
- }
1005
- x.value.dataLabels = il({
1006
- relator: ue.value,
1007
- adjuster: 400,
1008
- source: e.value.chart.grid.labels.fontSize,
1009
- threshold: 10,
1010
- fallback: 10
1011
- }), x.value.yAxis = il({
1012
- relator: Z.value,
1013
- adjuster: 1e3,
1014
- source: e.value.chart.grid.labels.axis.fontSize,
1015
- threshold: 10,
1016
- fallback: 10
1017
- }), x.value.xAxis = il({
1018
- relator: Z.value,
1019
- adjuster: 1e3,
1020
- source: e.value.chart.grid.labels.xAxisLabels.fontSize,
1021
- threshold: 10,
1022
- fallback: 10
1023
- }), x.value.plotLabels = il({
1024
- relator: Z.value,
1025
- adjuster: 800,
1026
- source: e.value.chart.labels.fontSize,
1027
- threshold: 10,
1028
- fallback: 10
1029
- }), Ae.value.plot = il({
1030
- relator: Z.value,
1031
- adjuster: 800,
1032
- source: e.value.plot.radius,
1033
- threshold: 1,
1034
- fallback: 1
1035
- }), Ae.value.line = il({
1036
- relator: Z.value,
1037
- adjuster: 800,
1038
- source: e.value.line.radius,
1039
- threshold: 1,
1040
- fallback: 1
1041
- });
1042
- }
1043
- const xl = A(() => !!e.value.debug);
1044
- function Ya() {
1045
- qa(y.dataset) ? (ta({
1046
- componentName: "VueUiXy",
1047
- type: "dataset",
1048
- debug: xl.value
1049
- }), wl.value = !0) : y.dataset.forEach((v, l) => {
1050
- [null, void 0].includes(v.name) && (ta({
1051
- componentName: "VueUiXy",
1052
- type: "datasetSerieAttribute",
1053
- property: "name (string)",
1054
- index: l,
1055
- debug: xl.value
1056
- }), wl.value = !0);
1057
- }), xl.value && y.dataset.forEach((v) => {
1058
- v.series.forEach((l, s) => {
1059
- Il(l) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
1060
- -----> The serie '${v.name}' contains the value '${l}' at index ${s}.
1061
- '${l}' was converted to null to allow the chart to display.`);
1062
- });
1063
- }), qa(y.dataset) || (wl.value = e.value.loading), da.value = e.value.chart.userOptions.showOnChartHover, Wl.value = e.value.chart.userOptions.keepStateOnChartLeave, kl.value = !e.value.chart.userOptions.showOnChartHover, f.value = {
1064
- dataLabels: {
1065
- show: !0
1066
- },
1067
- showTooltip: e.value.chart.tooltip.show === !0,
1068
- showTable: e.value.showTable === !0,
1069
- isStacked: e.value.chart.grid.labels.yAxis.stacked,
1070
- useIndividualScale: e.value.chart.grid.labels.yAxis.useIndividualScale
1071
- };
1072
- const a = G.value ? 0 : 12;
1073
- if (e.value.responsive) {
1074
- const l = ge.value.parentNode;
1075
- Xe.value && (Xe.value.unobserve(Yl.value), Xe.value.disconnect());
1076
- const { height: s, width: t } = l.getBoundingClientRect();
1077
- let n = null, o = 0;
1078
- e.value.chart.title.show && rl.value && (n = rl.value, o = n.getBoundingClientRect().height);
1079
- let Y = null, F = 0;
1080
- e.value.chart.zoom.show && He.value > 6 && Xl.value && Le.value && Le.value.$el && (Y = Le.value.$el, F = Y.getBoundingClientRect().height);
1081
- let ee = null, $ = 0;
1082
- e.value.chart.legend.show && al.value && (ee = al.value, $ = ee.getBoundingClientRect().height);
1083
- let I = 0;
1084
- nl.value && (I = nl.value.getBoundingClientRect().height);
1085
- let X = 0;
1086
- cl.value && (X = cl.value.getBoundingClientRect().height), ue.value = s - o - $ - F - I - X - a, Z.value = t, G.value ? ol() : De.value = `0 0 ${Z.value < 0 ? 10 : Z.value} ${ue.value < 0 ? 10 : ue.value}`, Ba();
1087
- const w = new ResizeObserver((R) => {
1088
- for (const L of R)
1089
- e.value.chart.title.show && rl.value ? o = rl.value.getBoundingClientRect().height : o = 0, Le.value && Le.value.$el ? F = Le.value.$el.getBoundingClientRect().height : F = 0, al.value ? $ = al.value.getBoundingClientRect().height : $ = 0, nl.value ? I = nl.value.getBoundingClientRect().height : I = 0, cl.value ? X = cl.value.getBoundingClientRect().height : X = 0, G.value && ge.value.classList.add("no-transition"), requestAnimationFrame(() => {
1090
- ue.value = L.contentRect.height - o - $ - F - I - X - (G.value ? 48 : a), G.value ? (ha.value = L.contentRect.height - ue.value, Z.value = L.contentBoxSize[0].inlineSize, it.value = Z.value / ha.value, ol()) : (Z.value = L.contentBoxSize[0].inlineSize, De.value = `0 0 ${Z.value < 0 ? 10 : Z.value} ${ue.value < 0 ? 10 : ue.value}`), Ba();
1091
- });
1092
- });
1093
- Xe.value = w, Yl.value = l, w.observe(l);
1094
- } else
1095
- ue.value = e.value.chart.height, Z.value = e.value.chart.width, x.value.dataLabels = e.value.chart.grid.labels.fontSize, x.value.yAxis = e.value.chart.grid.labels.axis.fontSize, x.value.xAxis = e.value.chart.grid.labels.xAxisLabels.fontSize, x.value.plotLabels = e.value.chart.labels.fontSize, Ae.value.plot = e.value.plot.radius, Ae.value.line = e.value.line.radius, G.value ? ol() : De.value = `0 0 ${Z.value} ${ue.value}`;
1096
- }
1097
- ea(() => {
1098
- Ya(), jl(), document.addEventListener("mousemove", (a) => {
1099
- ut.value = {
1100
- x: a.clientX,
1101
- y: a.clientY
1102
- };
1103
- }), document.addEventListener("scroll", ya);
1104
- }), Fa(() => {
1105
- document.removeEventListener("scroll", ya), Xe.value && (Xe.value.unobserve(Yl.value), Xe.value.disconnect());
1106
- }), Cl(() => f.value.isStacked, async () => {
1107
- G.value && (await Se(), ol(), Kl());
1108
- });
1109
- let Ml;
1110
- async function zt() {
1111
- await Se(), ol(), Kl(), Ml.disconnect();
1112
- }
1113
- return ea(() => {
1114
- ge.value && (Ml = new ResizeObserver((a) => {
1115
- for (const v of a) {
1116
- const { width: l, height: s } = v.contentRect;
1117
- if (l > 0 && s > 0) {
1118
- zt();
1119
- break;
1120
- }
1121
- }
1122
- }), Ml.observe(ge.value.parentElement));
1123
- }), Fa(() => {
1124
- Ml?.disconnect();
1125
- }), Cl(() => y.dataset, (a) => {
1126
- Array.isArray(a) && a.length > 0 && (wl.value = !1), He.value = Math.max(...Ne.value.map((v) => Ee({
1127
- data: v.series,
1128
- threshold: e.value.downsample.threshold
1129
- }).length)), S.value = {
1130
- start: 0,
1131
- end: He.value
1132
- }, Fl.value += 1, El.value += 1;
1133
- }, { deep: !0 }), Cl(() => y.config, (a) => {
1134
- Dl.value || (e.value = Gl()), Ya(), va.value += 1, ca.value += 1, f.value = {
1135
- dataLabels: {
1136
- show: !0
1137
- },
1138
- showTooltip: e.value.chart.tooltip.show === !0,
1139
- showTable: e.value.showTable === !0,
1140
- isStacked: e.value.chart.grid.labels.yAxis.stacked,
1141
- useIndividualScale: e.value.chart.grid.labels.yAxis.useIndividualScale
1142
- };
1143
- }, { deep: !0 }), Cl(e, () => {
1144
- f.value = {
1145
- dataLabels: {
1146
- show: !0
1147
- },
1148
- showTooltip: e.value.chart.tooltip.show === !0,
1149
- showTable: e.value.showTable === !0,
1150
- isStacked: e.value.chart.grid.labels.yAxis.stacked,
1151
- useIndividualScale: e.value.chart.grid.labels.yAxis.useIndividualScale
1152
- };
1153
- }, { immediate: !0 }), Za({
1154
- getData: mt,
1155
- getImage: yt,
1156
- generatePdf: ga,
1157
- generateImage: xa,
1158
- generateCsv: Oa,
1159
- toggleStack: _a,
1160
- toggleTable: Va,
1161
- toggleLabels: Pa,
1162
- toggleTooltip: Ha,
1163
- toggleAnnotator: Jl,
1164
- toggleFullscreen: Ra
1165
- }), (a, v) => (u(), r("div", {
1166
- id: `vue-ui-xy_${q.value}`,
1167
- class: Ke(`vue-ui-xy ${tl.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1168
- ref_key: "chart",
1169
- ref: ge,
1170
- style: z(`background:${e.value.chart.backgroundColor}; color:${e.value.chart.color};width:100%;font-family:${e.value.chart.fontFamily};${e.value.responsive ? "height: 100%" : ""}`),
1171
- onMouseenter: v[7] || (v[7] = () => pa(!0)),
1172
- onMouseleave: v[8] || (v[8] = () => pa(!1))
1173
- }, [
1174
- e.value.chart.userOptions.buttons.annotator && ye.value ? (u(), Ie(c(ot), {
1175
- key: 0,
1176
- svgRef: ye.value,
1177
- backgroundColor: e.value.chart.backgroundColor,
1178
- color: e.value.chart.color,
1179
- active: pl.value,
1180
- onClose: Jl
1181
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : d("", !0),
1182
- kt.value ? (u(), r("div", {
1183
- key: 1,
1184
- ref_key: "noTitle",
1185
- ref: cl,
1186
- class: "vue-data-ui-no-title-space",
1187
- style: "height:36px; width: 100%; background:transparent"
1188
- }, null, 512)) : d("", !0),
1189
- e.value.chart.title.show ? (u(), r("div", {
1190
- key: 2,
1191
- ref_key: "chartTitle",
1192
- ref: rl,
1193
- class: "vue-ui-xy-title",
1194
- style: z(`font-family:${e.value.chart.fontFamily}`)
1195
- }, [
1196
- (u(), Ie(ao, {
1197
- key: `title_${va.value}`,
1198
- config: {
1199
- title: {
1200
- cy: "xy-div-title",
1201
- ...e.value.chart.title
1202
- },
1203
- subtitle: {
1204
- cy: "xy-div-subtitle",
1205
- ...e.value.chart.title.subtitle
1206
- }
1207
- }
1208
- }, null, 8, ["config"]))
1209
- ], 4)) : d("", !0),
1210
- e.value.chart.userOptions.show && (Wl.value || kl.value) ? (u(), Ie(c(ja), {
1211
- ref: "defails",
1212
- key: `user_options_${na.value}`,
1213
- backgroundColor: e.value.chart.backgroundColor,
1214
- color: e.value.chart.color,
1215
- isPrinting: c(Ul),
1216
- isImaging: c(fa),
1217
- uid: q.value,
1218
- hasTooltip: e.value.chart.userOptions.buttons.tooltip && e.value.chart.tooltip.show,
1219
- hasPdf: e.value.chart.userOptions.buttons.pdf,
1220
- hasXls: e.value.chart.userOptions.buttons.csv,
1221
- hasImg: e.value.chart.userOptions.buttons.img,
1222
- hasLabel: e.value.chart.userOptions.buttons.labels,
1223
- hasTable: e.value.chart.userOptions.buttons.table,
1224
- hasStack: Nl.dataset.length > 1 && e.value.chart.userOptions.buttons.stack,
1225
- hasFullscreen: e.value.chart.userOptions.buttons.fullscreen,
1226
- isStacked: f.value.isStacked,
1227
- isFullscreen: tl.value,
1228
- chartElement: a.$refs.chart,
1229
- position: e.value.chart.userOptions.position,
1230
- isTooltip: f.value.showTooltip,
1231
- titles: { ...e.value.chart.userOptions.buttonTitles },
1232
- hasAnnotator: e.value.chart.userOptions.buttons.annotator,
1233
- isAnnotation: pl.value,
1234
- callbacks: e.value.chart.userOptions.callbacks,
1235
- printScale: e.value.chart.userOptions.print.scale,
1236
- onToggleFullscreen: Ra,
1237
- onGeneratePdf: c(ga),
1238
- onGenerateCsv: Oa,
1239
- onGenerateImage: c(xa),
1240
- onToggleTable: Va,
1241
- onToggleLabels: Pa,
1242
- onToggleStack: _a,
1243
- onToggleTooltip: Ha,
1244
- onToggleAnnotator: Jl,
1245
- style: z({
1246
- visibility: Wl.value ? kl.value ? "visible" : "hidden" : "visible"
1247
- })
1248
- }, Nt({ _: 2 }, [
1249
- a.$slots.menuIcon ? {
1250
- name: "menuIcon",
1251
- fn: se(({ isOpen: l, color: s }) => [
1252
- U(a.$slots, "menuIcon", Qe(je({ isOpen: l, color: s })), void 0, !0)
1253
- ]),
1254
- key: "0"
1255
- } : void 0,
1256
- a.$slots.optionTooltip ? {
1257
- name: "optionTooltip",
1258
- fn: se(() => [
1259
- U(a.$slots, "optionTooltip", {}, void 0, !0)
1260
- ]),
1261
- key: "1"
1262
- } : void 0,
1263
- a.$slots.optionPdf ? {
1264
- name: "optionPdf",
1265
- fn: se(() => [
1266
- U(a.$slots, "optionPdf", {}, void 0, !0)
1267
- ]),
1268
- key: "2"
1269
- } : void 0,
1270
- a.$slots.optionCsv ? {
1271
- name: "optionCsv",
1272
- fn: se(() => [
1273
- U(a.$slots, "optionCsv", {}, void 0, !0)
1274
- ]),
1275
- key: "3"
1276
- } : void 0,
1277
- a.$slots.optionImg ? {
1278
- name: "optionImg",
1279
- fn: se(() => [
1280
- U(a.$slots, "optionImg", {}, void 0, !0)
1281
- ]),
1282
- key: "4"
1283
- } : void 0,
1284
- a.$slots.optionTable ? {
1285
- name: "optionTable",
1286
- fn: se(() => [
1287
- U(a.$slots, "optionTable", {}, void 0, !0)
1288
- ]),
1289
- key: "5"
1290
- } : void 0,
1291
- a.$slots.optionLabels ? {
1292
- name: "optionLabels",
1293
- fn: se(() => [
1294
- U(a.$slots, "optionLabels", {}, void 0, !0)
1295
- ]),
1296
- key: "6"
1297
- } : void 0,
1298
- a.$slots.optionStack ? {
1299
- name: "optionStack",
1300
- fn: se(() => [
1301
- U(a.$slots, "optionStack", {}, void 0, !0)
1302
- ]),
1303
- key: "7"
1304
- } : void 0,
1305
- a.$slots.optionFullscreen ? {
1306
- name: "optionFullscreen",
1307
- fn: se(({ toggleFullscreen: l, isFullscreen: s }) => [
1308
- U(a.$slots, "optionFullscreen", Qe(je({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
1309
- ]),
1310
- key: "8"
1311
- } : void 0,
1312
- a.$slots.optionAnnotator ? {
1313
- name: "optionAnnotator",
1314
- fn: se(({ toggleAnnotator: l, isAnnotator: s }) => [
1315
- U(a.$slots, "optionAnnotator", Qe(je({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
1316
- ]),
1317
- key: "9"
1318
- } : void 0
1319
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
1320
- (u(), r("svg", {
1321
- ref_key: "svgRef",
1322
- ref: ye,
1323
- xmlns: "http://www.w3.org/2000/svg",
1324
- class: Ke([{ "vue-data-ui-fullscreen--on": tl.value, "vue-data-ui-fulscreen--off": !tl.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
1325
- width: G.value ? void 0 : "100%",
1326
- viewBox: De.value,
1327
- style: z(`background: transparent; color:${e.value.chart.color}; font-family:${e.value.chart.fontFamily}`),
1328
- "aria-label": pt.value,
1329
- role: "img",
1330
- "aria-live": "polite",
1331
- preserveAspectRatio: "xMidYMid"
1332
- }, [
1333
- g("g", {
1334
- ref_key: "G",
1335
- ref: ua,
1336
- class: "vue-data-ui-g"
1337
- }, [
1338
- ml(c(tt)),
1339
- a.$slots["chart-background"] ? (u(), r("foreignObject", {
1340
- key: 0,
1341
- x: i.value.left + B.value < 0 ? 0 : i.value.left + B.value,
1342
- y: i.value.top,
1343
- width: i.value.width - (e.value.chart.grid.position === "middle" ? 0 : i.value.width / b.value) < 0 ? 0 : i.value.width - (e.value.chart.grid.position === "middle" ? 0 : i.value.width / b.value),
1344
- height: i.value.height < 0 ? 0 : i.value.height,
1345
- style: {
1346
- pointerEvents: "none"
1347
- }
1348
- }, [
1349
- U(a.$slots, "chart-background", {}, void 0, !0)
1350
- ], 8, co)) : d("", !0),
1351
- b.value > 0 ? (u(), r("g", vo, [
1352
- g("g", ho, [
1353
- e.value.chart.grid.labels.xAxis.showBaseline ? (u(), r("line", {
1354
- key: 0,
1355
- stroke: e.value.chart.grid.stroke,
1356
- "stroke-width": "1",
1357
- x1: i.value.left + B.value,
1358
- x2: i.value.right - B.value,
1359
- y1: c(H)(i.value.bottom),
1360
- y2: c(H)(i.value.bottom),
1361
- "stroke-linecap": "round",
1362
- style: { animation: "none !important" }
1363
- }, null, 8, fo)) : d("", !0),
1364
- f.value.useIndividualScale ? e.value.chart.grid.showHorizontalLines ? (u(!0), r(h, { key: 2 }, m(gl.value, (l) => (u(), r("g", null, [
1365
- l.id === M.value && l.yLabels.length ? (u(!0), r(h, { key: 0 }, m(l.yLabels, (s) => (u(), r("line", {
1366
- x1: i.value.left + B.value,
1367
- x2: i.value.right - B.value,
1368
- y1: c(H)(s.y),
1369
- y2: c(H)(s.y),
1370
- stroke: l.color,
1371
- "stroke-width": 0.5,
1372
- "stroke-linecap": "round",
1373
- style: { animation: "none !important" }
1374
- }, null, 8, mo))), 256)) : l.yLabels.length ? (u(!0), r(h, { key: 1 }, m(l.yLabels, (s) => (u(), r("line", {
1375
- x1: i.value.left + B.value,
1376
- x2: i.value.right - B.value,
1377
- y1: c(H)(s.y),
1378
- y2: c(H)(s.y),
1379
- stroke: e.value.chart.grid.stroke,
1380
- "stroke-width": 0.5,
1381
- "stroke-linecap": "round",
1382
- style: { animation: "none !important" }
1383
- }, null, 8, yo))), 256)) : d("", !0)
1384
- ]))), 256)) : d("", !0) : (u(), r(h, { key: 1 }, [
1385
- e.value.chart.grid.labels.yAxis.showBaseline ? (u(), r("line", {
1386
- key: 0,
1387
- stroke: e.value.chart.grid.stroke,
1388
- "stroke-width": "1",
1389
- x1: i.value.left + B.value,
1390
- x2: i.value.left + B.value,
1391
- y1: c(H)(i.value.top),
1392
- y2: c(H)(i.value.bottom),
1393
- "stroke-linecap": "round",
1394
- style: { animation: "none !important" }
1395
- }, null, 8, go)) : d("", !0),
1396
- e.value.chart.grid.showHorizontalLines ? (u(), r("g", xo, [
1397
- (u(!0), r(h, null, m(Ca.value, (l) => (u(), r("line", {
1398
- x1: i.value.left + B.value,
1399
- x2: i.value.right - B.value,
1400
- y1: c(H)(l.y),
1401
- y2: c(H)(l.y),
1402
- stroke: e.value.chart.grid.stroke,
1403
- "stroke-width": 0.5,
1404
- "stroke-linecap": "round",
1405
- style: { animation: "none !important" }
1406
- }, null, 8, bo))), 256))
1407
- ])) : d("", !0)
1408
- ], 64)),
1409
- e.value.chart.grid.showVerticalLines ? (u(), r("g", po, [
1410
- (u(!0), r(h, null, m(b.value + (e.value.chart.grid.position === "middle" ? 1 : 0), (l, s) => (u(), r("line", {
1411
- key: `grid_vertical_line_${s}`,
1412
- x1: i.value.width / b.value * s + i.value.left + B.value,
1413
- x2: i.value.width / b.value * s + i.value.left + B.value,
1414
- y1: c(H)(i.value.top),
1415
- y2: c(H)(i.value.bottom),
1416
- "stroke-width": "0.5",
1417
- stroke: e.value.chart.grid.stroke,
1418
- style: { animation: "none !important" }
1419
- }, null, 8, ko))), 128))
1420
- ])) : d("", !0),
1421
- e.value.chart.grid.labels.xAxisLabels.show ? (u(), r("g", _o, [
1422
- (u(!0), r(h, null, m(de.value, (l, s) => (u(), r("g", {
1423
- key: `time_label_${s}`
1424
- }, [
1425
- l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (s === 0 || s === de.value.length - 1) && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && k.value === s && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && s % Math.floor((S.value.end - S.value.start) / e.value.chart.grid.labels.xAxisLabels.modulo) === 0 ? (u(), r(h, { key: 0 }, [
1426
- e.value.chart.grid.labels.xAxis.showCrosshairs ? (u(), r("line", {
1427
- key: 0,
1428
- y1: e.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero ? ie.value - (ie.value === i.value.bottom ? 0 : e.value.chart.grid.labels.xAxis.crosshairSize / 2) : i.value.bottom,
1429
- y2: e.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero ? ie.value + e.value.chart.grid.labels.xAxis.crosshairSize / (ie.value === i.value.bottom ? 1 : 2) : i.value.bottom + e.value.chart.grid.labels.xAxis.crosshairSize,
1430
- x1: i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2,
1431
- x2: i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2,
1432
- stroke: e.value.chart.grid.stroke,
1433
- "stroke-width": 1,
1434
- "stroke-linecap": "round",
1435
- style: { animation: "none !important" }
1436
- }, null, 8, wo)) : d("", !0)
1437
- ], 64)) : d("", !0)
1438
- ]))), 128))
1439
- ])) : d("", !0)
1440
- ]),
1441
- (u(!0), r(h, null, m(Re.value, (l, s) => (u(), r("defs", {
1442
- key: `def_rect_${s}`
1443
- }, [
1444
- g("linearGradient", {
1445
- id: `rectGradient_pos_${s}_${q.value}`,
1446
- x2: "0%",
1447
- y2: "100%"
1448
- }, [
1449
- g("stop", {
1450
- offset: "0%",
1451
- "stop-color": l.color
1452
- }, null, 8, $o),
1453
- g("stop", {
1454
- offset: "62%",
1455
- "stop-color": `${c(ll)(l.color, 0.02)}`
1456
- }, null, 8, Lo),
1457
- g("stop", {
1458
- offset: "100%",
1459
- "stop-color": `${c(ll)(l.color, 0.05)}`
1460
- }, null, 8, Ao)
1461
- ], 8, So),
1462
- g("linearGradient", {
1463
- id: `rectGradient_neg_${s}_${q.value}`,
1464
- x2: "0%",
1465
- y2: "100%"
1466
- }, [
1467
- g("stop", {
1468
- offset: "0%",
1469
- "stop-color": `${c(ll)(l.color, 0.05)}`
1470
- }, null, 8, zo),
1471
- g("stop", {
1472
- offset: "38%",
1473
- "stop-color": `${c(ll)(l.color, 0.02)}`
1474
- }, null, 8, Co),
1475
- g("stop", {
1476
- offset: "100%",
1477
- "stop-color": l.color
1478
- }, null, 8, Io)
1479
- ], 8, Mo)
1480
- ]))), 128)),
1481
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r("defs", {
1482
- key: `def_plot_${s}`
1483
- }, [
1484
- g("radialGradient", {
1485
- id: `plotGradient_${s}_${q.value}`,
1486
- cx: "50%",
1487
- cy: "50%",
1488
- r: "50%",
1489
- fx: "50%",
1490
- fy: "50%"
1491
- }, [
1492
- g("stop", {
1493
- offset: "0%",
1494
- "stop-color": `${c(ll)(l.color, 0.05)}`
1495
- }, null, 8, Oo),
1496
- g("stop", {
1497
- offset: "100%",
1498
- "stop-color": l.color
1499
- }, null, 8, No)
1500
- ], 8, To)
1501
- ]))), 128)),
1502
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r("defs", {
1503
- key: `def_line_${s}`
1504
- }, [
1505
- g("radialGradient", {
1506
- id: `lineGradient_${s}_${q.value}`,
1507
- cx: "50%",
1508
- cy: "50%",
1509
- r: "50%",
1510
- fx: "50%",
1511
- fy: "50%"
1512
- }, [
1513
- g("stop", {
1514
- offset: "0%",
1515
- "stop-color": `${c(ll)(l.color, 0.05)}`
1516
- }, null, 8, Po),
1517
- g("stop", {
1518
- offset: "100%",
1519
- "stop-color": l.color
1520
- }, null, 8, Ho)
1521
- ], 8, Vo),
1522
- g("linearGradient", {
1523
- id: `areaGradient_${s}_${q.value}`,
1524
- x1: "0%",
1525
- x2: "100%",
1526
- y1: "0%",
1527
- y2: "0%"
1528
- }, [
1529
- g("stop", {
1530
- offset: "0%",
1531
- "stop-color": `${c($e)(c(ll)(l.color, 0.03), e.value.line.area.opacity)}`
1532
- }, null, 8, Bo),
1533
- g("stop", {
1534
- offset: "100%",
1535
- "stop-color": `${c($e)(l.color, e.value.line.area.opacity)}`
1536
- }, null, 8, Yo)
1537
- ], 8, Ro)
1538
- ]))), 128)),
1539
- (u(!0), r(h, null, m(_t.value, (l) => (u(), r("g", null, [
1540
- l.show ? (u(), r(h, { key: 0 }, [
1541
- (u(!0), r(h, null, m(l.span, (s, t) => (u(), r("g", null, [
1542
- g("rect", {
1543
- style: z({
1544
- transition: "none",
1545
- opacity: l.from + t >= S.value.start && l.from + t <= S.value.end - 1 ? 1 : 0
1546
- }),
1547
- x: i.value.left + i.value.width / b.value * (l.from + t - S.value.start),
1548
- y: i.value.top,
1549
- height: i.value.height < 0 ? 10 : i.value.height,
1550
- width: i.value.width / b.value < 0 ? 1e-5 : i.value.width / b.value,
1551
- fill: c($e)(l.color, l.opacity)
1552
- }, null, 12, Fo)
1553
- ]))), 256)),
1554
- (u(!0), r(h, null, m(l.span, (s, t) => (u(), r("g", null, [
1555
- l.caption.text && t === 0 ? (u(), r("foreignObject", {
1556
- key: 0,
1557
- x: i.value.left + i.value.width / b.value * (l.from + t - S.value.start) - (l.caption.width === "auto" ? 0 : l.caption.width / 2 - i.value.width / b.value * l.span / 2),
1558
- y: i.value.top + l.caption.offsetY,
1559
- style: z({
1560
- overflow: "visible",
1561
- opacity: l.to >= S.value.start && l.from < S.value.end ? 1 : 0
1562
- }),
1563
- height: "1",
1564
- width: l.caption.width === "auto" ? i.value.width / b.value * l.span : l.caption.width
1565
- }, [
1566
- g("div", {
1567
- style: z(`padding:${l.caption.padding}px;text-align:${l.caption.textAlign};font-size:${l.caption.fontSize}px;color:${l.caption.color};font-weight:${l.caption.bold ? "bold" : "normal"}`)
1568
- }, j(l.caption.text), 5)
1569
- ], 12, Eo)) : d("", !0)
1570
- ]))), 256))
1571
- ], 64)) : d("", !0)
1572
- ]))), 256)),
1573
- g("g", null, [
1574
- (u(!0), r(h, null, m(b.value, (l, s) => (u(), r("g", {
1575
- key: `tooltip_trap_highlighter_${s}`
1576
- }, [
1577
- g("rect", {
1578
- x: i.value.left + i.value.width / b.value * s,
1579
- y: i.value.top,
1580
- height: i.value.height < 0 ? 10 : i.value.height,
1581
- width: i.value.width / b.value < 0 ? 1e-5 : i.value.width / b.value,
1582
- fill: [O.value, k.value, Ue.value].includes(s) ? c($e)(e.value.chart.highlighter.color, e.value.chart.highlighter.opacity) : "transparent"
1583
- }, null, 8, Wo)
1584
- ]))), 128))
1585
- ]),
1586
- Re.value.length ? (u(!0), r(h, { key: 0 }, m(Re.value, (l, s) => (u(), r("g", {
1587
- key: `serie_bar_${s}`,
1588
- class: Ke(`serie_bar_${s}`),
1589
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1590
- }, [
1591
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r("g", {
1592
- key: `bar_plot_${s}_${n}`
1593
- }, [
1594
- xe(t.value) ? (u(), r("rect", {
1595
- key: 0,
1596
- x: Ll(t),
1597
- y: f.value.useIndividualScale ? Aa(t) : La(t),
1598
- height: f.value.useIndividualScale ? Math.abs($a(t)) : Math.abs(Sa(t)),
1599
- width: _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value),
1600
- rx: e.value.bar.borderRadius,
1601
- fill: e.value.bar.useGradient ? t.value >= 0 ? `url(#rectGradient_pos_${s}_${q.value})` : `url(#rectGradient_neg_${s}_${q.value})` : l.color,
1602
- stroke: e.value.bar.border.useSerieColor ? l.color : e.value.bar.border.stroke,
1603
- "stroke-width": e.value.bar.border.strokeWidth,
1604
- style: z(`${c(Dl) ? "transition:none !important" : ""}`)
1605
- }, null, 12, Go)) : d("", !0),
1606
- xe(t.value) && a.$slots.pattern ? (u(), r("rect", {
1607
- key: 1,
1608
- x: Ll(t),
1609
- y: f.value.useIndividualScale ? Aa(t) : La(t),
1610
- height: f.value.useIndividualScale ? Math.abs($a(t)) : Math.abs(Sa(t)),
1611
- width: _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value),
1612
- rx: e.value.bar.borderRadius,
1613
- fill: `url(#pattern_${q.value}_${l.slotAbsoluteIndex})`,
1614
- stroke: e.value.bar.border.useSerieColor ? l.color : e.value.bar.border.stroke,
1615
- "stroke-width": e.value.bar.border.strokeWidth
1616
- }, null, 8, Xo)) : d("", !0),
1617
- t.comment && e.value.chart.comments.show ? (u(), r("foreignObject", {
1618
- key: 2,
1619
- style: { overflow: "visible" },
1620
- height: "12",
1621
- width: (_e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value) < 0 ? 1e-5 : _e() - (f.value.useIndividualScale && f.value.isStacked ? 0 : Pe.value) / 2) + e.value.chart.comments.width,
1622
- x: Ll(t) - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
1623
- y: c(T)(t.y) + e.value.chart.comments.offsetY + 6
1624
- }, [
1625
- U(a.$slots, "plot-comment", {
1626
- plot: { ...t, color: l.color, seriesIndex: s, datapointIndex: n }
1627
- }, void 0, !0)
1628
- ], 8, Do)) : d("", !0)
1629
- ]))), 128)),
1630
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(c(W)(l.plots).trend) ? (u(), r("g", Uo, [
1631
- g("defs", null, [
1632
- g("marker", {
1633
- id: `bar_arrow_${s}`,
1634
- markerWidth: 7,
1635
- markerHeight: 7,
1636
- refX: "0",
1637
- refY: 7 / 2,
1638
- orient: "auto"
1639
- }, [
1640
- g("polygon", {
1641
- points: `0 0, 7 ${7 / 2}, 0 7`,
1642
- fill: l.color
1643
- }, null, 8, Zo)
1644
- ], 8, qo)
1645
- ]),
1646
- l.plots.length > 1 ? (u(), r("line", {
1647
- key: 0,
1648
- x1: c(W)(l.plots).x1 + _e(),
1649
- x2: c(W)(l.plots).x2 + _e(),
1650
- y1: c(H)(c(W)(l.plots).y1),
1651
- y2: c(H)(c(W)(l.plots).y2),
1652
- "stroke-width": 1,
1653
- stroke: l.color,
1654
- "stroke-dasharray": 2,
1655
- "marker-end": `url(#bar_arrow_${s})`
1656
- }, null, 8, Jo)) : d("", !0),
1657
- l.plots.length > 1 ? (u(), r("text", {
1658
- key: 1,
1659
- "text-anchor": "middle",
1660
- x: c(W)(l.plots).x2 + _e(),
1661
- y: c(W)(l.plots).y2 - 6,
1662
- "font-size": x.value.plotLabels,
1663
- fill: l.color
1664
- }, j(c(me)({
1665
- v: c(W)(l.plots).trend * 100,
1666
- s: "%",
1667
- r: 2
1668
- })), 9, Ko)) : d("", !0)
1669
- ])) : d("", !0)
1670
- ], 6))), 128)) : d("", !0),
1671
- !f.value.useIndividualScale && e.value.chart.grid.labels.zeroLine.show ? (u(), r("line", {
1672
- key: 1,
1673
- stroke: e.value.chart.grid.stroke,
1674
- "stroke-width": "1",
1675
- x1: i.value.left + B.value,
1676
- x2: i.value.right - B.value,
1677
- y1: c(H)(ie.value),
1678
- y2: c(H)(ie.value),
1679
- "stroke-linecap": "round",
1680
- style: { animation: "none !important" }
1681
- }, null, 8, Qo)) : d("", !0),
1682
- e.value.chart.highlighter.useLine && (![null, void 0].includes(k.value) || ![null, void 0].includes(O.value)) ? (u(), r("g", jo, [
1683
- g("line", {
1684
- x1: i.value.left + i.value.width / b.value * ((k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)) + i.value.width / b.value / 2,
1685
- x2: i.value.left + i.value.width / b.value * ((k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)) + i.value.width / b.value / 2,
1686
- y1: c(H)(i.value.top),
1687
- y2: c(H)(i.value.bottom),
1688
- stroke: e.value.chart.highlighter.color,
1689
- "stroke-width": e.value.chart.highlighter.lineWidth,
1690
- "stroke-dasharray": e.value.chart.highlighter.lineDasharray,
1691
- "stroke-linecap": "round",
1692
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
1693
- }, null, 8, es)
1694
- ])) : d("", !0),
1695
- e.value.chart.grid.frame.show ? (u(), r("rect", {
1696
- key: 3,
1697
- style: { pointerEvents: "none", transition: "none", animation: "none !important" },
1698
- x: i.value.left + B.value < 0 ? 0 : i.value.left + B.value,
1699
- y: i.value.top,
1700
- width: i.value.width - (e.value.chart.grid.position === "middle" ? 0 : i.value.width / b.value) < 0 ? 0 : i.value.width - (e.value.chart.grid.position === "middle" ? 0 : i.value.width / b.value),
1701
- height: i.value.height < 0 ? 0 : i.value.height,
1702
- fill: "transparent",
1703
- stroke: e.value.chart.grid.frame.stroke,
1704
- "stroke-width": e.value.chart.grid.frame.strokeWidth,
1705
- "stroke-linecap": e.value.chart.grid.frame.strokeLinecap,
1706
- "stroke-linejoin": e.value.chart.grid.frame.strokeLinejoin,
1707
- "stroke-dasharray": e.value.chart.grid.frame.strokeDasharray
1708
- }, null, 8, ls)) : d("", !0),
1709
- e.value.chart.grid.labels.show ? (u(), r("g", as, [
1710
- f.value.useIndividualScale ? (u(), r(h, { key: 0 }, [
1711
- (u(!0), r(h, null, m(gl.value, (l) => (u(), r("g", null, [
1712
- g("line", {
1713
- x1: l.x + B.value,
1714
- x2: l.x + B.value,
1715
- y1: f.value.isStacked ? c(H)(i.value.bottom - l.yOffset - l.individualHeight) : c(H)(i.value.top),
1716
- y2: f.value.isStacked ? c(H)(i.value.bottom - l.yOffset) : c(H)(i.value.bottom),
1717
- stroke: l.color,
1718
- "stroke-width": e.value.chart.grid.stroke,
1719
- "stroke-linecap": "round",
1720
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
1721
- }, null, 12, ts)
1722
- ]))), 256)),
1723
- (u(!0), r(h, null, m(gl.value, (l) => (u(), r("g", {
1724
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
1725
- }, [
1726
- g("text", {
1727
- fill: l.color,
1728
- "font-size": x.value.dataLabels,
1729
- "text-anchor": "middle",
1730
- transform: `translate(${l.x - e.value.chart.grid.labels.yAxis.labelWidth + 5 + B.value + e.value.chart.grid.labels.yAxis.scaleLabelOffsetX}, ${f.value.isStacked ? i.value.bottom - l.yOffset - l.individualHeight / 2 : i.value.top + i.value.height / 2}) rotate(-90)`
1731
- }, j(l.name) + " " + j(l.scaleLabel && l.unique && l.scaleLabel !== l.id ? `- ${l.scaleLabel}` : ""), 9, os),
1732
- (u(!0), r(h, null, m(l.yLabels, (s, t) => (u(), r(h, null, [
1733
- e.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), r("line", {
1734
- key: 0,
1735
- x1: l.x + 3 + B.value - e.value.chart.grid.labels.yAxis.crosshairSize,
1736
- x2: l.x + B.value,
1737
- y1: c(H)(s.y),
1738
- y2: c(H)(s.y),
1739
- stroke: l.color,
1740
- "stroke-width": 1,
1741
- "stroke-linecap": "round",
1742
- style: { animation: "none !important" }
1743
- }, null, 8, ss)) : d("", !0)
1744
- ], 64))), 256)),
1745
- (u(!0), r(h, null, m(l.yLabels, (s, t) => (u(), r("text", {
1746
- x: G.value ? l.x - x.value.dataLabels / 2 + B.value + e.value.chart.grid.labels.yAxis.scaleValueOffsetX : l.x - 5 + B.value + e.value.chart.grid.labels.yAxis.scaleValueOffsetX,
1747
- y: c(H)(s.y) + x.value.dataLabels / 3,
1748
- "font-size": x.value.dataLabels,
1749
- "text-anchor": "end",
1750
- fill: l.color
1751
- }, j(c(ne)(
1752
- e.value.chart.grid.labels.yAxis.formatter,
1753
- s.value,
1754
- c(me)({
1755
- p: s.prefix,
1756
- v: s.value,
1757
- s: s.suffix,
1758
- r: 1
1759
- }),
1760
- { datapoint: s.datapoint, seriesIndex: t }
1761
- )), 9, us))), 256))
1762
- ], 4))), 256))
1763
- ], 64)) : (u(!0), r(h, { key: 1 }, m(Ca.value, (l, s) => (u(), r("g", {
1764
- key: `yLabel_${s}`
1765
- }, [
1766
- xe(l) && l.value >= pe.value.min && l.value <= pe.value.max && e.value.chart.grid.labels.yAxis.showCrosshairs ? (u(), r("line", {
1767
- key: 0,
1768
- x1: i.value.left + B.value,
1769
- x2: i.value.left - e.value.chart.grid.labels.yAxis.crosshairSize + B.value,
1770
- y1: c(H)(l.y),
1771
- y2: c(H)(l.y),
1772
- stroke: e.value.chart.grid.stroke,
1773
- "stroke-width": "1",
1774
- "stroke-linecap": "round",
1775
- style: { animation: "none !important" }
1776
- }, null, 8, is)) : d("", !0),
1777
- l.value >= pe.value.min && l.value <= pe.value.max ? (u(), r("text", {
1778
- key: 1,
1779
- x: i.value.left - 7 + B.value,
1780
- y: c(T)(l.y + x.value.dataLabels / 3),
1781
- "font-size": x.value.dataLabels,
1782
- "text-anchor": "end",
1783
- fill: e.value.chart.grid.labels.color
1784
- }, j(xe(l.value) ? c(ne)(
1785
- e.value.chart.grid.labels.yAxis.formatter,
1786
- l.value,
1787
- c(me)({
1788
- p: l.prefix,
1789
- v: l.value,
1790
- s: l.suffix,
1791
- r: 1
1792
- })
1793
- ) : ""), 9, rs)) : d("", !0)
1794
- ]))), 128))
1795
- ], 512)) : d("", !0),
1796
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r("g", {
1797
- key: `serie_plot_${s}`,
1798
- class: Ke(`serie_plot_${s}`),
1799
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1800
- }, [
1801
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r("g", {
1802
- key: `circle_plot_${s}_${n}`
1803
- }, [
1804
- t && xe(t.value) ? (u(), Ie(Ol, {
1805
- key: 0,
1806
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
1807
- color: e.value.plot.useGradient ? `url(#plotGradient_${s}_${q.value})` : e.value.plot.dot.useSerieColor ? l.color : e.value.plot.dot.fill,
1808
- plot: { x: c(T)(t.x), y: c(T)(t.y) },
1809
- radius: k.value !== null && k.value === n || O.value !== null && O.value === n ? (Ae.value.plot || 6) * 1.5 : Ae.value.plot || 6,
1810
- stroke: e.value.plot.dot.useSerieColor ? e.value.chart.backgroundColor : l.color,
1811
- strokeWidth: e.value.plot.dot.strokeWidth
1812
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
1813
- t.comment && e.value.chart.comments.show ? (u(), r("foreignObject", {
1814
- key: 1,
1815
- style: { overflow: "visible" },
1816
- height: "12",
1817
- width: e.value.chart.comments.width,
1818
- x: t.x - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
1819
- y: t.y + e.value.chart.comments.offsetY + 6
1820
- }, [
1821
- g("div", cs, [
1822
- U(a.$slots, "plot-comment", {
1823
- plot: { ...t, color: l.color, seriesIndex: s, datapointIndex: n }
1824
- }, void 0, !0)
1825
- ])
1826
- ], 8, ns)) : d("", !0)
1827
- ]))), 128)),
1828
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(c(W)(l.plots).trend) ? (u(), r("g", vs, [
1829
- g("defs", null, [
1830
- g("marker", {
1831
- id: `plot_arrow_${s}`,
1832
- markerWidth: 7,
1833
- markerHeight: 7,
1834
- refX: "0",
1835
- refY: 7 / 2,
1836
- orient: "auto"
1837
- }, [
1838
- g("polygon", {
1839
- points: `0 0, 7 ${7 / 2}, 0 7`,
1840
- fill: l.color
1841
- }, null, 8, hs)
1842
- ], 8, ds)
1843
- ]),
1844
- l.plots.length > 1 ? (u(), r("line", {
1845
- key: 0,
1846
- x1: c(W)(l.plots).x1,
1847
- x2: c(W)(l.plots).x2,
1848
- y1: c(H)(c(W)(l.plots).y1),
1849
- y2: c(H)(c(W)(l.plots).y2),
1850
- "stroke-width": 1,
1851
- stroke: l.color,
1852
- "stroke-dasharray": 2,
1853
- "marker-end": `url(#plot_arrow_${s})`
1854
- }, null, 8, fs)) : d("", !0),
1855
- l.plots.length > 1 ? (u(), r("text", {
1856
- key: 1,
1857
- "text-anchor": "middle",
1858
- x: c(W)(l.plots).x2,
1859
- y: c(W)(l.plots).y2 - 6,
1860
- "font-size": x.value.plotLabels,
1861
- fill: l.color
1862
- }, j(c(me)({
1863
- v: c(W)(l.plots).trend * 100,
1864
- s: "%",
1865
- r: 2
1866
- })), 9, gs)) : d("", !0)
1867
- ])) : d("", !0)
1868
- ], 6))), 128)),
1869
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r("g", {
1870
- key: `serie_line_${s}`,
1871
- class: Ke(`serie_line_${s}`),
1872
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1873
- }, [
1874
- l.smooth && l.plots.length > 1 && l.curve ? (u(), r("path", {
1875
- key: 0,
1876
- d: `M${l.curve}`,
1877
- stroke: e.value.chart.backgroundColor,
1878
- "stroke-width": e.value.line.strokeWidth + 1,
1879
- "stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
1880
- fill: "none"
1881
- }, null, 8, xs)) : l.plots.length > 1 && l.straight ? (u(), r("path", {
1882
- key: 1,
1883
- d: `M${l.straight}`,
1884
- stroke: e.value.chart.backgroundColor,
1885
- "stroke-width": e.value.line.strokeWidth + 1,
1886
- "stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
1887
- fill: "none",
1888
- "stroke-linecap": "round",
1889
- "stroke-linejoin": "round"
1890
- }, null, 8, bs)) : d("", !0)
1891
- ], 6))), 128)),
1892
- a.$slots.pattern ? (u(), r("defs", ms, [
1893
- (u(!0), r(h, null, m(Ve.value, (l, s) => U(a.$slots, "pattern", la({
1894
- key: `serie_pattern_slot_${s}`
1895
- }, { ref_for: !0 }, { ...l, seriesIndex: l.slotAbsoluteIndex, patternId: `pattern_${q.value}_${s}` }), void 0, !0)), 128))
1896
- ])) : d("", !0),
1897
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r("g", {
1898
- key: `serie_line_${s}`,
1899
- class: Ke(`serie_line_${s}`),
1900
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1901
- }, [
1902
- l.useArea && l.plots.length > 1 ? (u(), r("g", ys, [
1903
- l.smooth ? (u(!0), r(h, { key: 0 }, m(l.curveAreas, (t, n) => (u(), r(h, { key: n }, [
1904
- g("path", {
1905
- d: t,
1906
- fill: e.value.line.area.useGradient ? `url(#areaGradient_${s}_${q.value})` : c($e)(l.color, e.value.line.area.opacity)
1907
- }, null, 8, ps),
1908
- a.$slots.pattern ? (u(), r("path", {
1909
- key: 0,
1910
- d: t,
1911
- fill: `url(#pattern_${q.value}_${l.slotAbsoluteIndex})`
1912
- }, null, 8, ks)) : d("", !0)
1913
- ], 64))), 128)) : (u(!0), r(h, { key: 1 }, m(l.area.split(";"), (t, n) => (u(), r(h, { key: n }, [
1914
- g("path", {
1915
- d: `M${t}Z`,
1916
- fill: e.value.line.area.useGradient ? `url(#areaGradient_${s}_${q.value})` : c($e)(l.color, e.value.line.area.opacity)
1917
- }, null, 8, _s),
1918
- a.$slots.pattern ? (u(), r("path", {
1919
- key: 0,
1920
- d: `M${t}Z`,
1921
- fill: `url(#pattern_${q.value}_${l.slotAbsoluteIndex})`
1922
- }, null, 8, ws)) : d("", !0)
1923
- ], 64))), 128))
1924
- ])) : d("", !0),
1925
- l.smooth && l.plots.length > 1 && l.curve ? (u(), r("path", {
1926
- key: 1,
1927
- d: `M${l.curve}`,
1928
- stroke: l.color,
1929
- "stroke-width": e.value.line.strokeWidth,
1930
- "stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
1931
- fill: "none",
1932
- "stroke-linecap": "round"
1933
- }, null, 8, Ss)) : l.plots.length > 1 && l.straight ? (u(), r("path", {
1934
- key: 2,
1935
- d: `M${l.straight}`,
1936
- stroke: l.color,
1937
- "stroke-width": e.value.line.strokeWidth,
1938
- "stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
1939
- fill: "none",
1940
- "stroke-linecap": "round",
1941
- "stroke-linejoin": "round"
1942
- }, null, 8, $s)) : d("", !0),
1943
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
1944
- key: `circle_line_${s}_${n}`
1945
- }, [
1946
- !za.value.linePlot && t && xe(t.value) || za.value.linePlot && t && xe(t.value) && (k.value !== null && k.value === n || O.value !== null && O.value === n) ? (u(), Ie(Ol, {
1947
- key: 0,
1948
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
1949
- color: e.value.line.useGradient ? `url(#lineGradient_${s}_${q.value})` : e.value.line.dot.useSerieColor ? l.color : e.value.line.dot.fill,
1950
- plot: { x: c(T)(t.x), y: c(T)(t.y) },
1951
- radius: k.value !== null && k.value === n || O.value !== null && O.value === n ? (Ae.value.line || 6) * 1.5 : Ae.value.line || 6,
1952
- stroke: e.value.line.dot.useSerieColor ? e.value.chart.backgroundColor : l.color,
1953
- strokeWidth: e.value.line.dot.strokeWidth
1954
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : d("", !0),
1955
- t.comment && e.value.chart.comments.show ? (u(), r("foreignObject", {
1956
- key: 1,
1957
- style: { overflow: "visible" },
1958
- height: "12",
1959
- width: e.value.chart.comments.width,
1960
- x: t.x - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
1961
- y: t.y + e.value.chart.comments.offsetY + 6
1962
- }, [
1963
- g("div", As, [
1964
- U(a.$slots, "plot-comment", {
1965
- plot: { ...t, color: l.color, seriesIndex: s, datapointIndex: n }
1966
- }, void 0, !0)
1967
- ])
1968
- ], 8, Ls)) : d("", !0)
1969
- ], 64))), 128)),
1970
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(c(W)(l.plots).trend) ? (u(), r("g", Ms, [
1971
- g("defs", null, [
1972
- g("marker", {
1973
- id: `line_arrow_${s}`,
1974
- markerWidth: 7,
1975
- markerHeight: 7,
1976
- refX: "0",
1977
- refY: 7 / 2,
1978
- orient: "auto"
1979
- }, [
1980
- g("polygon", {
1981
- points: `0 0, 7 ${7 / 2}, 0 7`,
1982
- fill: l.color
1983
- }, null, 8, Cs)
1984
- ], 8, zs)
1985
- ]),
1986
- l.plots.length > 1 ? (u(), r("line", {
1987
- key: 0,
1988
- x1: c(W)(l.plots).x1,
1989
- x2: c(W)(l.plots).x2,
1990
- y1: c(H)(c(W)(l.plots).y1),
1991
- y2: c(H)(c(W)(l.plots).y2),
1992
- "stroke-width": 1,
1993
- stroke: l.color,
1994
- "stroke-dasharray": 2,
1995
- "marker-end": `url(#line_arrow_${s})`
1996
- }, null, 8, Is)) : d("", !0),
1997
- l.plots.length > 1 ? (u(), r("text", {
1998
- key: 1,
1999
- "text-anchor": "middle",
2000
- x: c(W)(l.plots).x2,
2001
- y: c(W)(l.plots).y2 - 6,
2002
- "font-size": x.value.plotLabels,
2003
- fill: l.color
2004
- }, j(c(me)({
2005
- v: c(W)(l.plots).trend * 100,
2006
- s: "%",
2007
- r: 2
2008
- })), 9, Ts)) : d("", !0)
2009
- ])) : d("", !0)
2010
- ], 6))), 128)),
2011
- (e.value.bar.labels.show || e.value.bar.serieName.show) && f.value.dataLabels.show ? (u(), r("g", Os, [
2012
- (u(!0), r(h, null, m(Re.value, (l, s) => (u(), r(h, {
2013
- key: `xLabel_bar_${s}`
2014
- }, [
2015
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2016
- key: `xLabel_bar_${s}_${n}`
2017
- }, [
2018
- t && (!Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || k.value !== null && k.value === n || O.value !== null && O.value === n) && e.value.bar.labels.show ? (u(), r("text", {
2019
- key: 0,
2020
- x: f.value.useIndividualScale && f.value.isStacked ? t.x + J.value.line / 2 : Ll(t) + _e() / 2 - Pe.value / 2,
2021
- y: c(T)(t.y) + (t.value >= 0 ? e.value.bar.labels.offsetY : -e.value.bar.labels.offsetY * 3),
2022
- "text-anchor": "middle",
2023
- "font-size": x.value.plotLabels,
2024
- fill: e.value.bar.labels.color,
2025
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2026
- }, j(xe(t.value) ? c(ne)(
2027
- e.value.bar.labels.formatter,
2028
- t.value,
2029
- c(me)({
2030
- p: l.prefix || e.value.chart.labels.prefix,
2031
- v: t.value,
2032
- s: l.suffix || e.value.chart.labels.suffix,
2033
- r: e.value.bar.labels.rounding
2034
- }),
2035
- {
2036
- datapoint: t,
2037
- serie: l
2038
- }
2039
- ) : ""), 13, Ns)) : d("", !0),
2040
- t && e.value.bar.serieName.show ? (u(), r("text", {
2041
- key: 1,
2042
- x: f.value.useIndividualScale && f.value.isStacked ? t.x + J.value.line / 2 : t.x + _e() * 1.1,
2043
- y: t.y + (t.value > 0 ? e.value.bar.serieName.offsetY : -e.value.bar.serieName.offsetY * 3),
2044
- "text-anchor": "middle",
2045
- "font-size": x.value.plotLabels,
2046
- fill: e.value.bar.serieName.useSerieColor ? l.color : e.value.bar.serieName.color,
2047
- "font-weight": e.value.bar.serieName.bold ? "bold" : "normal",
2048
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2049
- }, j(e.value.bar.serieName.useAbbreviation ? c(qt)({ source: l.name, length: e.value.bar.serieName.abbreviationSize }) : l.name), 13, Vs)) : d("", !0)
2050
- ], 64))), 128))
2051
- ], 64))), 128))
2052
- ])) : d("", !0),
2053
- e.value.plot.labels.show && f.value.dataLabels.show ? (u(), r("g", Ps, [
2054
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r(h, {
2055
- key: `xLabel_plot_${s}`
2056
- }, [
2057
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2058
- key: `xLabel_plot_${s}_${n}`
2059
- }, [
2060
- t && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || k.value !== null && k.value === n || O.value !== null && O.value === n ? (u(), r("text", {
2061
- key: 0,
2062
- x: t.x,
2063
- y: t.y + e.value.plot.labels.offsetY,
2064
- "text-anchor": "middle",
2065
- "font-size": x.value.plotLabels,
2066
- fill: e.value.plot.labels.color,
2067
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2068
- }, j(xe(t.value) ? c(ne)(
2069
- e.value.plot.labels.formatter,
2070
- t.value,
2071
- c(me)({
2072
- p: l.prefix || e.value.chart.labels.prefix,
2073
- v: t.value,
2074
- s: l.suffix || e.value.chart.labels.suffix,
2075
- r: e.value.plot.labels.rounding
2076
- }),
2077
- {
2078
- datapoint: t,
2079
- serie: l
2080
- }
2081
- ) : ""), 13, Hs)) : d("", !0)
2082
- ], 64))), 128))
2083
- ], 64))), 128))
2084
- ])) : (u(), r("g", Rs, [
2085
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r(h, {
2086
- key: `xLabel_plot_${s}`
2087
- }, [
2088
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2089
- key: `xLabel_plot_${s}_${n}`
2090
- }, [
2091
- e.value.plot.tag.followValue ? (u(), r(h, { key: 1 }, [
2092
- [O.value, k.value, Ue.value].includes(n) && l.useTag ? (u(), r("line", {
2093
- key: 0,
2094
- class: "vue-ui-xy-tag-plot",
2095
- x1: i.value.left,
2096
- x2: i.value.right,
2097
- y1: t.y,
2098
- y2: t.y,
2099
- "stroke-width": 1,
2100
- "stroke-linecap": "round",
2101
- "stroke-dasharray": "2",
2102
- stroke: l.color
2103
- }, null, 8, Ws)) : d("", !0)
2104
- ], 64)) : (u(), r(h, { key: 0 }, [
2105
- t && n === 0 && l.useTag && l.useTag === "start" ? (u(), r("foreignObject", {
2106
- key: 0,
2107
- x: t.x,
2108
- y: t.y - 20,
2109
- height: 24,
2110
- width: "150",
2111
- style: z(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2112
- }, [
2113
- g("div", {
2114
- style: z(`padding: 3px; background:${c($e)(l.color, 80)};color:${c(We)(l.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2115
- innerHTML: c(ne)(
2116
- e.value.plot.tag.formatter,
2117
- t.value,
2118
- l.name,
2119
- {
2120
- datapoint: t,
2121
- seriesIndex: n,
2122
- serieName: l.name
2123
- }
2124
- )
2125
- }, null, 12, Ys)
2126
- ], 12, Bs)) : d("", !0),
2127
- t && n === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (u(), r("foreignObject", {
2128
- key: 1,
2129
- x: t.x - l.name.length * (x.value.plotLabels / 2),
2130
- y: t.y - 20,
2131
- height: 24,
2132
- width: "150",
2133
- style: z(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2134
- }, [
2135
- g("div", {
2136
- style: z(`padding: 3px; background:${c($e)(l.color, 80)};color:${c(We)(l.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2137
- innerHTML: c(ne)(
2138
- e.value.plot.tag.formatter,
2139
- t.value,
2140
- l.name,
2141
- {
2142
- datapoint: t,
2143
- seriesIndex: n,
2144
- serieName: l.name
2145
- }
2146
- )
2147
- }, null, 12, Es)
2148
- ], 12, Fs)) : d("", !0)
2149
- ], 64))
2150
- ], 64))), 128))
2151
- ], 64))), 128))
2152
- ])),
2153
- e.value.line.labels.show && f.value.dataLabels.show ? (u(), r("g", Gs, [
2154
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r(h, {
2155
- key: `xLabel_line_${s}`
2156
- }, [
2157
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2158
- key: `xLabel_line_${s}_${n}`
2159
- }, [
2160
- t && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || k.value !== null && k.value === n || O.value !== null && O.value === n ? (u(), r("text", {
2161
- key: 0,
2162
- x: t.x,
2163
- y: t.y + (t.value >= 0 ? e.value.line.labels.offsetY : -e.value.line.labels.offsetY * 3),
2164
- "text-anchor": "middle",
2165
- "font-size": x.value.plotLabels,
2166
- fill: e.value.line.labels.color,
2167
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2168
- }, j(xe(t.value) ? c(ne)(
2169
- e.value.line.labels.formatter,
2170
- t.value,
2171
- c(me)({
2172
- p: l.prefix || e.value.chart.labels.prefix,
2173
- v: t.value,
2174
- s: l.suffix || e.value.chart.labels.suffix,
2175
- r: e.value.line.labels.rounding
2176
- }),
2177
- {
2178
- datapoint: t,
2179
- serie: l
2180
- }
2181
- ) : ""), 13, Xs)) : d("", !0)
2182
- ], 64))), 128))
2183
- ], 64))), 128))
2184
- ])) : (u(), r("g", Ds, [
2185
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r(h, {
2186
- key: `xLabel_line_${s}`
2187
- }, [
2188
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2189
- key: `xLabel_line_${s}_${n}`
2190
- }, [
2191
- e.value.line.tag.followValue ? (u(), r(h, { key: 1 }, [
2192
- [O.value, k.value, Ue.value].includes(n) && l.useTag ? (u(), r("line", {
2193
- key: 0,
2194
- class: "vue-ui-xy-tag-line",
2195
- x1: i.value.left,
2196
- x2: i.value.right,
2197
- y1: t.y,
2198
- y2: t.y,
2199
- "stroke-width": 1,
2200
- "stroke-linecap": "round",
2201
- "stroke-dasharray": "2",
2202
- stroke: l.color
2203
- }, null, 8, Ks)) : d("", !0)
2204
- ], 64)) : (u(), r(h, { key: 0 }, [
2205
- t && n === 0 && l.useTag && l.useTag === "start" ? (u(), r("foreignObject", {
2206
- key: 0,
2207
- x: t.x,
2208
- y: t.y - 20,
2209
- height: 24,
2210
- width: "150",
2211
- style: z(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2212
- }, [
2213
- g("div", {
2214
- style: z(`padding: 3px; background:${c($e)(l.color, 80)};color:${c(We)(l.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2215
- innerHTML: c(ne)(
2216
- e.value.line.tag.formatter,
2217
- t.value,
2218
- l.name,
2219
- {
2220
- datapoint: t,
2221
- seriesIndex: n,
2222
- serieName: l.name
2223
- }
2224
- )
2225
- }, null, 12, qs)
2226
- ], 12, Us)) : d("", !0),
2227
- t && n === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (u(), r("foreignObject", {
2228
- key: 1,
2229
- x: t.x,
2230
- y: t.y - 20,
2231
- height: 24,
2232
- width: "150",
2233
- style: z(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2234
- }, [
2235
- g("div", {
2236
- style: z(`padding: 3px; background:${c($e)(l.color, 80)};color:${c(We)(l.color)};width:fit-content;font-size:${x.value.plotLabels}px;border-radius: 2px;`),
2237
- innerHTML: c(ne)(
2238
- e.value.line.tag.formatter,
2239
- t.value,
2240
- l.name,
2241
- {
2242
- datapoint: t,
2243
- seriesIndex: n,
2244
- serieName: l.name
2245
- }
2246
- )
2247
- }, null, 12, Js)
2248
- ], 12, Zs)) : d("", !0)
2249
- ], 64))
2250
- ], 64))), 128))
2251
- ], 64))), 128))
2252
- ])),
2253
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r(h, {
2254
- key: `xLabel_line_${s}`
2255
- }, [
2256
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2257
- key: `xLabel_line_${s}_${n}`
2258
- }, [
2259
- t && n === 0 && l.showSerieName && l.showSerieName === "start" ? (u(), r("text", {
2260
- key: 0,
2261
- x: t.x - x.value.plotLabels,
2262
- y: t.y,
2263
- "font-size": x.value.plotLabels,
2264
- "text-anchor": "end",
2265
- fill: l.color,
2266
- innerHTML: c(Tl)({
2267
- content: l.name,
2268
- fontSize: x.value.plotLabels,
2269
- fill: l.color,
2270
- x: t.x - x.value.plotLabels,
2271
- y: t.y,
2272
- maxWords: 2
2273
- }),
2274
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2275
- }, null, 12, Qs)) : d("", !0),
2276
- t && n === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (u(), r("text", {
2277
- key: 1,
2278
- x: t.x + x.value.plotLabels,
2279
- y: t.y,
2280
- "font-size": x.value.plotLabels,
2281
- "text-anchor": "start",
2282
- fill: l.color,
2283
- innerHTML: c(Tl)({
2284
- content: l.name,
2285
- fontSize: x.value.plotLabels,
2286
- fill: l.color,
2287
- x: t.x + x.value.plotLabels,
2288
- y: t.y,
2289
- maxWords: 2
2290
- }),
2291
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2292
- }, null, 12, js)) : d("", !0)
2293
- ], 64))), 128))
2294
- ], 64))), 128)),
2295
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r(h, {
2296
- key: `xLabel_plot_${s}`
2297
- }, [
2298
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2299
- key: `xLabel_plot_${s}_${n}`
2300
- }, [
2301
- t && n === 0 && l.showSerieName && l.showSerieName === "start" ? (u(), r("text", {
2302
- key: 0,
2303
- x: t.x - x.value.plotLabels,
2304
- y: t.y,
2305
- "font-size": x.value.plotLabels,
2306
- "text-anchor": "end",
2307
- fill: l.color,
2308
- innerHTML: c(Tl)({
2309
- content: l.name,
2310
- fontSize: x.value.plotLabels,
2311
- fill: l.color,
2312
- x: t.x - x.value.plotLabels,
2313
- y: t.y,
2314
- maxWords: 2
2315
- }),
2316
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2317
- }, null, 12, eu)) : d("", !0),
2318
- t && n === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (u(), r("text", {
2319
- key: 1,
2320
- x: t.x + x.value.plotLabels,
2321
- y: t.y,
2322
- "font-size": x.value.plotLabels,
2323
- "text-anchor": "start",
2324
- fill: l.color,
2325
- innerHTML: c(Tl)({
2326
- content: l.name,
2327
- fontSize: x.value.plotLabels,
2328
- fill: l.color,
2329
- x: t.x + x.value.plotLabels,
2330
- y: t.y,
2331
- maxWords: 2
2332
- }),
2333
- style: z(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2334
- }, null, 12, lu)) : d("", !0)
2335
- ], 64))), 128))
2336
- ], 64))), 128)),
2337
- f.value.useIndividualScale && !f.value.isStacked ? (u(), r(h, { key: 11 }, [
2338
- g("defs", null, [
2339
- (u(!0), r(h, null, m(gl.value, (l, s) => (u(), r("linearGradient", {
2340
- id: `individual_scale_gradient_${q.value}_${s}`,
2341
- x1: "0%",
2342
- x2: "100%",
2343
- y1: "0%",
2344
- y2: "0%"
2345
- }, [
2346
- g("stop", {
2347
- offset: "0%",
2348
- "stop-color": e.value.chart.backgroundColor,
2349
- "stop-opacity": "0"
2350
- }, null, 8, tu),
2351
- g("stop", {
2352
- offset: "100%",
2353
- "stop-color": l.color,
2354
- "stop-opacity": "0.2"
2355
- }, null, 8, ou)
2356
- ], 8, au))), 256))
2357
- ]),
2358
- (u(!0), r(h, null, m(gl.value, (l, s) => (u(), r("rect", {
2359
- x: l.x - e.value.chart.grid.labels.yAxis.labelWidth + B.value,
2360
- y: i.value.top,
2361
- width: e.value.chart.grid.labels.yAxis.labelWidth,
2362
- height: i.value.height < 0 ? 10 : i.value.height,
2363
- fill: M.value === l.groupId ? `url(#individual_scale_gradient_${q.value}_${s})` : "transparent",
2364
- onMouseenter: (t) => M.value = l.groupId,
2365
- onMouseleave: v[0] || (v[0] = (t) => M.value = null)
2366
- }, null, 40, su))), 256))
2367
- ], 64)) : d("", !0),
2368
- g("g", null, [
2369
- e.value.chart.grid.labels.axis.yLabel && !f.value.useIndividualScale ? (u(), r("text", {
2370
- key: 0,
2371
- ref_key: "yAxisLabel",
2372
- ref: Rl,
2373
- "font-size": x.value.yAxis,
2374
- fill: e.value.chart.grid.labels.color,
2375
- transform: G.value ? void 0 : `translate(${x.value.yAxis + e.value.chart.grid.labels.axis.yLabelOffsetX}, ${i.value.top + i.value.height / 2}) rotate(-90)`,
2376
- "text-anchor": "middle",
2377
- style: { transition: "none" }
2378
- }, j(e.value.chart.grid.labels.axis.yLabel), 9, uu)) : d("", !0),
2379
- e.value.chart.grid.labels.axis.xLabel ? (u(), r("text", {
2380
- key: 1,
2381
- ref_key: "xAxisLabel",
2382
- ref: Hl,
2383
- "text-anchor": "middle",
2384
- x: G.value ? ql.value.width / 2 - Math.abs(ql.value.x) : Z.value / 2,
2385
- y: G.value ? void 0 : i.value.bottom + x.value.yAxis + x.value.xAxis * 1.3 + e.value.chart.grid.labels.axis.xLabelOffsetY,
2386
- "font-size": x.value.yAxis,
2387
- fill: e.value.chart.grid.labels.color
2388
- }, j(e.value.chart.grid.labels.axis.xLabel), 9, iu)) : d("", !0)
2389
- ]),
2390
- e.value.chart.grid.labels.xAxisLabels.show ? (u(), r("g", {
2391
- key: 12,
2392
- ref_key: "timeLabelsEls",
2393
- ref: Bl
2394
- }, [
2395
- a.$slots["time-label"] ? (u(!0), r(h, { key: 0 }, m(de.value, (l, s) => U(a.$slots, "time-label", la({
2396
- key: `time_label_${s}`,
2397
- ref_for: !0
2398
- }, {
2399
- x: i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2,
2400
- y: G.value ? i.value.bottom + e.value.chart.grid.labels.xAxisLabels.yOffset : i.value.bottom + x.value.xAxis * 1.3 + e.value.chart.grid.labels.xAxisLabels.yOffset,
2401
- fontSize: x.value.xAxis,
2402
- fill: e.value.chart.grid.labels.xAxisLabels.color,
2403
- transform: G.value ? `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})` : `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + x.value.xAxis * 1.3 + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
2404
- absoluteIndex: l.absoluteIndex,
2405
- content: l.text,
2406
- textAnchor: e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2407
- show: l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (s === 0 || s === de.value.length - 1) && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && k.value === s && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && s % Math.floor((S.value.end - S.value.start) / e.value.chart.grid.labels.xAxisLabels.modulo) === 0
2408
- }), void 0, !0)), 128)) : (u(!0), r(h, { key: 1 }, m(de.value, (l, s) => (u(), r("g", {
2409
- key: `time_label_${s}`
2410
- }, [
2411
- l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (s === 0 || s === de.value.length - 1) && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && k.value === s && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && s % Math.floor((S.value.end - S.value.start) / e.value.chart.grid.labels.xAxisLabels.modulo) === 0 ? (u(), r(h, { key: 0 }, [
2412
- String(l.text).includes(`
2413
- `) ? (u(), r("text", {
2414
- key: 1,
2415
- "text-anchor": e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2416
- "font-size": x.value.xAxis,
2417
- fill: e.value.chart.grid.labels.xAxisLabels.color,
2418
- transform: G.value ? `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})` : `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + x.value.xAxis * 1.3 + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
2419
- style: z({
2420
- cursor: ma() ? "pointer" : "default"
2421
- }),
2422
- innerHTML: c(Zt)({
2423
- content: String(l.text),
2424
- fontSize: x.value.xAxis,
2425
- fill: e.value.chart.grid.labels.xAxisLabels.color,
2426
- x: 0,
2427
- y: 0
2428
- }),
2429
- onClick: () => ka(l, s)
2430
- }, null, 12, nu)) : (u(), r("text", {
2431
- key: 0,
2432
- "text-anchor": e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2433
- "font-size": x.value.xAxis,
2434
- fill: e.value.chart.grid.labels.xAxisLabels.color,
2435
- transform: G.value ? `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})` : `translate(${i.value.left + i.value.width / b.value * s + i.value.width / b.value / 2}, ${i.value.bottom + x.value.xAxis * 1.3 + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
2436
- style: z({
2437
- cursor: ma() ? "pointer" : "default"
2438
- }),
2439
- onClick: () => ka(l, s)
2440
- }, j(l.text || ""), 13, ru))
2441
- ], 64)) : d("", !0)
2442
- ]))), 128))
2443
- ], 512)) : d("", !0),
2444
- Ia.value.length && !f.value.isStacked ? (u(), r("g", cu, [
2445
- (u(!0), r(h, null, m(Ia.value, (l) => (u(), r("g", {
2446
- key: l.uid
2447
- }, [
2448
- l.yTop && l.show && isFinite(l.yTop) ? (u(), r("line", {
2449
- key: 0,
2450
- x1: l.x1,
2451
- y1: l.yTop,
2452
- x2: l.x2,
2453
- y2: l.yTop,
2454
- stroke: l.config.line.stroke,
2455
- "stroke-width": l.config.line.strokeWidth,
2456
- "stroke-dasharray": l.config.line.strokeDasharray,
2457
- "stroke-linecap": "round",
2458
- style: { animation: "none !important" }
2459
- }, null, 8, vu)) : d("", !0),
2460
- l.yBottom && l.show && isFinite(l.yBottom) ? (u(), r("line", {
2461
- key: 1,
2462
- x1: l.x1,
2463
- y1: l.yBottom,
2464
- x2: l.x2,
2465
- y2: l.yBottom,
2466
- stroke: l.config.line.stroke,
2467
- "stroke-width": l.config.line.strokeWidth,
2468
- "stroke-dasharray": l.config.line.strokeDasharray,
2469
- "stroke-linecap": "round",
2470
- style: { animation: "none !important" }
2471
- }, null, 8, du)) : d("", !0),
2472
- l.hasArea && l.show && isFinite(l.yTop) && isFinite(l.yBottom) ? (u(), r("rect", {
2473
- key: 2,
2474
- y: Math.min(l.yTop, l.yBottom),
2475
- x: l.x1,
2476
- width: i.value.width,
2477
- height: c(T)(l.areaHeight, 0),
2478
- fill: c($e)(l.config.area.fill, l.config.area.opacity),
2479
- style: { animation: "none !important" }
2480
- }, null, 8, hu)) : d("", !0),
2481
- l.config.label.text && l.show && isFinite(l._box.y) ? (u(), r("rect", la({
2482
- key: 3,
2483
- class: "vue-ui-xy-annotation-label-box"
2484
- }, { ref_for: !0 }, l._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : d("", !0),
2485
- l.config.label.text && l.show && isFinite(l._text.y) ? (u(), r("text", {
2486
- key: 4,
2487
- id: l.id,
2488
- class: "vue-ui-xy-annotation-label",
2489
- x: l._text.x,
2490
- y: l._text.y,
2491
- "font-size": l.config.label.fontSize,
2492
- fill: l.config.label.color,
2493
- "text-anchor": l.config.label.textAnchor
2494
- }, j(l.config.label.text), 9, fu)) : d("", !0)
2495
- ]))), 128))
2496
- ])) : d("", !0),
2497
- g("g", null, [
2498
- (u(!0), r(h, null, m(b.value, (l, s) => (u(), r("rect", {
2499
- key: `tooltip_trap_${s}`,
2500
- x: i.value.left + i.value.width / b.value * s,
2501
- y: i.value.top,
2502
- height: i.value.height < 0 ? 10 : i.value.height,
2503
- width: i.value.width / b.value < 0 ? 1e-5 : i.value.width / b.value,
2504
- fill: "transparent",
2505
- onMouseenter: (t) => Na(!0, s),
2506
- onMouseleave: v[1] || (v[1] = (t) => Na(!1)),
2507
- onClick: (t) => bt(s)
2508
- }, null, 40, gu))), 128))
2509
- ]),
2510
- e.value.chart.timeTag.show && (![null, void 0].includes(k.value) || ![null, void 0].includes(O.value)) ? (u(), r("g", xu, [
2511
- (u(), r("foreignObject", {
2512
- x: i.value.left + i.value.width / b.value * ((k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)) - 100 + i.value.width / b.value / 2,
2513
- y: i.value.bottom,
2514
- width: "200",
2515
- height: "40",
2516
- style: { overflow: "visible !important" }
2517
- }, [
2518
- g("div", {
2519
- class: "vue-ui-xy-time-tag",
2520
- style: z(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.value.chart.timeTag.backgroundColor};color:${e.value.chart.timeTag.color};font-size:${e.value.chart.timeTag.fontSize}px`)
2521
- }, j(de.value[(k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)].text || (k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)), 5)
2522
- ], 8, bu)),
2523
- g("circle", {
2524
- cx: i.value.left + i.value.width / b.value * ((k.value !== null ? k.value : 0) || (O.value !== null ? O.value : 0)) + i.value.width / b.value / 2,
2525
- cy: i.value.bottom,
2526
- r: e.value.chart.timeTag.circleMarker.radius,
2527
- fill: e.value.chart.timeTag.circleMarker.color
2528
- }, null, 8, mu)
2529
- ])) : d("", !0)
2530
- ])) : d("", !0),
2531
- U(a.$slots, "svg", { svg: rt.value }, void 0, !0)
2532
- ], 512)
2533
- ], 14, no)),
2534
- a.$slots.watermark ? (u(), r("div", yu, [
2535
- U(a.$slots, "watermark", Qe(je({ isPrinting: c(Ul) || c(fa) })), void 0, !0)
2536
- ])) : d("", !0),
2537
- (u(!0), r(h, null, m(we.value, (l, s) => (u(), r(h, {
2538
- key: `tag_line_${s}`
2539
- }, [
2540
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2541
- key: `tag_line_${s}_${n}`
2542
- }, [
2543
- [O.value, k.value, Ue.value].includes(n) && l.useTag && l.useTag === "end" && e.value.line.tag.followValue ? (u(), r("div", {
2544
- key: 0,
2545
- ref_for: !0,
2546
- ref: (o) => $l(s, n, o, "right", "line"),
2547
- class: "vue-ui-xy-tag",
2548
- "data-tag": "right",
2549
- style: z({
2550
- position: "fixed",
2551
- top: c(Ge)({
2552
- svgElement: ye.value,
2553
- x: i.value.right + e.value.line.tag.fontSize / 1.5,
2554
- y: t.y,
2555
- element: Oe.value[`${s}_${n}_right_line`],
2556
- position: "right"
2557
- }).top + "px",
2558
- left: c(Ge)({
2559
- svgElement: ye.value,
2560
- x: i.value.right + e.value.line.tag.fontSize / 1.5,
2561
- y: t.y,
2562
- element: Oe.value[`${s}_${n}_right_line`],
2563
- position: "right"
2564
- }).left + "px",
2565
- height: "fit-content",
2566
- width: "fit-content",
2567
- background: l.color,
2568
- color: c(We)(l.color),
2569
- padding: "0 6px",
2570
- fontSize: e.value.line.tag.fontSize + "px",
2571
- opacity: 1
2572
- })
2573
- }, [
2574
- (u(), r("svg", pu, [
2575
- g("path", {
2576
- d: "M 0,10 10,0 10,20 Z",
2577
- fill: l.color,
2578
- stroke: "none"
2579
- }, null, 8, ku)
2580
- ])),
2581
- g("div", {
2582
- class: "vue-ui-xy-tag-content",
2583
- innerHTML: c(ne)(
2584
- e.value.line.tag.formatter,
2585
- t.value,
2586
- l.name,
2587
- {
2588
- datapoint: t,
2589
- seriesIndex: n,
2590
- serieName: l.name
2591
- }
2592
- )
2593
- }, null, 8, _u)
2594
- ], 4)) : d("", !0),
2595
- [O.value, k.value, Ue.value].includes(n) && l.useTag && l.useTag === "start" && e.value.line.tag.followValue ? (u(), r("div", {
2596
- key: 1,
2597
- ref_for: !0,
2598
- ref: (o) => $l(s, n, o, "left", "line"),
2599
- class: "vue-ui-xy-tag",
2600
- "data-tag": "left",
2601
- style: z({
2602
- position: "fixed",
2603
- top: c(Ge)({
2604
- svgElement: ye.value,
2605
- x: i.value.left - e.value.line.tag.fontSize / 1.5,
2606
- y: t.y,
2607
- element: Oe.value[`${s}_${n}_left_line`],
2608
- position: "left"
2609
- }).top + "px",
2610
- left: c(Ge)({
2611
- svgElement: ye.value,
2612
- x: i.value.left - e.value.line.tag.fontSize / 1.5,
2613
- y: t.y,
2614
- element: Oe.value[`${s}_${n}_left_line`],
2615
- position: "left"
2616
- }).left + "px",
2617
- height: "fit-content",
2618
- width: "fit-content",
2619
- background: l.color,
2620
- color: c(We)(l.color),
2621
- padding: "0 6px",
2622
- fontSize: e.value.line.tag.fontSize + "px",
2623
- opacity: 1
2624
- })
2625
- }, [
2626
- (u(), r("svg", wu, [
2627
- g("path", {
2628
- d: "M 0,0 10,10 0,20 Z",
2629
- fill: l.color,
2630
- stroke: "none"
2631
- }, null, 8, Su)
2632
- ])),
2633
- g("div", {
2634
- class: "vue-ui-xy-tag-content",
2635
- innerHTML: c(ne)(
2636
- e.value.line.tag.formatter,
2637
- t.value,
2638
- l.name,
2639
- {
2640
- datapoint: t,
2641
- seriesIndex: n,
2642
- serieName: l.name
2643
- }
2644
- )
2645
- }, null, 8, $u)
2646
- ], 4)) : d("", !0)
2647
- ], 64))), 128))
2648
- ], 64))), 128)),
2649
- (u(!0), r(h, null, m(ze.value, (l, s) => (u(), r(h, {
2650
- key: `tag_plot_${s}`
2651
- }, [
2652
- (u(!0), r(h, null, m(l.plots, (t, n) => (u(), r(h, {
2653
- key: `tag_plot_${s}_${n}`
2654
- }, [
2655
- [O.value, k.value, Ue.value].includes(n) && l.useTag && l.useTag === "end" && e.value.plot.tag.followValue ? (u(), r("div", {
2656
- key: 0,
2657
- ref_for: !0,
2658
- ref: (o) => $l(s, n, o, "right", "plot"),
2659
- class: "vue-ui-xy-tag",
2660
- "data-tag": "right",
2661
- style: z({
2662
- position: "fixed",
2663
- top: c(Ge)({
2664
- svgElement: ye.value,
2665
- x: i.value.right + e.value.plot.tag.fontSize / 1.5,
2666
- y: t.y,
2667
- element: Oe.value[`${s}_${n}_right_plot`],
2668
- position: "right"
2669
- }).top + "px",
2670
- left: c(Ge)({
2671
- svgElement: ye.value,
2672
- x: i.value.right + e.value.plot.tag.fontSize / 1.5,
2673
- y: t.y,
2674
- element: Oe.value[`${s}_${n}_right_plot`],
2675
- position: "right"
2676
- }).left + "px",
2677
- height: "fit-content",
2678
- width: "fit-content",
2679
- background: l.color,
2680
- color: c(We)(l.color),
2681
- padding: "0 6px",
2682
- fontSize: e.value.plot.tag.fontSize + "px",
2683
- opacity: 1
2684
- })
2685
- }, [
2686
- (u(), r("svg", Lu, [
2687
- g("path", {
2688
- d: "M 0,10 10,0 10,20 Z",
2689
- fill: l.color,
2690
- stroke: "none"
2691
- }, null, 8, Au)
2692
- ])),
2693
- g("div", {
2694
- class: "vue-ui-xy-tag-content",
2695
- innerHTML: c(ne)(
2696
- e.value.plot.tag.formatter,
2697
- t.value,
2698
- l.name,
2699
- {
2700
- datapoint: t,
2701
- seriesIndex: n,
2702
- serieName: l.name
2703
- }
2704
- )
2705
- }, null, 8, Mu)
2706
- ], 4)) : d("", !0),
2707
- [O.value, k.value, Ue.value].includes(n) && l.useTag && l.useTag === "start" && e.value.plot.tag.followValue ? (u(), r("div", {
2708
- key: 1,
2709
- ref_for: !0,
2710
- ref: (o) => $l(s, n, o, "left", "plot"),
2711
- class: "vue-ui-xy-tag",
2712
- "data-tag": "left",
2713
- style: z({
2714
- position: "fixed",
2715
- top: c(Ge)({
2716
- svgElement: ye.value,
2717
- x: i.value.left - e.value.plot.tag.fontSize / 1.5,
2718
- y: t.y,
2719
- element: Oe.value[`${s}_${n}_left_plot`],
2720
- position: "left"
2721
- }).top + "px",
2722
- left: c(Ge)({
2723
- svgElement: ye.value,
2724
- x: i.value.left - e.value.plot.tag.fontSize / 1.5,
2725
- y: t.y,
2726
- element: Oe.value[`${s}_${n}_left_plot`],
2727
- position: "left"
2728
- }).left + "px",
2729
- height: "fit-content",
2730
- width: "fit-content",
2731
- background: l.color,
2732
- color: c(We)(l.color),
2733
- padding: "0 6px",
2734
- fontSize: e.value.plot.tag.fontSize + "px",
2735
- opacity: 1
2736
- })
2737
- }, [
2738
- (u(), r("svg", zu, [
2739
- g("path", {
2740
- d: "M 0,0 10,10 0,20 Z",
2741
- fill: l.color,
2742
- stroke: "none"
2743
- }, null, 8, Cu)
2744
- ])),
2745
- g("div", {
2746
- class: "vue-ui-xy-tag-content",
2747
- innerHTML: c(ne)(
2748
- e.value.plot.tag.formatter,
2749
- t.value,
2750
- l.name,
2751
- {
2752
- datapoint: t,
2753
- seriesIndex: n,
2754
- serieName: l.name
2755
- }
2756
- )
2757
- }, null, 8, Iu)
2758
- ], 4)) : d("", !0)
2759
- ], 64))), 128))
2760
- ], 64))), 128)),
2761
- e.value.chart.zoom.show && He.value > 6 && Xl.value ? (u(), Ie(lo, {
2762
- ref_key: "chartSlicer",
2763
- ref: Le,
2764
- key: `slicer_${Fl.value}`,
2765
- background: e.value.chart.zoom.color,
2766
- fontSize: e.value.chart.zoom.fontSize,
2767
- useResetSlot: e.value.chart.zoom.useResetSlot,
2768
- labelLeft: de.value[0].text,
2769
- labelRight: de.value.at(-1).text,
2770
- textColor: e.value.chart.color,
2771
- inputColor: e.value.chart.zoom.color,
2772
- selectColor: e.value.chart.zoom.highlightColor,
2773
- borderColor: e.value.chart.backgroundColor,
2774
- minimap: At.value,
2775
- smoothMinimap: e.value.chart.zoom.minimap.smooth,
2776
- minimapSelectedColor: e.value.chart.zoom.minimap.selectedColor,
2777
- minimapSelectionRadius: e.value.chart.zoom.minimap.selectionRadius,
2778
- minimapLineColor: e.value.chart.zoom.minimap.lineColor,
2779
- minimapSelectedColorOpacity: e.value.chart.zoom.minimap.selectedColorOpacity,
2780
- minimapSelectedIndex: k.value,
2781
- minimapIndicatorColor: e.value.chart.zoom.minimap.indicatorColor,
2782
- verticalHandles: e.value.chart.zoom.minimap.verticalHandles,
2783
- max: He.value,
2784
- min: 0,
2785
- valueStart: S.value.start,
2786
- valueEnd: S.value.end,
2787
- start: S.value.start,
2788
- "onUpdate:start": v[2] || (v[2] = (l) => S.value.start = l),
2789
- end: S.value.end,
2790
- "onUpdate:end": v[3] || (v[3] = (l) => S.value.end = l),
2791
- refreshStartPoint: e.value.chart.zoom.startIndex !== null ? e.value.chart.zoom.startIndex : 0,
2792
- refreshEndPoint: e.value.chart.zoom.endIndex !== null ? e.value.chart.zoom.endIndex + 1 : Math.max(...Nl.dataset.map((l) => c(Ee)({ data: l.series, threshold: e.value.downsample.threshold }).length)),
2793
- enableRangeHandles: e.value.chart.zoom.enableRangeHandles,
2794
- enableSelectionDrag: e.value.chart.zoom.enableSelectionDrag,
2795
- onReset: xt,
2796
- onTrapMouse: ht
2797
- }, {
2798
- "reset-action": se(({ reset: l }) => [
2799
- U(a.$slots, "reset-action", Qe(je({ reset: l })), void 0, !0)
2800
- ]),
2801
- _: 3
2802
- }, 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"])) : d("", !0),
2803
- e.value.chart.legend.show ? (u(), r("div", {
2804
- key: 6,
2805
- ref_key: "chartLegend",
2806
- ref: al,
2807
- class: "vue-ui-xy-legend",
2808
- style: z(`font-size:${e.value.chart.legend.fontSize}px`)
2809
- }, [
2810
- (u(!0), r(h, null, m(Me.value, (l, s) => (u(), r("div", {
2811
- key: `div_legend_item_${s}`,
2812
- onClick: (t) => Ma(l),
2813
- class: Ke({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": ae.value.includes(l.id) })
2814
- }, [
2815
- vl.value[l.type] === "line" ? (u(), r("svg", Ou, [
2816
- g("rect", {
2817
- x: "0",
2818
- y: "7.5",
2819
- rx: "1.5",
2820
- stroke: e.value.chart.backgroundColor,
2821
- "stroke-width": 0.5,
2822
- height: "3",
2823
- width: "20",
2824
- fill: l.color
2825
- }, null, 8, Nu),
2826
- ml(Ol, {
2827
- plot: { x: 10, y: 9 },
2828
- radius: 4,
2829
- color: l.color,
2830
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
2831
- stroke: e.value.chart.backgroundColor,
2832
- strokeWidth: 0.5
2833
- }, null, 8, ["color", "shape", "stroke"])
2834
- ])) : vl.value[l.type] === "bar" ? (u(), r("svg", Vu, [
2835
- vl.value[l.type] === "bar" && a.$slots.pattern ? (u(), r("rect", {
2836
- key: 0,
2837
- x: "0",
2838
- y: "0",
2839
- rx: "1",
2840
- height: "40",
2841
- width: "40",
2842
- stroke: "none",
2843
- fill: l.color
2844
- }, null, 8, Pu)) : d("", !0),
2845
- vl.value[l.type] === "bar" ? (u(), r("rect", {
2846
- key: 1,
2847
- x: "0",
2848
- y: "0",
2849
- rx: "1",
2850
- height: "40",
2851
- width: "40",
2852
- stroke: "none",
2853
- fill: a.$slots.pattern ? `url(#pattern_${q.value}_${l.slotAbsoluteIndex})` : l.color
2854
- }, null, 8, Hu)) : d("", !0)
2855
- ])) : (u(), r("svg", Ru, [
2856
- ml(Ol, {
2857
- plot: { x: 6, y: 6 },
2858
- radius: 5,
2859
- color: l.color,
2860
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle"
2861
- }, null, 8, ["color", "shape"])
2862
- ])),
2863
- g("span", {
2864
- style: z(`color:${e.value.chart.legend.color}`)
2865
- }, j(l.name), 5)
2866
- ], 10, Tu))), 128))
2867
- ], 4)) : (u(), r("div", {
2868
- key: 7,
2869
- ref_key: "chartLegend",
2870
- ref: al
2871
- }, [
2872
- U(a.$slots, "legend", { legend: Me.value }, void 0, !0)
2873
- ], 512)),
2874
- a.$slots.source ? (u(), r("div", {
2875
- key: 8,
2876
- ref_key: "source",
2877
- ref: nl,
2878
- dir: "auto"
2879
- }, [
2880
- U(a.$slots, "source", {}, void 0, !0)
2881
- ], 512)) : d("", !0),
2882
- ml(c(Qa), {
2883
- show: f.value.showTooltip && ra.value,
2884
- backgroundColor: e.value.chart.tooltip.backgroundColor,
2885
- color: e.value.chart.tooltip.color,
2886
- fontSize: e.value.chart.tooltip.fontSize,
2887
- borderRadius: e.value.chart.tooltip.borderRadius,
2888
- borderColor: e.value.chart.tooltip.borderColor,
2889
- borderWidth: e.value.chart.tooltip.borderWidth,
2890
- backgroundOpacity: e.value.chart.tooltip.backgroundOpacity,
2891
- position: e.value.chart.tooltip.position,
2892
- offsetY: e.value.chart.tooltip.offsetY,
2893
- parent: a.$refs.chart,
2894
- content: Mt.value,
2895
- isFullscreen: tl.value,
2896
- isCustom: e.value.chart.tooltip.customFormat && typeof e.value.chart.tooltip.customFormat == "function"
2897
- }, {
2898
- "tooltip-before": se(() => [
2899
- U(a.$slots, "tooltip-before", Qe(je({ ...Ta.value })), void 0, !0)
2900
- ]),
2901
- "tooltip-after": se(() => [
2902
- U(a.$slots, "tooltip-after", Qe(je({ ...Ta.value })), void 0, !0)
2903
- ]),
2904
- _: 3
2905
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
2906
- Xl.value ? (u(), Ie(c(at), {
2907
- key: 9,
2908
- hideDetails: "",
2909
- config: {
2910
- open: f.value.showTable,
2911
- maxHeight: 1e4,
2912
- body: {
2913
- backgroundColor: e.value.chart.backgroundColor,
2914
- color: e.value.chart.color
2915
- },
2916
- head: {
2917
- backgroundColor: e.value.chart.backgroundColor,
2918
- color: e.value.chart.color
2919
- }
2920
- }
2921
- }, {
2922
- content: se(() => [
2923
- g("div", {
2924
- style: z(`${c(Ul) ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
2925
- }, [
2926
- g("div", Bu, [
2927
- Vt(g("input", {
2928
- type: "checkbox",
2929
- "onUpdate:modelValue": v[4] || (v[4] = (l) => dl.value = l)
2930
- }, null, 512), [
2931
- [Pt, dl.value]
2932
- ]),
2933
- g("div", {
2934
- onClick: v[5] || (v[5] = (l) => dl.value = !dl.value),
2935
- style: { cursor: "pointer" }
2936
- }, [
2937
- ml(c(et), {
2938
- name: "chartLine",
2939
- size: 20,
2940
- stroke: e.value.chart.color
2941
- }, null, 8, ["stroke"])
2942
- ])
2943
- ]),
2944
- dl.value ? (u(), Ie(c(lt), {
2945
- key: `sparkline_${El.value}`,
2946
- dataset: St.value,
2947
- config: $t.value
2948
- }, null, 8, ["dataset", "config"])) : (u(), Ie(c(Ka), {
2949
- key: `table_${ca.value}`,
2950
- colNames: Al.value.colNames,
2951
- head: Al.value.head,
2952
- body: Al.value.body,
2953
- config: Al.value.config,
2954
- title: `${e.value.chart.title.text}${e.value.chart.title.subtitle.text ? ` : ${e.value.chart.title.subtitle.text}` : ""}`,
2955
- onClose: v[6] || (v[6] = (l) => f.value.showTable = !1)
2956
- }, {
2957
- th: se(({ th: l }) => [
2958
- g("div", { innerHTML: l }, null, 8, Yu)
2959
- ]),
2960
- td: se(({ td: l }) => [
2961
- Ht(j(isNaN(Number(l)) ? l : c(me)({
2962
- p: e.value.chart.labels.prefix,
2963
- v: l,
2964
- s: e.value.chart.labels.suffix,
2965
- r: e.value.table.rounding
2966
- })), 1)
2967
- ]),
2968
- _: 1
2969
- }, 8, ["colNames", "head", "body", "config", "title"]))
2970
- ], 4)
2971
- ]),
2972
- _: 1
2973
- }, 8, ["config"])) : d("", !0),
2974
- c(Dl) ? (u(), Ie(uo, { key: 10 })) : d("", !0)
2975
- ], 46, ro));
2976
- }
2977
- }, ju = /* @__PURE__ */ io(Fu, [["__scopeId", "data-v-92ac0ab7"]]);
2978
- export {
2979
- ju as default
2980
- };