vue-data-ui 3.0.0-next.9 → 3.0.1

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