vue-data-ui 3.3.2 → 3.4.0

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 (161) hide show
  1. package/dist/{Arrow-DLi6NnGD.js → Arrow-CRe_nKB4.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CVGErydD.js → BaseDraggableDialog-CbuLbfrc.js} +2 -2
  3. package/dist/{BaseIcon-eZbszQrv.js → BaseIcon-B5KaGWWC.js} +1 -1
  4. package/dist/{ColorPicker-BoPM4Ejg.js → ColorPicker-BMztHpBp.js} +10 -10
  5. package/dist/{DataTable-yAMEyP6y.js → DataTable-DOx3zgih.js} +2 -2
  6. package/dist/{Legend-By4rru90.js → Legend-C8u37J42.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-C7QqIewT.js → NonSvgPenAndPaper-BcxfJ-r2.js} +3 -3
  8. package/dist/{PackageVersion-r-Q1R3nV.js → PackageVersion-DyDViSOy.js} +1 -1
  9. package/dist/{PenAndPaper-Bo-lMUik.js → PenAndPaper-Dj2diYr0.js} +3 -3
  10. package/dist/{Shape-BceHSLHf.js → Shape-BhNvlGIN.js} +1 -1
  11. package/dist/{Slicer-Znzt0gSE.js → Slicer-BHgEsIBU.js} +111 -111
  12. package/dist/SlicerPreview-Cobmb_1S.js +1148 -0
  13. package/dist/{SparkTooltip--YwqrrgZ.js → SparkTooltip-CL3cNRQ_.js} +1 -1
  14. package/dist/{Title-Camz1Lce.js → Title-CFmv95In.js} +1 -1
  15. package/dist/{Tooltip-VOcQEHa4.js → Tooltip-Cs4v8OnI.js} +1 -1
  16. package/dist/{UserOptions-CSja1SGU.js → UserOptions-C0YT60JN.js} +2 -2
  17. package/dist/components/arrow.js +1 -1
  18. package/dist/components/vue-ui-3d-bar.js +1 -1
  19. package/dist/components/vue-ui-accordion.js +1 -1
  20. package/dist/components/vue-ui-age-pyramid.js +1 -1
  21. package/dist/components/vue-ui-annotator.js +1 -1
  22. package/dist/components/vue-ui-bullet.js +1 -1
  23. package/dist/components/vue-ui-candlestick.js +1 -1
  24. package/dist/components/vue-ui-carousel-table.js +1 -1
  25. package/dist/components/vue-ui-chestnut.js +1 -1
  26. package/dist/components/vue-ui-chord.js +1 -1
  27. package/dist/components/vue-ui-circle-pack.js +1 -1
  28. package/dist/components/vue-ui-cursor.js +1 -1
  29. package/dist/components/vue-ui-dashboard.js +1 -1
  30. package/dist/components/vue-ui-digits.js +1 -1
  31. package/dist/components/vue-ui-donut-evolution.js +1 -1
  32. package/dist/components/vue-ui-donut.js +1 -1
  33. package/dist/components/vue-ui-dumbbell.js +1 -1
  34. package/dist/components/vue-ui-flow.js +1 -1
  35. package/dist/components/vue-ui-funnel.js +1 -1
  36. package/dist/components/vue-ui-galaxy.js +1 -1
  37. package/dist/components/vue-ui-gauge.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-heatmap.js +1 -1
  40. package/dist/components/vue-ui-history-plot.js +1 -1
  41. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  42. package/dist/components/vue-ui-icon.js +1 -1
  43. package/dist/components/vue-ui-kpi.js +1 -1
  44. package/dist/components/vue-ui-mini-loader.js +1 -1
  45. package/dist/components/vue-ui-molecule.js +1 -1
  46. package/dist/components/vue-ui-mood-radar.js +1 -1
  47. package/dist/components/vue-ui-nested-donuts.js +1 -1
  48. package/dist/components/vue-ui-onion.js +1 -1
  49. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  50. package/dist/components/vue-ui-quadrant.js +1 -1
  51. package/dist/components/vue-ui-quick-chart.js +1 -1
  52. package/dist/components/vue-ui-radar.js +1 -1
  53. package/dist/components/vue-ui-rating.js +1 -1
  54. package/dist/components/vue-ui-relation-circle.js +1 -1
  55. package/dist/components/vue-ui-ridgeline.js +1 -1
  56. package/dist/components/vue-ui-rings.js +1 -1
  57. package/dist/components/vue-ui-scatter.js +1 -1
  58. package/dist/components/vue-ui-skeleton.js +1 -1
  59. package/dist/components/vue-ui-smiley.js +1 -1
  60. package/dist/components/vue-ui-spark-trend.js +1 -1
  61. package/dist/components/vue-ui-sparkbar.js +1 -1
  62. package/dist/components/vue-ui-sparkgauge.js +1 -1
  63. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  64. package/dist/components/vue-ui-sparkline.js +1 -1
  65. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  66. package/dist/components/vue-ui-stackbar.js +1 -1
  67. package/dist/components/vue-ui-strip-plot.js +1 -1
  68. package/dist/components/vue-ui-table-heatmap.js +1 -1
  69. package/dist/components/vue-ui-table-sparkline.js +1 -1
  70. package/dist/components/vue-ui-table.js +1 -1
  71. package/dist/components/vue-ui-thermometer.js +1 -1
  72. package/dist/components/vue-ui-timer.js +1 -1
  73. package/dist/components/vue-ui-tiremarks.js +1 -1
  74. package/dist/components/vue-ui-treemap.js +1 -1
  75. package/dist/components/vue-ui-vertical-bar.js +1 -1
  76. package/dist/components/vue-ui-waffle.js +1 -1
  77. package/dist/components/vue-ui-wheel.js +1 -1
  78. package/dist/components/vue-ui-word-cloud.js +1 -1
  79. package/dist/components/vue-ui-world.js +1 -1
  80. package/dist/components/vue-ui-xy-canvas.js +1 -1
  81. package/dist/components/vue-ui-xy.js +1 -1
  82. package/dist/{dom-to-png-DxyZSvDx.js → dom-to-png-xQ7LXrxp.js} +1 -1
  83. package/dist/{img-J2dLIr8Y.js → img-CFY3JivG.js} +1 -1
  84. package/dist/{lib-CEjkWSLj.js → lib-BcBZIm6u.js} +439 -395
  85. package/dist/{pdf-anN8VbM7.js → pdf-O34i6EQX.js} +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/types/vue-data-ui.d.ts +82 -8
  88. package/dist/{useAutoSizeLabelsInsideViewbox-CovTrBjm.js → useAutoSizeLabelsInsideViewbox-BHq4FD8x.js} +1 -1
  89. package/dist/{useNestedProp-Ce3PwN8T.js → useNestedProp-B7CiTRDS.js} +327 -240
  90. package/dist/{usePrinter-DJ1iH-F_.js → usePrinter-C1GiglOH.js} +2 -2
  91. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  92. package/dist/{vue-data-ui-BFdGl7rL.js → vue-data-ui-D7Tgakts.js} +64 -64
  93. package/dist/vue-data-ui.js +100 -100
  94. package/dist/{vue-ui-3d-bar-kzlIaqHU.js → vue-ui-3d-bar-H_4pqH3h.js} +56 -56
  95. package/dist/{vue-ui-accordion-VTP418mC.js → vue-ui-accordion-BKkTS12x.js} +3 -3
  96. package/dist/{vue-ui-age-pyramid-YFzQ15k1.js → vue-ui-age-pyramid-BGzYbrts.js} +62 -55
  97. package/dist/{vue-ui-annotator-CmwDyy9m.js → vue-ui-annotator-DkSYrnwb.js} +7 -7
  98. package/dist/{vue-ui-bullet-DdjpiM-T.js → vue-ui-bullet-Cf4Uzhez.js} +7 -7
  99. package/dist/vue-ui-candlestick-DfbP87Cr.js +1334 -0
  100. package/dist/{vue-ui-carousel-table-CRI_iPLn.js → vue-ui-carousel-table-0z6eLg_I.js} +29 -29
  101. package/dist/{vue-ui-chestnut-YrEA5Gq3.js → vue-ui-chestnut-BcQFRaXx.js} +70 -70
  102. package/dist/{vue-ui-chord-D_2DdvpZ.js → vue-ui-chord-YYE07iRP.js} +35 -35
  103. package/dist/{vue-ui-circle-pack-xm9-OOAR.js → vue-ui-circle-pack-BRSqhjxm.js} +47 -47
  104. package/dist/{vue-ui-cursor-Dt8Zzw22.js → vue-ui-cursor-iuati4v1.js} +2 -2
  105. package/dist/{vue-ui-dashboard-29ZuFoLn.js → vue-ui-dashboard-BpeLteeH.js} +67 -67
  106. package/dist/{vue-ui-digits-nKPRJ9Vz.js → vue-ui-digits-eYxf3UFN.js} +2 -2
  107. package/dist/{vue-ui-donut-BQptfVfE.js → vue-ui-donut-Yw81BFf2.js} +189 -189
  108. package/dist/{vue-ui-donut-evolution-fiqngEFW.js → vue-ui-donut-evolution-k3xCwZYv.js} +145 -138
  109. package/dist/{vue-ui-dumbbell-Cw45EBO0.js → vue-ui-dumbbell-DMPndU1O.js} +82 -75
  110. package/dist/{vue-ui-flow-DPu9BjPy.js → vue-ui-flow-D-W3VQTv.js} +75 -75
  111. package/dist/{vue-ui-funnel-CtlDuNjO.js → vue-ui-funnel-q-b-LqXG.js} +63 -63
  112. package/dist/{vue-ui-galaxy-BiVjoNHW.js → vue-ui-galaxy-4pueJOcI.js} +62 -62
  113. package/dist/{vue-ui-gauge-CoM6Q3Nb.js → vue-ui-gauge-APtv_CvA.js} +58 -58
  114. package/dist/{vue-ui-gizmo-DXG8dS5u.js → vue-ui-gizmo-BH0MvhIV.js} +3 -3
  115. package/dist/{vue-ui-heatmap-D6n8AnCc.js → vue-ui-heatmap-BBdrkhmg.js} +465 -435
  116. package/dist/{vue-ui-history-plot-C8WMHda_.js → vue-ui-history-plot-DL5ioFH4.js} +115 -108
  117. package/dist/{vue-ui-kpi-Dphnwumo.js → vue-ui-kpi-N8s0i48S.js} +3 -3
  118. package/dist/{vue-ui-mini-loader-DFk9GZ5V.js → vue-ui-mini-loader-Db-9iQcC.js} +2 -2
  119. package/dist/{vue-ui-molecule-DC4_vXt_.js → vue-ui-molecule-DnjRfc4-.js} +102 -102
  120. package/dist/{vue-ui-mood-radar-BgT5wMS0.js → vue-ui-mood-radar-9aAC_ake.js} +28 -28
  121. package/dist/{vue-ui-nested-donuts-D2gSqe1f.js → vue-ui-nested-donuts-BnVXn9Qa.js} +60 -60
  122. package/dist/{vue-ui-onion-CEbv2ii4.js → vue-ui-onion-DbanwrFr.js} +46 -46
  123. package/dist/{vue-ui-parallel-coordinate-plot-budrvcwU.js → vue-ui-parallel-coordinate-plot-CtlpCJ97.js} +88 -81
  124. package/dist/{vue-ui-quadrant-PpymeiXe.js → vue-ui-quadrant-BVffm_0o.js} +8 -8
  125. package/dist/{vue-ui-quick-chart-k6mjTD56.js → vue-ui-quick-chart-C4Uc3DRH.js} +280 -273
  126. package/dist/{vue-ui-radar-C5NvYMnv.js → vue-ui-radar-C-MSV1ZJ.js} +69 -69
  127. package/dist/{vue-ui-rating-eKlTJch9.js → vue-ui-rating-fR2WRHYO.js} +2 -2
  128. package/dist/{vue-ui-relation-circle-Df33aaUT.js → vue-ui-relation-circle-4MPxPkAi.js} +31 -31
  129. package/dist/{vue-ui-ridgeline-BTw-37RS.js → vue-ui-ridgeline-B1T10gWF.js} +118 -111
  130. package/dist/{vue-ui-rings-C_s9xOtZ.js → vue-ui-rings-G0bYxlue.js} +50 -50
  131. package/dist/{vue-ui-scatter-Jd8bQ0S5.js → vue-ui-scatter-DqZwonPL.js} +100 -100
  132. package/dist/{vue-ui-skeleton-Ce7H57o7.js → vue-ui-skeleton-C-IKc-3B.js} +3 -3
  133. package/dist/{vue-ui-smiley-C4mhT7ZV.js → vue-ui-smiley-BKXuAviQ.js} +2 -2
  134. package/dist/{vue-ui-spark-trend-DQy4iSO7.js → vue-ui-spark-trend-8vV7SyrA.js} +18 -18
  135. package/dist/{vue-ui-sparkbar-CUFTHql0.js → vue-ui-sparkbar-BsWBXGuQ.js} +3 -3
  136. package/dist/{vue-ui-sparkgauge-CcykuBps.js → vue-ui-sparkgauge-B9-iRqNC.js} +6 -6
  137. package/dist/{vue-ui-sparkhistogram-CyGvYpYn.js → vue-ui-sparkhistogram-CV4PH2vQ.js} +4 -4
  138. package/dist/{vue-ui-sparkline-CLWJM6hA.js → vue-ui-sparkline-DScNHLXj.js} +23 -23
  139. package/dist/{vue-ui-sparkstackbar-Cln1pduE.js → vue-ui-sparkstackbar-CXPJToNY.js} +17 -17
  140. package/dist/vue-ui-stackbar-94piqh7z.js +1695 -0
  141. package/dist/{vue-ui-strip-plot-C4U0fT5D.js → vue-ui-strip-plot-CA4GL9dj.js} +144 -137
  142. package/dist/{vue-ui-table-DpdP3PDq.js → vue-ui-table-BAbQsJGk.js} +18 -18
  143. package/dist/{vue-ui-table-heatmap-J29d8nds.js → vue-ui-table-heatmap-DU6GKPVy.js} +32 -32
  144. package/dist/{vue-ui-table-sparkline-Chf5YY4A.js → vue-ui-table-sparkline-1KrHuOle.js} +28 -28
  145. package/dist/{vue-ui-thermometer-D6RmaNE6.js → vue-ui-thermometer-DrCAdNyW.js} +22 -22
  146. package/dist/{vue-ui-timer-C5E1kJRt.js → vue-ui-timer-Cj677c6_.js} +29 -29
  147. package/dist/{vue-ui-tiremarks-D0erVBnj.js → vue-ui-tiremarks-O5LGA_1a.js} +14 -14
  148. package/dist/{vue-ui-treemap-K8FYxuYz.js → vue-ui-treemap-BVe_Fft6.js} +78 -78
  149. package/dist/{vue-ui-vertical-bar-BA3OY8Sh.js → vue-ui-vertical-bar-D8oCUku1.js} +94 -94
  150. package/dist/{vue-ui-waffle-CgLgPuro.js → vue-ui-waffle-C39XL2GH.js} +68 -68
  151. package/dist/{vue-ui-wheel-C_cOUhCs.js → vue-ui-wheel-BEpyCUNj.js} +21 -21
  152. package/dist/{vue-ui-word-cloud-uvHNOIpN.js → vue-ui-word-cloud-Dlp9LghX.js} +35 -35
  153. package/dist/{vue-ui-world-DmeNMwpX.js → vue-ui-world-BS8BCZJ3.js} +6 -6
  154. package/dist/vue-ui-xy-D3LqMzve.js +3375 -0
  155. package/dist/vue-ui-xy-canvas-Dct7tf8w.js +1548 -0
  156. package/package.json +1 -1
  157. package/dist/useResizeObserverEffect-DfnWps4W.js +0 -109
  158. package/dist/vue-ui-candlestick-x9U5Ni0N.js +0 -1066
  159. package/dist/vue-ui-stackbar-DIUil9DO.js +0 -1442
  160. package/dist/vue-ui-xy-canvas-BQKR36bd.js +0 -1305
  161. package/dist/vue-ui-xy-tWE4H5ij.js +0 -4520
