vue-data-ui 3.0.0-next.13 → 3.0.0-next.14

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