vue-data-ui 3.0.0-next.31 → 3.0.0-next.32

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