@@ -1,4520 +0,0 @@
1
- import { useCssVars as Qo, computed as x, ref as y, watch as ft, onMounted as Zl, onBeforeUnmount as _l, onUpdated as fo, nextTick as Ml, createElementBlock as i, openBlock as n, createElementVNode as S, createCommentVNode as g, renderSlot as le, normalizeStyle as L, createVNode as gl, withDirectives as Oa, unref as m, Fragment as b, renderList as _, normalizeProps as Gt, mergeProps as Ut, normalizeClass as Ke, withKeys as mo, vModelText as go, toDisplayString as xe, defineAsyncComponent as Xt, useSlots as jo, getCurrentInstance as en, toRefs as tn, watchEffect as ln, createBlock as vt, createSlots as xo, withCtx as Me, guardReactiveProps as hl, Teleport as an, resolveDynamicComponent as on, vModelCheckbox as nn, createTextVNode as bo } from "vue";
2
- import { c as ga, z as xa, X as un, E as ht, ad as ya, U as pa, ae as ka, T as wa, af as yo, f as Pa, t as sn, e as rn, C as ql, a9 as fl, h as po, p as ko, ap as da, a4 as ee, _ as Fa, a7 as cn, q, ab as vn, aq as wo, ar as So, a as Ae, as as dn, A as hn, j as $o, k as Mt, d as _t, i as ml, s as dt, O as fn, ak as ha, a2 as lt, L as mn, at as Yt, B as Be, b as gn, o as Mo, x as xn, y as bn, D as $l } from "./lib-CEjkWSLj.js";
3
- import { t as ba, d as yn, u as pn } from "./useResponsive-DfdjqQps.js";
4
- import { u as kn, a as fa } from "./useNestedProp-Ce3PwN8T.js";
5
- import { u as wn } from "./usePrinter-DJ1iH-F_.js";
6
- import { u as Sn, B as $n } from "./BaseScanner-BgWxam9d.js";
7
- import { u as _o, a as Mn, l as _n } from "./useTimeLabels-BGFjWgrv.js";
8
- import { u as Ln } from "./useSvgExport-DrjCWun4.js";
9
- import { u as Cn, a as An } from "./useResizeObserverEffect-DfnWps4W.js";
10
- import Tn from "./img-J2dLIr8Y.js";
11
- import zn from "./Title-Camz1Lce.js";
12
- import { t as In } from "./themes-Dw-dDudK.js";
13
- import { _ as ma } from "./Shape-BceHSLHf.js";
14
- import Nn from "./BaseIcon-eZbszQrv.js";
15
- import { _ as Lo } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
- import Pn from "./vue-ui-accordion-VTP418mC.js";
17
- const Fn = {
18
- class: "vue-data-ui-slicer-labels",
19
- style: { position: "relative", "z-index": "1", "pointer-events": "none" }
20
- }, Rn = {
21
- key: 0,
22
- style: { width: "100%", position: "relative" }
23
- }, On = {
24
- key: 0,
25
- class: "minimap",
26
- style: { width: "100%" }
27
- }, Vn = ["xmlns", "viewBox"], Bn = ["id"], En = ["stop-color"], Hn = ["width", "height", "stroke"], Dn = ["d", "stroke"], Wn = ["d", "fill"], Xn = ["x", "y", "width", "height", "fill"], Yn = ["d", "stroke"], Gn = ["cx", "cy", "fill", "stroke"], Un = ["x", "width", "height", "fill", "rx"], qn = ["x", "width", "height", "rx", "fill"], Zn = ["x", "width", "height", "fill", "rx"], Kn = ["x2", "y1", "y2", "stroke"], Jn = { key: "merged-tree" }, Qn = ["d", "fill"], jn = ["d", "stroke"], ei = ["cx", "cy", "stroke", "fill"], ti = ["cx", "cy", "stroke", "fill"], li = { key: "split-tree" }, ai = ["x", "y", "width", "height", "fill"], oi = ["d", "stroke"], ni = ["x", "height", "fill", "stroke"], ii = ["x", "height", "fill", "stroke"], ui = { key: "merged-tree" }, si = ["cx", "cy", "stroke", "fill"], ri = ["cx", "cy", "fill"], ci = ["cx", "cy", "stroke", "fill"], vi = ["cx", "cy", "fill"], di = { key: 11 }, hi = ["d", "stroke"], fi = ["cx", "cy", "fill", "stroke"], mi = ["cx", "cy", "stroke", "fill"], gi = ["cx", "cy", "fill"], xi = ["cx", "cy", "stroke", "fill"], bi = ["cx", "cy", "fill"], yi = ["x", "height", "width", "onMouseenter"], pi = ["min", "max"], ki = ["min", "max"], Ra = 48, wi = {
28
- __name: "SlicerPreview",
29
- props: {
30
- immediate: {
31
- type: Boolean,
32
- default: !0
33
- },
34
- background: {
35
- type: String,
36
- default: "#FFFFFF"
37
- },
38
- borderColor: {
39
- type: String,
40
- default: "#FFFFFF"
41
- },
42
- fontSize: {
43
- type: Number,
44
- default: 14
45
- },
46
- labelLeft: {
47
- type: [String, Number],
48
- default: ""
49
- },
50
- labelRight: {
51
- type: [String, Number],
52
- default: ""
53
- },
54
- textColor: {
55
- type: String,
56
- default: "#1A1A1A"
57
- },
58
- inputColor: {
59
- type: String,
60
- default: "#1A1A1A"
61
- },
62
- max: {
63
- type: Number,
64
- default: 0
65
- },
66
- min: {
67
- type: Number,
68
- default: 0
69
- },
70
- selectColor: {
71
- type: String,
72
- default: "#4A4A4A"
73
- },
74
- useResetSlot: {
75
- type: Boolean,
76
- default: !1
77
- },
78
- valueStart: {
79
- type: [Number, String],
80
- default: 0
81
- },
82
- valueEnd: {
83
- type: [Number, String],
84
- default: 0
85
- },
86
- minimap: {
87
- type: Array,
88
- default: []
89
- },
90
- smoothMinimap: {
91
- type: Boolean,
92
- default: !1
93
- },
94
- minimapSelectedColor: {
95
- type: String,
96
- default: "#1f77b4"
97
- },
98
- minimapSelectionRadius: {
99
- type: Number,
100
- default: 12
101
- },
102
- minimapLineColor: {
103
- type: String,
104
- default: "#2D353C"
105
- },
106
- minimapSelectedColorOpacity: {
107
- type: Number,
108
- default: 0.2
109
- },
110
- minimapSelectedIndex: {
111
- type: Number,
112
- default: null
113
- },
114
- minimapIndicatorColor: {
115
- type: String,
116
- default: "#2D353C"
117
- },
118
- refreshStartPoint: {
119
- type: Number,
120
- default: 0
121
- },
122
- refreshEndPoint: {
123
- type: Number,
124
- default: null
125
- },
126
- enableRangeHandles: {
127
- type: Boolean,
128
- default: !1
129
- },
130
- enableSelectionDrag: {
131
- type: Boolean,
132
- default: !0
133
- },
134
- verticalHandles: {
135
- type: Boolean,
136
- default: !1
137
- },
138
- timeLabels: {
139
- type: Array
140
- },
141
- isPreview: {
142
- type: Boolean,
143
- default: !1
144
- },
145
- preciseLabels: {
146
- type: Array,
147
- default() {
148
- return [];
149
- }
150
- },
151
- usePreciseLabels: {
152
- type: Boolean,
153
- default: !1
154
- },
155
- selectedSeries: {
156
- type: Object
157
- },
158
- customFormat: {
159
- type: [Function, null]
160
- },
161
- minimapCompact: {
162
- type: Boolean,
163
- default: !1
164
- },
165
- allMinimaps: {
166
- type: Array,
167
- default() {
168
- return [];
169
- }
170
- },
171
- minimapMerged: {
172
- type: Boolean,
173
- default: !1
174
- },
175
- minimapFrameColor: {
176
- type: String,
177
- default: "#e1e5e8"
178
- },
179
- cutNullValues: {
180
- type: Boolean,
181
- default: !1
182
- },
183
- focusOnDrag: {
184
- type: Boolean,
185
- default: !1
186
- },
187
- focusRangeRatio: {
188
- type: Number,
189
- default: 0.1
190
- }
191
- },
192
- emits: ["futureStart", "futureEnd", "update:start", "update:end", "reset", "trapMouse"],
193
- setup(w, { expose: Sa, emit: $a }) {
194
- Qo((d) => ({
195
- v31489338: Al.value,
196
- v7f513ed8: ue.value,
197
- v74ff4a49: gt.value,
198
- v5f868008: w.selectColor,
199
- v2feba696: Tl.value
200
- }));
201
- const v = w, Fe = y(null), ce = y(v.min), fe = y(v.max), me = x(() => !!v.minimap.length), Ll = y(ga()), Lt = y(!1), Nt = x(() => me.value && v.minimapCompact), Kl = y(0), qt = ba((d) => Le("futureStart", d), 0), xl = ba((d) => Le("futureEnd", d), 0), Zt = x({
202
- get: () => ce.value,
203
- set(d) {
204
- const h = Math.min(d, fe.value - 1);
205
- h !== ce.value && (ce.value = h, Ft.value && (Ft.value.value = String(h)), v.immediate ? Le("update:start", Number(h)) : Lt.value && qt(h));
206
- }
207
- }), at = x({
208
- get: () => fe.value,
209
- set(d) {
210
- const h = Math.max(d, ce.value + 1);
211
- h !== fe.value && (fe.value = h, At.value && (At.value.value = String(h)), v.immediate ? Le("update:end", Number(h)) : Lt.value && xl(h));
212
- }
213
- });
214
- let Ee = null;
215
- function Te() {
216
- clearTimeout(Ee), v.immediate || (Le("update:start", Number(ce.value)), Le("update:end", Number(fe.value))), Lt.value = !1;
217
- }
218
- const Je = x(() => v.refreshEndPoint === null ? v.max : v.refreshEndPoint), Le = $a, mt = x(() => {
219
- if (Nt.value) {
220
- const h = Math.max(1, ot.value - 1);
221
- return Pt.value / h * 100;
222
- }
223
- const d = Math.max(1, v.max - v.min);
224
- return (ce.value - v.min) / d * 100;
225
- }), Ct = x(() => {
226
- if (Nt.value) {
227
- const h = Math.max(1, ot.value - 1);
228
- return tl.value / h * 100;
229
- }
230
- const d = Math.max(1, v.max - v.min);
231
- return (fe.value - v.min) / d * 100;
232
- }), Cl = x(() => (mt.value + Ct.value) / 2), Kt = x(() => {
233
- if (!Fe.value) return !1;
234
- const d = Math.max(1, v.max - v.min);
235
- return Fe.value.getBoundingClientRect().width * ((ce.value - v.min) / d) - nl.value / 2 < 0;
236
- }), Jt = x(() => {
237
- if (!Fe.value) return !1;
238
- const d = Math.max(1, v.max - v.min), h = Fe.value.getBoundingClientRect().width;
239
- return h * ((fe.value - v.min) / d) + il.value / 2 > h;
240
- }), _e = x(() => {
241
- const d = Jt.value ? `calc(${Cl.value}% - ${kt.value.width}px - 2px)` : Kt.value ? `calc(${Cl.value}% - 8px)` : `calc(${Cl.value}% - ${kt.value.width / 2}px - 4px)`;
242
- return {
243
- left: `${mt.value}%`,
244
- width: `${Math.max(0, Ct.value - mt.value)}%`,
245
- background: v.selectColor,
246
- tooltipLeft: `calc(${mt.value}% - ${Kt.value ? 9 : nl.value / 2 + 3.5}px)`,
247
- tooltipRight: `calc(${Ct.value}% - ${Jt.value ? il.value - 9 : il.value / 2 - 3.5}px)`,
248
- tooltipCenter: d,
249
- arrowLeft: !Kt.value,
250
- arrowRight: !Jt.value
251
- };
252
- }), Al = x(() => v.inputColor), Tl = x(() => v.background), gt = x(() => `${v.selectColor}33`), ue = x(() => v.borderColor), Jl = x(() => {
253
- let d = [];
254
- for (let h = 0; h < v.max; h += 1)
255
- d.push(h);
256
- return d;
257
- });
258
- function E() {
259
- Le("reset");
260
- }
261
- ft(
262
- () => v.min,
263
- (d) => {
264
- Number(ce.value) < Number(d) && (ce.value = Number(d)), Number(fe.value) < Number(d) && (fe.value = Number(d));
265
- }
266
- ), ft(
267
- () => v.max,
268
- (d) => {
269
- Number(ce.value) > Number(d) && (ce.value = Number(d)), Number(fe.value) > Number(d) && (fe.value = Number(d));
270
- }
271
- );
272
- const Qt = y(null), W = y({
273
- width: 1,
274
- height: 1
275
- }), ae = y(null);
276
- Zl(() => {
277
- if (me.value) {
278
- const d = ba(() => {
279
- if (!Qt.value) return;
280
- const { width: h, height: f } = pn({ chart: Qt.value }), $ = Math.max(0, Math.round(h)), C = Math.max(0, Math.round(f - 47));
281
- ($ !== W.value.width || C !== W.value.height) && (W.value.width = $, W.value.height = C);
282
- }, 0);
283
- ae.value = new ResizeObserver(d), ae.value.observe(Qt.value);
284
- }
285
- }), _l(() => {
286
- ae.value && ae.value.disconnect();
287
- });
288
- const ot = x(() => Math.max(1, v.max - v.min));
289
- function Ql(d) {
290
- const h = Math.floor(d - v.min);
291
- return Math.min(Math.max(0, h), ot.value);
292
- }
293
- function jt(d) {
294
- const h = Math.ceil(d - v.min);
295
- return Math.min(Math.max(0, h), ot.value);
296
- }
297
- const He = x(() => Ql(ce.value)), Re = x(() => jt(fe.value)), bl = x(() => Math.max(...v.allMinimaps.map((d) => d.series.length))), oe = x(() => {
298
- if (!v.minimap.length) return 0;
299
- const d = Math.max(1, bl.value - (v.minimapCompact ? 1 : 0));
300
- return W.value.width / d;
301
- }), ve = x(() => v.allMinimaps.length ? v.allMinimaps.filter((d) => d.type === "bar").length : 0), Z = x(() => oe.value / (ve.value || 1) * 0.8);
302
- function zl(d, h, f) {
303
- const $ = Z.value, C = Math.max(1, ve.value), D = bl.value - 1;
304
- return f === 0 ? d + $ / 2 * h : f === D ? d - $ / 2 * (C - h) : d - C * $ / 2 + h * $;
305
- }
306
- function Il(d, h) {
307
- return [0, bl.value - 1].includes(h) ? Z.value / 2 : Z.value;
308
- }
309
- const Nl = x(() => {
310
- const d = [];
311
- if (Array.isArray(v.minimap) && v.minimap.length && v.minimapMerged && d.push(...v.minimap.filter(Number.isFinite)), Array.isArray(v.allMinimaps) && v.allMinimaps.length)
312
- for (const h of v.allMinimaps)
313
- h?.isVisible && Array.isArray(h?.series) && d.push(...h.series.filter(Number.isFinite));
314
- return d.length ? { min: Math.min(...d), max: Math.max(...d) } : { min: 0, max: 1 };
315
- }), De = x(() => Nl.value.min), xt = x(() => Nl.value.max), X = x(() => De.value < 0 && xt.value > 0 || xt.value <= 0 ? De.value : 0), jl = x(() => Math.max(1e-9, Math.max(Math.abs(De.value), Math.abs(xt.value)))), Pl = x(() => De.value < 0 && xt.value > 0), yl = (d) => {
316
- const h = Math.max(1, W.value.height);
317
- if (Pl.value) {
318
- const f = jl.value;
319
- return (1 - (Math.max(-1, Math.min(1, d / f)) + 1) / 2) * h;
320
- } else {
321
- const f = Math.min(0, De.value), $ = Math.max(0, xt.value);
322
- return h - (d - f) / Math.max(1e-9, $ - f) * h;
323
- }
324
- }, $e = x(() => yl(0));
325
- function nt(d, h, f) {
326
- const $ = (D, pe, ne) => Math.max(pe, Math.min(ne, D));
327
- if (h <= 0) {
328
- const D = Math.max(1e-9, 0 - d);
329
- return (pe) => f - (pe - d) / D * f;
330
- } else if (d >= 0) {
331
- const D = Math.max(1e-9, h - 0);
332
- return (pe) => f - (pe - 0) / D * f;
333
- } else {
334
- const D = Math.max(1e-9, Math.max(Math.abs(d), Math.abs(h)));
335
- return (pe) => (1 - ($(pe / D, -1, 1) + 1) / 2) * f;
336
- }
337
- }
338
- function el(d, h = !1) {
339
- if (!d || !d.length)
340
- return {
341
- fullSet: "",
342
- points: [],
343
- selectionSet: "",
344
- sliced: [],
345
- firstPlot: null,
346
- lastPlot: null,
347
- hasFull: !1,
348
- hasSelection: !1,
349
- fullMarkers: [],
350
- selectionMarkers: []
351
- };
352
- const f = Math.max(1, W.value.height), $ = nt(De.value, xt.value, f), C = d.length, D = Math.min(Math.max(0, He.value), Math.max(0, C - 1)), pe = Math.min(C, Math.max(D + 1, Re.value)), ne = d.map((te, Dl) => {
353
- const St = te, sl = Number.isFinite(St), Ca = oe.value * Dl + (v.minimapCompact ? 0 : oe.value / 2), Aa = $(0);
354
- return {
355
- x: Ca,
356
- y: sl ? $(St) : NaN,
357
- v: St,
358
- value: St == null ? null : sl ? St : null,
359
- y0: Aa,
360
- i: Dl
361
- };
362
- }), I = (te) => te >= 0 && te < ne.length && Number.isFinite(ne[te]?.value), wt = ne.filter((te) => Number.isFinite(te.value) && !I(te.i - 1) && !I(te.i + 1)), ul = wt.filter((te) => te.i >= D && te.i < pe), ct = ne.slice(D, pe), La = ne.length >= 2 ? v.smoothMinimap || h ? v.cutNullValues ? ya(ne) : pa(ne.filter((te) => te.value != null)) : v.cutNullValues ? ka(ne) : wa(ne.filter((te) => te.value != null)) : "", aa = ct.length >= 2 ? v.smoothMinimap || h ? v.cutNullValues ? ya(ct) : pa(ct.filter((te) => te.value != null)) : v.cutNullValues ? ka(ct) : wa(ct.filter((te) => te.value != null)) : "";
363
- return {
364
- fullSet: La,
365
- points: ne,
366
- selectionSet: aa,
367
- sliced: ct,
368
- firstPlot: ne[D] || null,
369
- lastPlot: ne[Math.max(0, pe - 1)] || null,
370
- hasFull: ne.length >= 2,
371
- hasSelection: ct.length >= 2,
372
- fullMarkers: wt,
373
- selectionMarkers: ul
374
- };
375
- }
376
- const H = x(() => v.minimap.length ? el(v.minimap) : []), Qe = x(() => v.allMinimaps.length ? v.allMinimaps.map((d, h) => {
377
- const f = el(d?.series || [], !!d.smooth), $ = d?.id ?? d?.name ?? h;
378
- return {
379
- key: typeof $ == "object" ? JSON.stringify($) : String($),
380
- color: d?.color,
381
- ...f,
382
- isVisible: d.isVisible,
383
- type: d.type || "line"
384
- };
385
- }) : []), M = x(() => {
386
- const d = He.value, h = Math.max(d + 1, Re.value);
387
- return {
388
- x: oe.value * d + (v.minimapCompact ? 0 : oe.value / 2),
389
- width: oe.value * (h - d) - oe.value
390
- };
391
- }), bt = y(v.minimapSelectedIndex), Fl = (d) => Math.round(v.min + d), Pt = x({
392
- get() {
393
- return Nt.value ? He.value : Number(Zt.value);
394
- },
395
- set(d) {
396
- if (Nt.value) {
397
- const h = Math.round(+d || 0);
398
- ll(Fl(h));
399
- } else {
400
- let h = Math.round(+d || 0);
401
- const f = Number(fe.value) - 1, $ = Math.min(Math.max(v.min, h), f);
402
- Ft.value && (Ft.value.valueAsNumber = $), ll($);
403
- }
404
- }
405
- }), tl = x({
406
- get() {
407
- return Nt.value ? Math.max(He.value, Re.value - 1) : Number(at.value);
408
- },
409
- set(d) {
410
- if (Nt.value) {
411
- const h = Math.round(+d || 0);
412
- be(Fl(h + 1));
413
- } else {
414
- let h = Math.round(+d || 0);
415
- const f = Number(ce.value) + 1, $ = Math.max(f, Math.min(h, v.max));
416
- At.value && (At.value.valueAsNumber = $), be($);
417
- }
418
- }
419
- });
420
- function T(d) {
421
- bt.value = Ql(v.valueStart) + d;
422
- }
423
- const We = yn(T, 60);
424
- ft(() => v.minimapSelectedIndex, (d, h) => {
425
- if ([null, void 0].includes(d)) {
426
- bt.value = null;
427
- return;
428
- }
429
- d !== h && We(d);
430
- }, { immediate: !0 });
431
- function Rl(d) {
432
- bt.value = d;
433
- const h = He.value, f = Re.value;
434
- d >= h && d < f && !pt.value && Le("trapMouse", d - h);
435
- }
436
- const Ft = y(null), At = y(null);
437
- function t(d) {
438
- if (typeof d == "object" && d && "target" in d) {
439
- const f = d.target, $ = "valueAsNumber" in f ? f.valueAsNumber : +f.value;
440
- return Number.isFinite($) ? $ : NaN;
441
- }
442
- const h = +d;
443
- return Number.isFinite(h) ? h : NaN;
444
- }
445
- let p = 0;
446
- function ll(d) {
447
- Lt.value = !0;
448
- const h = t(d);
449
- Number.isFinite(h) && (cancelAnimationFrame(p), p = requestAnimationFrame(() => {
450
- Zt.value = h;
451
- }));
452
- }
453
- let Tt = 0;
454
- function be(d) {
455
- Lt.value = !0;
456
- const h = t(d);
457
- Number.isFinite(h) && (cancelAnimationFrame(Tt), Tt = requestAnimationFrame(() => {
458
- at.value = h;
459
- }));
460
- }
461
- _l(() => {
462
- cancelAnimationFrame(p), cancelAnimationFrame(Tt);
463
- });
464
- const ye = x(() => v.valueEnd - v.valueStart), pl = x(() => ye.value < v.max - v.min), Rt = y(!1);
465
- let Ma = y(null);
466
- const yt = x(() => (Kl.value - 48) / (v.max - v.min) * ye.value), je = x(() => Math.max(1, Kl.value - Ra - yt.value)), k = x(() => Math.max(1, v.max - v.min - ye.value)), Xe = x(() => k.value / je.value), Ol = y(0), Vl = y(0), Ot = y(0), _a = y(0);
467
- let et = null, it = null, ut = null, st = null;
468
- const ea = y(v.min);
469
- function Vt(d) {
470
- if (!Fe.value) return v.min;
471
- const h = Fe.value.getBoundingClientRect(), f = h.left + Ra / 2, $ = h.right - Ra / 2, C = Math.max(1, $ - f), pe = (Math.max(f, Math.min(d, $)) - f) / C, ne = Math.max(1, v.max - v.min);
472
- return Math.round(v.min + pe * ne);
473
- }
474
- const al = async (d) => {
475
- if (Lt.value = !0, c.value = !0, !v.enableSelectionDrag) return;
476
- const h = d.type === "touchstart";
477
- h || d.stopPropagation();
478
- const f = h && d.targetTouches && d.targetTouches[0] ? d.targetTouches[0] : null, $ = h ? f ? f.target : null : d.target;
479
- if (!$ || !($ instanceof Element) || $.classList && $.classList.contains("range-handle")) return;
480
- Rt.value = !0;
481
- const C = h ? f ? f.clientX : 0 : d.clientX;
482
- if (Ma.value = C, Ol.value = C, v.focusOnDrag && !pl.value && Fe.value) {
483
- ea.value = Vt(C);
484
- const D = Math.min(0.95, Math.max(0.05, v.focusRangeRatio)), pe = v.max - v.min, ne = Math.max(1, Math.round(pe * D)), I = Math.floor(ne / 2);
485
- let wt = ea.value - I;
486
- wt = Math.max(v.min, Math.min(wt, v.max - ne));
487
- const ul = Math.min(v.max, wt + ne);
488
- Zt.value = wt, at.value = ul, qt(wt), xl(ul), yo(Fe.value, "mouseup"), await Ml(), yo(Fe.value, "mousedown", { clientX: C });
489
- }
490
- Vl.value = ce.value, Ot.value = fe.value, _a.value = Xe.value, et = h ? "touchmove" : "mousemove", it = h ? "touchend" : "mouseup", ut = h ? Ye : kl, st = h ? Ge : rt, window.addEventListener(et, ut, { passive: !1 }), window.addEventListener(it, st);
491
- };
492
- function kl(d) {
493
- Rt.value && Bt(d.clientX);
494
- }
495
- function Ye(d) {
496
- if (!Rt.value || !Fe.value) return;
497
- const h = d.target;
498
- if (!(h instanceof Element) || !Fe.value.contains(h) || h.classList && h.classList.contains("range-handle")) return;
499
- d.preventDefault();
500
- const f = d.targetTouches && d.targetTouches[0] ? d.targetTouches[0] : null;
501
- f && Bt(f.clientX);
502
- }
503
- function Bt(d) {
504
- if (!Rt.value) return;
505
- const h = Vt(Ol.value), $ = Vt(d) - h;
506
- let C = Math.round(Vl.value + $);
507
- C = Math.max(v.min, Math.min(C, v.max - ye.value));
508
- const D = C + ye.value;
509
- Zt.value = C, at.value = D, qt(C), xl(D);
510
- }
511
- function rt() {
512
- ze();
513
- }
514
- function Ge() {
515
- ze();
516
- }
517
- function ze() {
518
- Rt.value = !1, et && ut && window.removeEventListener(et, ut), it && st && window.removeEventListener(it, st), et = it = null, ut = st = null, Te();
519
- }
520
- const pt = y(!1), zt = y(null), ol = y(null), nl = y(1), il = y(1), c = y(!1);
521
- function Bl() {
522
- if (zt.value) {
523
- const d = Math.round(zt.value.getBoundingClientRect().width);
524
- d !== nl.value && (nl.value = d);
525
- }
526
- }
527
- function El() {
528
- if (ol.value) {
529
- const d = Math.round(ol.value.getBoundingClientRect().width);
530
- d !== il.value && (il.value = d);
531
- }
532
- }
533
- fo(() => {
534
- Bl(), El();
535
- });
536
- const Hl = y(0);
537
- function ta(d) {
538
- Hl.value = d === "start" ? 1 : 0;
539
- }
540
- const Et = y(!1), kt = y({
541
- width: 0,
542
- left: 0
543
- });
544
- ft([ce, fe], async () => {
545
- if (await Ml(), !zt.value || !ol.value) {
546
- Et.value = !1, kt.value = { width: 0, left: 0 };
547
- return;
548
- }
549
- const d = zt.value.getBoundingClientRect(), h = ol.value.getBoundingClientRect();
550
- Et.value = d.x + d.width > h.x;
551
- const f = d.x + d.width / 2, $ = h.x + h.width / 2, C = d.width + h.width, D = (f + $) / 2;
552
- kt.value = {
553
- width: C,
554
- left: D - C / 2
555
- };
556
- }), fo(() => {
557
- Bl(), El();
558
- }), ft(() => v.labelLeft, () => {
559
- Ml(Bl);
560
- }, { deep: !0 }), ft(() => v.labelRight, () => {
561
- Ml(El);
562
- }, { deep: !0 });
563
- const ge = x(() => {
564
- let d = "", h = "", f = !1;
565
- if (xa(v.customFormat))
566
- try {
567
- const $ = v.customFormat({
568
- absoluteIndex: ce.value,
569
- seriesIndex: ce.value,
570
- datapoint: v.selectedSeries
571
- }), C = v.customFormat({
572
- absoluteIndex: fe.value - 1,
573
- seriesIndex: -1,
574
- datapoint: v.selectedSeries
575
- });
576
- typeof $ == "string" && typeof C == "string" && (d = $, h = C, f = !0);
577
- } catch {
578
- f = !1;
579
- }
580
- if (!f) {
581
- const $ = v.usePreciseLabels ? v.preciseLabels.find((D) => D.absoluteIndex === ce.value) : v.timeLabels.find((D) => D.absoluteIndex === ce.value), C = v.usePreciseLabels ? v.preciseLabels.find((D) => D.absoluteIndex === fe.value - 1) : v.timeLabels.find((D) => D.absoluteIndex === fe.value - 1);
582
- d = $ ? $.text : "", h = C ? C.text : "";
583
- }
584
- return { left: d, right: h };
585
- });
586
- _l(() => {
587
- ae.value && ae.value.disconnect(), et && ut && window.removeEventListener(et, ut), it && st && window.removeEventListener(it, st), et = it = null, ut = st = null, clearTimeout(Ee);
588
- });
589
- const la = x(() => {
590
- if (!Jl.value.length) return null;
591
- if (bt.value >= He.value && bt.value < Re.value) {
592
- const d = bt.value;
593
- return {
594
- x1: oe.value * d + (v.minimapCompact ? 0 : oe.value / 2),
595
- x2: oe.value * d + (v.minimapCompact ? 0 : oe.value / 2),
596
- y1: 0,
597
- y2: Math.max(W.value.height, 0),
598
- stroke: v.minimapIndicatorColor,
599
- "stroke-linecap": "round",
600
- "stroke-dasharray": 2,
601
- "stroke-width": 1
602
- };
603
- } else
604
- return null;
605
- });
606
- return Sa({
607
- setStartValue: ll,
608
- setEndValue: be
609
- }), (d, h) => (n(), i("div", {
610
- "data-dom-to-png-ignore": "",
611
- style: { padding: "0 24px" },
612
- class: "vue-data-ui-zoom",
613
- ref_key: "zoomWrapper",
614
- ref: Fe,
615
- onMousedown: al,
616
- onTouchstart: al
617
- }, [
618
- S("div", Fn, [
619
- w.valueStart !== w.refreshStartPoint || w.valueEnd !== Je.value ? (n(), i("div", Rn, [
620
- w.useResetSlot ? le(d.$slots, "reset-action", {
621
- key: 1,
622
- reset: E
623
- }, void 0, !0) : (n(), i("button", {
624
- key: 0,
625
- tabindex: "0",
626
- role: "button",
627
- class: "vue-data-ui-refresh-button",
628
- style: L({
629
- top: me.value ? "36px" : "-16px",
630
- pointerEvents: "all !important"
631
- }),
632
- onClick: E
633
- }, [
634
- gl(Nn, {
635
- name: "refresh",
636
- stroke: w.textColor
637
- }, null, 8, ["stroke"])
638
- ], 4))
639
- ])) : g("", !0)
640
- ]),
641
- S("div", {
642
- class: "double-range-slider",
643
- ref_key: "minimapWrapper",
644
- ref: Qt,
645
- style: { "z-index": "0" },
646
- onMouseenter: h[11] || (h[11] = (f) => c.value = !0),
647
- onMouseleave: h[12] || (h[12] = (f) => c.value = !1)
648
- }, [
649
- me.value ? (n(), i("div", On, [
650
- (n(), i("svg", {
651
- key: `mm-${w.minimapMerged ? "merged" : "split"}-${w.minimapCompact ? "compact" : "normal"}`,
652
- xmlns: m(un),
653
- viewBox: `0 0 ${Math.max(0, W.value.width)} ${Math.max(0, W.value.height)}`
654
- }, [
655
- S("defs", null, [
656
- S("linearGradient", {
657
- id: Ll.value,
658
- x1: "0%",
659
- y1: "0%",
660
- x2: "0%",
661
- y2: "100%"
662
- }, [
663
- S("stop", {
664
- offset: "0%",
665
- "stop-color": `${w.minimapLineColor}50`
666
- }, null, 8, En),
667
- h[13] || (h[13] = S("stop", {
668
- offset: "100%",
669
- "stop-color": "transparent"
670
- }, null, -1))
671
- ], 8, Bn)
672
- ]),
673
- w.minimapCompact ? (n(), i("rect", {
674
- key: 0,
675
- class: "vue-ui-zoom-minimap-frame",
676
- x: 0,
677
- y: 0,
678
- width: W.value.width,
679
- height: W.value.height,
680
- fill: "none",
681
- stroke: w.minimapFrameColor,
682
- rx: 3
683
- }, null, 8, Hn)) : g("", !0),
684
- w.minimapMerged ? (n(), i("path", {
685
- key: 1,
686
- d: `M${H.value.fullSet}`,
687
- stroke: `${w.minimapLineColor}`,
688
- fill: "none",
689
- "stroke-width": "1",
690
- "stroke-linecap": "round",
691
- "stroke-linejoin": "round",
692
- style: { opacity: "0.6" }
693
- }, null, 8, Dn)) : g("", !0),
694
- w.minimapMerged && !w.minimapCompact ? (n(), i("path", {
695
- key: 2,
696
- d: `M${oe.value / 2},${Math.max(W.value.height, 0)} ${H.value.fullSet} L${W.value.width - oe.value / 2},${Math.max(W.value.height, 0)}Z`,
697
- fill: `url(#${Ll.value})`,
698
- stroke: "none",
699
- style: { opacity: "0.6" }
700
- }, null, 8, Wn)) : w.minimapMerged ? g("", !0) : (n(), i(b, { key: 3 }, [
701
- (n(!0), i(b, null, _(Qe.value.filter((f) => f.type === "bar"), (f, $) => (n(), i("g", null, [
702
- (n(!0), i(b, null, _(f.points, (C, D) => (n(), i(b, null, [
703
- f.isVisible && !isNaN(C.y) ? (n(), i("rect", {
704
- key: 0,
705
- x: zl(C.x, $, D),
706
- y: C.v >= 0 ? C.y : C.y0,
707
- width: Il($, D),
708
- height: C.v >= 0 ? C.y0 - C.y : C.y - C.y0,
709
- fill: f.color,
710
- style: { opacity: 0.6 }
711
- }, null, 8, Xn)) : g("", !0)
712
- ], 64))), 256))
713
- ]))), 256)),
714
- (n(!0), i(b, null, _(Qe.value.filter((f) => f.type === "line"), (f) => (n(), i("g", null, [
715
- f.isVisible ? (n(), i("path", {
716
- key: 0,
717
- d: `M ${f.fullSet}`,
718
- fill: "none",
719
- stroke: f.color,
720
- style: { opacity: "0.6" }
721
- }, null, 8, Yn)) : g("", !0),
722
- f.isVisible && w.cutNullValues ? (n(!0), i(b, { key: 1 }, _(f.fullMarkers, ($) => (n(), i("circle", {
723
- key: `sel-dot-under-${f.key}-${$.i}`,
724
- cx: $.x,
725
- cy: $.y,
726
- r: "2",
727
- fill: f.color,
728
- stroke: ue.value,
729
- "stroke-width": "0.5",
730
- style: { opacity: "0.6" }
731
- }, null, 8, Gn))), 128)) : g("", !0)
732
- ]))), 256))
733
- ], 64)),
734
- S("rect", {
735
- x: M.value.x,
736
- y: 0,
737
- width: Math.max(0, M.value.width),
738
- height: Math.max(W.value.height, 0),
739
- fill: ue.value,
740
- rx: w.minimapSelectionRadius,
741
- stroke: "none"
742
- }, null, 8, Un),
743
- S("rect", {
744
- x: M.value.x,
745
- y: 0,
746
- width: M.value.width < 0 ? 0 : M.value.width,
747
- height: Math.max(W.value.height, 0),
748
- rx: w.minimapSelectionRadius,
749
- fill: ue.value,
750
- style: L({ opacity: Rt.value || Lt.value ? 0 : 1 })
751
- }, null, 12, qn),
752
- S("rect", {
753
- x: M.value.x,
754
- y: 0,
755
- width: M.value.width < 0 ? 0 : M.value.width,
756
- height: Math.max(W.value.height, 0),
757
- fill: w.minimapSelectedColor,
758
- rx: w.minimapSelectionRadius,
759
- style: L({ opacity: w.minimapSelectedColorOpacity })
760
- }, null, 12, Zn),
761
- !w.minimapMerged && X.value < 0 ? (n(), i("line", {
762
- key: 4,
763
- class: "slicer-minimap-zero-line",
764
- x1: 0,
765
- x2: W.value.width,
766
- y1: $e.value,
767
- y2: $e.value,
768
- stroke: w.minimapFrameColor,
769
- "stroke-width": "0.5"
770
- }, null, 8, Kn)) : g("", !0),
771
- w.minimapMerged ? (n(), i("g", Jn, [
772
- H.value && H.value.sliced && H.value.sliced.length ? (n(), i(b, { key: 0 }, [
773
- H.value.selectionSet ? (n(), i("path", {
774
- key: 0,
775
- d: `M${H.value.sliced[0].x},${Math.max(W.value.height, 0)} ${H.value.selectionSet} L${H.value.sliced[H.value.sliced.length - 1].x},${Math.max(W.value.height, 0)}Z`,
776
- fill: `url(#${Ll.value})`,
777
- stroke: "none",
778
- style: { opacity: "1" }
779
- }, null, 8, Qn)) : g("", !0),
780
- H.value.selectionSet ? (n(), i("path", {
781
- key: 1,
782
- d: `M ${H.value.selectionSet}`,
783
- stroke: `${w.minimapLineColor}`,
784
- fill: "transparent",
785
- "stroke-width": "2",
786
- "stroke-linecap": "round",
787
- "stroke-linejoin": "round"
788
- }, null, 8, jn)) : g("", !0)
789
- ], 64)) : g("", !0),
790
- H.value && H.value.firstPlot ? (n(), i("circle", {
791
- key: 1,
792
- cx: H.value.firstPlot.x,
793
- cy: H.value.firstPlot.y,
794
- "stroke-width": "0.5",
795
- stroke: ue.value,
796
- r: "3",
797
- fill: w.minimapLineColor
798
- }, null, 8, ei)) : g("", !0),
799
- H.value && H.value.lastPlot ? (n(), i("circle", {
800
- key: 2,
801
- cx: H.value.lastPlot.x,
802
- cy: H.value.lastPlot.y,
803
- "stroke-width": "0.5",
804
- stroke: ue.value,
805
- r: "3",
806
- fill: w.minimapLineColor
807
- }, null, 8, ti)) : g("", !0)
808
- ])) : (n(), i("g", li, [
809
- (n(!0), i(b, null, _(Qe.value.filter((f) => f.type === "bar"), (f, $) => (n(), i("g", null, [
810
- (n(!0), i(b, null, _(f.points, (C, D) => (n(), i(b, null, [
811
- f && f.isVisible && !isNaN(C.y) ? (n(), i("rect", {
812
- key: 0,
813
- x: zl(C.x, $, D),
814
- y: C.v >= 0 ? C.y : C.y0,
815
- width: Il($, D),
816
- height: C.v >= 0 ? C.y0 - C.y : C.y - C.y0,
817
- fill: f.color,
818
- style: L({ opacity: D >= Zt.value && D < at.value ? 1 : 0 })
819
- }, null, 12, ai)) : g("", !0)
820
- ], 64))), 256))
821
- ]))), 256)),
822
- (n(!0), i(b, null, _(Qe.value.filter((f) => f.type === "line"), (f) => (n(), i("g", {
823
- key: String(f.key)
824
- }, [
825
- f && f.hasSelection && f.selectionSet && f.isVisible ? (n(), i("path", {
826
- key: 0,
827
- d: `M ${f.selectionSet}`,
828
- stroke: f.color,
829
- fill: "transparent",
830
- "stroke-width": "2",
831
- "stroke-linecap": "round",
832
- "stroke-linejoin": "round"
833
- }, null, 8, oi)) : g("", !0)
834
- ]))), 128))
835
- ])),
836
- me.value && w.minimapCompact ? (n(), i("rect", {
837
- key: 7,
838
- class: "vue-ui-zoom-compact-minimap-handle",
839
- x: M.value.x - 8,
840
- y: 0,
841
- width: 8,
842
- height: W.value.height,
843
- fill: ue.value,
844
- stroke: w.textColor,
845
- rx: 3
846
- }, null, 8, ni)) : g("", !0),
847
- me.value && w.minimapCompact ? (n(), i("rect", {
848
- key: 8,
849
- class: "vue-ui-zoom-compact-minimap-handle",
850
- x: M.value.x + M.value.width,
851
- y: 0,
852
- width: 8,
853
- height: W.value.height,
854
- fill: ue.value,
855
- stroke: w.textColor,
856
- rx: 3
857
- }, null, 8, ii)) : g("", !0),
858
- bt.value !== null && !pt.value ? (n(), i("line", Gt(Ut({ key: 9 }, la.value)), null, 16)) : g("", !0),
859
- w.minimapMerged ? (n(), i("g", ui, [
860
- H.value && H.value.firstPlot && H.value.firstPlot.value !== null ? (n(), i("circle", {
861
- key: 0,
862
- cx: H.value.firstPlot.x,
863
- cy: H.value.firstPlot.y,
864
- "stroke-width": "0.5",
865
- stroke: ue.value,
866
- r: "4",
867
- fill: w.minimapLineColor
868
- }, null, 8, si)) : g("", !0),
869
- H.value && H.value.firstPlot && H.value.firstPlot.value !== null ? (n(), i("circle", {
870
- key: 1,
871
- cx: H.value.firstPlot.x,
872
- cy: H.value.firstPlot.y,
873
- r: 2,
874
- fill: ue.value
875
- }, null, 8, ri)) : g("", !0),
876
- H.value && H.value.lastPlot && H.value.lastPlot.value !== null ? (n(), i("circle", {
877
- key: 2,
878
- cx: H.value.lastPlot.x,
879
- cy: H.value.lastPlot.y,
880
- "stroke-width": "0.5",
881
- stroke: ue.value,
882
- r: "4",
883
- fill: w.minimapLineColor
884
- }, null, 8, ci)) : g("", !0),
885
- H.value && H.value.lastPlot && H.value.lastPlot.value !== null ? (n(), i("circle", {
886
- key: 3,
887
- cx: H.value.lastPlot.x,
888
- cy: H.value.lastPlot.y,
889
- r: "2",
890
- fill: ue.value
891
- }, null, 8, vi)) : g("", !0)
892
- ])) : (n(), i("g", di, [
893
- (n(!0), i(b, null, _(Qe.value.filter((f) => f.type === "line"), (f) => (n(), i("g", {
894
- key: String(f.key)
895
- }, [
896
- f && f.hasSelection && f.selectionSet && f.isVisible ? (n(), i("path", {
897
- key: 0,
898
- d: `M ${f.selectionSet}`,
899
- stroke: f.color,
900
- fill: "transparent",
901
- "stroke-width": "2",
902
- "stroke-linecap": "round",
903
- "stroke-linejoin": "round"
904
- }, null, 8, hi)) : g("", !0),
905
- f.isVisible && w.cutNullValues ? (n(!0), i(b, { key: 1 }, _(f.selectionMarkers, ($) => (n(), i("circle", {
906
- key: `sel-dot-${f.key}-${$.i}`,
907
- cx: $.x,
908
- cy: $.y,
909
- r: "2.5",
910
- fill: f.color,
911
- stroke: ue.value,
912
- "stroke-width": "0.5"
913
- }, null, 8, fi))), 128)) : g("", !0),
914
- f && f.firstPlot && f.isVisible && f.firstPlot.value !== null ? (n(), i("circle", {
915
- key: 2,
916
- cx: f.firstPlot.x,
917
- cy: f.firstPlot.y,
918
- "stroke-width": "0.5",
919
- stroke: ue.value,
920
- r: "4",
921
- fill: f.color
922
- }, null, 8, mi)) : g("", !0),
923
- f && f.firstPlot && f.isVisible && f.firstPlot.value !== null ? (n(), i("circle", {
924
- key: 3,
925
- cx: f.firstPlot.x,
926
- cy: f.firstPlot.y,
927
- r: "2",
928
- fill: ue.value
929
- }, null, 8, gi)) : g("", !0),
930
- f && f.lastPlot && f.isVisible && f.lastPlot.value !== null ? (n(), i("circle", {
931
- key: 4,
932
- cx: f.lastPlot.x,
933
- cy: f.lastPlot.y,
934
- "stroke-width": "0.5",
935
- stroke: ue.value,
936
- r: "4",
937
- fill: f.color
938
- }, null, 8, xi)) : g("", !0),
939
- f && f.lastPlot && f.isVisible && f.lastPlot.value !== null ? (n(), i("circle", {
940
- key: 5,
941
- cx: f.lastPlot.x,
942
- cy: f.lastPlot.y,
943
- r: "2",
944
- fill: ue.value
945
- }, null, 8, bi)) : g("", !0)
946
- ]))), 128))
947
- ])),
948
- (n(!0), i(b, null, _(Jl.value, (f, $) => (n(), i("rect", {
949
- x: oe.value * $ - (w.minimapCompact ? oe.value / 2 : 0),
950
- y: 0,
951
- height: Math.max(W.value.height, 0),
952
- width: oe.value < 0 ? 0 : oe.value,
953
- fill: "transparent",
954
- style: L([{ "pointer-events": "all !important" }, { cursor: f >= He.value && f < Re.value && w.enableSelectionDrag ? pt.value ? "grabbing" : "grab" : "default" }]),
955
- onMousedown: h[0] || (h[0] = (C) => pt.value = !0),
956
- onMouseup: h[1] || (h[1] = (C) => pt.value = !1),
957
- onMouseenter: (C) => Rl(f),
958
- onMouseleave: h[2] || (h[2] = (C) => {
959
- bt.value = null, Le("trapMouse", null);
960
- })
961
- }, null, 44, yi))), 256))
962
- ], 8, Vn))
963
- ])) : g("", !0),
964
- S("div", {
965
- class: "slider-track",
966
- style: L({ visibility: me.value && w.minimapCompact ? "hidden" : "visible" })
967
- }, null, 4),
968
- S("div", {
969
- class: Ke({ "range-highlight": !0, move: w.enableSelectionDrag }),
970
- onMousedown: h[3] || (h[3] = (f) => pt.value = !0),
971
- onMouseup: h[4] || (h[4] = (f) => pt.value = !1),
972
- style: L({
973
- ..._e.value,
974
- cursor: pt.value ? "grabbing" : "grab",
975
- visibility: me.value && w.minimapCompact ? "hidden" : "visible"
976
- })
977
- }, null, 38),
978
- w.enableRangeHandles ? Oa((n(), i("input", {
979
- key: 1,
980
- ref_key: "rangeStart",
981
- ref: Ft,
982
- type: "range",
983
- class: Ke({
984
- "range-left": !0,
985
- "range-handle": !0,
986
- "range-minimap": me.value && w.verticalHandles,
987
- "range-invisible": me.value && w.minimapCompact
988
- }),
989
- min: w.min,
990
- max: w.minimapCompact && me.value ? Math.max(0, ot.value - 1) : w.max,
991
- "onUpdate:modelValue": h[5] || (h[5] = (f) => Pt.value = f),
992
- onInput: h[6] || (h[6] = (f) => Pt.value = f.target.valueAsNumber),
993
- onChange: Te,
994
- onKeyup: mo(Te, ["enter"]),
995
- onBlur: Te,
996
- onMouseenter: h[7] || (h[7] = (f) => ta("start")),
997
- onPointerup: Te
998
- }, null, 42, pi)), [
999
- [
1000
- go,
1001
- Pt.value,
1002
- void 0,
1003
- { number: !0 }
1004
- ]
1005
- ]) : g("", !0),
1006
- w.enableRangeHandles ? Oa((n(), i("input", {
1007
- key: 2,
1008
- ref_key: "rangeEnd",
1009
- ref: At,
1010
- type: "range",
1011
- class: Ke({
1012
- "range-right": !0,
1013
- "range-handle": !0,
1014
- "range-minimap": me.value && w.verticalHandles,
1015
- "range-invisible": me.value && w.minimapCompact
1016
- }),
1017
- min: w.min,
1018
- max: w.minimapCompact && me.value ? Math.max(0, ot.value - 1) : w.max,
1019
- "onUpdate:modelValue": h[8] || (h[8] = (f) => tl.value = f),
1020
- onInput: h[9] || (h[9] = (f) => tl.value = f.target.valueAsNumber),
1021
- onChange: Te,
1022
- onKeyup: mo(Te, ["enter"]),
1023
- onBlur: Te,
1024
- onMouseenter: h[10] || (h[10] = (f) => ta("end")),
1025
- onPointerup: Te
1026
- }, null, 42, ki)), [
1027
- [
1028
- go,
1029
- tl.value,
1030
- void 0,
1031
- { number: !0 }
1032
- ]
1033
- ]) : g("", !0),
1034
- ge.value.left ? (n(), i("div", {
1035
- key: 3,
1036
- ref_key: "tooltipLeft",
1037
- ref: zt,
1038
- class: Ke({
1039
- "range-tooltip": !0,
1040
- "range-tooltip-visible": c.value,
1041
- "range-tooltip-arrow": _e.value.arrowLeft && !w.verticalHandles,
1042
- "range-tooltip-arrow-left": !_e.value.arrowLeft && !w.verticalHandles
1043
- }),
1044
- style: L({
1045
- left: _e.value.tooltipLeft,
1046
- color: m(ht)(w.selectColor),
1047
- backgroundColor: w.selectColor,
1048
- border: `1px solid ${ue.value}`,
1049
- zIndex: `${Hl.value + 4}`,
1050
- visibility: Et.value || ge.value.left === ge.value.right ? "hidden" : "visible",
1051
- top: me.value && w.minimapCompact ? "calc(-100% - 12px)" : "-100%"
1052
- })
1053
- }, xe(ge.value.left), 7)) : g("", !0),
1054
- (Et.value || ge.value.left === ge.value.right) && (ge.value.left || ge.value.right) ? (n(), i("div", {
1055
- key: 4,
1056
- ref: "tooltipMerge",
1057
- class: Ke({
1058
- "range-tooltip": !0,
1059
- "range-tooltip-visible": c.value,
1060
- "range-tooltip-arrow": !0,
1061
- "range-tooltip-arrow-left": !_e.value.arrowLeft && !w.verticalHandles,
1062
- "range-tooltip-arrow-right": !_e.value.arrowRight && !w.verticalHandles
1063
- }),
1064
- style: L({
1065
- left: _e.value.tooltipCenter,
1066
- width: kt.value.width + "px",
1067
- color: m(ht)(w.selectColor),
1068
- backgroundColor: w.selectColor,
1069
- border: `1px solid ${ue.value}`,
1070
- zIndex: "4",
1071
- top: me.value && w.minimapCompact ? "calc(-100% - 12px)" : "-100%"
1072
- })
1073
- }, xe(ge.value.left === ge.value.right ? ge.value.left : `${ge.value.left} - ${ge.value.right}`), 7)) : g("", !0),
1074
- ge.value.right ? (n(), i("div", {
1075
- key: 5,
1076
- ref_key: "tooltipRight",
1077
- ref: ol,
1078
- class: Ke({
1079
- "range-tooltip": !0,
1080
- "range-tooltip-visible": c.value,
1081
- "range-tooltip-arrow": _e.value.arrowRight && !w.verticalHandles,
1082
- "range-tooltip-arrow-right": !_e.value.arrowRight && !w.verticalHandles
1083
- }),
1084
- style: L({
1085
- left: _e.value.tooltipRight,
1086
- color: m(ht)(w.selectColor),
1087
- backgroundColor: w.selectColor,
1088
- border: `1px solid ${ue.value}`,
1089
- zIndex: "4",
1090
- visibility: Et.value || ge.value.left === ge.value.right ? "hidden" : "visible",
1091
- top: me.value && w.minimapCompact ? "calc(-100% - 12px)" : "-100%"
1092
- })
1093
- }, xe(ge.value.right), 7)) : g("", !0)
1094
- ], 544)
1095
- ], 544));
1096
- }
1097
- }, Si = /* @__PURE__ */ Lo(wi, [["__scopeId", "data-v-8840236b"]]), $i = ["id"], Mi = ["id"], _i = ["viewBox", "aria-label"], Li = ["x", "y", "width", "height"], Ci = { key: 1 }, Ai = { class: "vue-ui-xy-grid" }, Ti = ["stroke", "x1", "x2", "y1", "y2"], zi = ["stroke", "x1", "x2", "y1", "y2"], Ii = { key: 1 }, Ni = ["x1", "x2", "y1", "y2", "stroke"], Pi = ["x1", "x2", "y1", "y2", "stroke"], Fi = ["x1", "x2", "y1", "y2", "stroke"], Ri = { key: 3 }, Oi = ["d", "stroke"], Vi = { key: 4 }, Bi = ["d", "stroke"], Ei = ["id"], Hi = ["stop-color"], Di = ["stop-color"], Wi = ["stop-color"], Xi = ["id"], Yi = ["stop-color"], Gi = ["stop-color"], Ui = ["stop-color"], qi = ["id"], Zi = ["stop-color"], Ki = ["stop-color"], Ji = ["id"], Qi = ["stop-color"], ji = ["stop-color"], eu = ["id"], tu = ["stop-color"], lu = ["stop-color"], au = ["x", "y", "height", "width", "fill"], ou = ["x", "y", "width"], nu = { key: 0 }, iu = ["x", "y", "height", "width", "fill"], uu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], su = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], ru = ["width", "x", "y"], cu = ["stroke", "x1", "x2", "y1", "y2"], vu = { key: 3 }, du = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], hu = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], fu = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mu = ["fill", "font-size", "transform"], gu = ["x1", "x2", "y1", "y2", "stroke"], xu = ["x", "y", "font-size", "fill"], bu = ["x1", "x2", "y1", "y2", "stroke"], yu = ["x", "y", "font-size", "fill"], pu = ["width", "x", "y"], ku = { style: { width: "100%" } }, wu = ["d", "stroke", "stroke-width", "stroke-dasharray"], Su = ["d", "stroke", "stroke-width", "stroke-dasharray"], $u = { key: 6 }, Mu = { key: 7 }, _u = ["d", "fill", "fill-opacity"], Lu = { key: 0 }, Cu = ["d", "fill"], Au = ["d", "fill"], Tu = ["d", "fill"], zu = ["d", "fill"], Iu = ["d", "stroke", "stroke-width", "stroke-dasharray"], Nu = ["d", "stroke", "stroke-width", "stroke-dasharray"], Pu = ["width", "x", "y"], Fu = { style: { width: "100%" } }, Ru = { key: 8 }, Ou = ["x", "y", "font-size", "fill"], Vu = ["x", "y", "font-size", "fill", "font-weight"], Bu = { key: 9 }, Eu = ["x", "y", "font-size", "fill"], Hu = { key: 10 }, Du = ["x", "y"], Wu = ["innerHTML"], Xu = ["x", "y"], Yu = ["innerHTML"], Gu = ["x1", "x2", "y1", "y2", "stroke"], Uu = { key: 11 }, qu = ["x", "y", "font-size", "fill"], Zu = { key: 12 }, Ku = ["x", "y"], Ju = ["innerHTML"], Qu = ["x", "y"], ju = ["innerHTML"], es = ["x1", "x2", "y1", "y2", "stroke"], ts = ["x", "y", "font-size", "fill", "innerHTML"], ls = ["x", "y", "font-size", "fill", "innerHTML"], as = ["x", "y", "font-size", "fill", "innerHTML"], os = ["x", "y", "font-size", "fill", "innerHTML"], ns = { key: 0 }, is = ["id"], us = ["fill", "stroke"], ss = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], rs = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], cs = ["x", "y", "font-size", "fill", "stroke"], vs = ["id"], ds = ["stop-color"], hs = ["stop-color"], fs = ["x", "y", "width", "height", "fill", "onMouseenter"], ms = ["font-size", "fill", "transform"], gs = ["x", "y", "font-size", "fill"], xs = ["text-anchor", "font-size", "fill", "transform", "onClick"], bs = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], ys = { key: 15 }, ps = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ks = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ws = ["y", "x", "width", "height", "fill"], Ss = ["id", "x", "y", "font-size", "fill", "text-anchor"], $s = {
1098
- key: 16,
1099
- style: { "pointer-events": "none" }
1100
- }, Ms = ["x", "y"], _s = ["innerHTML"], Ls = ["cx", "cy", "r", "fill"], Cs = ["data-start", "data-end"], As = {
1101
- key: 4,
1102
- class: "vue-data-ui-watermark"
1103
- }, Ts = {
1104
- class: "vue-ui-xy-tag-arrow",
1105
- height: "20",
1106
- viewBox: "0 0 10 20",
1107
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
1108
- }, zs = ["fill"], Is = ["innerHTML"], Ns = {
1109
- class: "vue-ui-xy-tag-arrow",
1110
- height: "100%",
1111
- viewBox: "0 0 10 20",
1112
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
1113
- }, Ps = ["fill"], Fs = ["innerHTML"], Rs = {
1114
- class: "vue-ui-xy-tag-arrow",
1115
- height: "20",
1116
- viewBox: "0 0 10 20",
1117
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
1118
- }, Os = ["fill"], Vs = ["innerHTML"], Bs = {
1119
- class: "vue-ui-xy-tag-arrow",
1120
- height: "100%",
1121
- viewBox: "0 0 10 20",
1122
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
1123
- }, Es = ["fill"], Hs = ["innerHTML"], Ds = ["id"], Ws = ["onClick"], Xs = {
1124
- key: 0,
1125
- viewBox: "0 0 20 12",
1126
- height: "1em",
1127
- width: "1.43em"
1128
- }, Ys = ["stroke", "fill"], Gs = {
1129
- key: 1,
1130
- viewBox: "0 0 40 40",
1131
- height: "1em",
1132
- width: "1em"
1133
- }, Us = ["fill"], qs = ["fill"], Zs = {
1134
- key: 2,
1135
- viewBox: "0 0 12 12",
1136
- height: "1em",
1137
- width: "1em"
1138
- }, Ks = {
1139
- style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
1140
- "data-dom-to-png-ignore": ""
1141
- }, Js = ["innerHTML"], Qs = {
1142
- __name: "vue-ui-xy",
1143
- props: {
1144
- config: {
1145
- type: Object,
1146
- default() {
1147
- return {};
1148
- }
1149
- },
1150
- dataset: {
1151
- type: Array,
1152
- default() {
1153
- return [];
1154
- }
1155
- },
1156
- selectedXIndex: {
1157
- type: Number,
1158
- default: void 0
1159
- }
1160
- },
1161
- emits: ["selectTimeLabel", "selectX", "selectLegend"],
1162
- setup(w, { expose: Sa, emit: $a }) {
1163
- const v = w, Fe = Xt(() => import("./DataTable-yAMEyP6y.js")), ce = Xt(() => import("./Tooltip-VOcQEHa4.js")), fe = Xt(() => import("./UserOptions-CSja1SGU.js")), me = Xt(() => import("./BaseIcon-eZbszQrv.js")), Ll = Xt(() => import("./vue-ui-table-sparkline-Chf5YY4A.js")), Lt = Xt(() => import("./PackageVersion-r-Q1R3nV.js")), Nt = Xt(() => import("./PenAndPaper-Bo-lMUik.js")), Kl = Xt(() => import("./BaseDraggableDialog-CVGErydD.js")), qt = $a, xl = jo(), Zt = en(), { vue_ui_xy: at } = kn(), Ee = y(null), Te = y(null), Je = y(null), Le = y(null), mt = y(null), Ct = y(null), Cl = y(null), Kt = y(null), Jt = y(null), _e = y(null), Al = y(null), Tl = y(null), gt = y(null), ue = y(null), Jl = y(0), E = y(null), Qt = y(!0), W = y(600), ae = y(1e3), ot = y("0 0 1000 600"), Ql = y({ x: 0, y: 0 }), jt = y({ line: "line", bar: "bar", plot: "plot" }), He = y(!1), Re = y(!1), bl = y(!1), oe = y(null), ve = y([]), Z = y(ga()), zl = y(0), Il = y(0), Nl = y(0), De = y(!0), xt = y(0), X = y(null), jl = y(!1), Pl = y(!0), yl = y(!0), $e = y(null), nt = y({}), el = y(null), H = y(!1), Qe = y(null), M = y(null), bt = x(() => ({
1164
- height: W.value,
1165
- width: ae.value
1166
- }));
1167
- function Fl(l) {
1168
- return Number.isFinite(l) ? Math.max(0, Math.floor(l)) : 0;
1169
- }
1170
- function Pt(l, s, e = 0) {
1171
- return Number.isFinite(l) && Number.isFinite(s) && Math.abs(s) > 1e-9 ? l / s : e;
1172
- }
1173
- const tl = y(!1), T = y({
1174
- xAxis: 18,
1175
- yAxis: 12,
1176
- dataLabels: 20,
1177
- plotLabels: 10
1178
- }), We = y({ plot: 3, line: 3 });
1179
- Zl(() => {
1180
- H.value = !0, v.dataset.length && v.dataset.forEach((l, s) => {
1181
- [null, void 0].includes(l.series) && Pa({
1182
- componentName: "VueUiXy",
1183
- type: "datasetSerieAttribute",
1184
- property: "series (number[])",
1185
- index: s,
1186
- debug: Tt.value
1187
- });
1188
- });
1189
- });
1190
- function Rl() {
1191
- if (!Object.keys(v.config || {}).length)
1192
- return at;
1193
- const l = fa({
1194
- userConfig: v.config,
1195
- defaultConfig: at
1196
- });
1197
- return v.config && Be(v.config, "chart.highlightArea") && (Array.isArray(v.config.chart.highlightArea) ? l.chart.highlightArea = v.config.chart.highlightArea : l.chart.highlightArea = [v.config.chart.highlightArea]), v.config && Be(v.config, "chart.grid.labels.yAxis.scaleMin") ? l.chart.grid.labels.yAxis.scaleMin = v.config.chart.grid.labels.yAxis.scaleMin : l.chart.grid.labels.yAxis.scaleMin = null, v.config && Be(v.config, "chart.grid.labels.yAxis.scaleMax") ? l.chart.grid.labels.yAxis.scaleMax = v.config.chart.grid.labels.yAxis.scaleMax : l.chart.grid.labels.yAxis.scaleMax = null, v.config && Be(v.config, "chart.zoom.startIndex") ? l.chart.zoom.startIndex = v.config.chart.zoom.startIndex : l.chart.zoom.startIndex = null, v.config && Be(v.config, "chart.zoom.endIndex") ? l.chart.zoom.endIndex = v.config.chart.zoom.endIndex : l.chart.zoom.endIndex = null, v.config && Be(v.config, "chart.grid.labels.yAxis.groupColor") ? l.chart.grid.labels.yAxis.groupColor = v.config.chart.grid.labels.yAxis.groupColor : l.chart.grid.labels.yAxis.groupColor = null, v.config && Be(v.config, "chart.annotations") && Array.isArray(v.config.chart.annotations) && v.config.chart.annotations.length ? l.chart.annotations = v.config.chart.annotations.map((s) => fa({
1198
- defaultConfig: at.chart.annotations[0],
1199
- userConfig: s
1200
- })) : l.chart.annotations = [], v.config && Be(v.config, "chart.grid.position") && v.config.chart.grid.position === "start" && v.dataset.length && v.dataset.some((s) => s.type === "bar") && (l.chart.grid.position = "middle", Be(v.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), v.config && Be(v.config, "chart.grid.labels.yAxis.serieNameFormatter") ? l.chart.grid.labels.yAxis.serieNameFormatter = v.config.chart.grid.labels.yAxis.serieNameFormatter : l.chart.grid.labels.yAxis.serieNameFormatter = null, v.config && Be(v.config, "events.datapointEnter") ? l.events.datapointEnter = v.config.events.datapointEnter : l.events.datapointEnter = null, v.config && Be(v.config, "events.datapointLeave") ? l.events.datapointLeave = v.config.events.datapointLeave : l.events.datapointLeave = null, v.config && Be(v.config, "events.datapointClick") ? l.events.datapointClick = v.config.events.datapointClick : l.events.datapointClick = null, v.config && Be(v.config, "chart.highlightArea") && (Array.isArray(v.config.chart.highlightArea) ? l.chart.highlightArea = v.config.chart.highlightArea.map((s) => Ft({
1201
- defaultConfig: at.chart.highlightArea,
1202
- userConfig: s
1203
- })) : l.chart.highlightArea = Ft({
1204
- defaultConfig: at.chart.highlightArea,
1205
- userConfig: v.config.chart.highlightArea
1206
- })), l.theme ? {
1207
- ...fa({
1208
- userConfig: In.vue_ui_xy[l.theme] || v.config,
1209
- defaultConfig: l
1210
- }),
1211
- customPalette: gn[l.theme] || v.palette
1212
- } : l;
1213
- }
1214
- function Ft({ defaultConfig: l, userConfig: s }) {
1215
- return fa({
1216
- defaultConfig: l,
1217
- userConfig: s
1218
- });
1219
- }
1220
- const At = x({
1221
- get() {
1222
- return !!v.dataset && v.dataset.length;
1223
- },
1224
- set(l) {
1225
- return l;
1226
- }
1227
- }), t = y(Rl()), p = y({
1228
- dataLabels: { show: !0 },
1229
- showTooltip: !0,
1230
- showTable: !1,
1231
- isStacked: !1,
1232
- useIndividualScale: !1
1233
- });
1234
- function ll() {
1235
- tl.value ? (p.value.isStacked = t.value.chart.grid.labels.yAxis.stacked, p.value.useIndividualScale == null && (p.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale)) : (p.value = {
1236
- dataLabels: { show: !0 },
1237
- showTooltip: t.value.chart.tooltip.show === !0,
1238
- showTable: t.value.showTable === !0,
1239
- isStacked: t.value.chart.grid.labels.yAxis.stacked,
1240
- useIndividualScale: t.value.chart.grid.labels.yAxis.useIndividualScale
1241
- }, tl.value = !0);
1242
- }
1243
- const Tt = x(() => !!t.value.debug), { loading: be, FINAL_DATASET: ye, manualLoading: pl } = Sn({
1244
- ...tn(v),
1245
- FINAL_CONFIG: t,
1246
- prepareConfig: Rl,
1247
- callback: () => {
1248
- Promise.resolve().then(async () => {
1249
- await St(), p.value.showTable = t.value.showTable;
1250
- });
1251
- },
1252
- skeletonDataset: [
1253
- {
1254
- name: "",
1255
- series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
1256
- type: "line",
1257
- smooth: !0,
1258
- color: "#BABABA"
1259
- },
1260
- {
1261
- name: "",
1262
- series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
1263
- type: "bar",
1264
- color: "#CACACA"
1265
- }
1266
- ],
1267
- skeletonConfig: sn({
1268
- defaultConfig: t.value,
1269
- userConfig: {
1270
- useCssAnimation: !1,
1271
- showTable: !1,
1272
- chart: {
1273
- annotations: [],
1274
- highlightArea: [],
1275
- backgroundColor: "#99999930",
1276
- grid: {
1277
- stroke: "#6A6A6A",
1278
- labels: {
1279
- show: !1,
1280
- axis: {
1281
- yLabel: "",
1282
- xLabel: ""
1283
- },
1284
- xAxisLabels: { show: !1 },
1285
- yAxis: {
1286
- commonScaleSteps: 10,
1287
- useNiceScale: !0,
1288
- scaleMin: 0,
1289
- scaleMax: 134
1290
- },
1291
- zeroLine: { show: !0 }
1292
- }
1293
- },
1294
- padding: {
1295
- top: 12,
1296
- bottom: 24,
1297
- left: 24,
1298
- right: 24
1299
- },
1300
- userOptions: { show: !1 },
1301
- zoom: {
1302
- show: !1,
1303
- startIndex: null,
1304
- endIndex: null
1305
- }
1306
- },
1307
- bar: {
1308
- serieName: { show: !1 },
1309
- labels: { show: !1 },
1310
- border: {
1311
- useSerieColor: !1,
1312
- stroke: "#999999"
1313
- }
1314
- },
1315
- line: {
1316
- dot: {
1317
- useSerieColor: !1,
1318
- fill: "#8A8A8A"
1319
- },
1320
- labels: { show: !1 }
1321
- }
1322
- }
1323
- })
1324
- });
1325
- function Rt(l) {
1326
- const s = /* @__PURE__ */ new WeakMap();
1327
- return (e, ...u) => {
1328
- let a = s.get(e);
1329
- const r = JSON.stringify(u);
1330
- if (a && a.has(r)) return a.get(r);
1331
- const o = l(e, ...u);
1332
- return a || (a = /* @__PURE__ */ new Map(), s.set(e, a)), a.set(r, o), o;
1333
- };
1334
- }
1335
- const Ma = Rt((l, s) => Fa({ data: l, threshold: s })), yt = (l) => Ma(l, t.value.downsample.threshold), je = x({
1336
- get: () => Math.max(...ye.value.map((l) => yt(l.series).length)),
1337
- set: (l) => l
1338
- }), k = y({ start: 0, end: je.value }), Xe = y({ start: 0, end: je.value }), Ol = x(() => t.value.chart.zoom.preview.enable && (Xe.value.start !== k.value.start || Xe.value.end !== k.value.end));
1339
- function Vl(l, s) {
1340
- Xe.value[l] = s;
1341
- }
1342
- function Ot() {
1343
- const l = Math.max(
1344
- 1,
1345
- ...ye.value.map((u) => yt(u.series).length)
1346
- );
1347
- let s = Math.max(0, Math.min(k.value.start ?? 0, l - 1)), e = Math.max(s + 1, Math.min(k.value.end ?? l, l));
1348
- (!Number.isFinite(s) || !Number.isFinite(e) || e <= s) && (s = 0, e = l), k.value = { start: s, end: e }, Xe.value.start = s, Xe.value.end = e, Je.value && (Je.value.setStartValue(s), Je.value.setEndValue(e));
1349
- }
1350
- const _a = x(() => {
1351
- const { left: l, top: s, width: e, height: u } = c.value, a = k.value.start, o = k.value.end - a, F = e / o, R = Xe.value.start - a, O = Xe.value.end - a, A = Math.max(0, Math.min(o, R)), N = Math.max(0, Math.min(o, O));
1352
- return {
1353
- x: l + A * F,
1354
- y: s,
1355
- width: (N - A) * F,
1356
- height: u,
1357
- fill: t.value.chart.zoom.preview.fill,
1358
- stroke: t.value.chart.zoom.preview.stroke,
1359
- "stroke-width": t.value.chart.zoom.preview.strokeWidth,
1360
- "stroke-dasharray": t.value.chart.zoom.preview.strokeDasharray,
1361
- "stroke-linecap": "round",
1362
- "stroke-linejoin": "round",
1363
- style: {
1364
- pointerEvents: "none",
1365
- transition: "none !important",
1366
- animation: "none !important"
1367
- }
1368
- };
1369
- });
1370
- ft(() => v.selectedXIndex, (l) => {
1371
- if ([null, void 0].includes(v.selectedXIndex)) {
1372
- M.value = null;
1373
- return;
1374
- }
1375
- const s = l - k.value.start;
1376
- s < 0 || l >= k.value.end ? M.value = null : M.value = s ?? null;
1377
- }, { immediate: !0 });
1378
- const { isPrinting: et, isImaging: it, generatePdf: ut, generateImage: st } = wn({
1379
- elementId: `vue-ui-xy_${Z.value}`,
1380
- fileName: t.value.chart.title.text || "vue-ui-xy",
1381
- options: t.value.chart.userOptions.print
1382
- }), ea = y(!1), Vt = x(() => rn(t.value.customPalette)), al = x(() => {
1383
- if (t.value.chart.grid.labels.yAxis.scaleMin !== null)
1384
- return t.value.chart.grid.labels.yAxis.scaleMin;
1385
- const l = Math.min(...rt.value.filter((s) => !ve.value.includes(s.id)).map((s) => Math.min(...s.series)));
1386
- return l > 0 ? 0 : l;
1387
- }), kl = x(() => {
1388
- if (t.value.chart.grid.labels.yAxis.scaleMax)
1389
- return t.value.chart.grid.labels.yAxis.scaleMax;
1390
- const l = Math.max(...rt.value.filter((s) => !ve.value.includes(s.id)).map((s) => Math.max(...s.series)));
1391
- return al.value === l ? l + 1 : l;
1392
- }), Ye = x(() => t.value.chart.grid.labels.yAxis.useNiceScale ? ql(al.value, kl.value < 0 ? 0 : kl.value, t.value.chart.grid.labels.yAxis.commonScaleSteps) : fl(al.value, kl.value < 0 ? 0 : kl.value, t.value.chart.grid.labels.yAxis.commonScaleSteps)), Bt = x(() => [null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) ? Ye.value.min >= 0 ? 0 : Math.abs(Ye.value.min) : -Ye.value.min), rt = x(() => Qt.value ? ye.value.map((l, s) => {
1393
- const e = yt(l.series), u = `uniqueId_${s}`;
1394
- return {
1395
- ...l,
1396
- slotAbsoluteIndex: s,
1397
- series: e.map((a) => da(a) ? a : null).slice(k.value.start, k.value.end),
1398
- color: po(l.color ? l.color : Vt.value[s] ? Vt.value[s] : ko[s]),
1399
- id: u,
1400
- scaleLabel: l.scaleLabel || u
1401
- };
1402
- }) : ye.value), Ge = x(() => rt.value.map((l, s) => ({
1403
- absoluteIndex: s,
1404
- ...l,
1405
- series: l.series.map((e) => e + Bt.value),
1406
- absoluteValues: l.series,
1407
- segregate: () => Ga(l),
1408
- isSegregated: ve.value.includes(l.id)
1409
- }))), ze = x(() => rt.value.map((l, s) => ({
1410
- ...l,
1411
- series: l.series.map((e) => e + Bt.value),
1412
- absoluteValues: l.series
1413
- })).filter((l) => !ve.value.includes(l.id)));
1414
- function pt() {
1415
- let l = 0;
1416
- Al.value && (l = Array.from(Al.value.querySelectorAll("text")).reduce((a, r) => {
1417
- const o = r.getComputedTextLength();
1418
- return (o > a ? o : a) + t.value.chart.grid.labels.yAxis.scaleValueOffsetX;
1419
- }, 0));
1420
- const s = Jt.value ? Jt.value.getBoundingClientRect().width + t.value.chart.grid.labels.axis.yLabelOffsetX + T.value.yAxis : 0, e = t.value.chart.grid.labels.yAxis.crosshairSize;
1421
- return l + s + e;
1422
- }
1423
- const zt = y(0), ol = ba((l) => {
1424
- zt.value = l;
1425
- }, 100);
1426
- Cn({ elementRef: _e, callback: ol, attr: "height" }), _l(() => {
1427
- zt.value = 0;
1428
- });
1429
- const nl = x(() => {
1430
- let l = 0;
1431
- Kt.value && (l = Kt.value.getBBox().height);
1432
- let s = 0;
1433
- return _e.value && (s = zt.value), l + s + T.value.xAxis;
1434
- }), il = x(() => ye.value.some((l) => l.useProgression)), c = x(() => {
1435
- let l = 0;
1436
- const s = 36;
1437
- t.value.chart.grid.labels.show && (p.value.useIndividualScale && !p.value.isStacked ? l = (ye.value.length - ve.value.length) * (t.value.chart.grid.labels.yAxis.labelWidth + s) : p.value.useIndividualScale && p.value.isStacked ? l = t.value.chart.grid.labels.yAxis.labelWidth + s : l = pt());
1438
- const e = t.value.chart.labels.fontSize * 1.1, u = il.value ? 24 : 6;
1439
- if (_e.value) {
1440
- const o = _e.value.getBBox().x;
1441
- o < 0 && (l += Math.abs(o));
1442
- }
1443
- const a = ae.value - l - t.value.chart.grid.labels.yAxis.crosshairSize - u - t.value.chart.padding.left - t.value.chart.padding.right, r = t.value.chart.grid.position === "middle" ? 0 : a / I.value / 2;
1444
- return {
1445
- top: t.value.chart.padding.top + e,
1446
- right: ae.value - u - t.value.chart.padding.right,
1447
- bottom: W.value - nl.value - t.value.chart.padding.bottom - t.value.chart.grid.labels.axis.xLabelOffsetY,
1448
- left: l + t.value.chart.grid.labels.yAxis.crosshairSize - r + t.value.chart.padding.left,
1449
- height: W.value - nl.value - t.value.chart.padding.top - t.value.chart.padding.bottom - e - t.value.chart.grid.labels.axis.xLabelOffsetY,
1450
- width: a,
1451
- scaleLabelX: l,
1452
- individualOffsetX: s
1453
- };
1454
- }), Bl = x(() => {
1455
- const l = t.value.chart.grid.position === "middle" ? 1 : 0, s = I.value + l, e = ee(c.value.top), u = ee(c.value.bottom);
1456
- return Array.from({ length: s }).map((a, r) => {
1457
- const o = c.value.width / I.value * r + c.value.left + se.value;
1458
- return `M${o},${e} L${o},${u}`;
1459
- }).join(" ");
1460
- }), El = x(() => {
1461
- if (!t.value.chart.grid.labels.xAxis.showCrosshairs) return "";
1462
- const l = c.value.width / I.value, s = t.value.chart.grid.labels.xAxis.crosshairSize, e = t.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero;
1463
- return pe.value.map((u, a) => {
1464
- if (!u || !u.text) return null;
1465
- const r = c.value.left + l * a + l / 2, o = e ? Ie.value - (Ie.value === c.value.bottom ? 0 : s / 2) : c.value.bottom, F = e ? Ie.value + s / (Ie.value === c.value.bottom ? 1 : 2) : c.value.bottom + s;
1466
- return `M${r},${o} L${r},${F}`;
1467
- }).filter(Boolean).join(" ");
1468
- });
1469
- function Hl() {
1470
- return !!Zt?.vnode.props?.onSelectTimeLabel;
1471
- }
1472
- function ta(l, s, e) {
1473
- if (!el.value) {
1474
- const u = document.createElement("canvas");
1475
- el.value = u.getContext("2d");
1476
- }
1477
- return el.value.font = `normal ${l}px sans-serif`, el.value;
1478
- }
1479
- function Et() {
1480
- const l = Ee.value.querySelectorAll(".vue-ui-xy-tag");
1481
- l.length && Array.from(l).forEach((s) => s.style.opacity = "0");
1482
- }
1483
- function kt(l, s, e, u, a) {
1484
- e && (nt.value[`${l}_${s}_${u}_${a}`] = e);
1485
- }
1486
- const ge = y(!1);
1487
- async function la(l = !1) {
1488
- await Ml(), ge.value = l, jl.value && (yl.value = l);
1489
- }
1490
- function d() {
1491
- He.value = !He.value;
1492
- }
1493
- const h = x(() => {
1494
- const l = Math.max(...ye.value.map((s) => Fa({ data: s.series, threshold: t.value.downsample.threshold }).length));
1495
- return _o({
1496
- values: t.value.chart.grid.labels.xAxisLabels.values,
1497
- maxDatapoints: l,
1498
- formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
1499
- start: k.value.start,
1500
- end: k.value.end
1501
- });
1502
- }), f = x(() => {
1503
- const l = Math.max(...ye.value.map((s) => Fa({ data: s.series, threshold: t.value.downsample.threshold }).length));
1504
- return _o({
1505
- values: t.value.chart.grid.labels.xAxisLabels.values,
1506
- maxDatapoints: l,
1507
- formatter: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
1508
- start: 0,
1509
- end: je.value
1510
- });
1511
- }), $ = x(() => {
1512
- const l = t.value.chart.grid.labels.xAxisLabels.modulo;
1513
- return h.value.length ? Math.min(l, [...new Set(h.value.map((s) => s.text))].length) : l;
1514
- });
1515
- function C(l) {
1516
- let s = null, e = null;
1517
- return (...u) => {
1518
- const a = JSON.stringify(u);
1519
- return a === s || (s = a, e = l(...u)), e;
1520
- };
1521
- }
1522
- const D = C((l, s, e, u, a, r, o, F) => {
1523
- if (l)
1524
- return u.length <= 2 ? u.map((B, re) => ({ text: B, absoluteIndex: re })) : u.map((B, re) => ({ text: re === 0 || re === u.length - 1 || o != null && re === o ? B : "", absoluteIndex: re }));
1525
- if (!s)
1526
- return u.map((Y, B) => ({ text: Y, absoluteIndex: B }));
1527
- const R = Math.max(1, e || 1);
1528
- if (F <= R)
1529
- return u.map((Y, B) => ({ text: Y, absoluteIndex: B }));
1530
- const O = [];
1531
- for (let Y = 0; Y < u.length; Y += 1) {
1532
- const B = u[Y] ?? "";
1533
- if (!B) continue;
1534
- const re = r + Y - 1 >= 0 ? a[r + Y - 1] ?? "" : null;
1535
- B !== re && O.push(Y);
1536
- }
1537
- if (!O.length)
1538
- return u.map((Y, B) => ({ text: "", absoluteIndex: B }));
1539
- const A = O.length, N = R, j = Math.max(2, Math.min(N - 3, A)), z = Math.min(A, N + 3);
1540
- let U = Math.min(N, A), V = 1 / 0;
1541
- for (let Y = j; Y <= z; Y += 1) {
1542
- const B = (A - 1) % (Y - 1), re = Math.abs(Y - N), Oe = B * 10 + re;
1543
- Oe < V && (V = Oe, U = Y);
1544
- }
1545
- const he = /* @__PURE__ */ new Set();
1546
- if (U <= 1)
1547
- he.add(O[Math.round((A - 1) / 2)]);
1548
- else {
1549
- const Y = (A - 1) / (U - 1);
1550
- for (let B = 0; B < U; B += 1)
1551
- he.add(O[Math.round(B * Y)]);
1552
- }
1553
- return u.map((Y, B) => ({
1554
- text: he.has(B) ? Y : "",
1555
- absoluteIndex: B
1556
- }));
1557
- }), pe = x(() => {
1558
- const l = t.value.chart.grid.labels.xAxisLabels, s = h.value || [], e = f.value || [], u = k.value.start ?? 0, a = M.value, r = I.value, o = s.map((R) => R?.text ?? ""), F = e.map((R) => R?.text ?? "");
1559
- return D(
1560
- !!l.showOnlyFirstAndLast,
1561
- !!l.showOnlyAtModulo,
1562
- Math.max(1, $.value || 1),
1563
- o,
1564
- F,
1565
- u,
1566
- a,
1567
- r
1568
- );
1569
- });
1570
- function ne(l, s) {
1571
- const e = ze.value.map((u) => ({
1572
- shape: u.shape || null,
1573
- name: u.name,
1574
- color: u.color,
1575
- type: u.type,
1576
- value: u.absoluteValues.find((a, r) => r === s),
1577
- comments: u.comments || [],
1578
- prefix: u.prefix || t.value.chart.labels.prefix,
1579
- suffix: u.suffix || t.value.chart.labels.suffix
1580
- }));
1581
- qt("selectTimeLabel", {
1582
- datapoint: e,
1583
- absoluteIndex: l.absoluteIndex,
1584
- label: l.text
1585
- });
1586
- }
1587
- const I = x(() => {
1588
- const l = Fl((k.value.end ?? 0) - (k.value.start ?? 0));
1589
- return Math.max(1, l);
1590
- });
1591
- function wt(l) {
1592
- X.value = l;
1593
- }
1594
- function ul() {
1595
- p.value.isStacked = !p.value.isStacked, p.value.isStacked ? p.value.useIndividualScale = !0 : p.value.useIndividualScale = t.value.chart.grid.labels.yAxis.useIndividualScale;
1596
- }
1597
- function ct(l) {
1598
- Tt.value && l.autoScaling && (t.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), t.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${l.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
1599
- }
1600
- function La(l, s) {
1601
- const e = Fl(l), u = Array(e).fill(0);
1602
- for (let a = 0; a < s.length && a < e; a += 1) u[a] = s[a] ?? 0;
1603
- return u;
1604
- }
1605
- function aa(l) {
1606
- const s = Math.max(...ye.value.map((e) => yt(e.series).length));
1607
- return l > s ? s : l < 0 || t.value.chart.zoom.startIndex !== null && l < t.value.chart.zoom.startIndex ? t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex + 1 : 1 : l;
1608
- }
1609
- const te = y(!1), Dl = y(!1);
1610
- function St() {
1611
- if (!te.value) {
1612
- te.value = !0;
1613
- try {
1614
- const { startIndex: l, endIndex: s } = t.value.chart.zoom, e = Math.max(...ye.value.map((r) => yt(r.series).length)), u = l ?? 0, a = s != null ? Math.min(aa(s + 1), e) : e;
1615
- sl.value = !0, k.value.start = u, k.value.end = a, Xe.value.start = u, Xe.value.end = a, Ot(), Dl.value = !0;
1616
- } finally {
1617
- queueMicrotask(() => {
1618
- sl.value = !1;
1619
- }), te.value = !1;
1620
- }
1621
- }
1622
- }
1623
- const sl = y(!1);
1624
- function Ca(l) {
1625
- te.value || sl.value || l !== k.value.start && (k.value.start = l, Xe.value.start = l, Ot());
1626
- }
1627
- function Aa(l) {
1628
- if (te.value || sl.value) return;
1629
- const s = aa(l);
1630
- s !== k.value.end && (k.value.end = s, Xe.value.end = s, Ot());
1631
- }
1632
- async function Co() {
1633
- await St();
1634
- }
1635
- function Ue(l) {
1636
- return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(l);
1637
- }
1638
- const Va = x(() => Ye.value.max + Bt.value);
1639
- function rl(l) {
1640
- return l / (Ue(Va.value) ? Va.value : 1);
1641
- }
1642
- const Ie = x(() => isNaN(rl(Bt.value)) ? c.value.bottom : c.value.bottom - c.value.height * rl(Bt.value));
1643
- function Ba(l) {
1644
- const s = ![null, void 0].includes(t.value.chart.grid.labels.yAxis.scaleMin) && t.value.chart.grid.labels.yAxis.scaleMin > 0 && al.value >= 0 ? c.value.bottom : Ie.value;
1645
- return l.value >= 0 ? q(s - l.y <= 0 ? 1e-5 : s - l.y) : q(l.y - Ie.value <= 0 ? 1e-5 : l.y - Ie.value);
1646
- }
1647
- function Ea(l) {
1648
- return l.value >= 0 ? q(l.zeroPosition - l.y <= 0 ? 1e-5 : l.zeroPosition - l.y) : q(l.y - l.zeroPosition <= 0 ? 1e-5 : l.zeroPosition - l.y);
1649
- }
1650
- const de = x(() => {
1651
- const l = Math.max(1, I.value), s = Math.max(1, c.value.width), e = Math.max(1, rt.value.filter((u) => u.type === "bar" && !ve.value.includes(u.id)).length);
1652
- return {
1653
- bar: Pt(s, l * e, 1),
1654
- plot: Pt(s, l, 1),
1655
- line: Pt(s, l, 1)
1656
- };
1657
- });
1658
- function Ht() {
1659
- return p.value.useIndividualScale && p.value.isStacked ? de.value.line - c.value.width / I.value * 0.1 : de.value.bar;
1660
- }
1661
- function oa(l) {
1662
- return p.value.useIndividualScale && p.value.isStacked ? l.x + c.value.width / I.value * 0.05 : l.x + de.value.bar / 2;
1663
- }
1664
- function Ha(l) {
1665
- return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(Ie.value) ? c.bottom.value : Ie.value;
1666
- }
1667
- function Da(l) {
1668
- return l.value >= 0 ? l.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(l.zeroPosition) ? 0 : l.zeroPosition;
1669
- }
1670
- const Wl = y(null);
1671
- function Wa(l) {
1672
- const s = $e.value;
1673
- if (!s) return null;
1674
- if (s.createSVGPoint && s.getScreenCTM) {
1675
- const N = s.createSVGPoint();
1676
- N.x = l.clientX, N.y = l.clientY;
1677
- const j = s.getScreenCTM();
1678
- if (j) {
1679
- const z = N.matrixTransform(j.inverse());
1680
- return { x: z.x, y: z.y, ok: !0 };
1681
- }
1682
- }
1683
- const e = s.getBoundingClientRect(), u = s.viewBox?.baseVal || { x: 0, y: 0, width: e.width, height: e.height }, a = Math.min(e.width / u.width, e.height / u.height), r = u.width * a, o = u.height * a, F = (e.width - r) / 2, R = (e.height - o) / 2, O = (l.clientX - e.left - F) / a + u.x, A = (l.clientY - e.top - R) / a + u.y;
1684
- return { x: O, y: A, ok: !0 };
1685
- }
1686
- let cl = 0;
1687
- function Ao(l) {
1688
- He.value || (cl && cancelAnimationFrame(cl), cl = requestAnimationFrame(() => {
1689
- cl = 0;
1690
- const s = Wa(l);
1691
- if (!s || !$e.value) {
1692
- na();
1693
- return;
1694
- }
1695
- const { left: e, right: u, top: a, bottom: r, width: o } = c.value;
1696
- if (s.x < e || s.x > u || s.y < a || s.y > r) {
1697
- na();
1698
- return;
1699
- }
1700
- const F = s.x - e, R = o / I.value, O = Math.floor(F / R);
1701
- O >= 0 && O < I.value ? Wl.value !== O && (Wl.value = O, to(!0, O)) : na();
1702
- }));
1703
- }
1704
- function na() {
1705
- cl && (cancelAnimationFrame(cl), cl = 0), Wl.value = null, to(!1, null);
1706
- }
1707
- function Xa(l) {
1708
- const s = Wa(l);
1709
- if (s && $e.value) {
1710
- const { left: e, right: u, top: a, bottom: r, width: o } = c.value;
1711
- if (s.x >= e && s.x <= u && s.y >= a && s.y <= r) {
1712
- const F = o / Math.max(1, I.value), R = Math.floor((s.x - e) / F);
1713
- if (R >= 0 && R < I.value) {
1714
- Ya(R);
1715
- return;
1716
- }
1717
- }
1718
- }
1719
- Wl.value != null && Ya(Wl.value);
1720
- }
1721
- function Ya(l) {
1722
- const s = ze.value.map((e) => ({
1723
- name: e.name,
1724
- value: [null, void 0, NaN].includes(e.absoluteValues[l]) ? null : e.absoluteValues[l],
1725
- color: e.color,
1726
- type: e.type
1727
- }));
1728
- qt(
1729
- "selectX",
1730
- {
1731
- dataset: s,
1732
- index: l,
1733
- indexLabel: t.value.chart.grid.labels.xAxisLabels.values[l]
1734
- }
1735
- ), t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: s, seriesIndex: l + k.value.start });
1736
- }
1737
- function To() {
1738
- return Ge.value.map((l) => ({
1739
- values: l.absoluteValues,
1740
- color: l.color,
1741
- name: l.name,
1742
- type: l.type
1743
- }));
1744
- }
1745
- async function zo({ scale: l = 2 } = {}) {
1746
- if (!Ee.value) return;
1747
- const { width: s, height: e } = Ee.value.getBoundingClientRect(), u = s / e, { imageUri: a, base64: r } = await Tn({ domElement: Ee.value, base64: !0, img: !0, scale: l });
1748
- return {
1749
- imageUri: a,
1750
- base64: r,
1751
- title: t.value.chart.title.text,
1752
- width: s,
1753
- height: e,
1754
- aspectRatio: u
1755
- };
1756
- }
1757
- function Ga(l) {
1758
- if (ve.value.includes(l.id))
1759
- ve.value = ve.value.filter((s) => s !== l.id);
1760
- else {
1761
- if (ve.value.length + 1 === rt.value.length) return;
1762
- ve.value.push(l.id);
1763
- }
1764
- qt("selectLegend", ze.value.map((s) => ({
1765
- name: s.name,
1766
- values: s.absoluteValues,
1767
- color: s.color,
1768
- type: s.type
1769
- }))), xt.value += 1;
1770
- }
1771
- const Io = x(() => {
1772
- const l = t.value.chart.title.text || "Chart visualization", s = t.value.chart.title.subtitle.text || "";
1773
- return `${l}. ${s}`;
1774
- }), Ua = x(() => ({
1775
- linePlot: I.value > t.value.line.dot.hideAboveMaxSerieLength
1776
- })), No = x(() => t.value.chart.userOptions.show && (!t.value.chart.title.show || !t.value.chart.title.text)), Po = x(() => {
1777
- if (Array.isArray(t.value.chart.highlightArea))
1778
- return t.value.chart.highlightArea.map((s) => {
1779
- const e = Math.min(s.to, je.value - 1);
1780
- return {
1781
- ...s,
1782
- span: s.from === e ? 1 : e < s.from ? 0 : e - s.from + 1
1783
- };
1784
- });
1785
- const l = {
1786
- ...t.value.chart.highlightArea,
1787
- to: Math.min(t.value.chart.highlightArea.to, je.value - 1)
1788
- };
1789
- return [{ ...l, span: l.from === l.to ? 1 : l.to < l.from ? 0 : l.to - l.from + 1 }];
1790
- }), qa = x(() => Qt.value ? ye.value.map((l, s) => ({
1791
- ...l,
1792
- series: yt(l.series),
1793
- id: `uniqueId_${s}`,
1794
- color: po(l.color ? l.color : Vt.value[s] ? Vt.value[s] : ko[s])
1795
- })) : ye.value), Fo = x(() => ze.value.map((l) => {
1796
- const s = l.absoluteValues.map((e) => [void 0, null].includes(e) ? 0 : e);
1797
- return {
1798
- id: l.id,
1799
- name: l.name,
1800
- color: l.color,
1801
- values: La(I.value, s)
1802
- };
1803
- })), Ro = x(() => ({
1804
- responsiveBreakpoint: t.value.table.responsiveBreakpoint,
1805
- roundingValues: t.value.table.rounding,
1806
- showAverage: !1,
1807
- showMedian: !1,
1808
- showTotal: !1,
1809
- fontFamily: t.value.chart.fontFamily,
1810
- prefix: t.value.chart.labels.prefix,
1811
- suffix: t.value.chart.labels.suffix,
1812
- colNames: h.value.map((l, s) => t.value.table.useDefaultTimeFormat ? l.text : wl.value(s + k.value.start, t.value.table.timeFormat)),
1813
- thead: {
1814
- backgroundColor: t.value.table.th.backgroundColor,
1815
- color: t.value.table.th.color,
1816
- outline: t.value.table.th.outline
1817
- },
1818
- tbody: {
1819
- backgroundColor: t.value.table.td.backgroundColor,
1820
- color: t.value.table.td.color,
1821
- outline: t.value.table.td.outline
1822
- },
1823
- userOptions: {
1824
- show: !1
1825
- },
1826
- sparkline: {
1827
- animation: { show: !1 }
1828
- }
1829
- })), se = x(() => t.value.chart.grid.position === "middle" ? 0 : c.value.width / I.value / 2), vl = x(() => cn(Ge.value.filter((l) => !ve.value.includes(l.id)))), P = x(() => {
1830
- const l = Object.groupBy(vl.value, (e) => e.scaleLabel), s = {};
1831
- for (const [e, u] of Object.entries(l)) {
1832
- const a = u.flatMap((r) => r.absoluteValues);
1833
- s[e] = {
1834
- min: Math.min(...a) || 0,
1835
- max: Math.max(...a) || 1,
1836
- groupId: `scale_group_${ga()}`
1837
- };
1838
- }
1839
- return s;
1840
- }), Oo = x(() => {
1841
- const l = rt.value.filter((s) => s.type === "bar").filter((s) => !ve.value.includes(s.id)).length;
1842
- return c.value.width / I.value / l - ia.value * l;
1843
- }), ia = x(() => de.value.line * t.value.bar.periodGap), ua = x(() => Math.max(1e-5, Ht() - (p.value.useIndividualScale && p.value.isStacked ? 0 : ia.value))), sa = x(() => ua.value * Math.min(Math.abs(t.value.bar.innerGap), 0.95)), Vo = x(() => {
1844
- if (!t.value.chart.zoom.minimap.show) return [];
1845
- const l = qa.value.filter((a) => !ve.value.includes(a.id)), s = Math.max(...l.map((a) => a.series.length)), e = [];
1846
- for (let a = 0; a < s; a += 1)
1847
- e.push(l.map((r) => r.series[a] || 0).reduce((r, o) => (r || 0) + (o || 0), 0));
1848
- const u = Math.min(...e);
1849
- return e.map((a) => a + (u < 0 ? Math.abs(u) : 0));
1850
- }), Bo = x(() => t.value.chart.zoom.minimap.show ? qa.value.map((s) => ({
1851
- ...s,
1852
- isVisible: !ve.value.includes(s.id)
1853
- })) : []), It = x(() => ze.value.map((l) => ({
1854
- slotAbsoluteIndex: l.slotAbsoluteIndex,
1855
- shape: l.shape || null,
1856
- name: l.name,
1857
- color: l.color,
1858
- type: l.type,
1859
- value: l.absoluteValues.find((s, e) => e === M.value),
1860
- comments: l.comments || [],
1861
- prefix: l.prefix || t.value.chart.labels.prefix,
1862
- suffix: l.suffix || t.value.chart.labels.suffix
1863
- }))), Za = x(() => Ye.value.ticks.map((l) => ({
1864
- y: l >= 0 ? Ie.value - c.value.height * rl(l) : Ie.value + c.value.height * rl(Math.abs(l)),
1865
- value: l,
1866
- prefix: t.value.chart.labels.prefix,
1867
- suffix: t.value.chart.labels.suffix
1868
- }))), Ka = x(() => {
1869
- const l = t.value.chart.annotations;
1870
- if (!l || !Array.isArray(l) || l.every((A) => !A.show)) return [];
1871
- const s = l.filter(
1872
- (A) => A.show && (A.yAxis.yTop != null || A.yAxis.yBottom != null)
1873
- );
1874
- if (!s.length) return [];
1875
- const { left: e, right: u } = c.value, a = Ie.value, r = c.value.height, o = Ye.value.min, R = Ye.value.max - o, O = (A) => {
1876
- const N = (A - 0) / R;
1877
- return a - N * r;
1878
- };
1879
- return s.map((A) => {
1880
- const { yAxis: { yTop: N, yBottom: j, label: z } } = A, U = N != null && j != null && N !== j, V = N == null ? null : O(N), he = j == null ? null : O(j), Y = ta(z.fontSize);
1881
- Y.font = `${z.fontSize}px sans-serif`;
1882
- const B = Y.measureText(z.text).width, re = z.fontSize, Oe = (z.position === "start" ? e + z.padding.left : u - z.padding.right) + z.offsetX, qe = (V != null && he != null ? Math.min(V, he) : V ?? he) - z.fontSize / 3 + z.offsetY - z.padding.top;
1883
- let J;
1884
- z.textAnchor === "middle" ? J = Oe - B / 2 - z.padding.left : z.textAnchor === "end" ? J = Oe - B - z.padding.right : J = Oe - z.padding.left;
1885
- const Q = qe - re * 0.75 - z.padding.top;
1886
- return {
1887
- show: ![V, he, Q].includes(NaN),
1888
- id: `annotation_y_${ga()}`,
1889
- hasArea: U,
1890
- areaHeight: U ? Math.abs(V - he) : 0,
1891
- yTop: V,
1892
- yBottom: he,
1893
- config: A.yAxis,
1894
- x1: e,
1895
- x2: u,
1896
- _text: { x: Oe, y: qe },
1897
- _box: {
1898
- x: J,
1899
- y: Q,
1900
- width: B + z.padding.left + z.padding.right,
1901
- height: re + z.padding.top + z.padding.bottom,
1902
- fill: z.backgroundColor,
1903
- stroke: z.border.stroke,
1904
- rx: z.border.rx,
1905
- ry: z.border.ry,
1906
- strokeWidth: z.border.strokeWidth
1907
- }
1908
- };
1909
- });
1910
- });
1911
- function Ja(l, s) {
1912
- const e = l[s - 1], u = l[s + 1];
1913
- let a = !!e && !!u && e.value == null && u.value == null || !e && !!u && u.value == null || !!e && !u && e.value == null;
1914
- return Ue(l[s].value) && a && t.value.line.cutNullValues;
1915
- }
1916
- const $t = x(() => {
1917
- const l = vl.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = l.length, e = t.value.chart.grid.labels.yAxis.gap, u = p.value.isStacked, a = u ? e * (s - 1) : 0, r = c.value.height - a;
1918
- return l.filter((o) => o.type === "bar").map((o, F) => {
1919
- ct(o);
1920
- const R = P.value[o.scaleLabel].min, O = P.value[o.scaleLabel].max;
1921
- o.absoluteValues.filter((K) => ![null, void 0].includes(K)).map((K) => (K - R) / (O - R));
1922
- const A = {
1923
- valueMin: R,
1924
- valueMax: O < 0 ? 0 : O
1925
- }, N = {
1926
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
1927
- min: o.scaleMin || Math.min(...o.absoluteValues.filter((K) => ![void 0, null].includes(K))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((K) => ![null, void 0].includes(K)))
1928
- }, j = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, z = 1.0000001, U = t.value.chart.grid.labels.yAxis.useNiceScale ? ql(N.min, N.max === N.min ? N.max * z : N.max, j) : fl(N.min, N.max === N.min ? N.max * z : N.max, j), V = t.value.chart.grid.labels.yAxis.useNiceScale ? ql(A.valueMin, A.valueMax === A.valueMin ? A.valueMax * z : A.valueMax, j) : fl(A.valueMin, A.valueMax === A.valueMin ? A.valueMax * z : A.valueMax, j), he = U.min >= 0 ? 0 : Math.abs(U.min), Y = 0, B = U.max + he, re = V.max + Math.abs(Y), Oe = o.stackIndex, Sl = s - 1 - Oe, qe = u ? 1 - o.cumulatedStackRatio : 0, J = u ? r * qe + e * Sl : 0, Q = u ? r * o.stackRatio : c.value.height, ke = c.value.bottom - J - Q * he / B, Ze = c.value.bottom - J - Q * Y / re, Pe = Ge.value.filter((K) => K.type === "bar").filter((K) => !ve.value.includes(K.id)).length, Gl = o.series.map((K, Se) => {
1929
- const Wt = p.value.useIndividualScale ? (o.absoluteValues[Se] + he) / B : rl(K), dl = p.value.useIndividualScale && p.value.isStacked ? c.value.left + c.value.width / I.value * Se : c.value.left + de.value.bar * F + de.value.bar * Se * Pe - Oo.value / 2 - F * ia.value;
1930
- return {
1931
- yOffset: q(J),
1932
- individualHeight: q(Q),
1933
- x: q(dl),
1934
- y: c.value.bottom - J - Q * Wt,
1935
- value: o.absoluteValues[Se],
1936
- zeroPosition: q(ke),
1937
- individualMax: q(B),
1938
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[Se] || ""
1939
- };
1940
- }), Ve = o.absoluteValues.map((K) => V.min >= 0 ? (K - Math.abs(V.min)) / (V.max - Math.abs(V.min)) : (K + Math.abs(V.min)) / (V.max + Math.abs(V.min))), Dt = o.series.map((K, Se) => {
1941
- const Wt = p.value.useIndividualScale && p.value.isStacked ? c.value.left + c.value.width / I.value * Se : c.value.left - de.value.bar / 2 + de.value.bar * F + de.value.bar * Se * Ge.value.filter((dl) => dl.type === "bar").filter((dl) => !ve.value.includes(dl.id)).length;
1942
- return {
1943
- yOffset: q(J),
1944
- individualHeight: q(Q),
1945
- x: q(Wt),
1946
- y: q(c.value.bottom - q(J) - (q(Q) * Ve[Se] || 0)),
1947
- value: o.absoluteValues[Se],
1948
- zeroPosition: q(ke),
1949
- individualMax: q(B),
1950
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[Se] || ""
1951
- };
1952
- }), ie = U.ticks.map((K) => ({
1953
- y: K >= 0 ? ke - Q * (K / B) : ke + Q * Math.abs(K) / B,
1954
- value: K,
1955
- prefix: o.prefix || t.value.chart.labels.prefix,
1956
- suffix: o.suffix || t.value.chart.labels.suffix,
1957
- datapoint: o
1958
- })), we = V.ticks.map((K) => {
1959
- const Se = (K - V.min) / (V.max - V.min);
1960
- return {
1961
- y: K >= 0 ? Ze - Q * Se : Ze + Q * Se,
1962
- value: K,
1963
- prefix: o.prefix || t.value.chart.labels.prefix,
1964
- suffix: o.suffix || t.value.chart.labels.suffix,
1965
- datapoint: o
1966
- };
1967
- });
1968
- return P.value[o.scaleLabel].name = o.name, P.value[o.scaleLabel].groupName = o.scaleLabel, P.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, P.value[o.scaleLabel].color = o.color, P.value[o.scaleLabel].scaleYLabels = o.autoScaling ? we : ie, P.value[o.scaleLabel].zeroPosition = o.autoScaling ? Ze : ke, P.value[o.scaleLabel].individualMax = o.autoScaling ? re : B, P.value[o.scaleLabel].scaleLabel = o.scaleLabel, P.value[o.scaleLabel].id = o.id, P.value[o.scaleLabel].yOffset = J, P.value[o.scaleLabel].individualHeight = Q, P.value[o.scaleLabel].autoScaleYLabels = we, P.value[o.scaleLabel].unique = vl.value.filter((K) => K.scaleLabel === o.scaleLabel).length === 1, {
1969
- ...o,
1970
- yOffset: J,
1971
- autoScaleYLabels: we,
1972
- individualHeight: Q,
1973
- scaleYLabels: o.autoScaling ? we : ie,
1974
- individualScale: o.autoScaling ? V : U,
1975
- individualMax: o.autoScaling ? re : B,
1976
- zeroPosition: o.autoScaling ? Ze : ke,
1977
- plots: o.autoScaling ? Dt : Gl,
1978
- groupId: P.value[o.scaleLabel].groupId
1979
- };
1980
- });
1981
- }), Ne = x(() => {
1982
- const l = vl.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = l.length, e = t.value.chart.grid.labels.yAxis.gap, u = p.value.isStacked, a = u ? e * (s - 1) : 0, r = c.value.height - a;
1983
- return l.filter((o) => o.type === "line").map((o, F) => {
1984
- ct(o);
1985
- const R = P.value[o.scaleLabel].min, O = P.value[o.scaleLabel].max;
1986
- o.absoluteValues.filter((G) => ![null, void 0].includes(G)).map((G) => (G - R) / (O - R));
1987
- const A = {
1988
- valueMin: R,
1989
- valueMax: O
1990
- }, N = {
1991
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
1992
- min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
1993
- }, j = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, z = 1.0000001, U = t.value.chart.grid.labels.yAxis.useNiceScale ? ql(N.min, N.max === N.min ? N.max * z : N.max, j) : fl(N.min, N.max === N.min ? N.max * z : N.max, j), V = t.value.chart.grid.labels.yAxis.useNiceScale ? ql(A.valueMin, A.valueMax === A.valueMin ? A.valueMax * z : A.valueMax, j) : fl(A.valueMin, A.valueMax === A.valueMin ? A.valueMax * z : A.valueMax, j), he = U.min >= 0 ? 0 : Math.abs(U.min), Y = 0, B = U.max + Math.abs(he), re = V.max + Math.abs(Y), Oe = o.stackIndex, Sl = s - 1 - Oe, qe = u ? 1 - o.cumulatedStackRatio : 0, J = u ? r * qe + e * Sl : 0, Q = u ? r * o.stackRatio : c.value.height, ke = c.value.bottom - J - Q * he / B, Ze = c.value.bottom - J - Q * Y / re, Pe = o.series.map((G, Ce) => {
1994
- const Jo = p.value.useIndividualScale ? (o.absoluteValues[Ce] + Math.abs(he)) / B : rl(G);
1995
- return {
1996
- x: q(c.value.left + de.value.line / 2 + de.value.line * Ce),
1997
- y: q(c.value.bottom - J - Q * Jo),
1998
- value: o.absoluteValues[Ce],
1999
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[Ce] || ""
2000
- };
2001
- }), Gl = o.absoluteValues.map((G) => V.min >= 0 ? (G - Math.abs(V.min)) / (V.max - Math.abs(V.min)) : (G + Math.abs(V.min)) / (V.max + Math.abs(V.min))), Ve = o.series.map((G, Ce) => [void 0, null].includes(o.absoluteValues[Ce]) ? {
2002
- x: q(c.value.left + de.value.line / 2 + de.value.line * Ce),
2003
- y: ke,
2004
- value: o.absoluteValues[Ce],
2005
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[Ce] || ""
2006
- } : {
2007
- x: q(c.value.left + de.value.line / 2 + de.value.line * Ce),
2008
- y: q(c.value.bottom - J - (Q * Gl[Ce] || 0)),
2009
- value: o.absoluteValues[Ce],
2010
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[Ce] || ""
2011
- }), Dt = t.value.line.cutNullValues ? ya(Pe) : pa(Pe.filter((G) => G.value !== null)), ie = t.value.line.cutNullValues ? ya(Ve) : pa(Ve.filter((G) => G.value !== null)), we = t.value.line.cutNullValues ? ka(Pe) : wa(Pe.filter((G) => G.value !== null)), K = t.value.line.cutNullValues ? ka(Ve) : wa(Ve.filter((G) => G.value !== null)), Se = U.ticks.map((G) => ({
2012
- y: G >= 0 ? ke - Q * (G / B) : ke + Q * Math.abs(G) / B,
2013
- value: G,
2014
- prefix: o.prefix || t.value.chart.labels.prefix,
2015
- suffix: o.suffix || t.value.chart.labels.suffix,
2016
- datapoint: o
2017
- })), Wt = V.ticks.map((G) => {
2018
- const Ce = (G - V.min) / (V.max - V.min);
2019
- return {
2020
- y: G >= 0 ? Ze - Q * Ce : Ze + Q * Ce,
2021
- value: G,
2022
- prefix: o.prefix || t.value.chart.labels.prefix,
2023
- suffix: o.suffix || t.value.chart.labels.suffix,
2024
- datapoint: o
2025
- };
2026
- });
2027
- P.value[o.scaleLabel].name = o.name, P.value[o.scaleLabel].groupName = o.scaleLabel, P.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, P.value[o.scaleLabel].color = o.color, P.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Wt : Se, P.value[o.scaleLabel].zeroPosition = o.autoScaling ? Ze : ke, P.value[o.scaleLabel].individualMax = o.autoScaling ? re : B, P.value[o.scaleLabel].scaleLabel = o.scaleLabel, P.value[o.scaleLabel].id = o.id, P.value[o.scaleLabel].yOffset = J, P.value[o.scaleLabel].individualHeight = Q, P.value[o.scaleLabel].autoScaleYLabels = Wt, P.value[o.scaleLabel].unique = vl.value.filter((G) => G.scaleLabel === o.scaleLabel).length === 1;
2028
- const dl = p.value.useIndividualScale ? o.autoScaling ? Ze : ke : Ie.value, Ul = Math.max(Math.max(o.autoScaling ? Ze : Se.at(-1) ? Se.at(-1).y : 0, c.value.top), dl);
2029
- return {
2030
- ...o,
2031
- yOffset: J,
2032
- autoScaleYLabels: Wt,
2033
- individualHeight: Q,
2034
- scaleYLabels: o.autoScaling ? Wt : Se,
2035
- individualScale: o.autoScaling ? V : U,
2036
- individualMax: o.autoScaling ? re : B,
2037
- zeroPosition: o.autoScaling ? Ze : ke,
2038
- curve: o.autoScaling ? ie : Dt,
2039
- plots: o.autoScaling ? Ve : Pe,
2040
- area: o.useArea ? p.value.useIndividualScale ? t.value.line.cutNullValues ? wo(
2041
- o.autoScaling ? Ve : Pe,
2042
- Ul
2043
- ) : So(
2044
- o.autoScaling ? Ve.filter((G) => G.value !== null) : Pe.filter((G) => G.value !== null),
2045
- Ul
2046
- ) : t.value.line.cutNullValues ? wo(Pe, Ul) : So(Pe.filter((G) => G.value !== null), Ul) : "",
2047
- curveAreas: o.useArea ? vn(
2048
- o.autoScaling ? t.value.line.cutNullValues ? Ve : Ve.filter((G) => G.value !== null) : t.value.line.cutNullValues ? Pe : Pe.filter((G) => G.value !== null),
2049
- Ul,
2050
- t.value.line.cutNullValues
2051
- ) : [],
2052
- straight: o.autoScaling ? K : we,
2053
- groupId: P.value[o.scaleLabel].groupId
2054
- };
2055
- });
2056
- }), tt = x(() => {
2057
- const l = vl.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), s = l.length, e = t.value.chart.grid.labels.yAxis.gap, u = p.value.isStacked, a = u ? e * (s - 1) : 0, r = c.value.height - a;
2058
- return l.filter((o) => o.type === "plot").map((o) => {
2059
- ct(o);
2060
- const F = P.value[o.scaleLabel].min, R = P.value[o.scaleLabel].max;
2061
- o.absoluteValues.filter((ie) => ![null, void 0].includes(ie)).map((ie) => (ie - F) / (R - F));
2062
- const O = {
2063
- valueMin: F,
2064
- valueMax: R
2065
- }, A = {
2066
- max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
2067
- min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
2068
- }, N = o.scaleSteps || t.value.chart.grid.labels.yAxis.commonScaleSteps, j = 1.0000001, z = fl(A.min, A.max === A.min ? A.max * j : A.max, N), U = fl(O.valueMin, O.valueMax === O.valueMin ? O.valueMax * j : O.valueMax, N), V = z.min >= 0 ? 0 : Math.abs(z.min), he = 0, Y = z.max + V, B = U.max + Math.abs(he), re = o.stackIndex, Oe = s - 1 - re, Sl = u ? 1 - o.cumulatedStackRatio : 0, qe = u ? r * Sl + e * Oe : 0, J = u ? r * o.stackRatio : c.value.height, Q = c.value.bottom - qe - J * V / Y, ke = c.value.bottom - qe - J * he / B, Ze = o.series.map((ie, we) => {
2069
- const K = p.value.useIndividualScale ? (o.absoluteValues[we] + Math.abs(V)) / Y : rl(ie);
2070
- return {
2071
- x: q(c.value.left + de.value.plot / 2 + de.value.plot * we),
2072
- y: q(c.value.bottom - qe - J * K),
2073
- value: o.absoluteValues[we],
2074
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[we] || ""
2075
- };
2076
- }), Pe = o.absoluteValues.map((ie) => U.min >= 0 ? (ie - Math.abs(U.min)) / (U.max - Math.abs(U.min)) : (ie + Math.abs(U.min)) / (U.max + Math.abs(U.min))), Gl = o.series.map((ie, we) => ({
2077
- x: q(c.value.left + de.value.plot / 2 + de.value.plot * we),
2078
- y: q(c.value.bottom - qe - (J * Pe[we] || 0)),
2079
- value: o.absoluteValues[we],
2080
- comment: o.comments && o.comments.slice(k.value.start, k.value.end)[we] || ""
2081
- })), Ve = z.ticks.map((ie) => ({
2082
- y: ie >= 0 ? Q - J * (ie / Y) : Q + J * Math.abs(ie) / Y,
2083
- value: ie,
2084
- prefix: o.prefix || t.value.chart.labels.prefix,
2085
- suffix: o.suffix || t.value.chart.labels.suffix,
2086
- datapoint: o
2087
- })), Dt = U.ticks.map((ie) => {
2088
- const we = (ie - U.min) / (U.max - U.min);
2089
- return {
2090
- y: ie >= 0 ? ke - J * we : ke + J * we,
2091
- value: ie,
2092
- prefix: o.prefix || t.value.chart.labels.prefix,
2093
- suffix: o.suffix || t.value.chart.labels.suffix,
2094
- datapoint: o
2095
- };
2096
- });
2097
- return P.value[o.scaleLabel].name = o.name, P.value[o.scaleLabel].groupName = o.scaleLabel, P.value[o.scaleLabel].groupColor = t.value.chart.grid.labels.yAxis.groupColor || o.color, P.value[o.scaleLabel].color = o.color, P.value[o.scaleLabel].scaleYLabels = o.autoScaling ? Dt : Ve, P.value[o.scaleLabel].zeroPosition = o.autoScaling ? ke : Q, P.value[o.scaleLabel].individualMax = o.autoScaling ? B : Y, P.value[o.scaleLabel].scaleLabel = o.scaleLabel, P.value[o.scaleLabel].id = o.id, P.value[o.scaleLabel].yOffset = qe, P.value[o.scaleLabel].individualHeight = J, P.value[o.scaleLabel].autoScaleYLabels = Dt, P.value[o.scaleLabel].unique = vl.value.filter((ie) => ie.scaleLabel === o.scaleLabel).length === 1, {
2098
- ...o,
2099
- yOffset: qe,
2100
- autoScaleYLabels: Dt,
2101
- individualHeight: J,
2102
- scaleYLabels: o.autoScaling ? Dt : Ve,
2103
- individualScale: o.autoScaling ? U : z,
2104
- individualMax: o.autoScaling ? B : Y,
2105
- zeroPosition: o.autoScaling ? ke : Q,
2106
- plots: o.autoScaling ? Gl : Ze,
2107
- groupId: P.value[o.scaleLabel].groupId
2108
- };
2109
- });
2110
- }), Xl = x(() => {
2111
- const l = Ne.value.map((r) => ({
2112
- name: r.name,
2113
- color: r.color,
2114
- scale: r.individualScale,
2115
- scaleYLabels: r.scaleYLabels,
2116
- zero: r.zeroPosition,
2117
- max: r.individualMax,
2118
- scaleLabel: r.scaleLabel || "",
2119
- id: r.id,
2120
- yOffset: r.yOffset || 0,
2121
- individualHeight: r.individualHeight || c.value.height,
2122
- autoScaleYLabels: r.autoScaleYLabels
2123
- })), s = $t.value.map((r) => ({
2124
- name: r.name,
2125
- color: r.color,
2126
- scale: r.individualScale,
2127
- scaleYLabels: r.scaleYLabels,
2128
- zero: r.zeroPosition,
2129
- max: r.individualMax,
2130
- scaleLabel: r.scaleLabel || "",
2131
- id: r.id,
2132
- yOffset: r.yOffset || 0,
2133
- individualHeight: r.individualHeight || c.value.height
2134
- })), e = tt.value.map((r) => ({
2135
- name: r.name,
2136
- color: r.color,
2137
- scale: r.individualScale,
2138
- scaleYLabels: r.scaleYLabels,
2139
- // FIX
2140
- zero: r.zeroPosition,
2141
- max: r.individualMax,
2142
- scaleLabel: r.scaleLabel || "",
2143
- id: r.id,
2144
- yOffset: r.yOffset || 0,
2145
- individualHeight: r.individualHeight || c.value.height
2146
- })), u = p.value.useIndividualScale && !p.value.isStacked ? Object.values(P.value) : [...l, ...s, ...e], a = u.flatMap((r) => r).length;
2147
- return u.flatMap((r, o) => {
2148
- let F = 0;
2149
- F = p.value.isStacked ? c.value.left : c.value.left / a * (o + 1);
2150
- const R = p.value.useIndividualScale && !p.value.isStacked ? r.unique ? r.name : r.groupName : r.name;
2151
- return {
2152
- unique: r.unique,
2153
- id: r.id,
2154
- groupId: r.groupId,
2155
- scaleLabel: r.scaleLabel,
2156
- name: Ae(
2157
- t.value.chart.grid.labels.yAxis.serieNameFormatter,
2158
- R,
2159
- R,
2160
- r
2161
- ),
2162
- color: p.value.useIndividualScale && !p.value.isStacked ? r.unique ? r.color : r.groupColor : r.color,
2163
- scale: r.scale,
2164
- yOffset: r.yOffset,
2165
- individualHeight: r.individualHeight,
2166
- x: F,
2167
- yLabels: r.scaleYLabels || r.scale.ticks.map((O) => ({
2168
- y: O >= 0 ? r.zero - r.individualHeight * (O / r.max) : r.zero + r.individualHeight * Math.abs(O) / r.max,
2169
- value: O
2170
- }))
2171
- };
2172
- });
2173
- }), Qa = x(() => {
2174
- const l = t.value.line.interLine || {}, s = l.pairs || [], e = l.colors || [];
2175
- if (!s.length) return [];
2176
- const u = [];
2177
- return s.forEach((a, r) => {
2178
- const [o, F] = Array.isArray(a) ? a : [a.a, a.b];
2179
- if (!o || !F) return;
2180
- const R = Ne.value.find((z) => z.name === o), O = Ne.value.find((z) => z.name === F);
2181
- if (!R || !O || R.type !== "line" || O.type !== "line") return;
2182
- const A = e?.[r]?.[0] ?? R.color, N = e?.[r]?.[1] ?? O.color;
2183
- dn({
2184
- lineA: R.plots,
2185
- lineB: O.plots,
2186
- smoothA: !!R.smooth,
2187
- smoothB: !!O.smooth,
2188
- colorLineA: A,
2189
- colorLineB: N,
2190
- sampleStepPx: 2,
2191
- cutNullValues: t.value.line.cutNullValues
2192
- }).forEach((z, U) => {
2193
- u.push({ ...z, key: `inter_${o}_${F}_${r}_${U}` });
2194
- });
2195
- }), u;
2196
- }), ja = x(() => ({
2197
- datapoint: It.value,
2198
- seriesIndex: M.value,
2199
- series: Ge.value,
2200
- bars: $t.value,
2201
- lines: Ne.value,
2202
- plots: tt.value,
2203
- config: t.value
2204
- })), wl = x(() => {
2205
- const l = t.value.chart.grid.labels.xAxisLabels.datetimeFormatter, s = Mn({
2206
- useUTC: l.useUTC,
2207
- locale: _n[l.locale] || { months: [], shortMonths: [], days: [], shortDays: [] },
2208
- januaryAsYear: l.januaryAsYear
2209
- });
2210
- return (e, u) => {
2211
- const r = t.value.chart.grid.labels.xAxisLabels.values?.[e];
2212
- return r == null ? "" : s.formatDate(new Date(r), u);
2213
- };
2214
- }), Ta = x(() => (t.value.chart.grid.labels.xAxisLabels.values || []).map((s, e) => ({
2215
- text: wl.value(e, t.value.chart.zoom.timeFormat),
2216
- absoluteIndex: e
2217
- }))), ra = y(!1);
2218
- x(() => {
2219
- let l = "", s = "";
2220
- if (t.value.chart.zoom.preview.enable)
2221
- return { left: l, right: s };
2222
- ra.value = !1;
2223
- const e = t.value.chart.zoom.customFormat;
2224
- if (xa(e))
2225
- try {
2226
- const u = e({
2227
- absoluteIndex: k.value.start,
2228
- seriesIndex: k.value.start,
2229
- datapoint: It.value
2230
- }), a = e({
2231
- absoluteIndex: k.value.end - 1,
2232
- seriesIndex: k.value.end - 1,
2233
- datapoint: It.value
2234
- });
2235
- typeof u == "string" && typeof a == "string" && (l = u, s = a, ra.value = !0);
2236
- } catch {
2237
- console.warn("Custom format cannot be applied on zoom labels."), ra.value = !1;
2238
- }
2239
- if (!ra.value) {
2240
- l = t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.zoom.useDefaultFormat ? Ta.value[k.value.start]?.text || "" : h.value[0]?.text || "";
2241
- const u = Math.max(k.value.start, k.value.end - 1);
2242
- s = t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.zoom.useDefaultFormat ? Ta.value[u]?.text || "" : h.value.at(-1)?.text || "";
2243
- }
2244
- return { left: l, right: s };
2245
- });
2246
- const Eo = x(() => {
2247
- let l = "", s = It.value.map((a) => a.value).filter((a) => da(a) && a !== null).reduce((a, r) => Math.abs(a) + Math.abs(r), 0);
2248
- const e = h.value[M.value], u = t.value.chart.tooltip.customFormat;
2249
- if (xa(u) && hn(() => u({
2250
- absoluteIndex: M.value + k.value.start,
2251
- seriesIndex: M.value,
2252
- datapoint: It.value,
2253
- series: Ge.value,
2254
- bars: $t.value,
2255
- lines: Ne.value,
2256
- plots: tt.value,
2257
- config: t.value
2258
- })))
2259
- return u({
2260
- absoluteIndex: M.value + k.value.start,
2261
- seriesIndex: M.value,
2262
- datapoint: It.value,
2263
- series: Ge.value,
2264
- bars: $t.value,
2265
- lines: Ne.value,
2266
- plots: tt.value,
2267
- config: t.value
2268
- });
2269
- if (e && e.text && t.value.chart.tooltip.showTimeLabel) {
2270
- const a = wl.value(M.value + k.value.start, t.value.chart.tooltip.timeFormat);
2271
- l += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.chart.tooltip.borderColor}; width:100%">${t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.tooltip.useDefaultTimeFormat ? a : e.text}</div>`;
2272
- }
2273
- return It.value.forEach((a) => {
2274
- if (da(a.value)) {
2275
- let r = "", o = "";
2276
- switch (jt.value[a.type]) {
2277
- case "bar":
2278
- r = `<svg viewBox="0 0 40 40" height="14" width="14">${xl.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${a.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${xl.pattern ? `url(#pattern_${Z.value}_${a.slotAbsoluteIndex}` : a.color}" /></svg>`;
2279
- break;
2280
- case "line":
2281
- !a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" />` : a.shape === "triangle" ? o = `<path d="${Mt({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "square" ? o = `<path d="${Mt({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "diamond" ? o = `<path d="${Mt({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "pentagon" ? o = `<path d="${Mt({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "hexagon" ? o = `<path d="${Mt({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "star" && (o = `<polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" points="${$o({ 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="${t.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${a.color}" />${o}</svg>`;
2282
- break;
2283
- case "plot":
2284
- if (!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape)) {
2285
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;
2286
- break;
2287
- }
2288
- if (a.shape === "star") {
2289
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${$o({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
2290
- break;
2291
- }
2292
- if (a.shape === "triangle") {
2293
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Mt({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2294
- break;
2295
- }
2296
- if (a.shape === "square") {
2297
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Mt({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2298
- break;
2299
- }
2300
- if (a.shape === "diamond") {
2301
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Mt({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2302
- break;
2303
- }
2304
- if (a.shape === "pentagon") {
2305
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Mt({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2306
- break;
2307
- }
2308
- if (a.shape === "hexagon") {
2309
- r = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${Mt({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${t.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
2310
- break;
2311
- }
2312
- }
2313
- l += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${r}</div> ${a.name}: <b>${t.value.chart.tooltip.showValue ? Ae(
2314
- a.type === "line" ? t.value.line.labels.formatter : a.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
2315
- a.value,
2316
- _t({
2317
- p: a.prefix,
2318
- v: a.value,
2319
- s: a.suffix,
2320
- r: t.value.chart.tooltip.roundingValue
2321
- }),
2322
- { datapoint: a }
2323
- ) : ""}</b> ${t.value.chart.tooltip.showPercentage ? `(${_t({
2324
- v: q(Math.abs(a.value) / s * 100),
2325
- s: "%",
2326
- r: t.value.chart.tooltip.roundingPercentage
2327
- })})` : ""}</div>`, t.value.chart.comments.showInTooltip && a.comments.length && a.comments.slice(k.value.start, k.value.end)[M.value] && (l += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(k.value.start, k.value.end)[M.value]}</div>`);
2328
- }
2329
- }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${t.value.chart.tooltip.color}">${l}</div>`;
2330
- }), eo = x(() => {
2331
- if (rt.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
2332
- const l = ze.value.map((e) => ({
2333
- label: e.name,
2334
- color: e.color,
2335
- type: e.type
2336
- })), s = [];
2337
- return h.value.forEach((e, u) => {
2338
- const a = t.value.table.useDefaultTimeFormat ? [e.text] : [wl.value(u + k.value.start, t.value.table.timeFormat)];
2339
- ze.value.forEach((r) => {
2340
- a.push(Ue(r.absoluteValues[u]) ? Number(r.absoluteValues[u].toFixed(t.value.table.rounding)) : "");
2341
- }), s.push(a);
2342
- }), { head: l, body: s };
2343
- }), ca = x(() => {
2344
- const l = t.value.table.showSum;
2345
- let s = [""].concat(ze.value.map((r) => r.name));
2346
- l && (s = s.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>'));
2347
- let e = [];
2348
- for (let r = 0; r < I.value; r += 1) {
2349
- const o = ze.value.map((F) => F.absoluteValues[r] ?? 0).reduce((F, R) => F + R, 0);
2350
- e.push(
2351
- [
2352
- t.value.table.useDefaultTimeFormat ? h.value[r].text ?? "-" : wl.value(r + k.value.start, t.value.table.timeFormat)
2353
- ].concat(ze.value.map(
2354
- (F) => Ae(
2355
- F.type === "line" ? t.value.line.labels.formatter : F.type === "bar" ? t.value.bar.labels.formatter : t.value.plot.labels.formatter,
2356
- F.absoluteValues[r] ?? 0,
2357
- _t({
2358
- p: F.prefix || t.value.chart.labels.prefix,
2359
- v: F.absoluteValues[r] ?? 0,
2360
- s: F.suffix || t.value.chart.labels.suffix,
2361
- r: t.value.table.rounding
2362
- })
2363
- )
2364
- )).concat(l ? (o ?? 0).toFixed(t.value.table.rounding) : [])
2365
- );
2366
- }
2367
- const u = {
2368
- th: {
2369
- backgroundColor: t.value.table.th.backgroundColor,
2370
- color: t.value.table.th.color,
2371
- outline: t.value.table.th.outline
2372
- },
2373
- td: {
2374
- backgroundColor: t.value.table.td.backgroundColor,
2375
- color: t.value.table.td.color,
2376
- outline: t.value.table.td.outline
2377
- },
2378
- breakpoint: t.value.table.responsiveBreakpoint
2379
- }, a = [t.value.table.columnNames.period].concat(ze.value.map((r) => r.name)).concat(t.value.table.columnNames.total);
2380
- return { head: s, body: e, config: u, colNames: a };
2381
- });
2382
- function za(l = null) {
2383
- const s = [[t.value.chart.title.text], [t.value.chart.title.subtitle.text], [""]], e = ["", ...eo.value.head.map((o) => o.label)], u = eo.value.body, a = s.concat([e]).concat(u), r = xn(a);
2384
- l ? l(r) : bn({ csvContent: r, title: t.value.chart.title.text || "vue-ui-xy" });
2385
- }
2386
- function to(l, s = null) {
2387
- bl.value = l;
2388
- const e = ze.value.map((u) => ({
2389
- name: u.name,
2390
- value: [null, void 0, NaN].includes(u.absoluteValues[s]) ? null : u.absoluteValues[s],
2391
- color: u.color,
2392
- type: u.type
2393
- }));
2394
- l ? (M.value = s, t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: s + k.value.start })) : (M.value = null, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: s + k.value.start }));
2395
- }
2396
- function lo() {
2397
- p.value.showTable = !p.value.showTable;
2398
- }
2399
- function ao() {
2400
- p.value.dataLabels.show = !p.value.dataLabels.show;
2401
- }
2402
- function oo() {
2403
- p.value.showTooltip = !p.value.showTooltip;
2404
- }
2405
- function no(l) {
2406
- Re.value = l, zl.value += 1;
2407
- }
2408
- function io() {
2409
- if (!t.value.responsiveProportionalSizing) {
2410
- T.value.dataLabels = t.value.chart.grid.labels.fontSize, T.value.yAxis = t.value.chart.grid.labels.axis.fontSize, T.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, T.value.plotLabels = t.value.chart.labels.fontSize, We.value.plot = t.value.plot.radius, We.value.line = t.value.line.radius;
2411
- return;
2412
- }
2413
- T.value.dataLabels = $l({
2414
- relator: W.value,
2415
- adjuster: 400,
2416
- source: t.value.chart.grid.labels.fontSize,
2417
- threshold: 10,
2418
- fallback: 10
2419
- }), T.value.yAxis = $l({
2420
- relator: ae.value,
2421
- adjuster: 1e3,
2422
- source: t.value.chart.grid.labels.axis.fontSize,
2423
- threshold: 10,
2424
- fallback: 10
2425
- }), T.value.xAxis = $l({
2426
- relator: ae.value,
2427
- adjuster: 1e3,
2428
- source: t.value.chart.grid.labels.xAxisLabels.fontSize,
2429
- threshold: 10,
2430
- fallback: 10
2431
- }), T.value.plotLabels = $l({
2432
- relator: ae.value,
2433
- adjuster: 800,
2434
- source: t.value.chart.labels.fontSize,
2435
- threshold: 10,
2436
- fallback: 10
2437
- }), We.value.plot = $l({
2438
- relator: ae.value,
2439
- adjuster: 800,
2440
- source: t.value.plot.radius,
2441
- threshold: 1,
2442
- fallback: 1
2443
- }), We.value.line = $l({
2444
- relator: ae.value,
2445
- adjuster: 800,
2446
- source: t.value.line.radius,
2447
- threshold: 1,
2448
- fallback: 1
2449
- });
2450
- }
2451
- function Ia() {
2452
- Mo(v.dataset) ? (Pa({
2453
- componentName: "VueUiXy",
2454
- type: "dataset",
2455
- debug: Tt.value
2456
- }), pl.value = !0) : v.dataset.forEach((s, e) => {
2457
- [null, void 0].includes(s.name) && (Pa({
2458
- componentName: "VueUiXy",
2459
- type: "datasetSerieAttribute",
2460
- property: "name (string)",
2461
- index: e,
2462
- debug: Tt.value
2463
- }), pl.value = !0);
2464
- }), Tt.value && v.dataset.forEach((s) => {
2465
- s.series.forEach((e, u) => {
2466
- da(e) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
2467
- -----> The serie '${s.name}' contains the value '${e}' at index ${u}.
2468
- '${e}' was converted to null to allow the chart to display.`);
2469
- });
2470
- }), Mo(v.dataset) || (pl.value = t.value.loading), jl.value = t.value.chart.userOptions.showOnChartHover, Pl.value = t.value.chart.userOptions.keepStateOnChartLeave, yl.value = !t.value.chart.userOptions.showOnChartHover, ll();
2471
- const l = 12;
2472
- if (t.value.responsive) {
2473
- const e = Ee.value.parentNode;
2474
- gt.value && (gt.value.unobserve(ue.value), gt.value.disconnect());
2475
- const { height: u, width: a } = e.getBoundingClientRect();
2476
- let r = null, o = 0;
2477
- t.value.chart.title.show && Te.value && (r = Te.value, o = r.getBoundingClientRect().height);
2478
- let F = null, R = 0;
2479
- t.value.chart.zoom.show && je.value > 6 && At.value && Je.value && Je.value.$el && (F = Je.value.$el, R = F.getBoundingClientRect().height);
2480
- let O = null, A = 0;
2481
- t.value.chart.legend.show && Le.value && (O = Le.value, A = O.getBoundingClientRect().height);
2482
- let N = 0;
2483
- mt.value && (N = mt.value.getBoundingClientRect().height);
2484
- let j = 0;
2485
- Ct.value && (j = Ct.value.getBoundingClientRect().height), W.value = u - o - A - R - N - j - l, ae.value = a, ot.value = `0 0 ${ae.value < 0 ? 10 : ae.value} ${W.value < 0 ? 10 : W.value}`, io();
2486
- const z = new ResizeObserver((U) => {
2487
- for (const V of U)
2488
- t.value.chart.title.show && Te.value ? o = Te.value.getBoundingClientRect().height : o = 0, Je.value && Je.value.$el ? R = Je.value.$el.getBoundingClientRect().height : R = 0, Le.value ? A = Le.value.getBoundingClientRect().height : A = 0, mt.value ? N = mt.value.getBoundingClientRect().height : N = 0, Ct.value ? j = Ct.value.getBoundingClientRect().height : j = 0, requestAnimationFrame(() => {
2489
- W.value = V.contentRect.height - o - A - R - N - j - l, ae.value = V.contentBoxSize[0].inlineSize, ot.value = `0 0 ${ae.value < 0 ? 10 : ae.value} ${W.value < 0 ? 10 : W.value}`, io();
2490
- });
2491
- });
2492
- gt.value = z, ue.value = e, z.observe(e);
2493
- } else
2494
- W.value = t.value.chart.height, ae.value = t.value.chart.width, T.value.dataLabels = t.value.chart.grid.labels.fontSize, T.value.yAxis = t.value.chart.grid.labels.axis.fontSize, T.value.xAxis = t.value.chart.grid.labels.xAxisLabels.fontSize, T.value.plotLabels = t.value.chart.labels.fontSize, We.value.plot = t.value.plot.radius, We.value.line = t.value.line.radius, ot.value = `0 0 ${ae.value} ${W.value}`;
2495
- }
2496
- function uo(l) {
2497
- Ql.value = {
2498
- x: l.clientX,
2499
- y: l.clientY
2500
- };
2501
- }
2502
- Zl(() => {
2503
- Ia(), St(), document.addEventListener("mousemove", uo, { passive: !0 }), document.addEventListener("scroll", Et, { passive: !0 });
2504
- }), _l(() => {
2505
- document.removeEventListener("scroll", Et, { passive: !0 }), document.removeEventListener("mousemove", uo, { passive: !0 }), gt.value && (gt.value.unobserve(ue.value), gt.value.disconnect(), gt.value = null);
2506
- }), An({
2507
- timeLabelsEls: _e,
2508
- timeLabels: h,
2509
- slicer: k,
2510
- configRef: t,
2511
- rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
2512
- autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate", "enable"],
2513
- isAutoSize: ea,
2514
- height: W,
2515
- width: ae,
2516
- rotation: t.value.chart.grid.labels.xAxisLabels.autoRotate.angle
2517
- });
2518
- const va = y(!1), so = y(null), ro = y(200), Ho = x(
2519
- () => M.value ?? X.value ?? 0
2520
- );
2521
- function Do() {
2522
- const l = Math.ceil(ro.value || 200);
2523
- return Math.min(Math.max(l, 1), 200);
2524
- }
2525
- function Wo() {
2526
- const l = Do(), s = 200, e = Math.max(1, I.value), u = c.value.width / e, r = c.value.left + Ho.value * u + u / 2 - l / 2 - (s - l) / 2, o = c.value.left - (s - l) / 2, F = c.value.right - (s + l) / 2, R = Math.max(o, Math.min(r, F));
2527
- return q(R);
2528
- }
2529
- Zl(() => {
2530
- let l = null, s = null;
2531
- const e = (r) => {
2532
- cancelAnimationFrame(s), s = requestAnimationFrame(() => {
2533
- ro.value = Math.min(Math.max(Math.ceil(r || 0), 1), 200);
2534
- });
2535
- }, u = new ResizeObserver((r) => {
2536
- let o = r.find((F) => F.target === l) || r[0];
2537
- o && e(o.contentRect.width || 200);
2538
- }), a = ln((r) => {
2539
- const o = so.value;
2540
- l && l !== o && (u.unobserve(l), l = null), o && o !== l && (Ml(() => {
2541
- o.offsetParent !== null && e(o.offsetWidth || o.getBoundingClientRect().width || 200);
2542
- }), u.observe(o), l = o), r(() => {
2543
- l && (u.unobserve(l), l = null);
2544
- });
2545
- });
2546
- _l(() => {
2547
- try {
2548
- l && u.unobserve(l), u.disconnect(), a();
2549
- } catch {
2550
- }
2551
- });
2552
- });
2553
- const Xo = x(() => {
2554
- if ([null, void 0].includes(M.value) && [null, void 0].includes(X.value)) return "";
2555
- const l = (M.value != null ? M.value : 0) || (X.value != null ? X.value : 0), s = t.value.chart.timeTag.customFormat;
2556
- if (va.value = !1, xa(s))
2557
- try {
2558
- const e = s({
2559
- absoluteIndex: l + k.value.start,
2560
- seriesIndex: l,
2561
- datapoint: It.value,
2562
- bars: $t.value,
2563
- lines: Ne.value,
2564
- plots: tt.value,
2565
- config: t.value
2566
- });
2567
- if (typeof e == "string")
2568
- return va.value = !0, e;
2569
- } catch {
2570
- console.warn("Custom format cannot be applied on timeTag."), va.value = !1;
2571
- }
2572
- if (!va.value)
2573
- return [null, void 0].includes(h.value[l]) ? "" : t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.timeTag.useDefaultFormat ? wl.value(l + k.value.start, t.value.chart.timeTag.timeFormat) : h.value[l].text;
2574
- });
2575
- ft(() => v.dataset, (l) => {
2576
- Array.isArray(l) && l.length > 0 && (pl.value = !1), je.value = Math.max(...ye.value.map((s) => yt(s.series).length)), k.value = {
2577
- start: 0,
2578
- end: je.value
2579
- }, Jl.value += 1, xt.value += 1, Ot();
2580
- }, { deep: !0 }), ft(() => v.config, (l) => {
2581
- be.value || (t.value = Rl()), Ia(), Nl.value += 1, Il.value += 1, ll(), Ot();
2582
- }, { deep: !0 });
2583
- const Na = y(!1);
2584
- function co() {
2585
- const l = Ee.value?.parentNode;
2586
- if (!l) {
2587
- Na.value = !1;
2588
- return;
2589
- }
2590
- const s = l.getBoundingClientRect();
2591
- Na.value = s.width > 2 && s.height > 2;
2592
- }
2593
- Zl(() => {
2594
- co();
2595
- const l = new ResizeObserver(() => {
2596
- co(), Na.value && (Ia(), Ot(), St());
2597
- });
2598
- Ee.value?.parentNode && l.observe(Ee.value.parentNode);
2599
- }), ft(t, () => {
2600
- ll();
2601
- }, { immediate: !0 });
2602
- const Yl = x(() => {
2603
- const l = t.value.table.useDialog && !t.value.showTable, s = p.value.showTable;
2604
- return {
2605
- component: l ? Kl : Pn,
2606
- title: `${t.value.chart.title.text}${t.value.chart.title.subtitle.text ? `: ${t.value.chart.title.subtitle.text}` : ""}`,
2607
- props: l ? {
2608
- backgroundColor: t.value.table.th.backgroundColor,
2609
- color: t.value.table.th.color,
2610
- headerColor: t.value.table.th.color,
2611
- headerBg: t.value.table.th.backgroundColor,
2612
- isFullscreen: Re.value,
2613
- fullscreenParent: Ee.value,
2614
- forcedWidth: Math.min(800, window.innerWidth * 0.8)
2615
- } : {
2616
- hideDetails: !0,
2617
- config: {
2618
- open: s,
2619
- maxHeight: 1e4,
2620
- body: {
2621
- backgroundColor: t.value.chart.backgroundColor,
2622
- color: t.value.chart.color
2623
- },
2624
- head: {
2625
- backgroundColor: t.value.chart.backgroundColor,
2626
- color: t.value.chart.color
2627
- }
2628
- }
2629
- }
2630
- };
2631
- });
2632
- ft(() => p.value.showTable, (l) => {
2633
- t.value.showTable || (l && t.value.table.useDialog && Qe.value ? Qe.value.open() : Qe.value && Qe.value.close && Qe.value.close());
2634
- });
2635
- function vo() {
2636
- p.value.showTable = !1, Tl.value && Tl.value.setTableIconState(!1);
2637
- }
2638
- const Yo = x(() => Ge.value.map((l) => ({
2639
- shape: l.type === "bar" ? "square" : l.shape ?? "circle",
2640
- color: l.color,
2641
- name: l.name
2642
- }))), Go = x(() => t.value.chart.backgroundColor), Uo = x(() => t.value.chart.legend), qo = x(() => t.value.chart.title), { exportSvg: Zo, getSvg: Ko } = Ln({
2643
- svg: $e,
2644
- title: qo,
2645
- legend: Uo,
2646
- legendItems: Yo,
2647
- backgroundColor: Go
2648
- });
2649
- async function ho({ isCb: l }) {
2650
- if (l) {
2651
- const { blob: s, url: e, text: u, dataUrl: a } = await Ko();
2652
- t.value.chart.userOptions.callbacks.svg({ blob: s, url: e, text: u, dataUrl: a });
2653
- } else
2654
- Zo();
2655
- }
2656
- return Sa({
2657
- getData: To,
2658
- getImage: zo,
2659
- generatePdf: ut,
2660
- generateImage: st,
2661
- generateSvg: ho,
2662
- generateCsv: za,
2663
- toggleStack: ul,
2664
- toggleTable: lo,
2665
- toggleLabels: ao,
2666
- toggleTooltip: oo,
2667
- toggleAnnotator: d,
2668
- toggleFullscreen: no
2669
- }), (l, s) => (n(), i("div", {
2670
- id: `vue-ui-xy_${Z.value}`,
2671
- class: Ke(`vue-data-ui-component vue-ui-xy ${Re.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
2672
- ref_key: "chart",
2673
- ref: Ee,
2674
- style: L(`background:${t.value.chart.backgroundColor}; color:${t.value.chart.color};width:100%;font-family:${t.value.chart.fontFamily};${t.value.responsive ? "height: 100%" : ""}`),
2675
- onMouseenter: s[6] || (s[6] = () => la(!0)),
2676
- onMouseleave: s[7] || (s[7] = () => la(!1)),
2677
- onClick: Xa
2678
- }, [
2679
- t.value.chart.userOptions.buttons.annotator && $e.value ? (n(), vt(m(Nt), {
2680
- key: 0,
2681
- svgRef: $e.value,
2682
- backgroundColor: t.value.chart.backgroundColor,
2683
- color: t.value.chart.color,
2684
- active: He.value,
2685
- onClose: d
2686
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
2687
- No.value ? (n(), i("div", {
2688
- key: 1,
2689
- ref_key: "noTitle",
2690
- ref: Ct,
2691
- class: "vue-data-ui-no-title-space",
2692
- style: "height:36px; width: 100%; background:transparent"
2693
- }, null, 512)) : g("", !0),
2694
- t.value.chart.title.show ? (n(), i("div", {
2695
- key: 2,
2696
- ref_key: "chartTitle",
2697
- ref: Te,
2698
- class: "vue-ui-xy-title",
2699
- style: L(`font-family:${t.value.chart.fontFamily}`)
2700
- }, [
2701
- (n(), vt(zn, {
2702
- key: `title_${Nl.value}`,
2703
- config: {
2704
- title: {
2705
- cy: "xy-div-title",
2706
- ...t.value.chart.title
2707
- },
2708
- subtitle: {
2709
- cy: "xy-div-subtitle",
2710
- ...t.value.chart.title.subtitle
2711
- }
2712
- }
2713
- }, null, 8, ["config"]))
2714
- ], 4)) : g("", !0),
2715
- S("div", {
2716
- id: `legend-top-${Z.value}`
2717
- }, null, 8, Mi),
2718
- t.value.chart.userOptions.show && (Pl.value || yl.value) ? (n(), vt(m(fe), {
2719
- ref_key: "userOptionsRef",
2720
- ref: Tl,
2721
- key: `user_options_${zl.value}`,
2722
- backgroundColor: t.value.chart.backgroundColor,
2723
- color: t.value.chart.color,
2724
- isPrinting: m(et),
2725
- isImaging: m(it),
2726
- uid: Z.value,
2727
- hasTooltip: t.value.chart.userOptions.buttons.tooltip && t.value.chart.tooltip.show,
2728
- hasPdf: t.value.chart.userOptions.buttons.pdf,
2729
- hasXls: t.value.chart.userOptions.buttons.csv,
2730
- hasImg: t.value.chart.userOptions.buttons.img,
2731
- hasSvg: t.value.chart.userOptions.buttons.svg,
2732
- hasLabel: t.value.chart.userOptions.buttons.labels,
2733
- hasTable: t.value.chart.userOptions.buttons.table,
2734
- hasStack: w.dataset.length > 1 && t.value.chart.userOptions.buttons.stack,
2735
- hasFullscreen: t.value.chart.userOptions.buttons.fullscreen,
2736
- isStacked: p.value.isStacked,
2737
- isFullscreen: Re.value,
2738
- chartElement: l.$refs.chart,
2739
- position: t.value.chart.userOptions.position,
2740
- isTooltip: p.value.showTooltip,
2741
- titles: { ...t.value.chart.userOptions.buttonTitles },
2742
- hasAnnotator: t.value.chart.userOptions.buttons.annotator,
2743
- isAnnotation: He.value,
2744
- callbacks: t.value.chart.userOptions.callbacks,
2745
- tableDialog: t.value.table.useDialog,
2746
- printScale: t.value.chart.userOptions.print.scale,
2747
- onToggleFullscreen: no,
2748
- onGeneratePdf: m(ut),
2749
- onGenerateCsv: za,
2750
- onGenerateImage: m(st),
2751
- onGenerateSvg: ho,
2752
- onToggleTable: lo,
2753
- onToggleLabels: ao,
2754
- onToggleStack: ul,
2755
- onToggleTooltip: oo,
2756
- onToggleAnnotator: d,
2757
- style: L({
2758
- visibility: Pl.value ? yl.value ? "visible" : "hidden" : "visible"
2759
- })
2760
- }, xo({ _: 2 }, [
2761
- l.$slots.menuIcon ? {
2762
- name: "menuIcon",
2763
- fn: Me(({ isOpen: e, color: u }) => [
2764
- le(l.$slots, "menuIcon", Gt(hl({ isOpen: e, color: u })), void 0, !0)
2765
- ]),
2766
- key: "0"
2767
- } : void 0,
2768
- l.$slots.optionTooltip ? {
2769
- name: "optionTooltip",
2770
- fn: Me(() => [
2771
- le(l.$slots, "optionTooltip", {}, void 0, !0)
2772
- ]),
2773
- key: "1"
2774
- } : void 0,
2775
- l.$slots.optionPdf ? {
2776
- name: "optionPdf",
2777
- fn: Me(() => [
2778
- le(l.$slots, "optionPdf", {}, void 0, !0)
2779
- ]),
2780
- key: "2"
2781
- } : void 0,
2782
- l.$slots.optionCsv ? {
2783
- name: "optionCsv",
2784
- fn: Me(() => [
2785
- le(l.$slots, "optionCsv", {}, void 0, !0)
2786
- ]),
2787
- key: "3"
2788
- } : void 0,
2789
- l.$slots.optionImg ? {
2790
- name: "optionImg",
2791
- fn: Me(() => [
2792
- le(l.$slots, "optionImg", {}, void 0, !0)
2793
- ]),
2794
- key: "4"
2795
- } : void 0,
2796
- l.$slots.optionTable ? {
2797
- name: "optionTable",
2798
- fn: Me(() => [
2799
- le(l.$slots, "optionTable", {}, void 0, !0)
2800
- ]),
2801
- key: "5"
2802
- } : void 0,
2803
- l.$slots.optionLabels ? {
2804
- name: "optionLabels",
2805
- fn: Me(() => [
2806
- le(l.$slots, "optionLabels", {}, void 0, !0)
2807
- ]),
2808
- key: "6"
2809
- } : void 0,
2810
- l.$slots.optionStack ? {
2811
- name: "optionStack",
2812
- fn: Me(() => [
2813
- le(l.$slots, "optionStack", {}, void 0, !0)
2814
- ]),
2815
- key: "7"
2816
- } : void 0,
2817
- l.$slots.optionFullscreen ? {
2818
- name: "optionFullscreen",
2819
- fn: Me(({ toggleFullscreen: e, isFullscreen: u }) => [
2820
- le(l.$slots, "optionFullscreen", Gt(hl({ toggleFullscreen: e, isFullscreen: u })), void 0, !0)
2821
- ]),
2822
- key: "8"
2823
- } : void 0,
2824
- l.$slots.optionAnnotator ? {
2825
- name: "optionAnnotator",
2826
- fn: Me(({ toggleAnnotator: e, isAnnotator: u }) => [
2827
- le(l.$slots, "optionAnnotator", Gt(hl({ toggleAnnotator: e, isAnnotator: u })), void 0, !0)
2828
- ]),
2829
- key: "9"
2830
- } : void 0
2831
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "tableDialog", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
2832
- (n(), i("svg", {
2833
- ref_key: "svgRef",
2834
- ref: $e,
2835
- xmlns: "http://www.w3.org/2000/svg",
2836
- class: Ke([{ "vue-data-ui-fullscreen--on": Re.value, "vue-data-ui-fulscreen--off": !Re.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
2837
- width: "100%",
2838
- viewBox: ot.value,
2839
- style: L({
2840
- background: "transparent",
2841
- color: t.value.chart.color,
2842
- fontFamily: t.value.chart.fontFamily
2843
- }),
2844
- "aria-label": Io.value,
2845
- role: "img",
2846
- "aria-live": "polite",
2847
- preserveAspectRatio: "xMidYMid",
2848
- onMousemove: Ao,
2849
- onMouseleave: na,
2850
- onClick: Xa
2851
- }, [
2852
- S("g", {
2853
- ref_key: "G",
2854
- ref: Cl,
2855
- class: "vue-data-ui-g"
2856
- }, [
2857
- gl(m(Lt)),
2858
- l.$slots["chart-background"] ? (n(), i("foreignObject", {
2859
- key: 0,
2860
- x: c.value.left + se.value < 0 ? 0 : c.value.left + se.value,
2861
- y: c.value.top,
2862
- width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / I.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / I.value),
2863
- height: c.value.height < 0 ? 0 : c.value.height,
2864
- style: {
2865
- pointerEvents: "none"
2866
- }
2867
- }, [
2868
- le(l.$slots, "chart-background", {}, void 0, !0)
2869
- ], 8, Li)) : g("", !0),
2870
- I.value > 0 ? (n(), i("g", Ci, [
2871
- S("g", Ai, [
2872
- t.value.chart.grid.labels.xAxis.showBaseline ? (n(), i("line", {
2873
- key: 0,
2874
- stroke: t.value.chart.grid.stroke,
2875
- "stroke-width": "1",
2876
- x1: c.value.left + se.value,
2877
- x2: c.value.right - se.value,
2878
- y1: m(ee)(c.value.bottom),
2879
- y2: m(ee)(c.value.bottom),
2880
- "stroke-linecap": "round",
2881
- style: { animation: "none !important" }
2882
- }, null, 8, Ti)) : g("", !0),
2883
- p.value.useIndividualScale ? t.value.chart.grid.showHorizontalLines ? (n(!0), i(b, { key: 2 }, _(Xl.value, (e) => (n(), i("g", null, [
2884
- e.id === E.value && e.yLabels.length ? (n(!0), i(b, { key: 0 }, _(e.yLabels, (u) => (n(), i("line", {
2885
- x1: c.value.left + se.value,
2886
- x2: c.value.right - se.value,
2887
- y1: m(ee)(u.y),
2888
- y2: m(ee)(u.y),
2889
- stroke: e.color,
2890
- "stroke-width": 0.5,
2891
- "stroke-linecap": "round",
2892
- style: { animation: "none !important" }
2893
- }, null, 8, Pi))), 256)) : e.yLabels.length ? (n(!0), i(b, { key: 1 }, _(e.yLabels, (u) => (n(), i("line", {
2894
- x1: c.value.left + se.value,
2895
- x2: c.value.right - se.value,
2896
- y1: m(ee)(u.y),
2897
- y2: m(ee)(u.y),
2898
- stroke: t.value.chart.grid.stroke,
2899
- "stroke-width": 0.5,
2900
- "stroke-linecap": "round",
2901
- style: { animation: "none !important" }
2902
- }, null, 8, Fi))), 256)) : g("", !0)
2903
- ]))), 256)) : g("", !0) : (n(), i(b, { key: 1 }, [
2904
- t.value.chart.grid.labels.yAxis.showBaseline ? (n(), i("line", {
2905
- key: 0,
2906
- stroke: t.value.chart.grid.stroke,
2907
- "stroke-width": "1",
2908
- x1: c.value.left + se.value,
2909
- x2: c.value.left + se.value,
2910
- y1: m(ee)(c.value.top),
2911
- y2: m(ee)(c.value.bottom),
2912
- "stroke-linecap": "round",
2913
- style: { animation: "none !important" }
2914
- }, null, 8, zi)) : g("", !0),
2915
- t.value.chart.grid.showHorizontalLines ? (n(), i("g", Ii, [
2916
- (n(!0), i(b, null, _(Za.value, (e) => (n(), i("line", {
2917
- x1: c.value.left + se.value,
2918
- x2: c.value.right,
2919
- y1: m(ee)(e.y),
2920
- y2: m(ee)(e.y),
2921
- stroke: t.value.chart.grid.stroke,
2922
- "stroke-width": 0.5,
2923
- "stroke-linecap": "round",
2924
- style: { animation: "none !important" }
2925
- }, null, 8, Ni))), 256))
2926
- ])) : g("", !0)
2927
- ], 64)),
2928
- t.value.chart.grid.showVerticalLines ? (n(), i("g", Ri, [
2929
- S("path", {
2930
- d: Bl.value,
2931
- "stroke-width": 0.5,
2932
- stroke: t.value.chart.grid.stroke,
2933
- "stroke-linecap": "round",
2934
- style: { animation: "none !important" }
2935
- }, null, 8, Oi)
2936
- ])) : g("", !0),
2937
- t.value.chart.grid.labels.xAxisLabels.show ? (n(), i("g", Vi, [
2938
- S("path", {
2939
- d: El.value,
2940
- stroke: t.value.chart.grid.stroke,
2941
- "stroke-width": 1,
2942
- "stroke-linecap": "round",
2943
- style: { animation: "none !important" }
2944
- }, null, 8, Bi)
2945
- ])) : g("", !0)
2946
- ]),
2947
- (n(!0), i(b, null, _($t.value, (e, u) => (n(), i("defs", {
2948
- key: `def_rect_${u}`
2949
- }, [
2950
- l.$slots["bar-gradient"] ? le(l.$slots, "bar-gradient", Ut({
2951
- key: 0,
2952
- ref_for: !0
2953
- }, { series: e, positiveId: `rectGradient_pos_${u}_${Z.value}`, negativeId: `rectGradient_neg_${u}_${Z.value}` }), void 0, !0) : (n(), i(b, { key: 1 }, [
2954
- S("linearGradient", {
2955
- id: `rectGradient_pos_${u}_${Z.value}`,
2956
- x2: "0%",
2957
- y2: "100%"
2958
- }, [
2959
- S("stop", {
2960
- offset: "0%",
2961
- "stop-color": e.color
2962
- }, null, 8, Hi),
2963
- S("stop", {
2964
- offset: "62%",
2965
- "stop-color": `${m(ml)(e.color, 0.02)}`
2966
- }, null, 8, Di),
2967
- S("stop", {
2968
- offset: "100%",
2969
- "stop-color": `${m(ml)(e.color, 0.05)}`
2970
- }, null, 8, Wi)
2971
- ], 8, Ei),
2972
- S("linearGradient", {
2973
- id: `rectGradient_neg_${u}_${Z.value}`,
2974
- x2: "0%",
2975
- y2: "100%"
2976
- }, [
2977
- S("stop", {
2978
- offset: "0%",
2979
- "stop-color": `${m(ml)(e.color, 0.05)}`
2980
- }, null, 8, Yi),
2981
- S("stop", {
2982
- offset: "38%",
2983
- "stop-color": `${m(ml)(e.color, 0.02)}`
2984
- }, null, 8, Gi),
2985
- S("stop", {
2986
- offset: "100%",
2987
- "stop-color": e.color
2988
- }, null, 8, Ui)
2989
- ], 8, Xi)
2990
- ], 64))
2991
- ]))), 128)),
2992
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i("defs", {
2993
- key: `def_plot_${u}`
2994
- }, [
2995
- S("radialGradient", {
2996
- id: `plotGradient_${u}_${Z.value}`,
2997
- cx: "50%",
2998
- cy: "50%",
2999
- r: "50%",
3000
- fx: "50%",
3001
- fy: "50%"
3002
- }, [
3003
- S("stop", {
3004
- offset: "0%",
3005
- "stop-color": `${m(ml)(e.color, 0.05)}`
3006
- }, null, 8, Zi),
3007
- S("stop", {
3008
- offset: "100%",
3009
- "stop-color": e.color
3010
- }, null, 8, Ki)
3011
- ], 8, qi)
3012
- ]))), 128)),
3013
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i("defs", {
3014
- key: `def_line_${e.id}`
3015
- }, [
3016
- S("radialGradient", {
3017
- id: `lineGradient_${u}_${Z.value}`,
3018
- cx: "50%",
3019
- cy: "50%",
3020
- r: "50%",
3021
- fx: "50%",
3022
- fy: "50%"
3023
- }, [
3024
- S("stop", {
3025
- offset: "0%",
3026
- "stop-color": `${m(ml)(e.color, 0.05)}`
3027
- }, null, 8, Qi),
3028
- S("stop", {
3029
- offset: "100%",
3030
- "stop-color": e.color
3031
- }, null, 8, ji)
3032
- ], 8, Ji),
3033
- l.$slots["area-gradient"] ? le(l.$slots, "area-gradient", Ut({
3034
- key: 0,
3035
- ref_for: !0
3036
- }, { series: e, id: `areaGradient_${u}_${Z.value}` }), void 0, !0) : (n(), i("linearGradient", {
3037
- key: 1,
3038
- id: `areaGradient_${u}_${Z.value}`,
3039
- x1: "0%",
3040
- x2: "100%",
3041
- y1: "0%",
3042
- y2: "0%"
3043
- }, [
3044
- S("stop", {
3045
- offset: "0%",
3046
- "stop-color": `${m(dt)(m(ml)(e.color, 0.03), t.value.line.area.opacity)}`
3047
- }, null, 8, tu),
3048
- S("stop", {
3049
- offset: "100%",
3050
- "stop-color": `${m(dt)(e.color, t.value.line.area.opacity)}`
3051
- }, null, 8, lu)
3052
- ], 8, eu))
3053
- ]))), 128)),
3054
- (n(!0), i(b, null, _(Po.value, (e) => (n(), i("g", null, [
3055
- e.show ? (n(), i(b, { key: 0 }, [
3056
- (n(!0), i(b, null, _(e.span, (u, a) => (n(), i("g", null, [
3057
- S("rect", {
3058
- style: L({
3059
- transition: "none",
3060
- opacity: e.from + a >= k.value.start && e.from + a <= k.value.end - 1 ? 1 : 0
3061
- }),
3062
- x: c.value.left + c.value.width / I.value * (e.from + a - k.value.start),
3063
- y: c.value.top,
3064
- height: c.value.height < 0 ? 10 : c.value.height,
3065
- width: c.value.width / I.value < 0 ? 1e-5 : c.value.width / I.value,
3066
- fill: m(dt)(e.color, e.opacity)
3067
- }, null, 12, au)
3068
- ]))), 256)),
3069
- (n(!0), i(b, null, _(e.span, (u, a) => (n(), i("g", null, [
3070
- e.caption.text && a === 0 ? (n(), i("foreignObject", {
3071
- key: 0,
3072
- x: c.value.left + c.value.width / I.value * (e.from + a - k.value.start) - (e.caption.width === "auto" ? 0 : e.caption.width / 2 - c.value.width / I.value * e.span / 2),
3073
- y: c.value.top + e.caption.offsetY,
3074
- style: L({
3075
- overflow: "visible",
3076
- opacity: e.to >= k.value.start && e.from < k.value.end ? 1 : 0
3077
- }),
3078
- height: "1",
3079
- width: e.caption.width === "auto" ? c.value.width / I.value * e.span : e.caption.width
3080
- }, [
3081
- S("div", {
3082
- style: L(`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"}`)
3083
- }, xe(e.caption.text), 5)
3084
- ], 12, ou)) : g("", !0)
3085
- ]))), 256))
3086
- ], 64)) : g("", !0)
3087
- ]))), 256)),
3088
- ge.value ? (n(), i("g", nu, [
3089
- (n(!0), i(b, null, _(I.value, (e, u) => (n(), i("g", {
3090
- key: `tooltip_trap_highlighter_${u}`
3091
- }, [
3092
- S("rect", {
3093
- x: c.value.left + c.value.width / I.value * u,
3094
- y: c.value.top,
3095
- height: c.value.height < 0 ? 10 : c.value.height,
3096
- width: c.value.width / I.value < 0 ? 1e-5 : c.value.width / I.value,
3097
- fill: [X.value, M.value, oe.value].includes(u) ? m(dt)(t.value.chart.highlighter.color, t.value.chart.highlighter.opacity) : "transparent",
3098
- style: { transition: "none !important", animation: "none !important" }
3099
- }, null, 8, iu)
3100
- ]))), 128))
3101
- ])) : g("", !0),
3102
- $t.value.length ? (n(!0), i(b, { key: 1 }, _($t.value, (e, u) => (n(), i("g", {
3103
- key: `serie_bar_${e.id}`,
3104
- class: Ke(`serie_bar_${u}`),
3105
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3106
- }, [
3107
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i("g", {
3108
- key: `bar_plot_${u}_${r}`
3109
- }, [
3110
- Ue(a.value) ? (n(), i("rect", {
3111
- key: 0,
3112
- x: oa(a) + sa.value / 2,
3113
- y: p.value.useIndividualScale ? Da(a) : Ha(a),
3114
- height: p.value.useIndividualScale ? Math.abs(Ea(a)) : Math.abs(Ba(a)),
3115
- width: ua.value - sa.value,
3116
- rx: t.value.bar.borderRadius,
3117
- fill: t.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${u}_${Z.value})` : `url(#rectGradient_neg_${u}_${Z.value})` : e.color,
3118
- stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
3119
- "stroke-width": t.value.bar.border.strokeWidth,
3120
- style: L({
3121
- transition: m(be) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out`
3122
- })
3123
- }, null, 12, uu)) : g("", !0),
3124
- Ue(a.value) && l.$slots.pattern ? (n(), i("rect", {
3125
- key: 1,
3126
- x: oa(a) - sa.value / 2,
3127
- y: p.value.useIndividualScale ? Da(a) : Ha(a),
3128
- height: p.value.useIndividualScale ? Math.abs(Ea(a)) : Math.abs(Ba(a)),
3129
- width: ua.value - sa.value,
3130
- rx: t.value.bar.borderRadius,
3131
- fill: `url(#pattern_${Z.value}_${e.slotAbsoluteIndex})`,
3132
- stroke: t.value.bar.border.useSerieColor ? e.color : t.value.bar.border.stroke,
3133
- "stroke-width": t.value.bar.border.strokeWidth,
3134
- style: L({ transition: m(be) || !t.value.bar.showTransition ? void 0 : `all ${t.value.bar.transitionDurationMs}ms ease-in-out` })
3135
- }, null, 12, su)) : g("", !0),
3136
- a.comment && t.value.chart.comments.show ? (n(), i("foreignObject", {
3137
- key: 2,
3138
- style: { overflow: "visible" },
3139
- height: "12",
3140
- width: ua.value / 2 + t.value.chart.comments.width,
3141
- x: oa(a) - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
3142
- y: m(q)(a.y) + t.value.chart.comments.offsetY + 6
3143
- }, [
3144
- le(l.$slots, "plot-comment", {
3145
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: r }
3146
- }, void 0, !0)
3147
- ], 8, ru)) : g("", !0)
3148
- ]))), 128))
3149
- ], 6))), 128)) : g("", !0),
3150
- !p.value.useIndividualScale && t.value.chart.grid.labels.zeroLine.show ? (n(), i("line", {
3151
- key: 2,
3152
- stroke: t.value.chart.grid.stroke,
3153
- "stroke-width": "1",
3154
- x1: c.value.left + se.value,
3155
- x2: c.value.right,
3156
- y1: m(ee)(Ie.value),
3157
- y2: m(ee)(Ie.value),
3158
- "stroke-linecap": "round",
3159
- style: { animation: "none !important" }
3160
- }, null, 8, cu)) : g("", !0),
3161
- t.value.chart.highlighter.useLine && (![null, void 0].includes(M.value) || ![null, void 0].includes(X.value)) ? (n(), i("g", vu, [
3162
- S("line", {
3163
- x1: c.value.left + c.value.width / I.value * ((M.value !== null ? M.value : 0) || (X.value !== null ? X.value : 0)) + c.value.width / I.value / 2,
3164
- x2: c.value.left + c.value.width / I.value * ((M.value !== null ? M.value : 0) || (X.value !== null ? X.value : 0)) + c.value.width / I.value / 2,
3165
- y1: m(ee)(c.value.top),
3166
- y2: m(ee)(c.value.bottom),
3167
- stroke: t.value.chart.highlighter.color,
3168
- "stroke-width": t.value.chart.highlighter.lineWidth,
3169
- "stroke-dasharray": t.value.chart.highlighter.lineDasharray,
3170
- "stroke-linecap": "round",
3171
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
3172
- }, null, 8, du)
3173
- ])) : g("", !0),
3174
- t.value.chart.grid.frame.show ? (n(), i("rect", {
3175
- key: 4,
3176
- style: { pointerEvents: "none", transition: "none", animation: "none !important" },
3177
- x: c.value.left + se.value < 0 ? 0 : c.value.left + se.value,
3178
- y: c.value.top,
3179
- width: c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / I.value) < 0 ? 0 : c.value.width - (t.value.chart.grid.position === "middle" ? 0 : c.value.width / I.value),
3180
- height: c.value.height < 0 ? 0 : c.value.height,
3181
- fill: "transparent",
3182
- stroke: t.value.chart.grid.frame.stroke,
3183
- "stroke-width": t.value.chart.grid.frame.strokeWidth,
3184
- "stroke-linecap": t.value.chart.grid.frame.strokeLinecap,
3185
- "stroke-linejoin": t.value.chart.grid.frame.strokeLinejoin,
3186
- "stroke-dasharray": t.value.chart.grid.frame.strokeDasharray
3187
- }, null, 8, hu)) : g("", !0),
3188
- t.value.chart.grid.labels.show ? (n(), i("g", {
3189
- key: 5,
3190
- ref_key: "scaleLabels",
3191
- ref: Al
3192
- }, [
3193
- p.value.useIndividualScale ? (n(), i(b, { key: 0 }, [
3194
- (n(!0), i(b, null, _(Xl.value, (e) => (n(), i("g", null, [
3195
- S("line", {
3196
- x1: e.x + se.value - c.value.individualOffsetX,
3197
- x2: e.x + se.value - c.value.individualOffsetX,
3198
- y1: p.value.isStacked ? m(ee)(c.value.bottom - e.yOffset - e.individualHeight) : m(ee)(c.value.top),
3199
- y2: p.value.isStacked ? m(ee)(c.value.bottom - e.yOffset) : m(ee)(c.value.bottom),
3200
- stroke: e.color,
3201
- "stroke-width": t.value.chart.grid.stroke,
3202
- "stroke-linecap": "round",
3203
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
3204
- }, null, 12, fu)
3205
- ]))), 256)),
3206
- (n(!0), i(b, null, _(Xl.value, (e) => (n(), i("g", {
3207
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
3208
- }, [
3209
- S("text", {
3210
- fill: e.color,
3211
- "font-size": T.value.dataLabels * 0.8,
3212
- "text-anchor": "middle",
3213
- transform: `translate(${e.x - T.value.dataLabels * 0.8 / 2 + se.value}, ${p.value.isStacked ? c.value.bottom - e.yOffset - e.individualHeight / 2 : c.value.top + c.value.height / 2}) rotate(-90)`
3214
- }, xe(e.name) + " " + xe(e.scaleLabel && e.unique && e.scaleLabel !== e.id ? `-
3215
- ${e.scaleLabel}` : ""), 9, mu),
3216
- (n(!0), i(b, null, _(e.yLabels, (u, a) => (n(), i(b, null, [
3217
- t.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), i("line", {
3218
- key: 0,
3219
- x1: e.x + 3 + se.value - t.value.chart.grid.labels.yAxis.crosshairSize - c.value.individualOffsetX,
3220
- x2: e.x + se.value - c.value.individualOffsetX,
3221
- y1: m(ee)(u.y),
3222
- y2: m(ee)(u.y),
3223
- stroke: e.color,
3224
- "stroke-width": 1,
3225
- "stroke-linecap": "round",
3226
- style: { animation: "none !important" }
3227
- }, null, 8, gu)) : g("", !0)
3228
- ], 64))), 256)),
3229
- (n(!0), i(b, null, _(e.yLabels, (u, a) => (n(), i("text", {
3230
- x: e.x - 5 + se.value - c.value.individualOffsetX,
3231
- y: m(ee)(u.y) + T.value.dataLabels / 3,
3232
- "font-size": T.value.dataLabels,
3233
- "text-anchor": "end",
3234
- fill: e.color
3235
- }, xe(m(Ae)(
3236
- t.value.chart.grid.labels.yAxis.formatter,
3237
- u.value,
3238
- m(_t)({
3239
- p: u.prefix,
3240
- v: u.value,
3241
- s: u.suffix,
3242
- r: t.value.chart.grid.labels.yAxis.rounding
3243
- }),
3244
- { datapoint: u.datapoint, seriesIndex: a }
3245
- )), 9, xu))), 256))
3246
- ], 4))), 256))
3247
- ], 64)) : (n(!0), i(b, { key: 1 }, _(Za.value, (e, u) => (n(), i("g", {
3248
- key: `yLabel_${u}`
3249
- }, [
3250
- Ue(e) && e.value >= Ye.value.min && e.value <= Ye.value.max && t.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), i("line", {
3251
- key: 0,
3252
- x1: c.value.left + se.value,
3253
- x2: c.value.left + se.value - t.value.chart.grid.labels.yAxis.crosshairSize,
3254
- y1: m(ee)(e.y),
3255
- y2: m(ee)(e.y),
3256
- stroke: t.value.chart.grid.stroke,
3257
- "stroke-width": "1",
3258
- "stroke-linecap": "round",
3259
- style: { animation: "none !important" }
3260
- }, null, 8, bu)) : g("", !0),
3261
- e.value >= Ye.value.min && e.value <= Ye.value.max ? (n(), i("text", {
3262
- key: 1,
3263
- x: c.value.scaleLabelX - t.value.chart.grid.labels.yAxis.crosshairSize,
3264
- y: m(q)(e.y + T.value.dataLabels / 3),
3265
- "font-size": T.value.dataLabels,
3266
- "text-anchor": "end",
3267
- fill: t.value.chart.grid.labels.color
3268
- }, xe(Ue(e.value) ? m(Ae)(
3269
- t.value.chart.grid.labels.yAxis.formatter,
3270
- e.value,
3271
- m(_t)({
3272
- p: e.prefix,
3273
- v: e.value,
3274
- s: e.suffix,
3275
- r: t.value.chart.grid.labels.yAxis.rounding
3276
- })
3277
- ) : ""), 9, yu)) : g("", !0)
3278
- ]))), 128))
3279
- ], 512)) : g("", !0),
3280
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i("g", {
3281
- key: `serie_plot_${e.id}`,
3282
- class: Ke(`serie_plot_${u}`),
3283
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3284
- }, [
3285
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i("g", {
3286
- key: `circle_plot_${u}_${r}`
3287
- }, [
3288
- a && Ue(a.value) ? (n(), vt(ma, {
3289
- key: 0,
3290
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
3291
- color: t.value.plot.useGradient ? `url(#plotGradient_${u}_${Z.value})` : t.value.plot.dot.useSerieColor ? e.color : t.value.plot.dot.fill,
3292
- plot: { x: m(q)(a.x), y: m(q)(a.y) },
3293
- radius: M.value !== null && M.value === r || X.value !== null && X.value === r ? (We.value.plot || 6) * 1.5 : We.value.plot || 6,
3294
- stroke: t.value.plot.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
3295
- strokeWidth: t.value.plot.dot.strokeWidth,
3296
- transition: m(be) || !t.value.plot.showTransition || M.value !== null && M.value === r || X.value !== null && X.value === r ? void 0 : `all ${t.value.plot.transitionDurationMs}ms ease-in-out`
3297
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : g("", !0),
3298
- a.comment && t.value.chart.comments.show ? (n(), i("foreignObject", {
3299
- key: 1,
3300
- style: { overflow: "visible" },
3301
- height: "12",
3302
- width: t.value.chart.comments.width,
3303
- x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
3304
- y: a.y + t.value.chart.comments.offsetY + 6
3305
- }, [
3306
- S("div", ku, [
3307
- le(l.$slots, "plot-comment", {
3308
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: r }
3309
- }, void 0, !0)
3310
- ])
3311
- ], 8, pu)) : g("", !0)
3312
- ]))), 128))
3313
- ], 6))), 128)),
3314
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i("g", {
3315
- key: `serie_line_${e.id}`,
3316
- class: Ke(`serie_line_${u}`),
3317
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3318
- }, [
3319
- e.smooth && e.plots.length > 1 && e.curve ? (n(), i("path", {
3320
- key: 0,
3321
- d: `M${e.curve}`,
3322
- stroke: t.value.chart.backgroundColor,
3323
- "stroke-width": t.value.line.strokeWidth + 1,
3324
- "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
3325
- fill: "none",
3326
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3327
- }, null, 12, wu)) : e.plots.length > 1 && e.straight ? (n(), i("path", {
3328
- key: 1,
3329
- d: `M${e.straight}`,
3330
- stroke: t.value.chart.backgroundColor,
3331
- "stroke-width": t.value.line.strokeWidth + 1,
3332
- "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
3333
- fill: "none",
3334
- "stroke-linecap": "round",
3335
- "stroke-linejoin": "round",
3336
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3337
- }, null, 12, Su)) : g("", !0)
3338
- ], 6))), 128)),
3339
- l.$slots.pattern ? (n(), i("defs", $u, [
3340
- (n(!0), i(b, null, _(rt.value, (e, u) => le(l.$slots, "pattern", Ut({
3341
- key: `serie_pattern_slot_${e.id}`
3342
- }, { ref_for: !0 }, { ...e, seriesIndex: e.slotAbsoluteIndex, patternId: `pattern_${Z.value}_${u}` }), void 0, !0)), 128))
3343
- ])) : g("", !0),
3344
- Qa.value.length && !p.value.isStacked ? (n(), i("g", Mu, [
3345
- (n(!0), i(b, null, _(Qa.value, (e) => (n(), i("path", {
3346
- key: e.key,
3347
- d: e.d,
3348
- fill: e.color,
3349
- "fill-opacity": t.value.line.interLine.fillOpacity,
3350
- stroke: "none",
3351
- "pointer-events": "none",
3352
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3353
- }, null, 12, _u))), 128))
3354
- ])) : g("", !0),
3355
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i("g", {
3356
- key: `serie_line_above_${e.id}`,
3357
- class: Ke(`serie_line_${u}`),
3358
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3359
- }, [
3360
- e.useArea && e.plots.length > 1 ? (n(), i("g", Lu, [
3361
- e.smooth ? (n(!0), i(b, { key: 0 }, _(e.curveAreas, (a, r) => (n(), i(b, { key: r }, [
3362
- a ? (n(), i("path", {
3363
- key: 0,
3364
- d: a,
3365
- fill: t.value.line.area.useGradient ? `url(#areaGradient_${u}_${Z.value})` : m(dt)(e.color, t.value.line.area.opacity),
3366
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3367
- }, null, 12, Cu)) : g("", !0),
3368
- l.$slots.pattern && a ? (n(), i("path", {
3369
- key: 1,
3370
- d: a,
3371
- fill: `url(#pattern_${Z.value}_${e.slotAbsoluteIndex})`,
3372
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3373
- }, null, 12, Au)) : g("", !0)
3374
- ], 64))), 128)) : (n(!0), i(b, { key: 1 }, _(e.area.split(";"), (a, r) => (n(), i(b, { key: r }, [
3375
- a ? (n(), i("path", {
3376
- key: 0,
3377
- d: `M${a}Z`,
3378
- fill: t.value.line.area.useGradient ? `url(#areaGradient_${u}_${Z.value})` : m(dt)(e.color, t.value.line.area.opacity),
3379
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3380
- }, null, 12, Tu)) : g("", !0),
3381
- l.$slots.pattern && a ? (n(), i("path", {
3382
- key: 1,
3383
- d: `M${a}Z`,
3384
- fill: `url(#pattern_${Z.value}_${e.slotAbsoluteIndex})`,
3385
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3386
- }, null, 12, zu)) : g("", !0)
3387
- ], 64))), 128))
3388
- ])) : g("", !0),
3389
- e.smooth && e.plots.length > 1 && e.curve ? (n(), i("path", {
3390
- key: 1,
3391
- d: `M${e.curve}`,
3392
- stroke: e.color,
3393
- "stroke-width": t.value.line.strokeWidth,
3394
- "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
3395
- fill: "none",
3396
- "stroke-linecap": "round",
3397
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3398
- }, null, 12, Iu)) : e.plots.length > 1 && e.straight ? (n(), i("path", {
3399
- key: 2,
3400
- d: `M${e.straight}`,
3401
- stroke: e.color,
3402
- "stroke-width": t.value.line.strokeWidth,
3403
- "stroke-dasharray": e.dashed ? t.value.line.strokeWidth * 2 : 0,
3404
- fill: "none",
3405
- "stroke-linecap": "round",
3406
- "stroke-linejoin": "round",
3407
- style: L({ transition: m(be) || !t.value.line.showTransition ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out` })
3408
- }, null, 12, Nu)) : g("", !0),
3409
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3410
- key: `circle_line_${u}_${r}`
3411
- }, [
3412
- !Ua.value.linePlot && a && Ue(a.value) || Ua.value.linePlot && a && Ue(a.value) && (M.value !== null && M.value === r || X.value !== null && X.value === r) || Ja(e.plots, r) ? (n(), vt(ma, {
3413
- key: 0,
3414
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
3415
- color: t.value.line.useGradient ? `url(#lineGradient_${u}_${Z.value})` : t.value.line.dot.useSerieColor ? e.color : t.value.line.dot.fill,
3416
- plot: { x: m(q)(a.x), y: m(q)(a.y) },
3417
- radius: M.value !== null && M.value === r || X.value !== null && X.value === r ? (We.value.line || 6) * 1.5 : (Ja(e.plots, r), We.value.line || 6),
3418
- stroke: t.value.line.dot.useSerieColor ? t.value.chart.backgroundColor : e.color,
3419
- strokeWidth: t.value.line.dot.strokeWidth,
3420
- transition: m(be) || !t.value.line.showTransition || M.value !== null && M.value === r || X.value !== null && X.value === r ? void 0 : `all ${t.value.line.transitionDurationMs}ms ease-in-out`
3421
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : g("", !0),
3422
- a.comment && t.value.chart.comments.show ? (n(), i("foreignObject", {
3423
- key: 1,
3424
- style: { overflow: "visible" },
3425
- height: "12",
3426
- width: t.value.chart.comments.width,
3427
- x: a.x - t.value.chart.comments.width / 2 + t.value.chart.comments.offsetX,
3428
- y: a.y + t.value.chart.comments.offsetY + 6
3429
- }, [
3430
- S("div", Fu, [
3431
- le(l.$slots, "plot-comment", {
3432
- plot: { ...a, color: e.color, seriesIndex: u, datapointIndex: r }
3433
- }, void 0, !0)
3434
- ])
3435
- ], 8, Pu)) : g("", !0)
3436
- ], 64))), 128))
3437
- ], 6))), 128)),
3438
- (t.value.bar.labels.show || t.value.bar.serieName.show) && p.value.dataLabels.show ? (n(), i("g", Ru, [
3439
- (n(!0), i(b, null, _($t.value, (e, u) => (n(), i(b, {
3440
- key: `xLabel_bar_${e.id}`
3441
- }, [
3442
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3443
- key: `xLabel_bar_${u}_${r}`
3444
- }, [
3445
- a && (!Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || M.value !== null && M.value === r || X.value !== null && X.value === r) && t.value.bar.labels.show ? (n(), i("text", {
3446
- key: 0,
3447
- x: p.value.useIndividualScale && p.value.isStacked ? a.x + de.value.line / 2 : oa(a) + Ht() / 2 - ia.value / 2,
3448
- y: m(q)(a.y) + (a.value >= 0 ? t.value.bar.labels.offsetY : -t.value.bar.labels.offsetY * 3),
3449
- "text-anchor": "middle",
3450
- "font-size": T.value.plotLabels,
3451
- fill: t.value.bar.labels.color,
3452
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3453
- }, xe(Ue(a.value) ? m(Ae)(
3454
- t.value.bar.labels.formatter,
3455
- a.value,
3456
- m(_t)({
3457
- p: e.prefix || t.value.chart.labels.prefix,
3458
- v: a.value,
3459
- s: e.suffix || t.value.chart.labels.suffix,
3460
- r: t.value.bar.labels.rounding
3461
- }),
3462
- {
3463
- datapoint: a,
3464
- serie: e
3465
- }
3466
- ) : ""), 13, Ou)) : g("", !0),
3467
- a && t.value.bar.serieName.show ? (n(), i("text", {
3468
- key: 1,
3469
- x: p.value.useIndividualScale && p.value.isStacked ? a.x + de.value.line / 2 : a.x + Ht() * 1.1,
3470
- y: a.y + (a.value > 0 ? t.value.bar.serieName.offsetY : -t.value.bar.serieName.offsetY * 3),
3471
- "text-anchor": "middle",
3472
- "font-size": T.value.plotLabels,
3473
- fill: t.value.bar.serieName.useSerieColor ? e.color : t.value.bar.serieName.color,
3474
- "font-weight": t.value.bar.serieName.bold ? "bold" : "normal",
3475
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3476
- }, xe(t.value.bar.serieName.useAbbreviation ? m(fn)({
3477
- source: e.name,
3478
- length: t.value.bar.serieName.abbreviationSize
3479
- }) : e.name), 13, Vu)) : g("", !0)
3480
- ], 64))), 128))
3481
- ], 64))), 128))
3482
- ])) : g("", !0),
3483
- t.value.plot.labels.show && p.value.dataLabels.show ? (n(), i("g", Bu, [
3484
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i(b, {
3485
- key: `xLabel_plot_${e.id}`
3486
- }, [
3487
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3488
- key: `xLabel_plot_${u}_${r}`
3489
- }, [
3490
- a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || M.value !== null && M.value === r || X.value !== null && X.value === r ? (n(), i("text", {
3491
- key: 0,
3492
- x: a.x,
3493
- y: a.y + t.value.plot.labels.offsetY,
3494
- "text-anchor": "middle",
3495
- "font-size": T.value.plotLabels,
3496
- fill: t.value.plot.labels.color,
3497
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3498
- }, xe(Ue(a.value) ? m(Ae)(
3499
- t.value.plot.labels.formatter,
3500
- a.value,
3501
- m(_t)({
3502
- p: e.prefix || t.value.chart.labels.prefix,
3503
- v: a.value,
3504
- s: e.suffix || t.value.chart.labels.suffix,
3505
- r: t.value.plot.labels.rounding
3506
- }),
3507
- {
3508
- datapoint: a,
3509
- serie: e
3510
- }
3511
- ) : ""), 13, Eu)) : g("", !0)
3512
- ], 64))), 128))
3513
- ], 64))), 128))
3514
- ])) : (n(), i("g", Hu, [
3515
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i(b, {
3516
- key: `xLabel_plot_${e.id}`
3517
- }, [
3518
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3519
- key: `xLabel_plot_${u}_${r}`
3520
- }, [
3521
- t.value.plot.tag.followValue ? (n(), i(b, { key: 1 }, [
3522
- [X.value, M.value, oe.value].includes(r) && e.useTag ? (n(), i("line", {
3523
- key: 0,
3524
- class: "vue-ui-xy-tag-plot",
3525
- x1: c.value.left,
3526
- x2: c.value.right,
3527
- y1: a.y,
3528
- y2: a.y,
3529
- "stroke-width": 1,
3530
- "stroke-linecap": "round",
3531
- "stroke-dasharray": "2",
3532
- stroke: e.color
3533
- }, null, 8, Gu)) : g("", !0)
3534
- ], 64)) : (n(), i(b, { key: 0 }, [
3535
- a && r === 0 && e.useTag && e.useTag === "start" ? (n(), i("foreignObject", {
3536
- key: 0,
3537
- x: a.x,
3538
- y: a.y - 20,
3539
- height: 24,
3540
- width: "150",
3541
- style: L(`overflow: visible; opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3542
- }, [
3543
- S("div", {
3544
- style: L(`padding: 3px; background:${m(dt)(e.color, 80)};color:${m(ht)(e.color)};width:fit-content;font-size:${T.value.plotLabels}px;border-radius: 2px;`),
3545
- innerHTML: m(Ae)(
3546
- t.value.plot.tag.formatter,
3547
- a.value,
3548
- e.name,
3549
- {
3550
- datapoint: a,
3551
- seriesIndex: r,
3552
- serieName: e.name
3553
- }
3554
- )
3555
- }, null, 12, Wu)
3556
- ], 12, Du)) : g("", !0),
3557
- a && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (n(), i("foreignObject", {
3558
- key: 1,
3559
- x: a.x - e.name.length * (T.value.plotLabels / 2),
3560
- y: a.y - 20,
3561
- height: 24,
3562
- width: "150",
3563
- style: L(`overflow: visible; opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3564
- }, [
3565
- S("div", {
3566
- style: L(`padding: 3px; background:${m(dt)(e.color, 80)};color:${m(ht)(e.color)};width:fit-content;font-size:${T.value.plotLabels}px;border-radius: 2px;`),
3567
- innerHTML: m(Ae)(
3568
- t.value.plot.tag.formatter,
3569
- a.value,
3570
- e.name,
3571
- {
3572
- datapoint: a,
3573
- seriesIndex: r,
3574
- serieName: e.name
3575
- }
3576
- )
3577
- }, null, 12, Yu)
3578
- ], 12, Xu)) : g("", !0)
3579
- ], 64))
3580
- ], 64))), 128))
3581
- ], 64))), 128))
3582
- ])),
3583
- t.value.line.labels.show && p.value.dataLabels.show ? (n(), i("g", Uu, [
3584
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i(b, {
3585
- key: `xLabel_line_${e.id}`
3586
- }, [
3587
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3588
- key: `xLabel_line_${u}_${r}`
3589
- }, [
3590
- a && !Object.hasOwn(e, "dataLabels") || e.dataLabels === !0 || M.value !== null && M.value === r || X.value !== null && X.value === r ? (n(), i("text", {
3591
- key: 0,
3592
- x: a.x,
3593
- y: a.y + (a.value >= 0 ? t.value.line.labels.offsetY : -t.value.line.labels.offsetY * 3),
3594
- "text-anchor": "middle",
3595
- "font-size": T.value.plotLabels,
3596
- fill: t.value.line.labels.color,
3597
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3598
- }, xe(Ue(a.value) ? m(Ae)(
3599
- t.value.line.labels.formatter,
3600
- a.value,
3601
- m(_t)({
3602
- p: e.prefix || t.value.chart.labels.prefix,
3603
- v: a.value,
3604
- s: e.suffix || t.value.chart.labels.suffix,
3605
- r: t.value.line.labels.rounding
3606
- }),
3607
- {
3608
- datapoint: a,
3609
- serie: e
3610
- }
3611
- ) : ""), 13, qu)) : g("", !0)
3612
- ], 64))), 128))
3613
- ], 64))), 128))
3614
- ])) : (n(), i("g", Zu, [
3615
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i(b, {
3616
- key: `xLabel_line_${e.id}`
3617
- }, [
3618
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3619
- key: `xLabel_line_${u}_${r}`
3620
- }, [
3621
- t.value.line.tag.followValue ? (n(), i(b, { key: 1 }, [
3622
- [X.value, M.value, oe.value].includes(r) && e.useTag ? (n(), i("line", {
3623
- key: 0,
3624
- class: "vue-ui-xy-tag-line",
3625
- x1: c.value.left,
3626
- x2: c.value.right,
3627
- y1: a.y,
3628
- y2: a.y,
3629
- "stroke-width": 1,
3630
- "stroke-linecap": "round",
3631
- "stroke-dasharray": "2",
3632
- stroke: e.color
3633
- }, null, 8, es)) : g("", !0)
3634
- ], 64)) : (n(), i(b, { key: 0 }, [
3635
- a && r === 0 && e.useTag && e.useTag === "start" ? (n(), i("foreignObject", {
3636
- key: 0,
3637
- x: a.x,
3638
- y: a.y - 20,
3639
- height: 24,
3640
- width: "150",
3641
- style: L(`overflow: visible; opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3642
- }, [
3643
- S("div", {
3644
- style: L(`padding: 3px; background:${m(dt)(e.color, 80)};color:${m(ht)(e.color)};width:fit-content;font-size:${T.value.plotLabels}px;border-radius: 2px;`),
3645
- innerHTML: m(Ae)(
3646
- t.value.line.tag.formatter,
3647
- a.value,
3648
- e.name,
3649
- {
3650
- datapoint: a,
3651
- seriesIndex: r,
3652
- serieName: e.name
3653
- }
3654
- )
3655
- }, null, 12, Ju)
3656
- ], 12, Ku)) : g("", !0),
3657
- a && r === e.plots.length - 1 && e.useTag && e.useTag === "end" ? (n(), i("foreignObject", {
3658
- key: 1,
3659
- x: a.x,
3660
- y: a.y - 20,
3661
- height: 24,
3662
- width: "150",
3663
- style: L(`overflow: visible; opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3664
- }, [
3665
- S("div", {
3666
- style: L(`padding: 3px; background:${m(dt)(e.color, 80)};color:${m(ht)(e.color)};width:fit-content;font-size:${T.value.plotLabels}px;border-radius: 2px;`),
3667
- innerHTML: m(Ae)(
3668
- t.value.line.tag.formatter,
3669
- a.value,
3670
- e.name,
3671
- {
3672
- datapoint: a,
3673
- seriesIndex: r,
3674
- serieName: e.name
3675
- }
3676
- )
3677
- }, null, 12, ju)
3678
- ], 12, Qu)) : g("", !0)
3679
- ], 64))
3680
- ], 64))), 128))
3681
- ], 64))), 128))
3682
- ])),
3683
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i(b, {
3684
- key: `xLabel_line_${e.id}`
3685
- }, [
3686
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3687
- key: `xLabel_line_${u}_${r}`
3688
- }, [
3689
- a && r === 0 && e.showSerieName && e.showSerieName === "start" ? (n(), i("text", {
3690
- key: 0,
3691
- x: a.x - T.value.plotLabels,
3692
- y: a.y,
3693
- "font-size": T.value.plotLabels,
3694
- "text-anchor": "end",
3695
- fill: e.color,
3696
- innerHTML: m(ha)({
3697
- content: e.name,
3698
- fontSize: T.value.plotLabels,
3699
- fill: e.color,
3700
- x: a.x - T.value.plotLabels,
3701
- y: a.y,
3702
- maxWords: 2
3703
- }),
3704
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3705
- }, null, 12, ts)) : g("", !0),
3706
- a && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (n(), i("text", {
3707
- key: 1,
3708
- x: a.x + T.value.plotLabels,
3709
- y: a.y,
3710
- "font-size": T.value.plotLabels,
3711
- "text-anchor": "start",
3712
- fill: e.color,
3713
- innerHTML: m(ha)({
3714
- content: e.name,
3715
- fontSize: T.value.plotLabels,
3716
- fill: e.color,
3717
- x: a.x + T.value.plotLabels,
3718
- y: a.y,
3719
- maxWords: 2
3720
- }),
3721
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3722
- }, null, 12, ls)) : g("", !0)
3723
- ], 64))), 128))
3724
- ], 64))), 128)),
3725
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i(b, {
3726
- key: `xLabel_plot_${e.id}`
3727
- }, [
3728
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
3729
- key: `xLabel_plot_${u}_${r}`
3730
- }, [
3731
- a && r === 0 && e.showSerieName && e.showSerieName === "start" ? (n(), i("text", {
3732
- key: 0,
3733
- x: a.x - T.value.plotLabels,
3734
- y: a.y,
3735
- "font-size": T.value.plotLabels,
3736
- "text-anchor": "end",
3737
- fill: e.color,
3738
- innerHTML: m(ha)({
3739
- content: e.name,
3740
- fontSize: T.value.plotLabels,
3741
- fill: e.color,
3742
- x: a.x - T.value.plotLabels,
3743
- y: a.y,
3744
- maxWords: 2
3745
- }),
3746
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3747
- }, null, 12, as)) : g("", !0),
3748
- a && r === e.plots.length - 1 && e.showSerieName && e.showSerieName === "end" ? (n(), i("text", {
3749
- key: 1,
3750
- x: a.x + T.value.plotLabels,
3751
- y: a.y,
3752
- "font-size": T.value.plotLabels,
3753
- "text-anchor": "start",
3754
- fill: e.color,
3755
- innerHTML: m(ha)({
3756
- content: e.name,
3757
- fontSize: T.value.plotLabels,
3758
- fill: e.color,
3759
- x: a.x + T.value.plotLabels,
3760
- y: a.y,
3761
- maxWords: 2
3762
- }),
3763
- style: L(`opacity:${E.value ? E.value === e.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
3764
- }, null, 12, os)) : g("", !0)
3765
- ], 64))), 128))
3766
- ], 64))), 128)),
3767
- (n(!0), i(b, null, _([...tt.value, ...Ne.value, ...$t.value], (e, u) => (n(), i(b, {
3768
- key: `progression-${u}`
3769
- }, [
3770
- Object.hasOwn(e, "useProgression") && e.useProgression === !0 && !isNaN(m(lt)(e.plots).trend) ? (n(), i("g", ns, [
3771
- S("defs", null, [
3772
- S("marker", {
3773
- id: `progression_arrow_${u}`,
3774
- markerWidth: "9",
3775
- markerHeight: "9",
3776
- viewBox: "-1 -1 9 9",
3777
- markerUnits: "userSpaceOnUse",
3778
- refX: "7",
3779
- refY: 7 / 2,
3780
- orient: "auto",
3781
- overflow: "visible"
3782
- }, [
3783
- S("polygon", {
3784
- points: "0,0 7,3.5 0,7",
3785
- fill: e.color,
3786
- stroke: t.value.chart.backgroundColor,
3787
- "stroke-width": "1",
3788
- "stroke-linejoin": "round"
3789
- }, null, 8, us)
3790
- ], 8, is)
3791
- ]),
3792
- e.plots.length > 1 ? (n(), i("line", {
3793
- key: 0,
3794
- x1: m(lt)(e.plots).x1 + (e.type === "bar" ? Ht() : 0),
3795
- x2: m(lt)(e.plots).x2 + (e.type === "bar" ? Ht() : 0),
3796
- y1: m(ee)(m(lt)(e.plots).y1),
3797
- y2: m(ee)(m(lt)(e.plots).y2),
3798
- "stroke-width": 1,
3799
- stroke: t.value.chart.backgroundColor,
3800
- "stroke-dasharray": 2,
3801
- "stroke-linecap": "round",
3802
- "stroke-linejoin": "round",
3803
- "marker-end": `url(#progression_arrow_${u})`
3804
- }, null, 8, ss)) : g("", !0),
3805
- e.plots.length > 1 ? (n(), i("line", {
3806
- key: 1,
3807
- x1: m(lt)(e.plots).x1 + (e.type === "bar" ? Ht() : 0),
3808
- x2: m(lt)(e.plots).x2 + (e.type === "bar" ? Ht() : 0),
3809
- y1: m(ee)(m(lt)(e.plots).y1),
3810
- y2: m(ee)(m(lt)(e.plots).y2),
3811
- "stroke-width": 1,
3812
- stroke: e.color,
3813
- "stroke-dasharray": 2,
3814
- "stroke-linecap": "round",
3815
- "stroke-linejoin": "round",
3816
- "marker-end": `url(#progression_arrow_${u})`
3817
- }, null, 8, rs)) : g("", !0),
3818
- e.plots.length > 1 ? (n(), i("text", {
3819
- key: 2,
3820
- "text-anchor": "middle",
3821
- x: m(lt)(e.plots).x2 + (e.type === "bar" ? Ht() : 0),
3822
- y: m(lt)(e.plots).y2 - 12,
3823
- "font-size": T.value.plotLabels,
3824
- fill: e.color,
3825
- stroke: t.value.chart.backgroundColor,
3826
- "stroke-width": 4,
3827
- "stroke-linecap": "round",
3828
- "stroke-linejoin": "round",
3829
- "paint-order": "stroke fill"
3830
- }, xe(m(_t)({
3831
- v: m(lt)(e.plots).trend * 100,
3832
- s: "%",
3833
- r: 2
3834
- })), 9, cs)) : g("", !0)
3835
- ])) : g("", !0)
3836
- ], 64))), 128)),
3837
- p.value.useIndividualScale && !p.value.isStacked ? (n(), i(b, { key: 13 }, [
3838
- S("defs", null, [
3839
- (n(!0), i(b, null, _(Xl.value, (e, u) => (n(), i("linearGradient", {
3840
- id: `individual_scale_gradient_${Z.value}_${u}`,
3841
- x1: "0%",
3842
- x2: "100%",
3843
- y1: "0%",
3844
- y2: "0%"
3845
- }, [
3846
- S("stop", {
3847
- offset: "0%",
3848
- "stop-color": t.value.chart.backgroundColor,
3849
- "stop-opacity": "0"
3850
- }, null, 8, ds),
3851
- S("stop", {
3852
- offset: "100%",
3853
- "stop-color": e.color,
3854
- "stop-opacity": "0.2"
3855
- }, null, 8, hs)
3856
- ], 8, vs))), 256))
3857
- ]),
3858
- (n(!0), i(b, null, _(Xl.value, (e, u) => (n(), i("rect", {
3859
- x: e.x - t.value.chart.grid.labels.yAxis.labelWidth + se.value - c.value.individualOffsetX,
3860
- y: c.value.top,
3861
- width: t.value.chart.grid.labels.yAxis.labelWidth + c.value.individualOffsetX,
3862
- height: c.value.height < 0 ? 10 : c.value.height,
3863
- fill: E.value === e.groupId ? `url(#individual_scale_gradient_${Z.value}_${u})` : "transparent",
3864
- onMouseenter: (a) => E.value = e.groupId,
3865
- onMouseleave: s[0] || (s[0] = (a) => E.value = null)
3866
- }, null, 40, fs))), 256))
3867
- ], 64)) : g("", !0),
3868
- S("g", null, [
3869
- t.value.chart.grid.labels.axis.yLabel && !p.value.useIndividualScale ? (n(), i("text", {
3870
- key: 0,
3871
- ref_key: "yAxisLabel",
3872
- ref: Jt,
3873
- "font-size": T.value.yAxis,
3874
- fill: t.value.chart.grid.labels.color,
3875
- transform: `translate(${t.value.chart.grid.labels.axis.fontSize}, ${c.value.top + c.value.height / 2}) rotate(-90)`,
3876
- "text-anchor": "middle",
3877
- style: { transition: "none" }
3878
- }, xe(t.value.chart.grid.labels.axis.yLabel), 9, ms)) : g("", !0),
3879
- t.value.chart.grid.labels.axis.xLabel ? (n(), i("text", {
3880
- key: 1,
3881
- ref_key: "xAxisLabel",
3882
- ref: Kt,
3883
- "text-anchor": "middle",
3884
- x: ae.value / 2,
3885
- y: W.value - 3,
3886
- "font-size": T.value.yAxis,
3887
- fill: t.value.chart.grid.labels.color
3888
- }, xe(t.value.chart.grid.labels.axis.xLabel), 9, gs)) : g("", !0)
3889
- ]),
3890
- t.value.chart.grid.labels.xAxisLabels.show ? (n(), i("g", {
3891
- key: 14,
3892
- ref_key: "timeLabelsEls",
3893
- ref: _e
3894
- }, [
3895
- l.$slots["time-label"] ? (n(!0), i(b, { key: 0 }, _(pe.value, (e, u) => le(l.$slots, "time-label", Ut({
3896
- key: `time_label_${e.id}`,
3897
- ref_for: !0
3898
- }, {
3899
- x: c.value.left + c.value.width / I.value * u + c.value.width / I.value / 2,
3900
- y: c.value.bottom,
3901
- fontSize: T.value.xAxis,
3902
- fill: t.value.chart.grid.labels.xAxisLabels.color,
3903
- transform: `translate(${c.value.left + c.value.width / I.value * u + c.value.width / I.value / 2}, ${c.value.bottom + T.value.xAxis * 1.3 + t.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3904
- absoluteIndex: e.absoluteIndex,
3905
- content: e.text,
3906
- textAnchor: t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3907
- show: e && e.text
3908
- }), void 0, !0)), 128)) : (n(!0), i(b, { key: 1 }, _(pe.value, (e, u) => (n(), i("g", {
3909
- key: `time_label_${u}`
3910
- }, [
3911
- e && e.text ? (n(), i(b, { key: 0 }, [
3912
- String(e.text).includes(`
3913
- `) ? (n(), i("text", {
3914
- key: 1,
3915
- class: "vue-data-ui-time-label",
3916
- "text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3917
- "font-size": T.value.xAxis,
3918
- fill: t.value.chart.grid.labels.xAxisLabels.color,
3919
- transform: `translate(${c.value.left + c.value.width / I.value * u + c.value.width / I.value / 2}, ${c.value.bottom + T.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3920
- style: L({
3921
- cursor: Hl() ? "pointer" : "default"
3922
- }),
3923
- innerHTML: m(mn)({
3924
- content: String(e.text),
3925
- fontSize: T.value.xAxis,
3926
- fill: t.value.chart.grid.labels.xAxisLabels.color,
3927
- x: 0,
3928
- y: 0
3929
- }),
3930
- onClick: () => ne(e, u)
3931
- }, null, 12, bs)) : (n(), i("text", {
3932
- key: 0,
3933
- class: "vue-data-ui-time-label",
3934
- "text-anchor": t.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : t.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
3935
- "font-size": T.value.xAxis,
3936
- fill: t.value.chart.grid.labels.xAxisLabels.color,
3937
- transform: `translate(${c.value.left + c.value.width / I.value * u + c.value.width / I.value / 2}, ${c.value.bottom + T.value.xAxis * 1.5}), rotate(${t.value.chart.grid.labels.xAxisLabels.rotation})`,
3938
- style: L({
3939
- cursor: Hl() ? "pointer" : "default"
3940
- }),
3941
- onClick: () => ne(e, u)
3942
- }, xe(e.text || ""), 13, xs))
3943
- ], 64)) : g("", !0)
3944
- ]))), 128))
3945
- ], 512)) : g("", !0),
3946
- Ka.value.length && !p.value.isStacked ? (n(), i("g", ys, [
3947
- (n(!0), i(b, null, _(Ka.value, (e) => (n(), i("g", {
3948
- key: e.uid
3949
- }, [
3950
- e.yTop && e.show && isFinite(e.yTop) ? (n(), i("line", {
3951
- key: 0,
3952
- x1: e.x1,
3953
- y1: e.yTop,
3954
- x2: e.x2,
3955
- y2: e.yTop,
3956
- stroke: e.config.line.stroke,
3957
- "stroke-width": e.config.line.strokeWidth,
3958
- "stroke-dasharray": e.config.line.strokeDasharray,
3959
- "stroke-linecap": "round",
3960
- style: { animation: "none !important" }
3961
- }, null, 8, ps)) : g("", !0),
3962
- e.yBottom && e.show && isFinite(e.yBottom) ? (n(), i("line", {
3963
- key: 1,
3964
- x1: e.x1,
3965
- y1: e.yBottom,
3966
- x2: e.x2,
3967
- y2: e.yBottom,
3968
- stroke: e.config.line.stroke,
3969
- "stroke-width": e.config.line.strokeWidth,
3970
- "stroke-dasharray": e.config.line.strokeDasharray,
3971
- "stroke-linecap": "round",
3972
- style: { animation: "none !important" }
3973
- }, null, 8, ks)) : g("", !0),
3974
- e.hasArea && e.show && isFinite(e.yTop) && isFinite(e.yBottom) ? (n(), i("rect", {
3975
- key: 2,
3976
- y: Math.min(e.yTop, e.yBottom),
3977
- x: e.x1,
3978
- width: c.value.width,
3979
- height: m(q)(e.areaHeight, 0),
3980
- fill: m(dt)(e.config.area.fill, e.config.area.opacity),
3981
- style: { animation: "none !important" }
3982
- }, null, 8, ws)) : g("", !0),
3983
- e.config.label.text && e.show && isFinite(e._box.y) ? (n(), i("rect", Ut({
3984
- key: 3,
3985
- class: "vue-ui-xy-annotation-label-box"
3986
- }, { ref_for: !0 }, e._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : g("", !0),
3987
- e.config.label.text && e.show && isFinite(e._text.y) ? (n(), i("text", {
3988
- key: 4,
3989
- id: e.id,
3990
- class: "vue-ui-xy-annotation-label",
3991
- x: e._text.x,
3992
- y: e._text.y,
3993
- "font-size": e.config.label.fontSize,
3994
- fill: e.config.label.color,
3995
- "text-anchor": e.config.label.textAnchor
3996
- }, xe(e.config.label.text), 9, Ss)) : g("", !0)
3997
- ]))), 128))
3998
- ])) : g("", !0),
3999
- t.value.chart.timeTag.show && (![null, void 0].includes(M.value) || ![null, void 0].includes(X.value)) ? (n(), i("g", $s, [
4000
- (n(), i("foreignObject", {
4001
- x: Wo(),
4002
- y: c.value.bottom,
4003
- width: "200",
4004
- height: "40",
4005
- style: { overflow: "visible !important" }
4006
- }, [
4007
- S("div", {
4008
- ref_key: "timeTagEl",
4009
- ref: so,
4010
- class: "vue-ui-xy-time-tag",
4011
- style: L(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${t.value.chart.timeTag.backgroundColor};color:${t.value.chart.timeTag.color};font-size:${t.value.chart.timeTag.fontSize}px`),
4012
- innerHTML: Xo.value
4013
- }, null, 12, _s)
4014
- ], 8, Ms)),
4015
- S("circle", {
4016
- cx: c.value.left + c.value.width / I.value * ((M.value !== null ? M.value : 0) || (X.value !== null ? X.value : 0)) + c.value.width / I.value / 2,
4017
- cy: c.value.bottom,
4018
- r: t.value.chart.timeTag.circleMarker.radius,
4019
- fill: t.value.chart.timeTag.circleMarker.color
4020
- }, null, 8, Ls)
4021
- ])) : g("", !0)
4022
- ])) : g("", !0),
4023
- Ol.value ? (n(), i("rect", Ut({ key: 2 }, _a.value, {
4024
- "data-start": k.value.start,
4025
- "data-end": k.value.end
4026
- }), null, 16, Cs)) : g("", !0),
4027
- le(l.$slots, "svg", { svg: bt.value }, void 0, !0)
4028
- ], 512)
4029
- ], 46, _i)),
4030
- l.$slots.watermark ? (n(), i("div", As, [
4031
- le(l.$slots, "watermark", Gt(hl({ isPrinting: m(et) || m(it) })), void 0, !0)
4032
- ])) : g("", !0),
4033
- (n(!0), i(b, null, _(Ne.value, (e, u) => (n(), i(b, {
4034
- key: `tag_line_${e.id}`
4035
- }, [
4036
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
4037
- key: `tag_line_${u}_${r}`
4038
- }, [
4039
- [X.value, M.value, oe.value].includes(r) && e.useTag && e.useTag === "end" && t.value.line.tag.followValue ? (n(), i("div", {
4040
- key: 0,
4041
- ref_for: !0,
4042
- ref: (o) => kt(u, r, o, "right", "line"),
4043
- class: "vue-ui-xy-tag",
4044
- "data-tag": "right",
4045
- style: L({
4046
- position: "fixed",
4047
- top: m(Yt)({
4048
- svgElement: $e.value,
4049
- x: c.value.right + t.value.line.tag.fontSize / 1.5,
4050
- y: a.y,
4051
- element: nt.value[`${u}_${r}_right_line`],
4052
- position: "right"
4053
- }).top + "px",
4054
- left: m(Yt)({
4055
- svgElement: $e.value,
4056
- x: c.value.right + t.value.line.tag.fontSize / 1.5,
4057
- y: a.y,
4058
- element: nt.value[`${u}_${r}_right_line`],
4059
- position: "right"
4060
- }).left + "px",
4061
- height: "fit-content",
4062
- width: "fit-content",
4063
- background: e.color,
4064
- color: m(ht)(e.color),
4065
- padding: "0 6px",
4066
- fontSize: t.value.line.tag.fontSize + "px",
4067
- opacity: 1
4068
- })
4069
- }, [
4070
- (n(), i("svg", Ts, [
4071
- S("path", {
4072
- d: "M 0,10 10,0 10,20 Z",
4073
- fill: e.color,
4074
- stroke: "none"
4075
- }, null, 8, zs)
4076
- ])),
4077
- S("div", {
4078
- class: "vue-ui-xy-tag-content",
4079
- innerHTML: m(Ae)(
4080
- t.value.line.tag.formatter,
4081
- a.value,
4082
- e.name,
4083
- {
4084
- datapoint: a,
4085
- seriesIndex: r,
4086
- serieName: e.name
4087
- }
4088
- )
4089
- }, null, 8, Is)
4090
- ], 4)) : g("", !0),
4091
- [X.value, M.value, oe.value].includes(r) && e.useTag && e.useTag === "start" && t.value.line.tag.followValue ? (n(), i("div", {
4092
- key: 1,
4093
- ref_for: !0,
4094
- ref: (o) => kt(u, r, o, "left", "line"),
4095
- class: "vue-ui-xy-tag",
4096
- "data-tag": "left",
4097
- style: L({
4098
- position: "fixed",
4099
- top: m(Yt)({
4100
- svgElement: $e.value,
4101
- x: c.value.left - t.value.line.tag.fontSize / 1.5,
4102
- y: a.y,
4103
- element: nt.value[`${u}_${r}_left_line`],
4104
- position: "left"
4105
- }).top + "px",
4106
- left: m(Yt)({
4107
- svgElement: $e.value,
4108
- x: c.value.left - t.value.line.tag.fontSize / 1.5,
4109
- y: a.y,
4110
- element: nt.value[`${u}_${r}_left_line`],
4111
- position: "left"
4112
- }).left + "px",
4113
- height: "fit-content",
4114
- width: "fit-content",
4115
- background: e.color,
4116
- color: m(ht)(e.color),
4117
- padding: "0 6px",
4118
- fontSize: t.value.line.tag.fontSize + "px",
4119
- opacity: 1
4120
- })
4121
- }, [
4122
- (n(), i("svg", Ns, [
4123
- S("path", {
4124
- d: "M 0,0 10,10 0,20 Z",
4125
- fill: e.color,
4126
- stroke: "none"
4127
- }, null, 8, Ps)
4128
- ])),
4129
- S("div", {
4130
- class: "vue-ui-xy-tag-content",
4131
- innerHTML: m(Ae)(
4132
- t.value.line.tag.formatter,
4133
- a.value,
4134
- e.name,
4135
- {
4136
- datapoint: a,
4137
- seriesIndex: r,
4138
- serieName: e.name
4139
- }
4140
- )
4141
- }, null, 8, Fs)
4142
- ], 4)) : g("", !0)
4143
- ], 64))), 128))
4144
- ], 64))), 128)),
4145
- (n(!0), i(b, null, _(tt.value, (e, u) => (n(), i(b, {
4146
- key: `tag_plot_${e.id}`
4147
- }, [
4148
- (n(!0), i(b, null, _(e.plots, (a, r) => (n(), i(b, {
4149
- key: `tag_plot_${u}_${r}`
4150
- }, [
4151
- [X.value, M.value, oe.value].includes(r) && e.useTag && e.useTag === "end" && t.value.plot.tag.followValue ? (n(), i("div", {
4152
- key: 0,
4153
- ref_for: !0,
4154
- ref: (o) => kt(u, r, o, "right", "plot"),
4155
- class: "vue-ui-xy-tag",
4156
- "data-tag": "right",
4157
- style: L({
4158
- position: "fixed",
4159
- top: m(Yt)({
4160
- svgElement: $e.value,
4161
- x: c.value.right + t.value.plot.tag.fontSize / 1.5,
4162
- y: a.y,
4163
- element: nt.value[`${u}_${r}_right_plot`],
4164
- position: "right"
4165
- }).top + "px",
4166
- left: m(Yt)({
4167
- svgElement: $e.value,
4168
- x: c.value.right + t.value.plot.tag.fontSize / 1.5,
4169
- y: a.y,
4170
- element: nt.value[`${u}_${r}_right_plot`],
4171
- position: "right"
4172
- }).left + "px",
4173
- height: "fit-content",
4174
- width: "fit-content",
4175
- background: e.color,
4176
- color: m(ht)(e.color),
4177
- padding: "0 6px",
4178
- fontSize: t.value.plot.tag.fontSize + "px",
4179
- opacity: 1
4180
- })
4181
- }, [
4182
- (n(), i("svg", Rs, [
4183
- S("path", {
4184
- d: "M 0,10 10,0 10,20 Z",
4185
- fill: e.color,
4186
- stroke: "none"
4187
- }, null, 8, Os)
4188
- ])),
4189
- S("div", {
4190
- class: "vue-ui-xy-tag-content",
4191
- innerHTML: m(Ae)(
4192
- t.value.plot.tag.formatter,
4193
- a.value,
4194
- e.name,
4195
- {
4196
- datapoint: a,
4197
- seriesIndex: r,
4198
- serieName: e.name
4199
- }
4200
- )
4201
- }, null, 8, Vs)
4202
- ], 4)) : g("", !0),
4203
- [X.value, M.value, oe.value].includes(r) && e.useTag && e.useTag === "start" && t.value.plot.tag.followValue ? (n(), i("div", {
4204
- key: 1,
4205
- ref_for: !0,
4206
- ref: (o) => kt(u, r, o, "left", "plot"),
4207
- class: "vue-ui-xy-tag",
4208
- "data-tag": "left",
4209
- style: L({
4210
- position: "fixed",
4211
- top: m(Yt)({
4212
- svgElement: $e.value,
4213
- x: c.value.left - t.value.plot.tag.fontSize / 1.5,
4214
- y: a.y,
4215
- element: nt.value[`${u}_${r}_left_plot`],
4216
- position: "left"
4217
- }).top + "px",
4218
- left: m(Yt)({
4219
- svgElement: $e.value,
4220
- x: c.value.left - t.value.plot.tag.fontSize / 1.5,
4221
- y: a.y,
4222
- element: nt.value[`${u}_${r}_left_plot`],
4223
- position: "left"
4224
- }).left + "px",
4225
- height: "fit-content",
4226
- width: "fit-content",
4227
- background: e.color,
4228
- color: m(ht)(e.color),
4229
- padding: "0 6px",
4230
- fontSize: t.value.plot.tag.fontSize + "px",
4231
- opacity: 1
4232
- })
4233
- }, [
4234
- (n(), i("svg", Bs, [
4235
- S("path", {
4236
- d: "M 0,0 10,10 0,20 Z",
4237
- fill: e.color,
4238
- stroke: "none"
4239
- }, null, 8, Es)
4240
- ])),
4241
- S("div", {
4242
- class: "vue-ui-xy-tag-content",
4243
- innerHTML: m(Ae)(
4244
- t.value.plot.tag.formatter,
4245
- a.value,
4246
- e.name,
4247
- {
4248
- datapoint: a,
4249
- seriesIndex: r,
4250
- serieName: e.name
4251
- }
4252
- )
4253
- }, null, 8, Hs)
4254
- ], 4)) : g("", !0)
4255
- ], 64))), 128))
4256
- ], 64))), 128)),
4257
- t.value.chart.zoom.show && je.value > 6 && At.value && Dl.value ? (n(), vt(Si, {
4258
- key: 5,
4259
- ref_key: "chartSlicer",
4260
- ref: Je,
4261
- immediate: !t.value.chart.zoom.preview.enable,
4262
- max: je.value,
4263
- min: 0,
4264
- valueStart: k.value.start,
4265
- valueEnd: k.value.end,
4266
- start: k.value.start,
4267
- end: k.value.end,
4268
- "onUpdate:start": Ca,
4269
- "onUpdate:end": Aa,
4270
- selectedSeries: It.value,
4271
- customFormat: t.value.chart.zoom.customFormat,
4272
- background: t.value.chart.zoom.color,
4273
- fontSize: t.value.chart.zoom.fontSize,
4274
- useResetSlot: t.value.chart.zoom.useResetSlot,
4275
- labelLeft: h.value[0] ? h.value[0].text : "",
4276
- labelRight: h.value.at(-1) ? h.value.at(-1).text : "",
4277
- textColor: t.value.chart.color,
4278
- usePreciseLabels: t.value.chart.grid.labels.xAxisLabels.datetimeFormatter.enable && !t.value.chart.zoom.useDefaultFormat,
4279
- preciseLabels: Ta.value,
4280
- inputColor: t.value.chart.zoom.color,
4281
- selectColor: t.value.chart.zoom.highlightColor,
4282
- borderColor: t.value.chart.backgroundColor,
4283
- minimap: Vo.value,
4284
- smoothMinimap: t.value.chart.zoom.minimap.smooth,
4285
- minimapSelectedColor: t.value.chart.zoom.minimap.selectedColor,
4286
- minimapSelectionRadius: t.value.chart.zoom.minimap.selectionRadius,
4287
- minimapLineColor: t.value.chart.zoom.minimap.lineColor,
4288
- minimapSelectedColorOpacity: t.value.chart.zoom.minimap.selectedColorOpacity,
4289
- minimapSelectedIndex: M.value,
4290
- minimapIndicatorColor: t.value.chart.zoom.minimap.indicatorColor,
4291
- verticalHandles: t.value.chart.zoom.minimap.verticalHandles,
4292
- refreshStartPoint: t.value.chart.zoom.startIndex !== null ? t.value.chart.zoom.startIndex : 0,
4293
- refreshEndPoint: t.value.chart.zoom.endIndex !== null ? t.value.chart.zoom.endIndex + 1 : Math.max(...w.dataset.map((e) => yt(e.series).length)),
4294
- enableRangeHandles: t.value.chart.zoom.enableRangeHandles,
4295
- enableSelectionDrag: t.value.chart.zoom.enableSelectionDrag,
4296
- minimapCompact: t.value.chart.zoom.minimap.compact,
4297
- allMinimaps: Bo.value,
4298
- minimapMerged: t.value.chart.zoom.minimap.merged,
4299
- minimapFrameColor: t.value.chart.zoom.minimap.frameColor,
4300
- cutNullValues: t.value.line.cutNullValues,
4301
- focusOnDrag: t.value.chart.zoom.focusOnDrag,
4302
- focusRangeRatio: t.value.chart.zoom.focusRangeRatio,
4303
- onReset: Co,
4304
- onTrapMouse: wt,
4305
- onFutureStart: s[1] || (s[1] = (e) => Vl("start", e)),
4306
- onFutureEnd: s[2] || (s[2] = (e) => Vl("end", e)),
4307
- timeLabels: f.value,
4308
- isPreview: Ol.value
4309
- }, {
4310
- "reset-action": Me(({ reset: e }) => [
4311
- le(l.$slots, "reset-action", Gt(hl({ reset: e })), void 0, !0)
4312
- ]),
4313
- _: 3
4314
- }, 8, ["immediate", "max", "valueStart", "valueEnd", "start", "end", "selectedSeries", "customFormat", "background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "usePreciseLabels", "preciseLabels", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "verticalHandles", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "minimapCompact", "allMinimaps", "minimapMerged", "minimapFrameColor", "cutNullValues", "focusOnDrag", "focusRangeRatio", "timeLabels", "isPreview"])) : g("", !0),
4315
- S("div", {
4316
- id: `legend-bottom-${Z.value}`
4317
- }, null, 8, Ds),
4318
- H.value ? (n(), vt(an, {
4319
- key: 6,
4320
- to: t.value.chart.legend.position === "top" ? `#legend-top-${Z.value}` : `#legend-bottom-${Z.value}`
4321
- }, [
4322
- t.value.chart.legend.show ? (n(), i("div", {
4323
- key: 0,
4324
- ref_key: "chartLegend",
4325
- ref: Le,
4326
- class: "vue-ui-xy-legend",
4327
- style: L({
4328
- fontSize: `var(--legend-font-size, ${t.value.chart.legend.fontSize ?? 14}px)`
4329
- })
4330
- }, [
4331
- (n(!0), i(b, null, _(Ge.value, (e, u) => (n(), i("div", {
4332
- key: `div_legend_item_${u}`,
4333
- onClick: (a) => Ga(e),
4334
- class: Ke({ "vue-ui-xy-legend-item-alone": Ge.value.length === 1, "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": ve.value.includes(e.id) })
4335
- }, [
4336
- jt.value[e.type] === "line" ? (n(), i("svg", Xs, [
4337
- S("rect", {
4338
- x: "0",
4339
- y: "7.5",
4340
- rx: "1.5",
4341
- stroke: t.value.chart.backgroundColor,
4342
- "stroke-width": 0.5,
4343
- height: "3",
4344
- width: "20",
4345
- fill: e.color
4346
- }, null, 8, Ys),
4347
- gl(ma, {
4348
- plot: { x: 10, y: 9 },
4349
- radius: 4,
4350
- color: e.color,
4351
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle",
4352
- stroke: t.value.chart.backgroundColor,
4353
- strokeWidth: 0.5
4354
- }, null, 8, ["color", "shape", "stroke"])
4355
- ])) : jt.value[e.type] === "bar" ? (n(), i("svg", Gs, [
4356
- jt.value[e.type] === "bar" && l.$slots.pattern ? (n(), i("rect", {
4357
- key: 0,
4358
- x: "4",
4359
- y: "4",
4360
- rx: "1",
4361
- height: "32",
4362
- width: "32",
4363
- stroke: "none",
4364
- fill: e.color
4365
- }, null, 8, Us)) : g("", !0),
4366
- jt.value[e.type] === "bar" ? (n(), i("rect", {
4367
- key: 1,
4368
- x: "4",
4369
- y: "4",
4370
- rx: "1",
4371
- height: "32",
4372
- width: "32",
4373
- stroke: "none",
4374
- fill: l.$slots.pattern ? `url(#pattern_${Z.value}_${e.slotAbsoluteIndex})` : e.color
4375
- }, null, 8, qs)) : g("", !0)
4376
- ])) : (n(), i("svg", Zs, [
4377
- gl(ma, {
4378
- plot: { x: 6, y: 6 },
4379
- radius: 5,
4380
- color: e.color,
4381
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(e.shape) ? e.shape : "circle"
4382
- }, null, 8, ["color", "shape"])
4383
- ])),
4384
- S("span", {
4385
- style: L(`color:${t.value.chart.legend.color}`)
4386
- }, xe(e.name), 5)
4387
- ], 10, Ws))), 128))
4388
- ], 4)) : (n(), i("div", {
4389
- key: 1,
4390
- ref_key: "chartLegend",
4391
- ref: Le
4392
- }, [
4393
- le(l.$slots, "legend", { legend: Ge.value }, void 0, !0)
4394
- ], 512))
4395
- ], 8, ["to"])) : g("", !0),
4396
- l.$slots.source ? (n(), i("div", {
4397
- key: 7,
4398
- ref_key: "source",
4399
- ref: mt,
4400
- dir: "auto"
4401
- }, [
4402
- le(l.$slots, "source", {}, void 0, !0)
4403
- ], 512)) : g("", !0),
4404
- gl(m(ce), {
4405
- show: p.value.showTooltip && bl.value,
4406
- backgroundColor: t.value.chart.tooltip.backgroundColor,
4407
- color: t.value.chart.tooltip.color,
4408
- fontSize: t.value.chart.tooltip.fontSize,
4409
- borderRadius: t.value.chart.tooltip.borderRadius,
4410
- borderColor: t.value.chart.tooltip.borderColor,
4411
- borderWidth: t.value.chart.tooltip.borderWidth,
4412
- backgroundOpacity: t.value.chart.tooltip.backgroundOpacity,
4413
- position: t.value.chart.tooltip.position,
4414
- offsetY: t.value.chart.tooltip.offsetY,
4415
- parent: l.$refs.chart,
4416
- content: Eo.value,
4417
- isFullscreen: Re.value,
4418
- isCustom: t.value.chart.tooltip.customFormat && typeof t.value.chart.tooltip.customFormat == "function",
4419
- smooth: t.value.chart.tooltip.smooth,
4420
- backdropFilter: t.value.chart.tooltip.backdropFilter,
4421
- smoothForce: t.value.chart.tooltip.smoothForce,
4422
- smoothSnapThreshold: t.value.chart.tooltip.smoothSnapThreshold
4423
- }, {
4424
- "tooltip-before": Me(() => [
4425
- le(l.$slots, "tooltip-before", Gt(hl({ ...ja.value })), void 0, !0)
4426
- ]),
4427
- "tooltip-after": Me(() => [
4428
- le(l.$slots, "tooltip-after", Gt(hl({ ...ja.value })), void 0, !0)
4429
- ]),
4430
- _: 3
4431
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
4432
- At.value && t.value.chart.userOptions.buttons.table ? (n(), vt(on(Yl.value.component), Ut({ key: 8 }, Yl.value.props, {
4433
- ref_key: "tableUnit",
4434
- ref: Qe,
4435
- onClose: vo
4436
- }), xo({
4437
- content: Me(() => [
4438
- S("div", {
4439
- style: L(`${m(et) || t.value.table.useDialog ? "" : "max-height:400px"};${t.value.table.useDialog ? "height: fit-content; " : ""};overflow:auto;width:100%;${t.value.table.useDialog ? "" : "margin-top:48px"}`)
4440
- }, [
4441
- S("div", Ks, [
4442
- Oa(S("input", {
4443
- type: "checkbox",
4444
- "onUpdate:modelValue": s[4] || (s[4] = (e) => De.value = e)
4445
- }, null, 512), [
4446
- [nn, De.value]
4447
- ]),
4448
- S("div", {
4449
- onClick: s[5] || (s[5] = (e) => De.value = !De.value),
4450
- style: { cursor: "pointer" }
4451
- }, [
4452
- gl(m(me), {
4453
- name: "chartLine",
4454
- size: 20,
4455
- stroke: t.value.chart.color
4456
- }, null, 8, ["stroke"])
4457
- ])
4458
- ]),
4459
- De.value ? (n(), vt(m(Ll), {
4460
- key: `sparkline_${xt.value}`,
4461
- dataset: Fo.value,
4462
- config: Ro.value
4463
- }, null, 8, ["dataset", "config"])) : (n(), vt(m(Fe), {
4464
- key: `table_${Il.value}`,
4465
- colNames: ca.value.colNames,
4466
- head: ca.value.head,
4467
- body: ca.value.body,
4468
- config: ca.value.config,
4469
- title: t.value.table.useDialog ? "" : Yl.value.title,
4470
- withCloseButton: !t.value.table.useDialog,
4471
- onClose: vo
4472
- }, {
4473
- th: Me(({ th: e }) => [
4474
- S("div", { innerHTML: e }, null, 8, Js)
4475
- ]),
4476
- td: Me(({ td: e }) => [
4477
- bo(xe(isNaN(Number(e)) ? e : m(_t)({
4478
- p: t.value.chart.labels.prefix,
4479
- v: e,
4480
- s: t.value.chart.labels.suffix,
4481
- r: t.value.table.rounding
4482
- })), 1)
4483
- ]),
4484
- _: 1
4485
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
4486
- ], 4)
4487
- ]),
4488
- _: 2
4489
- }, [
4490
- t.value.table.useDialog ? {
4491
- name: "title",
4492
- fn: Me(() => [
4493
- bo(xe(Yl.value.title), 1)
4494
- ]),
4495
- key: "0"
4496
- } : void 0,
4497
- t.value.table.useDialog ? {
4498
- name: "actions",
4499
- fn: Me(() => [
4500
- S("button", {
4501
- tabindex: "0",
4502
- class: "vue-ui-user-options-button",
4503
- onClick: s[3] || (s[3] = (e) => za(t.value.chart.userOptions.callbacks.csv))
4504
- }, [
4505
- gl(m(me), {
4506
- name: "excel",
4507
- stroke: Yl.value.props.color
4508
- }, null, 8, ["stroke"])
4509
- ])
4510
- ]),
4511
- key: "1"
4512
- } : void 0
4513
- ]), 1040)) : g("", !0),
4514
- m(be) ? (n(), vt($n, { key: 9 })) : g("", !0)
4515
- ], 46, $i));
4516
- }
4517
- }, mr = /* @__PURE__ */ Lo(Qs, [["__scopeId", "data-v-9baf1f86"]]);
4518
- export {
4519
- mr as default
4520
- };