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