vue-data-ui 2.15.6-beta.2 → 2.16.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 (91) hide show
  1. package/README.md +43 -0
  2. package/dist/{Arrow-GPO9LVH8.js → Arrow-DxJlDB9C.js} +1 -1
  3. package/dist/{BaseDraggableDialog-DHoNoFHj.js → BaseDraggableDialog-ptA-tymg.js} +2 -2
  4. package/dist/{BaseIcon-Dp9dacYe.js → BaseIcon-C_4Rt67h.js} +1 -1
  5. package/dist/{ColorPicker-BzhOo1ot.js → ColorPicker-RSAHpYAS.js} +2 -2
  6. package/dist/{DataTable-DTw4Wb-0.js → DataTable-DH1qIr9V.js} +2 -2
  7. package/dist/{Legend-C6hgGuRg.js → Legend-DRRDpFh2.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-WVx3nUz9.js → NonSvgPenAndPaper-BOLmbvp3.js} +3 -3
  9. package/dist/{PackageVersion-BwCRb6li.js → PackageVersion-DdKhk9BJ.js} +2 -2
  10. package/dist/{PenAndPaper-wPLe65BY.js → PenAndPaper-CRZSYHVX.js} +3 -3
  11. package/dist/{Shape-CN9mpcil.js → Shape-BoeIXAWe.js} +1 -1
  12. package/dist/{Slicer-C2-pp00y.js → Slicer-CSRvxGa5.js} +2 -2
  13. package/dist/{SparkTooltip-C77TZ8Uu.js → SparkTooltip-BSSLhdaq.js} +1 -1
  14. package/dist/{Title-DWUBnGSS.js → Title-Dxc8Xaru.js} +1 -1
  15. package/dist/{Tooltip-D9Jx-sTW.js → Tooltip-BC4_CO4g.js} +1 -1
  16. package/dist/{UserOptions-CSbWEsAB.js → UserOptions-D5GkhjeU.js} +2 -2
  17. package/dist/{dom-to-png-BroHXPrj.js → dom-to-png-3RI__D49.js} +1 -1
  18. package/dist/{img-F41ob8sE.js → img-Bk3lHRQt.js} +1 -1
  19. package/dist/{index-C105UlW4.js → index-CVxAE1Qc.js} +21 -20
  20. package/dist/{pdf-CLOacSiV.js → pdf-CaadJrGW.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +100 -11
  23. package/dist/types/vue-data-ui.d.ts +100 -11
  24. package/dist/{useNestedProp-Ik0O2Bx-.js → useNestedProp-yHcl2Qv-.js} +1 -1
  25. package/dist/{usePrinter-DHkpNryF.js → usePrinter-D-4Ffa-i.js} +2 -2
  26. package/dist/{vue-data-ui-BetYP3GL.js → vue-data-ui-Bc92n--W.js} +63 -63
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-vr7kJvPq.js → vue-ui-3d-bar-6A2PA5X3.js} +5 -5
  29. package/dist/{vue-ui-accordion-K6A5AUee.js → vue-ui-accordion-OTQS2IW6.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-CQZsYtIG.js → vue-ui-age-pyramid-k9NdJIQs.js} +5 -5
  31. package/dist/{vue-ui-annotator-1MhSI4z-.js → vue-ui-annotator-oBoCJwq7.js} +2 -2
  32. package/dist/{vue-ui-bullet-Do_o6iLD.js → vue-ui-bullet-CKo1pjMc.js} +6 -6
  33. package/dist/{vue-ui-candlestick-D-ybMgD_.js → vue-ui-candlestick-DMEmIiUl.js} +6 -6
  34. package/dist/{vue-ui-carousel-table-BRcrLgj5.js → vue-ui-carousel-table-CerLckm9.js} +4 -4
  35. package/dist/{vue-ui-chestnut-Csk6O9Q4.js → vue-ui-chestnut-CbOmjyl9.js} +4 -4
  36. package/dist/{vue-ui-chord-BdZdfK0m.js → vue-ui-chord-wKA4GJin.js} +7 -7
  37. package/dist/{vue-ui-circle-pack-DO812sqD.js → vue-ui-circle-pack-Du_EwmFM.js} +5 -5
  38. package/dist/{vue-ui-cursor-epDxzf8G.js → vue-ui-cursor-LsO6mxm2.js} +2 -2
  39. package/dist/{vue-ui-dashboard-Do2xCA9Q.js → vue-ui-dashboard-uYvDgfup.js} +62 -62
  40. package/dist/{vue-ui-digits-DqShjFp6.js → vue-ui-digits-BEDQ4U3-.js} +2 -2
  41. package/dist/{vue-ui-donut-FpeRestz.js → vue-ui-donut-CNqFLCTB.js} +7 -7
  42. package/dist/{vue-ui-donut-evolution-BY73RgZ3.js → vue-ui-donut-evolution-D55rGHJV.js} +7 -7
  43. package/dist/{vue-ui-dumbbell-BOI6x_Ij.js → vue-ui-dumbbell-CrbLRiu-.js} +6 -6
  44. package/dist/{vue-ui-flow-BWPa5r7C.js → vue-ui-flow-C3DXSQoY.js} +6 -6
  45. package/dist/{vue-ui-funnel-BCxfFUuh.js → vue-ui-funnel-DSBxYb6k.js} +5 -5
  46. package/dist/{vue-ui-galaxy-soaioiR4.js → vue-ui-galaxy-CqKIg-rc.js} +4 -4
  47. package/dist/{vue-ui-gauge-DZseh5v-.js → vue-ui-gauge-Dtomr8t9.js} +5 -5
  48. package/dist/{vue-ui-gizmo-DeiUC9d9.js → vue-ui-gizmo-CO3p3p_3.js} +3 -3
  49. package/dist/{vue-ui-heatmap-DOq6z5Pk.js → vue-ui-heatmap-BI8PLPtn.js} +6 -6
  50. package/dist/{vue-ui-history-plot-wO4-9pBn.js → vue-ui-history-plot-DQ8_78yX.js} +6 -6
  51. package/dist/{vue-ui-kpi-Dn2POQ3e.js → vue-ui-kpi-DLh1H9Tx.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-0UYyx9Dg.js → vue-ui-mini-loader-d5fyINYa.js} +2 -2
  53. package/dist/{vue-ui-molecule-vpvPqHVo.js → vue-ui-molecule-Bb-t7Jvr.js} +4 -4
  54. package/dist/{vue-ui-mood-radar-9aeno5kE.js → vue-ui-mood-radar-CItSFvA-.js} +6 -6
  55. package/dist/{vue-ui-nested-donuts-AmFbOphT.js → vue-ui-nested-donuts-hc8hNcKU.js} +6 -6
  56. package/dist/{vue-ui-onion-JdjIjDQC.js → vue-ui-onion-B3n29xo3.js} +6 -6
  57. package/dist/{vue-ui-parallel-coordinate-plot-D59xe2YN.js → vue-ui-parallel-coordinate-plot-Bw5e6CMy.js} +7 -7
  58. package/dist/{vue-ui-quadrant-CfoSpAi2.js → vue-ui-quadrant-DYgN6P0V.js} +7 -7
  59. package/dist/{vue-ui-quick-chart-B4_MecKf.js → vue-ui-quick-chart-Dw2-YckC.js} +5 -5
  60. package/dist/{vue-ui-radar-v0Q9MUEh.js → vue-ui-radar-BVaP7LwG.js} +6 -6
  61. package/dist/{vue-ui-rating-brp_e1ob.js → vue-ui-rating-CQQimLsh.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-BpymSYy8.js → vue-ui-relation-circle-DSOzKaPS.js} +5 -5
  63. package/dist/{vue-ui-ridgeline-Cx43R6kA.js → vue-ui-ridgeline-CQe9ZeC1.js} +7 -7
  64. package/dist/{vue-ui-rings-Dmkr02rA.js → vue-ui-rings-4HpaWVvw.js} +7 -7
  65. package/dist/{vue-ui-scatter-BTxr3JPV.js → vue-ui-scatter-Ck-XaEUb.js} +7 -7
  66. package/dist/{vue-ui-skeleton-Czaz-GOG.js → vue-ui-skeleton-CngL8NX6.js} +3 -3
  67. package/dist/{vue-ui-smiley-DRKM1rUy.js → vue-ui-smiley-DXBpPiOD.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-B-uovzwr.js → vue-ui-spark-trend-hfl74frB.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-DDrnMfDT.js → vue-ui-sparkbar-CWl_FGtY.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-DVMLiVoM.js → vue-ui-sparkgauge-DS-pJjbj.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-B7nOLC8V.js → vue-ui-sparkhistogram-B2VBewT2.js} +4 -4
  72. package/dist/{vue-ui-sparkline-mv7V-Q7J.js → vue-ui-sparkline-Dnt5PMGA.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-q2kY6_ik.js → vue-ui-sparkstackbar-CYLHafTS.js} +3 -3
  74. package/dist/{vue-ui-stackbar-DuhMhx3T.js → vue-ui-stackbar-1N7NhmtT.js} +8 -8
  75. package/dist/{vue-ui-strip-plot-CC0Apm9f.js → vue-ui-strip-plot-B_RvzXNO.js} +6 -6
  76. package/dist/{vue-ui-table-heatmap-DZf-J-y8.js → vue-ui-table-heatmap-Di5ymmvG.js} +5 -5
  77. package/dist/{vue-ui-table-DElqsOIB.js → vue-ui-table-lX2V9h7J.js} +3 -3
  78. package/dist/{vue-ui-table-sparkline-B_ZgXOh0.js → vue-ui-table-sparkline-eYNRFxNH.js} +4 -4
  79. package/dist/{vue-ui-thermometer-CNhHV_Ib.js → vue-ui-thermometer-BYc5OpKO.js} +5 -5
  80. package/dist/{vue-ui-timer-DgtXozNk.js → vue-ui-timer-8y6KLjU2.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-D2GTp4h2.js → vue-ui-tiremarks-CgBQYwuT.js} +5 -5
  82. package/dist/{vue-ui-treemap-Bn5mp_h4.js → vue-ui-treemap-BaPv0JXG.js} +7 -7
  83. package/dist/{vue-ui-vertical-bar-Ds6AkgMG.js → vue-ui-vertical-bar-D-KieI-N.js} +8 -8
  84. package/dist/{vue-ui-waffle-D4zF3R48.js → vue-ui-waffle-DTXUhV-1.js} +7 -7
  85. package/dist/{vue-ui-wheel-Cm_KcJZD.js → vue-ui-wheel-CyLaYzIA.js} +5 -5
  86. package/dist/{vue-ui-word-cloud-BKim6GYT.js → vue-ui-word-cloud-vwfccReT.js} +5 -5
  87. package/dist/{vue-ui-world-DDEUK5Uv.js → vue-ui-world-Bm7I4XLt.js} +5 -5
  88. package/dist/vue-ui-xy-CO-EfhIw.js +3082 -0
  89. package/dist/{vue-ui-xy-canvas-EdHc0Zci.js → vue-ui-xy-canvas-DqZ3KKxB.js} +7 -7
  90. package/package.json +1 -1
  91. package/dist/vue-ui-xy-Bi4XIob2.js +0 -3128
@@ -1,3128 +0,0 @@
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-C105UlW4.js";
2
- import { u as je } from "./useMouse-AicQS8Vf.js";
3
- import { u as re } from "./useNestedProp-Ik0O2Bx-.js";
4
- import { u as $e } from "./useTimeLabels-Mrr0jrpL.js";
5
- import { defineAsyncComponent as Z, resolveComponent as X, createElementBlock as i, openBlock as r, normalizeStyle as _, normalizeClass as j, createBlock as U, createCommentVNode as u, 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 ie, withDirectives as tt, vModelCheckbox as lt, createTextVNode as st } from "vue";
6
- import { S as at } from "./Slicer-C2-pp00y.js";
7
- import rt from "./Title-DWUBnGSS.js";
8
- import { _ as it } from "./Shape-CN9mpcil.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: rt,
30
- // Must be ready in responsive mode
31
- Shape: it,
32
- DataTable: Z(() => import("./DataTable-DTw4Wb-0.js")),
33
- Tooltip: Z(() => import("./Tooltip-D9Jx-sTW.js")),
34
- UserOptions: Z(() => import("./UserOptions-CSbWEsAB.js")),
35
- BaseIcon: Z(() => import("./BaseIcon-Dp9dacYe.js")),
36
- TableSparkline: Z(() => import("./vue-ui-table-sparkline-B_ZgXOh0.js")),
37
- Skeleton: Z(() => import("./vue-ui-skeleton-Czaz-GOG.js")),
38
- Accordion: Z(() => import("./vue-ui-accordion-K6A5AUee.js")),
39
- PackageVersion: Z(() => import("./PackageVersion-BwCRb6li.js")),
40
- PenAndPaper: Z(() => import("./PenAndPaper-wPLe65BY.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)), h = {
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: h,
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((h) => this.largestTriangleThreeBucketsArray({
145
- data: h.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)), h = [];
188
- for (let l = 0; l < n; l += 1)
189
- h.push(s.map((e) => e.series[l] || 0).reduce((e, a) => (e || 0) + (a || 0), 0));
190
- const f = Math.min(...h);
191
- return h.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
- })), h = 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, ...h], 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((A) => ({
251
- y: A >= 0 ? e.zero - e.individualHeight * (A / e.max) : e.zero + e.individualHeight * Math.abs(A) / e.max,
252
- value: A
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 h = 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: h.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((h) => h + 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((h) => [void 0, null].includes(h) ? 0 : h);
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((h) => h + 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, (h) => h.scaleLabel), n = {};
380
- for (const [h, f] of Object.entries(s)) {
381
- const l = f.flatMap((e) => e.absoluteValues);
382
- n[h] = {
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, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (n - 1) : 0, e = this.drawingArea.height - l;
392
- return s.filter((a) => a.type === "bar").map((a, A) => {
393
- this.checkAutoScaleError(a);
394
- const M = this.scaleGroups[a.scaleLabel].min, w = this.scaleGroups[a.scaleLabel].max;
395
- a.absoluteValues.filter((C) => ![null, void 0].includes(C)).map((C) => (C - M) / (w - M));
396
- const N = {
397
- valueMin: M,
398
- valueMax: w < 0 ? 0 : w
399
- }, F = {
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
- }, v = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, m = 1.0000001, L = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(F.min, F.max === F.min ? F.max * m : F.max, v) : this.calculateNiceScaleWithExactExtremes(F.min, F.max === F.min ? F.max * m : F.max, v), b = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v) : this.calculateNiceScaleWithExactExtremes(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v), p = L.min >= 0 ? 0 : Math.abs(L.min), B = 0, t = L.max + p, o = b.max + Math.abs(B), c = a.stackIndex, g = n - 1 - c, z = f ? 1 - a.cumulatedStackRatio : 0, S = f ? e * z + h * g : 0, k = f ? e * a.stackRatio : this.drawingArea.height, T = this.drawingArea.bottom - S - k * p / 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] + p) / 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 * A + this.slot.bar * P * E - this.barSlot / 2 - A * 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 * A + 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, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (n - 1) : 0, e = this.drawingArea.height - l;
458
- return s.filter((a) => a.type === "line").map((a, A) => {
459
- this.checkAutoScaleError(a);
460
- const M = this.scaleGroups[a.scaleLabel].min, w = this.scaleGroups[a.scaleLabel].max;
461
- a.absoluteValues.filter((y) => ![null, void 0].includes(y)).map((y) => (y - M) / (w - M));
462
- const N = {
463
- valueMin: M,
464
- valueMax: w
465
- }, F = {
466
- max: a.scaleMax || Math.max(...a.absoluteValues) || 1,
467
- min: a.scaleMin || (Math.min(...a.absoluteValues) > 0 ? 0 : Math.min(...a.absoluteValues))
468
- }, v = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, m = 1.0000001, L = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(F.min, F.max === F.min ? F.max * m : F.max, v) : this.calculateNiceScaleWithExactExtremes(F.min, F.max === F.min ? F.max * m : F.max, v), b = this.FINAL_CONFIG.chart.grid.labels.yAxis.useNiceScale ? this.calculateNiceScale(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v) : this.calculateNiceScaleWithExactExtremes(N.valueMin, N.valueMax === N.valueMin ? N.valueMax * m : N.valueMax, v), p = L.min >= 0 ? 0 : Math.abs(L.min), B = 0, t = L.max + Math.abs(p), o = b.max + Math.abs(B), c = a.stackIndex, g = n - 1 - c, z = f ? 1 - a.cumulatedStackRatio : 0, S = f ? e * z + h * g : 0, k = f ? e * a.stackRatio : this.drawingArea.height, T = this.drawingArea.bottom - S - k * p / t, Y = this.drawingArea.bottom - S - k * B / o, E = a.series.map((y, H) => {
469
- const he = this.mutableConfig.useIndividualScale ? (a.absoluteValues[H] + Math.abs(p)) / t : this.ratioToMax(y);
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((y) => b.min >= 0 ? (y - Math.abs(b.min)) / (b.max - Math.abs(b.min)) : (y + Math.abs(b.min)) / (b.max + Math.abs(b.min))), W = a.series.map((y, 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((y) => y.value !== null)), O = this.FINAL_CONFIG.line.cutNullValues ? this.createSmoothPathWithCuts(W) : this.createSmoothPath(W.filter((y) => y.value !== null)), V = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(E) : this.createStraightPath(E.filter((y) => y.value !== null)), C = this.FINAL_CONFIG.line.cutNullValues ? this.createStraightPathWithCuts(W) : this.createStraightPath(W.filter((y) => y.value !== null)), P = L.ticks.map((y) => ({
487
- y: y >= 0 ? T - k * (y / t) : T + k * Math.abs(y) / t,
488
- value: y,
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((y) => {
493
- const H = (y - b.min) / (b.max - b.min);
494
- return {
495
- y: y >= 0 ? Y - k * H : Y + k * H,
496
- value: y,
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((y) => y.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((y) => y.value !== null) : E.filter((y) => y.value !== null),
520
- se
521
- ) : this.createIndividualArea(E.filter((y) => y.value !== null), se) : "",
522
- curveAreas: a.useArea ? ce(
523
- a.autoScaling ? this.FINAL_CONFIG.line.cutNullValues ? W : W.filter((y) => y.value !== null) : this.FINAL_CONFIG.line.cutNullValues ? E : E.filter((y) => y.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, h = this.FINAL_CONFIG.chart.grid.labels.yAxis.gap, f = this.mutableConfig.isStacked, l = f ? h * (n - 1) : 0, e = this.drawingArea.height - l;
534
- return s.filter((a) => a.type === "plot").map((a) => {
535
- this.checkAutoScaleError(a);
536
- const A = this.scaleGroups[a.scaleLabel].min, M = this.scaleGroups[a.scaleLabel].max;
537
- a.absoluteValues.filter((O) => ![null, void 0].includes(O)).map((O) => (O - A) / (M - A));
538
- const w = {
539
- valueMin: A,
540
- valueMax: M
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
- }, F = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, v = 1.0000001, m = this.calculateNiceScaleWithExactExtremes(N.min, N.max === N.min ? N.max * v : N.max, F), L = this.calculateNiceScaleWithExactExtremes(w.valueMin, w.valueMax === w.valueMin ? w.valueMax * v : w.valueMax, F), b = m.min >= 0 ? 0 : Math.abs(m.min), p = 0, B = m.max + b, t = L.max + Math.abs(p), o = a.stackIndex, c = n - 1 - o, g = f ? 1 - a.cumulatedStackRatio : 0, z = f ? e * g + h * c : 0, S = f ? e * a.stackRatio : this.drawingArea.height, k = this.drawingArea.bottom - z - S * b / B, T = this.drawingArea.bottom - z - S * p / 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 A = a.scaleLabel || "__noScaleLabel__";
592
- e.add(A);
593
- }), e.size;
594
- }
595
- const n = s(this.absoluteDataset.filter((l) => !this.segregatedSeries.includes(l.id))), h = 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 + h + 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 + h + 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((h) => ({
650
- label: h.name,
651
- color: h.color,
652
- type: h.type
653
- })), n = [];
654
- return this.timeLabels.forEach((h, f) => {
655
- const l = [h.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 h = [];
666
- for (let e = 0; e < this.maxSeries; e += 1) {
667
- const a = this.relativeDataset.map((A) => A.absoluteValues[e] ?? 0).reduce((A, M) => A + M, 0);
668
- h.push(
669
- [
670
- this.timeLabels[e].text ?? "-"
671
- ].concat(this.relativeDataset.map(
672
- (A) => this.applyDataLabel(
673
- A.type === "line" ? this.FINAL_CONFIG.line.labels.formatter : A.type === "bar" ? this.FINAL_CONFIG.bar.labels.formatter : this.FINAL_CONFIG.plot.labels.formatter,
674
- A.absoluteValues[e] ?? 0,
675
- this.dataLabel({
676
- p: A.prefix || this.FINAL_CONFIG.chart.labels.prefix,
677
- v: A.absoluteValues[e] ?? 0,
678
- s: A.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: h, 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, h) => h === 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 h = 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
- }) : (h && h.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%">${h.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: h, right: f } = this.drawingArea, l = this.zero, e = this.drawingArea.height, a = this.niceScale.min, M = this.niceScale.max - a, w = (N) => {
826
- const F = (N - 0) / M;
827
- return l - F * e;
828
- };
829
- return n.map((N) => {
830
- const { yAxis: { yTop: F, yBottom: v, label: m } } = N, L = F != null && v != null && F !== v, b = F == null ? null : w(F), p = v == null ? null : w(v), 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" ? h + m.padding.left : f - m.padding.right) + m.offsetX, z = (b != null && p != null ? Math.min(b, p) : b ?? p) - 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, p, k].includes(NaN),
838
- id: `annotation_y_${this.createUid()}`,
839
- hasArea: L,
840
- areaHeight: L ? Math.abs(b - p) : 0,
841
- yTop: b,
842
- yBottom: p,
843
- config: N.yAxis,
844
- x1: h,
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: re,
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, h) {
919
- if (!this._textMeasurer) {
920
- const f = document.createElement("canvas");
921
- this._textMeasurer = f.getContext("2d");
922
- }
923
- return this._textMeasurer.font = `${h || "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, h, f, l) {
930
- h && (this.tagRefs[`${s}_${n}_${f}_${l}`] = h);
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 h = 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: h,
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), h = 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: h
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((h) => re({
971
- defaultConfig: s.chart.annotations[0],
972
- userConfig: h
973
- })) : n.chart.annotations = [], n.theme ? {
974
- ...re({
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
- 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 h = this.fontSizes.plotLabels;
987
- let f = 0;
988
- this.$refs.yAxisLabel && (f += this.$refs.yAxisLabel.getBBox().width);
989
- let l = 0;
990
- this.$refs.xAxisLabel && (l += this.$refs.xAxisLabel.getBBox().height + this.fontSizes.yAxis + this.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY), this.viewBox = `0 0 ${this.width} ${this.height}`, this.$nextTick(() => {
991
- const { x: e, y: a, width: A, height: M } = s.getBBox();
992
- if (this.viewBox = `${e - f} ${a - h} ${A + f} ${M + h + l}`, this.$refs.scaleLabels) {
993
- const { x: w, width: N } = this.$refs.scaleLabels.getBBox();
994
- this.scaleBox.x = w, this.scaleBox.width = N;
995
- } else
996
- this.scaleBox.x = this.drawingArea.left;
997
- 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;
998
- }), n && n.classList.remove("no-transition");
999
- },
1000
- prepareChart() {
1001
- if (this.objectIsEmpty(this.dataset) ? this.error({
1002
- componentName: "VueUiXy",
1003
- type: "dataset"
1004
- }) : this.dataset.forEach((s, n) => {
1005
- [null, void 0].includes(s.name) && this.error({
1006
- componentName: "VueUiXy",
1007
- type: "datasetSerieAttribute",
1008
- property: "name (string)",
1009
- index: n
1010
- });
1011
- }), this.FINAL_CONFIG.showWarnings && this.dataset.forEach((s) => {
1012
- s.series.forEach((n, h) => {
1013
- this.isSafeValue(n) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
1014
- -----> The serie '${s.name}' contains the value '${n}' at index ${h}.
1015
- '${n}' was converted to null to allow the chart to display.`);
1016
- });
1017
- }), 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 = {
1018
- dataLabels: {
1019
- show: !0
1020
- },
1021
- showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
1022
- showTable: this.FINAL_CONFIG.showTable === !0,
1023
- isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
1024
- useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
1025
- }, this.FINAL_CONFIG.responsive) {
1026
- const n = this.$refs.chart.parentNode;
1027
- this.resizeObserver && (this.resizeObserver.unobserve(this.observedEl), this.resizeObserver.disconnect());
1028
- const { height: h, width: f } = n.getBoundingClientRect();
1029
- let l = null, e = 0;
1030
- this.FINAL_CONFIG.chart.title.show && this.$refs.chartTitle && (l = this.$refs.chartTitle, e = l.getBoundingClientRect().height);
1031
- let a = null, A = 0;
1032
- this.FINAL_CONFIG.chart.zoom.show && this.maxX > 6 && this.isDataset && this.$refs.chartSlicer && this.$refs.chartSlicer.$el && (a = this.$refs.chartSlicer.$el, A = a.getBoundingClientRect().height);
1033
- let M = null, w = 0;
1034
- this.FINAL_CONFIG.chart.legend.show && this.$refs.chartLegend && (M = this.$refs.chartLegend, w = M.getBoundingClientRect().height);
1035
- let N = 0;
1036
- this.$refs.source && (N = this.$refs.source.getBoundingClientRect().height);
1037
- let F = 0;
1038
- this.$refs.noTitle && (F = this.$refs.noTitle.getBoundingClientRect().height);
1039
- const v = e + F + A + w + N + 12;
1040
- this.height = h - v, this.width = f, this.convertSizes(), this.$nextTick(this.setViewBox);
1041
- const m = this.$refs.svgRef;
1042
- m && m.setAttribute("height", `calc(100% - ${v}px`);
1043
- const L = new ResizeObserver((b) => {
1044
- for (const p of b)
1045
- this.FINAL_CONFIG.chart.title.show && this.$refs.chartTitle ? e = this.$refs.chartTitle.getBoundingClientRect().height : e = 0, this.$refs.chartSlicer && this.$refs.chartSlicer.$el ? A = this.$refs.chartSlicer.$el.getBoundingClientRect().height : A = 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 ? F = this.$refs.noTitle.getBoundingClientRect().height : F = 0, requestAnimationFrame(() => {
1046
- this.height = Math.max(12, p.contentRect.height - e - w - A - N - F - 12), this.width = Math.max(12, p.contentBoxSize[0].inlineSize), this.convertSizes(), this.$nextTick(this.setViewBox);
1047
- });
1048
- });
1049
- this.resizeObserver = L, this.observedEl = n, L.observe(n);
1050
- } else
1051
- this.height = this.FINAL_CONFIG.chart.height, this.width = this.FINAL_CONFIG.chart.width, 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);
1052
- },
1053
- selectMinimapIndex(s) {
1054
- this.selectedMinimapIndex = s;
1055
- },
1056
- convertSizes() {
1057
- if (!this.FINAL_CONFIG.responsiveProportionalSizing) {
1058
- 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;
1059
- return;
1060
- }
1061
- this.fontSizes.dataLabels = this.translateSize({
1062
- relator: this.height,
1063
- adjuster: 400,
1064
- source: this.FINAL_CONFIG.chart.grid.labels.fontSize,
1065
- threshold: 10,
1066
- fallback: 10
1067
- }), this.fontSizes.yAxis = this.translateSize({
1068
- relator: this.width,
1069
- adjuster: 1e3,
1070
- source: this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,
1071
- threshold: 10,
1072
- fallback: 10
1073
- }), this.fontSizes.xAxis = this.translateSize({
1074
- relator: this.width,
1075
- adjuster: 1e3,
1076
- source: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,
1077
- threshold: 10,
1078
- fallback: 10
1079
- }), this.fontSizes.plotLabels = this.translateSize({
1080
- relator: this.width,
1081
- adjuster: 800,
1082
- source: this.FINAL_CONFIG.chart.labels.fontSize,
1083
- threshold: 10,
1084
- fallback: 10
1085
- }), this.plotRadii.plot = this.translateSize({
1086
- relator: this.width,
1087
- adjuster: 800,
1088
- source: this.FINAL_CONFIG.plot.radius,
1089
- threshold: 1,
1090
- fallback: 1
1091
- }), this.plotRadii.line = this.translateSize({
1092
- relator: this.width,
1093
- adjuster: 800,
1094
- source: this.FINAL_CONFIG.line.radius,
1095
- threshold: 1,
1096
- fallback: 1
1097
- });
1098
- },
1099
- toggleStack() {
1100
- this.mutableConfig.isStacked = !this.mutableConfig.isStacked, this.mutableConfig.isStacked ? this.mutableConfig.useIndividualScale = !0 : this.mutableConfig.useIndividualScale = this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale;
1101
- },
1102
- toggleTable() {
1103
- this.mutableConfig.showTable = !this.mutableConfig.showTable;
1104
- },
1105
- toggleLabels() {
1106
- this.mutableConfig.dataLabels.show = !this.mutableConfig.dataLabels.show;
1107
- },
1108
- toggleTooltip() {
1109
- this.mutableConfig.showTooltip = !this.mutableConfig.showTooltip;
1110
- },
1111
- checkAutoScaleError(s) {
1112
- 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`));
1113
- },
1114
- createArea(s, n) {
1115
- if (!s[0]) return [-10, -10, "", -10, -10];
1116
- const h = { x: s[0].x, y: n }, f = { x: s.at(-1).x, y: n }, l = [];
1117
- return s.forEach((e) => {
1118
- l.push(`${e.x},${e.y} `);
1119
- }), [h.x, h.y, ...l, f.x, f.y].toString();
1120
- },
1121
- createStar: ae,
1122
- createPolygonPath: q,
1123
- fillArray(s, n) {
1124
- let h = Array(s).fill(0);
1125
- for (let f = 0; f < n.length && f < s; f += 1)
1126
- h[f] = n[f];
1127
- return h;
1128
- },
1129
- async setupSlicer() {
1130
- (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 = {
1131
- start: 0,
1132
- end: Math.max(...this.dataset.map((s) => this.largestTriangleThreeBucketsArray({ data: s.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length))
1133
- }, this.slicerStep += 1);
1134
- },
1135
- refreshSlicer() {
1136
- this.setupSlicer();
1137
- },
1138
- validSlicerEnd(s) {
1139
- const n = Math.max(...this.dataset.map((h) => this.largestTriangleThreeBucketsArray({ data: h.series, threshold: this.FINAL_CONFIG.downsample.threshold }).length));
1140
- 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;
1141
- },
1142
- calcRectHeight(s) {
1143
- 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;
1144
- 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);
1145
- },
1146
- calcIndividualHeight(s) {
1147
- 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);
1148
- },
1149
- calcRectWidth() {
1150
- return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.slot.line - this.drawingArea.width / this.maxSeries * 0.1 : this.slot.bar;
1151
- },
1152
- calcRectX(s) {
1153
- return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? s.x + this.drawingArea.width / this.maxSeries * 0.05 : s.x + this.slot.bar / 2;
1154
- },
1155
- calcRectY(s) {
1156
- return s.value >= 0 ? s.y : this.zero;
1157
- },
1158
- calcIndividualRectY(s) {
1159
- return s.value >= 0 ? s.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(s.zeroPosition) ? 0 : s.zeroPosition;
1160
- },
1161
- canShowValue(s) {
1162
- return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(s);
1163
- },
1164
- findClosestValue(s, n) {
1165
- let h = n[0], f = Math.abs(s - n[0]);
1166
- for (let l = 1; l < n.length; l += 1) {
1167
- const e = Math.abs(s - n[l]);
1168
- e < f && n[l] < s && (h = n[l], f = e);
1169
- }
1170
- return h;
1171
- },
1172
- ratioToMax(s) {
1173
- return s / (this.canShowValue(this.absoluteMax) ? this.absoluteMax : 1);
1174
- },
1175
- selectX(s) {
1176
- this.$emit(
1177
- "selectX",
1178
- {
1179
- dataset: this.relativeDataset.map((n) => ({
1180
- name: n.name,
1181
- value: [null, void 0, NaN].includes(n.absoluteValues[s]) ? null : n.absoluteValues[s],
1182
- color: n.color,
1183
- type: n.type
1184
- })),
1185
- index: s,
1186
- indexLabel: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[s]
1187
- }
1188
- );
1189
- },
1190
- getData() {
1191
- return this.absoluteDataset.map((s) => ({
1192
- values: s.absoluteValues,
1193
- color: s.color,
1194
- name: s.name,
1195
- type: s.type
1196
- }));
1197
- },
1198
- segregate(s) {
1199
- if (this.segregatedSeries.includes(s.id))
1200
- this.segregatedSeries = this.segregatedSeries.filter((n) => n !== s.id);
1201
- else {
1202
- if (this.segregatedSeries.length + 1 === this.safeDataset.length) return;
1203
- this.segregatedSeries.push(s.id);
1204
- }
1205
- this.$emit("selectLegend", this.relativeDataset.map((n) => ({
1206
- name: n.name,
1207
- values: n.absoluteValues,
1208
- color: n.color,
1209
- type: n.type
1210
- }))), this.segregateStep += 1;
1211
- },
1212
- toggleTooltipVisibility(s, n = null) {
1213
- this.isTooltip = s, s ? this.selectedSerieIndex = n : this.selectedSerieIndex = null;
1214
- },
1215
- toggleFullscreen(s) {
1216
- this.isFullscreen = s, this.step += 1;
1217
- },
1218
- showSpinnerPdf() {
1219
- this.isPrinting = !0;
1220
- },
1221
- async generatePdf() {
1222
- this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
1223
- try {
1224
- const { default: s } = await import("./pdf-CLOacSiV.js");
1225
- await s({
1226
- domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
1227
- fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
1228
- options: this.FINAL_CONFIG.chart.userOptions.print
1229
- });
1230
- } catch (s) {
1231
- console.error("Error generating PDF:", s);
1232
- } finally {
1233
- this.isPrinting = !1;
1234
- }
1235
- }, 100);
1236
- },
1237
- generateCsv(s = null) {
1238
- const n = [[this.FINAL_CONFIG.chart.title.text], [this.FINAL_CONFIG.chart.title.subtitle.text], [""]], h = ["", ...this.table.head.map((a) => a.label)], f = this.table.body, l = n.concat([h]).concat(f), e = this.createCsvContent(l);
1239
- s ? s(e) : this.downloadCsv({ csvContent: e, title: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy" });
1240
- },
1241
- showSpinnerImage() {
1242
- this.isImaging = !0;
1243
- },
1244
- async generateImage() {
1245
- this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
1246
- try {
1247
- const { default: s } = await import("./img-F41ob8sE.js");
1248
- await s({
1249
- domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
1250
- fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
1251
- format: "png",
1252
- options: this.FINAL_CONFIG.chart.userOptions.print
1253
- });
1254
- } catch (s) {
1255
- console.error("Error generating image:", s);
1256
- } finally {
1257
- this.isImaging = !1;
1258
- }
1259
- }, 100);
1260
- }
1261
- }
1262
- }, ht = ["id"], ut = {
1263
- key: 1,
1264
- ref: "noTitle",
1265
- class: "vue-data-ui-no-title-space",
1266
- style: "height:36px; width: 100%; background:transparent"
1267
- }, 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"], rl = {
1268
- key: 4,
1269
- ref: "scaleLabels"
1270
- }, il = ["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"], rs = ["id"], is = ["stop-color"], ns = ["stop-color"], cs = ["x", "y", "width", "height", "fill", "onMouseenter"], os = ["font-size", "fill", "transform"], hs = ["x", "y", "font-size", "fill"], us = {
1271
- key: 12,
1272
- ref: "timeLabels"
1273
- }, 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 = {
1274
- key: 14,
1275
- style: { "pointer-events": "none" }
1276
- }, _s = ["x", "y"], ys = ["cx", "cy", "r", "fill"], As = {
1277
- key: 5,
1278
- class: "vue-data-ui-watermark"
1279
- }, Ls = {
1280
- class: "vue-ui-xy-tag-arrow",
1281
- height: "20",
1282
- viewBox: "0 0 10 20",
1283
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
1284
- }, Cs = ["fill"], Ss = ["innerHTML"], ks = {
1285
- class: "vue-ui-xy-tag-arrow",
1286
- height: "100%",
1287
- viewBox: "0 0 10 20",
1288
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
1289
- }, ws = ["fill"], Os = ["innerHTML"], Gs = {
1290
- class: "vue-ui-xy-tag-arrow",
1291
- height: "20",
1292
- viewBox: "0 0 10 20",
1293
- style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
1294
- }, vs = ["fill"], ps = ["innerHTML"], Ms = {
1295
- class: "vue-ui-xy-tag-arrow",
1296
- height: "100%",
1297
- viewBox: "0 0 10 20",
1298
- style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
1299
- }, zs = ["fill"], Ts = ["innerHTML"], Vs = ["onClick"], Ps = {
1300
- key: 0,
1301
- viewBox: "0 0 20 12",
1302
- height: "14",
1303
- width: "20"
1304
- }, Rs = ["stroke", "fill"], Bs = {
1305
- key: 1,
1306
- viewBox: "0 0 40 40",
1307
- height: "14",
1308
- width: "14"
1309
- }, Hs = ["fill"], Ds = ["fill"], Es = {
1310
- key: 2,
1311
- viewBox: "0 0 12 12",
1312
- height: "14",
1313
- width: "14"
1314
- }, Ws = {
1315
- key: 9,
1316
- ref: "chartLegend"
1317
- }, Ys = {
1318
- key: 10,
1319
- ref: "source",
1320
- dir: "auto"
1321
- }, Xs = {
1322
- style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
1323
- "data-dom-to-png-ignore": ""
1324
- }, qs = ["innerHTML"];
1325
- function Us(s, n, h, f, l, e) {
1326
- const a = X("PenAndPaper"), A = X("Title"), M = X("UserOptions"), w = X("PackageVersion"), N = X("Shape"), F = X("Skeleton"), v = X("Slicer"), m = X("Tooltip"), L = X("BaseIcon"), b = X("TableSparkline"), p = X("DataTable"), B = X("Accordion");
1327
- return r(), i("div", {
1328
- id: `vue-ui-xy_${l.uniqueId}`,
1329
- class: j(`vue-ui-xy ${l.isFullscreen ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.FINAL_CONFIG.useCssAnimation ? "" : "vue-ui-dna"}`),
1330
- ref: "chart",
1331
- style: _(`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%" : ""}`),
1332
- onMouseenter: n[7] || (n[7] = () => e.setUserOptionsVisibility(!0)),
1333
- onMouseleave: n[8] || (n[8] = () => e.setUserOptionsVisibility(!1))
1334
- }, [
1335
- e.FINAL_CONFIG.chart.userOptions.buttons.annotator ? (r(), U(a, {
1336
- key: 0,
1337
- svgRef: l.svgRef,
1338
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
1339
- color: e.FINAL_CONFIG.chart.color,
1340
- active: l.isAnnotator,
1341
- onClose: e.toggleAnnotator
1342
- }, null, 8, ["svgRef", "backgroundColor", "color", "active", "onClose"])) : u("", !0),
1343
- e.hasOptionsNoTitle ? (r(), i("div", ut, null, 512)) : u("", !0),
1344
- e.FINAL_CONFIG.chart.title.show ? (r(), i("div", {
1345
- key: 2,
1346
- ref: "chartTitle",
1347
- class: "vue-ui-xy-title",
1348
- style: _(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
1349
- }, [
1350
- (r(), U(A, {
1351
- key: `title_${l.titleStep}`,
1352
- config: {
1353
- title: {
1354
- cy: "xy-div-title",
1355
- ...e.FINAL_CONFIG.chart.title
1356
- },
1357
- subtitle: {
1358
- cy: "xy-div-subtitle",
1359
- ...e.FINAL_CONFIG.chart.title.subtitle
1360
- }
1361
- }
1362
- }, null, 8, ["config"]))
1363
- ], 4)) : u("", !0),
1364
- e.FINAL_CONFIG.chart.userOptions.show && e.isDataset && (l.keepUserOptionState || l.userOptionsVisible) ? (r(), U(M, {
1365
- ref: "defails",
1366
- key: `user_options_${l.step}`,
1367
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
1368
- color: e.FINAL_CONFIG.chart.color,
1369
- isPrinting: l.isPrinting,
1370
- isImaging: l.isImaging,
1371
- uid: l.uniqueId,
1372
- hasTooltip: e.FINAL_CONFIG.chart.userOptions.buttons.tooltip && e.FINAL_CONFIG.chart.tooltip.show,
1373
- hasPdf: e.FINAL_CONFIG.chart.userOptions.buttons.pdf,
1374
- hasXls: e.FINAL_CONFIG.chart.userOptions.buttons.csv,
1375
- hasImg: e.FINAL_CONFIG.chart.userOptions.buttons.img,
1376
- hasLabel: e.FINAL_CONFIG.chart.userOptions.buttons.labels,
1377
- hasTable: e.FINAL_CONFIG.chart.userOptions.buttons.table,
1378
- hasStack: h.dataset.length > 1 && e.FINAL_CONFIG.chart.userOptions.buttons.stack,
1379
- hasFullscreen: e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,
1380
- isStacked: l.mutableConfig.isStacked,
1381
- isFullscreen: l.isFullscreen,
1382
- chartElement: s.$refs.chart,
1383
- position: e.FINAL_CONFIG.chart.userOptions.position,
1384
- isTooltip: l.mutableConfig.showTooltip,
1385
- titles: { ...e.FINAL_CONFIG.chart.userOptions.buttonTitles },
1386
- hasAnnotator: e.FINAL_CONFIG.chart.userOptions.buttons.annotator,
1387
- isAnnotation: l.isAnnotator,
1388
- callbacks: e.FINAL_CONFIG.chart.userOptions.callbacks,
1389
- onToggleFullscreen: e.toggleFullscreen,
1390
- onGeneratePdf: e.generatePdf,
1391
- onGenerateCsv: e.generateCsv,
1392
- onGenerateImage: e.generateImage,
1393
- onToggleTable: e.toggleTable,
1394
- onToggleLabels: e.toggleLabels,
1395
- onToggleStack: e.toggleStack,
1396
- onToggleTooltip: e.toggleTooltip,
1397
- onToggleAnnotator: e.toggleAnnotator,
1398
- style: _({
1399
- visibility: l.keepUserOptionState ? l.userOptionsVisible ? "visible" : "hidden" : "visible"
1400
- })
1401
- }, et({ _: 2 }, [
1402
- s.$slots.menuIcon ? {
1403
- name: "menuIcon",
1404
- fn: D(({ isOpen: t, color: o }) => [
1405
- G(s.$slots, "menuIcon", $(ee({ isOpen: t, color: o })), void 0, !0)
1406
- ]),
1407
- key: "0"
1408
- } : void 0,
1409
- s.$slots.optionTooltip ? {
1410
- name: "optionTooltip",
1411
- fn: D(() => [
1412
- G(s.$slots, "optionTooltip", {}, void 0, !0)
1413
- ]),
1414
- key: "1"
1415
- } : void 0,
1416
- s.$slots.optionPdf ? {
1417
- name: "optionPdf",
1418
- fn: D(() => [
1419
- G(s.$slots, "optionPdf", {}, void 0, !0)
1420
- ]),
1421
- key: "2"
1422
- } : void 0,
1423
- s.$slots.optionCsv ? {
1424
- name: "optionCsv",
1425
- fn: D(() => [
1426
- G(s.$slots, "optionCsv", {}, void 0, !0)
1427
- ]),
1428
- key: "3"
1429
- } : void 0,
1430
- s.$slots.optionImg ? {
1431
- name: "optionImg",
1432
- fn: D(() => [
1433
- G(s.$slots, "optionImg", {}, void 0, !0)
1434
- ]),
1435
- key: "4"
1436
- } : void 0,
1437
- s.$slots.optionTable ? {
1438
- name: "optionTable",
1439
- fn: D(() => [
1440
- G(s.$slots, "optionTable", {}, void 0, !0)
1441
- ]),
1442
- key: "5"
1443
- } : void 0,
1444
- s.$slots.optionLabels ? {
1445
- name: "optionLabels",
1446
- fn: D(() => [
1447
- G(s.$slots, "optionLabels", {}, void 0, !0)
1448
- ]),
1449
- key: "6"
1450
- } : void 0,
1451
- s.$slots.optionStack ? {
1452
- name: "optionStack",
1453
- fn: D(() => [
1454
- G(s.$slots, "optionStack", {}, void 0, !0)
1455
- ]),
1456
- key: "7"
1457
- } : void 0,
1458
- s.$slots.optionFullscreen ? {
1459
- name: "optionFullscreen",
1460
- fn: D(({ toggleFullscreen: t, isFullscreen: o }) => [
1461
- G(s.$slots, "optionFullscreen", $(ee({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
1462
- ]),
1463
- key: "8"
1464
- } : void 0,
1465
- s.$slots.optionAnnotator ? {
1466
- name: "optionAnnotator",
1467
- fn: D(({ toggleAnnotator: t, isAnnotator: o }) => [
1468
- G(s.$slots, "optionAnnotator", $(ee({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
1469
- ]),
1470
- key: "9"
1471
- } : void 0
1472
- ]), 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"])) : u("", !0),
1473
- e.isDataset ? (r(), i("svg", {
1474
- key: 4,
1475
- ref: "svgRef",
1476
- xmlns: "http://www.w3.org/2000/svg",
1477
- class: j([{ "vue-data-ui-fullscreen--on": l.isFullscreen, "vue-data-ui-fulscreen--off": !l.isFullscreen }, "vue-ui-xy-svg"]),
1478
- width: "100%",
1479
- viewBox: l.viewBox,
1480
- style: _(`background: transparent; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`),
1481
- "aria-label": e.chartAriaLabel,
1482
- role: "img",
1483
- "aria-live": "polite",
1484
- preserveAspectRatio: "xMidYMid"
1485
- }, [
1486
- I("g", gt, [
1487
- le(w),
1488
- s.$slots["chart-background"] ? (r(), i("foreignObject", {
1489
- key: 0,
1490
- x: Math.max(0, e.drawingArea.left + e.xPadding),
1491
- y: e.drawingArea.top,
1492
- width: Math.max(0, e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries)),
1493
- height: Math.max(0, e.drawingArea.height),
1494
- style: {
1495
- pointerEvents: "none"
1496
- }
1497
- }, [
1498
- G(s.$slots, "chart-background", {}, void 0, !0)
1499
- ], 8, ft)) : u("", !0),
1500
- e.maxSeries > 0 ? (r(), i("g", It, [
1501
- I("g", xt, [
1502
- e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline ? (r(), i("line", {
1503
- key: 0,
1504
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1505
- "stroke-width": "1",
1506
- x1: e.drawingArea.left + e.xPadding,
1507
- x2: e.drawingArea.right - e.xPadding,
1508
- y1: e.forceValidValue(e.drawingArea.bottom),
1509
- y2: e.forceValidValue(e.drawingArea.bottom),
1510
- "stroke-linecap": "round",
1511
- style: { animation: "none !important" }
1512
- }, null, 8, Nt)) : u("", !0),
1513
- l.mutableConfig.useIndividualScale ? e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (r(!0), i(d, { key: 2 }, x(e.allScales, (t) => (r(), i("g", null, [
1514
- t.id === l.selectedScale && t.yLabels.length ? (r(!0), i(d, { key: 0 }, x(t.yLabels, (o) => (r(), i("line", {
1515
- x1: e.drawingArea.left + e.xPadding,
1516
- x2: e.drawingArea.right - e.xPadding,
1517
- y1: e.forceValidValue(o.y),
1518
- y2: e.forceValidValue(o.y),
1519
- stroke: t.color,
1520
- "stroke-width": 0.5,
1521
- "stroke-linecap": "round",
1522
- style: { animation: "none !important" }
1523
- }, null, 8, _t))), 256)) : t.yLabels.length ? (r(!0), i(d, { key: 1 }, x(t.yLabels, (o) => (r(), i("line", {
1524
- x1: e.drawingArea.left + e.xPadding,
1525
- x2: e.drawingArea.right - e.xPadding,
1526
- y1: e.forceValidValue(o.y),
1527
- y2: e.forceValidValue(o.y),
1528
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1529
- "stroke-width": 0.5,
1530
- "stroke-linecap": "round",
1531
- style: { animation: "none !important" }
1532
- }, null, 8, yt))), 256)) : u("", !0)
1533
- ]))), 256)) : u("", !0) : (r(), i(d, { key: 1 }, [
1534
- e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline ? (r(), i("line", {
1535
- key: 0,
1536
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1537
- "stroke-width": "1",
1538
- x1: e.drawingArea.left + e.xPadding,
1539
- x2: e.drawingArea.left + e.xPadding,
1540
- y1: e.forceValidValue(e.drawingArea.top),
1541
- y2: e.forceValidValue(e.drawingArea.bottom),
1542
- "stroke-linecap": "round",
1543
- style: { animation: "none !important" }
1544
- }, null, 8, mt)) : u("", !0),
1545
- e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (r(), i("g", bt, [
1546
- (r(!0), i(d, null, x(e.yLabels, (t) => (r(), i("line", {
1547
- x1: e.drawingArea.left + e.xPadding,
1548
- x2: e.drawingArea.right - e.xPadding,
1549
- y1: e.forceValidValue(t.y),
1550
- y2: e.forceValidValue(t.y),
1551
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1552
- "stroke-width": 0.5,
1553
- "stroke-linecap": "round",
1554
- style: { animation: "none !important" }
1555
- }, null, 8, Ft))), 256))
1556
- ])) : u("", !0)
1557
- ], 64)),
1558
- e.FINAL_CONFIG.chart.grid.showVerticalLines ? (r(), i("g", At, [
1559
- (r(!0), i(d, null, x(e.maxSeries + (e.FINAL_CONFIG.chart.grid.position === "middle" ? 1 : 0), (t, o) => (r(), i("line", {
1560
- key: `grid_vertical_line_${o}`,
1561
- x1: e.drawingArea.width / e.maxSeries * o + e.drawingArea.left + e.xPadding,
1562
- x2: e.drawingArea.width / e.maxSeries * o + e.drawingArea.left + e.xPadding,
1563
- y1: e.forceValidValue(e.drawingArea.top),
1564
- y2: e.forceValidValue(e.drawingArea.bottom),
1565
- "stroke-width": "0.5",
1566
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1567
- style: { animation: "none !important" }
1568
- }, null, 8, Lt))), 128))
1569
- ])) : u("", !0),
1570
- e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (r(), i("g", Ct, [
1571
- (r(!0), i(d, null, x(e.timeLabels, (t, o) => (r(), i("g", {
1572
- key: `time_label_${o}`
1573
- }, [
1574
- 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 ? (r(), i(d, { key: 0 }, [
1575
- e.FINAL_CONFIG.chart.grid.labels.xAxis.showCrosshairs ? (r(), i("line", {
1576
- key: 0,
1577
- 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,
1578
- 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,
1579
- x1: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + e.drawingArea.width / e.maxSeries / 2,
1580
- x2: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + e.drawingArea.width / e.maxSeries / 2,
1581
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1582
- "stroke-width": 1,
1583
- "stroke-linecap": "round",
1584
- style: { animation: "none !important" }
1585
- }, null, 8, St)) : u("", !0)
1586
- ], 64)) : u("", !0)
1587
- ]))), 128))
1588
- ])) : u("", !0)
1589
- ]),
1590
- (r(!0), i(d, null, x(e.barSet, (t, o) => (r(), i("defs", {
1591
- key: `def_rect_${o}`
1592
- }, [
1593
- I("linearGradient", {
1594
- id: `rectGradient_pos_${o}_${l.uniqueId}`,
1595
- x2: "0%",
1596
- y2: "100%"
1597
- }, [
1598
- I("stop", {
1599
- offset: "0%",
1600
- "stop-color": t.color
1601
- }, null, 8, wt),
1602
- I("stop", {
1603
- offset: "62%",
1604
- "stop-color": `${e.shiftHue(t.color, 0.02)}`
1605
- }, null, 8, Ot),
1606
- I("stop", {
1607
- offset: "100%",
1608
- "stop-color": `${e.shiftHue(t.color, 0.05)}`
1609
- }, null, 8, Gt)
1610
- ], 8, kt),
1611
- I("linearGradient", {
1612
- id: `rectGradient_neg_${o}_${l.uniqueId}`,
1613
- x2: "0%",
1614
- y2: "100%"
1615
- }, [
1616
- I("stop", {
1617
- offset: "0%",
1618
- "stop-color": `${e.shiftHue(t.color, 0.05)}`
1619
- }, null, 8, pt),
1620
- I("stop", {
1621
- offset: "38%",
1622
- "stop-color": `${e.shiftHue(t.color, 0.02)}`
1623
- }, null, 8, Mt),
1624
- I("stop", {
1625
- offset: "100%",
1626
- "stop-color": t.color
1627
- }, null, 8, zt)
1628
- ], 8, vt)
1629
- ]))), 128)),
1630
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i("defs", {
1631
- key: `def_plot_${o}`
1632
- }, [
1633
- I("radialGradient", {
1634
- id: `plotGradient_${o}_${l.uniqueId}`,
1635
- cx: "50%",
1636
- cy: "50%",
1637
- r: "50%",
1638
- fx: "50%",
1639
- fy: "50%"
1640
- }, [
1641
- I("stop", {
1642
- offset: "0%",
1643
- "stop-color": `${e.shiftHue(t.color, 0.05)}`
1644
- }, null, 8, Vt),
1645
- I("stop", {
1646
- offset: "100%",
1647
- "stop-color": t.color
1648
- }, null, 8, Pt)
1649
- ], 8, Tt)
1650
- ]))), 128)),
1651
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i("defs", {
1652
- key: `def_line_${o}`
1653
- }, [
1654
- I("radialGradient", {
1655
- id: `lineGradient_${o}_${l.uniqueId}`,
1656
- cx: "50%",
1657
- cy: "50%",
1658
- r: "50%",
1659
- fx: "50%",
1660
- fy: "50%"
1661
- }, [
1662
- I("stop", {
1663
- offset: "0%",
1664
- "stop-color": `${e.shiftHue(t.color, 0.05)}`
1665
- }, null, 8, Bt),
1666
- I("stop", {
1667
- offset: "100%",
1668
- "stop-color": t.color
1669
- }, null, 8, Ht)
1670
- ], 8, Rt),
1671
- I("linearGradient", {
1672
- id: `areaGradient_${o}_${l.uniqueId}`,
1673
- x1: "0%",
1674
- x2: "100%",
1675
- y1: "0%",
1676
- y2: "0%"
1677
- }, [
1678
- I("stop", {
1679
- offset: "0%",
1680
- "stop-color": `${e.setOpacity(e.shiftHue(t.color, 0.03), e.FINAL_CONFIG.line.area.opacity)}`
1681
- }, null, 8, Et),
1682
- I("stop", {
1683
- offset: "100%",
1684
- "stop-color": `${e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)}`
1685
- }, null, 8, Wt)
1686
- ], 8, Dt)
1687
- ]))), 128)),
1688
- (r(!0), i(d, null, x(e.highlightAreas, (t) => (r(), i("g", null, [
1689
- t.show ? (r(), i(d, { key: 0 }, [
1690
- (r(!0), i(d, null, x(t.span, (o, c) => (r(), i("g", null, [
1691
- I("rect", {
1692
- style: _({
1693
- transition: "none",
1694
- opacity: t.from + c >= l.slicer.start && t.from + c <= l.slicer.end - 1 ? 1 : 0
1695
- }),
1696
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (t.from + c - l.slicer.start),
1697
- y: e.drawingArea.top,
1698
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1699
- width: Math.max(0, e.drawingArea.width / e.maxSeries),
1700
- fill: e.setOpacity(t.color, t.opacity)
1701
- }, null, 12, Yt)
1702
- ]))), 256)),
1703
- (r(!0), i(d, null, x(t.span, (o, c) => (r(), i("g", null, [
1704
- t.caption.text && c === 0 ? (r(), i("foreignObject", {
1705
- key: 0,
1706
- 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),
1707
- y: e.drawingArea.top + t.caption.offsetY,
1708
- style: _({
1709
- overflow: "visible",
1710
- opacity: t.to >= l.slicer.start && t.from < l.slicer.end ? 1 : 0
1711
- }),
1712
- height: "1",
1713
- width: Math.max(0, t.caption.width === "auto" ? e.drawingArea.width / e.maxSeries * t.span : t.caption.width)
1714
- }, [
1715
- I("div", {
1716
- style: _(`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"}`)
1717
- }, R(t.caption.text), 5)
1718
- ], 12, Xt)) : u("", !0)
1719
- ]))), 256))
1720
- ], 64)) : u("", !0)
1721
- ]))), 256)),
1722
- I("g", null, [
1723
- (r(!0), i(d, null, x(e.maxSeries, (t, o) => (r(), i("g", {
1724
- key: `tooltip_trap_highlighter_${o}`
1725
- }, [
1726
- I("rect", {
1727
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o,
1728
- y: e.drawingArea.top,
1729
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1730
- width: Math.max(0, e.drawingArea.width / e.maxSeries),
1731
- fill: [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(o) ? e.setOpacity(e.FINAL_CONFIG.chart.highlighter.color, e.FINAL_CONFIG.chart.highlighter.opacity) : "transparent"
1732
- }, null, 8, qt)
1733
- ]))), 128))
1734
- ]),
1735
- e.barSet.length ? (r(!0), i(d, { key: 0 }, x(e.barSet, (t, o) => (r(), i("g", {
1736
- key: `serie_bar_${o}`,
1737
- class: j(`serie_bar_${o}`),
1738
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1739
- }, [
1740
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i("g", {
1741
- key: `bar_plot_${o}_${g}`
1742
- }, [
1743
- e.canShowValue(c.value) ? (r(), i("rect", {
1744
- key: 0,
1745
- x: e.calcRectX(c),
1746
- y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(c) : e.calcRectY(c),
1747
- height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(c)) : Math.abs(e.calcRectHeight(c)),
1748
- width: Math.max(0, e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap)),
1749
- rx: e.FINAL_CONFIG.bar.borderRadius,
1750
- fill: e.FINAL_CONFIG.bar.useGradient ? c.value >= 0 ? `url(#rectGradient_pos_${o}_${l.uniqueId})` : `url(#rectGradient_neg_${o}_${l.uniqueId})` : t.color,
1751
- stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? t.color : e.FINAL_CONFIG.bar.border.stroke,
1752
- "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
1753
- }, null, 8, Ut)) : u("", !0),
1754
- e.canShowValue(c.value) && s.$slots.pattern ? (r(), i("rect", {
1755
- key: 1,
1756
- x: e.calcRectX(c),
1757
- y: l.mutableConfig.useIndividualScale ? e.calcIndividualRectY(c) : e.calcRectY(c),
1758
- height: l.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(c)) : Math.abs(e.calcRectHeight(c)),
1759
- width: Math.max(0, e.calcRectWidth() - (l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? 0 : e.barPeriodGap)),
1760
- rx: e.FINAL_CONFIG.bar.borderRadius,
1761
- fill: `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})`,
1762
- stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? t.color : e.FINAL_CONFIG.bar.border.stroke,
1763
- "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
1764
- }, null, 8, Zt)) : u("", !0),
1765
- c.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
1766
- key: 2,
1767
- style: { overflow: "visible" },
1768
- height: "12",
1769
- 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,
1770
- x: e.calcRectX(c) - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
1771
- y: e.checkNaN(c.y) + e.FINAL_CONFIG.chart.comments.offsetY + 6
1772
- }, [
1773
- G(s.$slots, "plot-comment", {
1774
- plot: { ...c, color: t.color, seriesIndex: o, datapointIndex: g }
1775
- }, void 0, !0)
1776
- ], 8, Jt)) : u("", !0)
1777
- ]))), 128)),
1778
- Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (r(), i("g", Kt, [
1779
- I("defs", null, [
1780
- I("marker", {
1781
- id: `bar_arrow_${o}`,
1782
- markerWidth: 7,
1783
- markerHeight: 7,
1784
- refX: "0",
1785
- refY: 7 / 2,
1786
- orient: "auto"
1787
- }, [
1788
- I("polygon", {
1789
- points: `0 0, 7 ${7 / 2}, 0 7`,
1790
- fill: t.color
1791
- }, null, 8, jt)
1792
- ], 8, Qt)
1793
- ]),
1794
- t.plots.length > 1 ? (r(), i("line", {
1795
- key: 0,
1796
- x1: e.calcLinearProgression(t.plots).x1 + e.calcRectWidth(),
1797
- x2: e.calcLinearProgression(t.plots).x2 + e.calcRectWidth(),
1798
- y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
1799
- y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
1800
- "stroke-width": 1,
1801
- stroke: t.color,
1802
- "stroke-dasharray": 2,
1803
- "marker-end": `url(#bar_arrow_${o})`
1804
- }, null, 8, $t)) : u("", !0),
1805
- t.plots.length > 1 ? (r(), i("text", {
1806
- key: 1,
1807
- "text-anchor": "middle",
1808
- x: e.calcLinearProgression(t.plots).x2 + e.calcRectWidth(),
1809
- y: e.calcLinearProgression(t.plots).y2 - 6,
1810
- "font-size": l.fontSizes.plotLabels,
1811
- fill: t.color
1812
- }, R(e.dataLabel({
1813
- v: e.calcLinearProgression(t.plots).trend * 100,
1814
- s: "%",
1815
- r: 2
1816
- })), 9, el)) : u("", !0)
1817
- ])) : u("", !0)
1818
- ], 6))), 128)) : u("", !0),
1819
- !l.mutableConfig.useIndividualScale && e.FINAL_CONFIG.chart.grid.labels.zeroLine.show ? (r(), i("line", {
1820
- key: 1,
1821
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1822
- "stroke-width": "1",
1823
- x1: e.drawingArea.left + e.xPadding,
1824
- x2: e.drawingArea.right - e.xPadding,
1825
- y1: e.forceValidValue(e.zero),
1826
- y2: e.forceValidValue(e.zero),
1827
- "stroke-linecap": "round",
1828
- style: { animation: "none !important" }
1829
- }, null, 8, tl)) : u("", !0),
1830
- e.FINAL_CONFIG.chart.highlighter.useLine && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (r(), i("g", ll, [
1831
- I("line", {
1832
- 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,
1833
- 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,
1834
- y1: e.forceValidValue(e.drawingArea.top),
1835
- y2: e.forceValidValue(e.drawingArea.bottom),
1836
- stroke: e.FINAL_CONFIG.chart.highlighter.color,
1837
- "stroke-width": e.FINAL_CONFIG.chart.highlighter.lineWidth,
1838
- "stroke-dasharray": e.FINAL_CONFIG.chart.highlighter.lineDasharray,
1839
- "stroke-linecap": "round",
1840
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
1841
- }, null, 8, sl)
1842
- ])) : u("", !0),
1843
- e.FINAL_CONFIG.chart.grid.frame.show ? (r(), i("rect", {
1844
- key: 3,
1845
- style: { pointerEvents: "none", transition: "none", animation: "none !important" },
1846
- x: e.drawingArea.left + e.xPadding < 0 ? 0 : e.drawingArea.left + e.xPadding,
1847
- y: e.drawingArea.top,
1848
- width: Math.max(0, e.drawingArea.width - (e.FINAL_CONFIG.chart.grid.position === "middle" ? 0 : e.drawingArea.width / e.maxSeries)),
1849
- height: e.drawingArea.height < 0 ? 0 : e.drawingArea.height,
1850
- fill: "transparent",
1851
- stroke: e.FINAL_CONFIG.chart.grid.frame.stroke,
1852
- "stroke-width": e.FINAL_CONFIG.chart.grid.frame.strokeWidth,
1853
- "stroke-linecap": e.FINAL_CONFIG.chart.grid.frame.strokeLinecap,
1854
- "stroke-linejoin": e.FINAL_CONFIG.chart.grid.frame.strokeLinejoin,
1855
- "stroke-dasharray": e.FINAL_CONFIG.chart.grid.frame.strokeDasharray
1856
- }, null, 8, al)) : u("", !0),
1857
- e.FINAL_CONFIG.chart.grid.labels.show ? (r(), i("g", rl, [
1858
- l.mutableConfig.useIndividualScale ? (r(), i(d, { key: 0 }, [
1859
- (r(!0), i(d, null, x(e.allScales, (t) => (r(), i("g", null, [
1860
- I("line", {
1861
- x1: t.x + e.xPadding,
1862
- x2: t.x + e.xPadding,
1863
- y1: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - t.yOffset - t.individualHeight) : e.forceValidValue(e.drawingArea.top),
1864
- y2: l.mutableConfig.isStacked ? e.forceValidValue(e.drawingArea.bottom - t.yOffset) : e.forceValidValue(e.drawingArea.bottom),
1865
- stroke: t.color,
1866
- "stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
1867
- "stroke-linecap": "round",
1868
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
1869
- }, null, 12, il)
1870
- ]))), 256)),
1871
- (r(!0), i(d, null, x(e.allScales, (t) => (r(), i("g", {
1872
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
1873
- }, [
1874
- I("text", {
1875
- fill: t.color,
1876
- "font-size": l.fontSizes.dataLabels,
1877
- "text-anchor": "middle",
1878
- 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)`
1879
- }, R(t.name) + " " + R(t.scaleLabel && t.unique && t.scaleLabel !== t.id ? `- ${t.scaleLabel}` : ""), 9, nl),
1880
- (r(!0), i(d, null, x(t.yLabels, (o, c) => (r(), i(d, null, [
1881
- e.FINAL_CONFIG.chart.grid.labels.yAxis.showCrosshairs ? (r(), i("line", {
1882
- key: 0,
1883
- x1: t.x + 3 + e.xPadding - e.FINAL_CONFIG.chart.grid.labels.yAxis.crosshairSize,
1884
- x2: t.x + e.xPadding,
1885
- y1: e.forceValidValue(o.y),
1886
- y2: e.forceValidValue(o.y),
1887
- stroke: t.color,
1888
- "stroke-width": 1,
1889
- "stroke-linecap": "round",
1890
- style: { animation: "none !important" }
1891
- }, null, 8, cl)) : u("", !0)
1892
- ], 64))), 256)),
1893
- (r(!0), i(d, null, x(t.yLabels, (o, c) => (r(), i("text", {
1894
- x: t.x + e.FINAL_CONFIG.chart.grid.labels.yAxis.scaleValueOffsetX - 5,
1895
- y: e.forceValidValue(o.y) + l.fontSizes.dataLabels / 3,
1896
- "font-size": l.fontSizes.dataLabels,
1897
- "text-anchor": "end",
1898
- fill: t.color
1899
- }, R(e.applyDataLabel(
1900
- e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
1901
- o.value,
1902
- e.dataLabel({
1903
- p: o.prefix,
1904
- v: o.value,
1905
- s: o.suffix,
1906
- r: 1
1907
- }),
1908
- { datapoint: o.datapoint, seriesIndex: c }
1909
- )), 9, ol))), 256))
1910
- ], 4))), 256))
1911
- ], 64)) : (r(!0), i(d, { key: 1 }, x(e.yLabels, (t, o) => (r(), i("g", {
1912
- key: `yLabel_${o}`
1913
- }, [
1914
- e.canShowValue(t) && t.value >= e.niceScale.min && t.value <= e.niceScale.max && e.FINAL_CONFIG.chart.grid.labels.yAxis.showCrosshairs ? (r(), i("line", {
1915
- key: 0,
1916
- x1: e.drawingArea.left + e.xPadding,
1917
- x2: e.drawingArea.left - e.FINAL_CONFIG.chart.grid.labels.yAxis.crosshairSize + e.xPadding,
1918
- y1: e.forceValidValue(t.y),
1919
- y2: e.forceValidValue(t.y),
1920
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1921
- "stroke-width": "1",
1922
- "stroke-linecap": "round",
1923
- style: { animation: "none !important" }
1924
- }, null, 8, hl)) : u("", !0),
1925
- t.value >= e.niceScale.min && t.value <= e.niceScale.max ? (r(), i("text", {
1926
- key: 1,
1927
- x: e.drawingArea.left - 7 + e.xPadding,
1928
- y: e.checkNaN(t.y + l.fontSizes.dataLabels / 3),
1929
- "font-size": l.fontSizes.dataLabels,
1930
- "text-anchor": "end",
1931
- fill: e.FINAL_CONFIG.chart.grid.labels.color
1932
- }, R(e.canShowValue(t.value) ? e.applyDataLabel(
1933
- e.FINAL_CONFIG.chart.grid.labels.yAxis.formatter,
1934
- t.value,
1935
- e.dataLabel({
1936
- p: t.prefix,
1937
- v: t.value,
1938
- s: t.suffix,
1939
- r: 1
1940
- })
1941
- ) : ""), 9, ul)) : u("", !0)
1942
- ]))), 128))
1943
- ], 512)) : u("", !0),
1944
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i("g", {
1945
- key: `serie_plot_${o}`,
1946
- class: j(`serie_plot_${o}`),
1947
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1948
- }, [
1949
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i("g", {
1950
- key: `circle_plot_${o}_${g}`
1951
- }, [
1952
- c && e.canShowValue(c.value) ? (r(), U(N, {
1953
- key: 0,
1954
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
1955
- 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,
1956
- plot: { x: e.checkNaN(c.x), y: e.checkNaN(c.y) },
1957
- radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (l.plotRadii.plot || 6) * 1.5 : l.plotRadii.plot || 6,
1958
- stroke: e.FINAL_CONFIG.plot.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : t.color,
1959
- strokeWidth: e.FINAL_CONFIG.plot.dot.strokeWidth
1960
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : u("", !0),
1961
- c.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
1962
- key: 1,
1963
- style: { overflow: "visible" },
1964
- height: "12",
1965
- width: e.FINAL_CONFIG.chart.comments.width,
1966
- x: c.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
1967
- y: c.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
1968
- }, [
1969
- I("div", gl, [
1970
- G(s.$slots, "plot-comment", {
1971
- plot: { ...c, color: t.color, seriesIndex: o, datapointIndex: g }
1972
- }, void 0, !0)
1973
- ])
1974
- ], 8, dl)) : u("", !0)
1975
- ]))), 128)),
1976
- Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (r(), i("g", fl, [
1977
- I("defs", null, [
1978
- I("marker", {
1979
- id: `plot_arrow_${o}`,
1980
- markerWidth: 7,
1981
- markerHeight: 7,
1982
- refX: "0",
1983
- refY: 7 / 2,
1984
- orient: "auto"
1985
- }, [
1986
- I("polygon", {
1987
- points: `0 0, 7 ${7 / 2}, 0 7`,
1988
- fill: t.color
1989
- }, null, 8, xl)
1990
- ], 8, Il)
1991
- ]),
1992
- t.plots.length > 1 ? (r(), i("line", {
1993
- key: 0,
1994
- x1: e.calcLinearProgression(t.plots).x1,
1995
- x2: e.calcLinearProgression(t.plots).x2,
1996
- y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
1997
- y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
1998
- "stroke-width": 1,
1999
- stroke: t.color,
2000
- "stroke-dasharray": 2,
2001
- "marker-end": `url(#plot_arrow_${o})`
2002
- }, null, 8, Nl)) : u("", !0),
2003
- t.plots.length > 1 ? (r(), i("text", {
2004
- key: 1,
2005
- "text-anchor": "middle",
2006
- x: e.calcLinearProgression(t.plots).x2,
2007
- y: e.calcLinearProgression(t.plots).y2 - 6,
2008
- "font-size": l.fontSizes.plotLabels,
2009
- fill: t.color
2010
- }, R(e.dataLabel({
2011
- v: e.calcLinearProgression(t.plots).trend * 100,
2012
- s: "%",
2013
- r: 2
2014
- })), 9, ml)) : u("", !0)
2015
- ])) : u("", !0)
2016
- ], 6))), 128)),
2017
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i("g", {
2018
- key: `serie_line_${o}`,
2019
- class: j(`serie_line_${o}`),
2020
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2021
- }, [
2022
- t.smooth && t.plots.length > 1 && t.curve ? (r(), i("path", {
2023
- key: 0,
2024
- d: `M${t.curve}`,
2025
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
2026
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
2027
- "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
2028
- fill: "none"
2029
- }, null, 8, bl)) : t.plots.length > 1 && t.straight ? (r(), i("path", {
2030
- key: 1,
2031
- d: `M${t.straight}`,
2032
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
2033
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
2034
- "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
2035
- fill: "none",
2036
- "stroke-linecap": "round",
2037
- "stroke-linejoin": "round"
2038
- }, null, 8, Fl)) : u("", !0)
2039
- ], 6))), 128)),
2040
- s.$slots.pattern ? (r(), i("defs", _l, [
2041
- (r(!0), i(d, null, x(e.safeDataset, (t, o) => G(s.$slots, "pattern", ie({
2042
- key: `serie_pattern_slot_${o}`
2043
- }, { ref_for: !0 }, { ...t, seriesIndex: t.slotAbsoluteIndex, patternId: `pattern_${l.uniqueId}_${o}` }), void 0, !0)), 128))
2044
- ])) : u("", !0),
2045
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i("g", {
2046
- key: `serie_line_${o}`,
2047
- class: j(`serie_line_${o}`),
2048
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2049
- }, [
2050
- t.useArea && t.plots.length > 1 ? (r(), i("g", yl, [
2051
- t.smooth ? (r(!0), i(d, { key: 0 }, x(t.curveAreas, (c, g) => (r(), i(d, { key: g }, [
2052
- I("path", {
2053
- d: c,
2054
- fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${o}_${l.uniqueId})` : e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)
2055
- }, null, 8, Al),
2056
- s.$slots.pattern ? (r(), i("path", {
2057
- key: 0,
2058
- d: c,
2059
- fill: `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})`
2060
- }, null, 8, Ll)) : u("", !0)
2061
- ], 64))), 128)) : (r(!0), i(d, { key: 1 }, x(t.area.split(";"), (c, g) => (r(), i(d, { key: g }, [
2062
- I("path", {
2063
- d: `M${c}Z`,
2064
- fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${o}_${l.uniqueId})` : e.setOpacity(t.color, e.FINAL_CONFIG.line.area.opacity)
2065
- }, null, 8, Cl),
2066
- s.$slots.pattern ? (r(), i("path", {
2067
- key: 0,
2068
- d: `M${c}Z`,
2069
- fill: `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})`
2070
- }, null, 8, Sl)) : u("", !0)
2071
- ], 64))), 128))
2072
- ])) : u("", !0),
2073
- t.smooth && t.plots.length > 1 && t.curve ? (r(), i("path", {
2074
- key: 1,
2075
- d: `M${t.curve}`,
2076
- stroke: t.color,
2077
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
2078
- "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
2079
- fill: "none",
2080
- "stroke-linecap": "round"
2081
- }, null, 8, kl)) : t.plots.length > 1 && t.straight ? (r(), i("path", {
2082
- key: 2,
2083
- d: `M${t.straight}`,
2084
- stroke: t.color,
2085
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
2086
- "stroke-dasharray": t.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
2087
- fill: "none",
2088
- "stroke-linecap": "round",
2089
- "stroke-linejoin": "round"
2090
- }, null, 8, wl)) : u("", !0),
2091
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2092
- key: `circle_line_${o}_${g}`
2093
- }, [
2094
- !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) ? (r(), U(N, {
2095
- key: 0,
2096
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
2097
- 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,
2098
- plot: { x: e.checkNaN(c.x), y: e.checkNaN(c.y) },
2099
- radius: l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (l.plotRadii.line || 6) * 1.5 : l.plotRadii.line || 6,
2100
- stroke: e.FINAL_CONFIG.line.dot.useSerieColor ? e.FINAL_CONFIG.chart.backgroundColor : t.color,
2101
- strokeWidth: e.FINAL_CONFIG.line.dot.strokeWidth
2102
- }, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])) : u("", !0),
2103
- c.comment && e.FINAL_CONFIG.chart.comments.show ? (r(), i("foreignObject", {
2104
- key: 1,
2105
- style: { overflow: "visible" },
2106
- height: "12",
2107
- width: e.FINAL_CONFIG.chart.comments.width,
2108
- x: c.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
2109
- y: c.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
2110
- }, [
2111
- I("div", Gl, [
2112
- G(s.$slots, "plot-comment", {
2113
- plot: { ...c, color: t.color, seriesIndex: o, datapointIndex: g }
2114
- }, void 0, !0)
2115
- ])
2116
- ], 8, Ol)) : u("", !0)
2117
- ], 64))), 128)),
2118
- Object.hasOwn(t, "useProgression") && t.useProgression === !0 && !isNaN(e.calcLinearProgression(t.plots).trend) ? (r(), i("g", vl, [
2119
- I("defs", null, [
2120
- I("marker", {
2121
- id: `line_arrow_${o}`,
2122
- markerWidth: 7,
2123
- markerHeight: 7,
2124
- refX: "0",
2125
- refY: 7 / 2,
2126
- orient: "auto"
2127
- }, [
2128
- I("polygon", {
2129
- points: `0 0, 7 ${7 / 2}, 0 7`,
2130
- fill: t.color
2131
- }, null, 8, Ml)
2132
- ], 8, pl)
2133
- ]),
2134
- t.plots.length > 1 ? (r(), i("line", {
2135
- key: 0,
2136
- x1: e.calcLinearProgression(t.plots).x1,
2137
- x2: e.calcLinearProgression(t.plots).x2,
2138
- y1: e.forceValidValue(e.calcLinearProgression(t.plots).y1),
2139
- y2: e.forceValidValue(e.calcLinearProgression(t.plots).y2),
2140
- "stroke-width": 1,
2141
- stroke: t.color,
2142
- "stroke-dasharray": 2,
2143
- "marker-end": `url(#line_arrow_${o})`
2144
- }, null, 8, zl)) : u("", !0),
2145
- t.plots.length > 1 ? (r(), i("text", {
2146
- key: 1,
2147
- "text-anchor": "middle",
2148
- x: e.calcLinearProgression(t.plots).x2,
2149
- y: e.calcLinearProgression(t.plots).y2 - 6,
2150
- "font-size": l.fontSizes.plotLabels,
2151
- fill: t.color
2152
- }, R(e.dataLabel({
2153
- v: e.calcLinearProgression(t.plots).trend * 100,
2154
- s: "%",
2155
- r: 2
2156
- })), 9, Tl)) : u("", !0)
2157
- ])) : u("", !0)
2158
- ], 6))), 128)),
2159
- (e.FINAL_CONFIG.bar.labels.show || e.FINAL_CONFIG.bar.serieName.show) && l.mutableConfig.dataLabels.show ? (r(), i("g", Vl, [
2160
- (r(!0), i(d, null, x(e.barSet, (t, o) => (r(), i(d, {
2161
- key: `xLabel_bar_${o}`
2162
- }, [
2163
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2164
- key: `xLabel_bar_${o}_${g}`
2165
- }, [
2166
- 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 ? (r(), i("text", {
2167
- key: 0,
2168
- x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? c.x + e.slot.line / 2 : e.calcRectX(c) + e.calcRectWidth() / 2 - e.barPeriodGap / 2,
2169
- y: e.checkNaN(c.y) + (c.value >= 0 ? e.FINAL_CONFIG.bar.labels.offsetY : -e.FINAL_CONFIG.bar.labels.offsetY * 3),
2170
- "text-anchor": "middle",
2171
- "font-size": l.fontSizes.plotLabels,
2172
- fill: e.FINAL_CONFIG.bar.labels.color,
2173
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2174
- }, R(e.canShowValue(c.value) ? e.applyDataLabel(
2175
- e.FINAL_CONFIG.bar.labels.formatter,
2176
- c.value,
2177
- e.dataLabel({
2178
- p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
2179
- v: c.value,
2180
- s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
2181
- r: e.FINAL_CONFIG.bar.labels.rounding
2182
- }),
2183
- {
2184
- datapoint: c,
2185
- serie: t
2186
- }
2187
- ) : ""), 13, Pl)) : u("", !0),
2188
- c && e.FINAL_CONFIG.bar.serieName.show ? (r(), i("text", {
2189
- key: 1,
2190
- x: l.mutableConfig.useIndividualScale && l.mutableConfig.isStacked ? c.x + e.slot.line / 2 : c.x + e.calcRectWidth() * 1.1,
2191
- y: c.y + (c.value > 0 ? e.FINAL_CONFIG.bar.serieName.offsetY : -e.FINAL_CONFIG.bar.serieName.offsetY * 3),
2192
- "text-anchor": "middle",
2193
- "font-size": l.fontSizes.plotLabels,
2194
- fill: e.FINAL_CONFIG.bar.serieName.useSerieColor ? t.color : e.FINAL_CONFIG.bar.serieName.color,
2195
- "font-weight": e.FINAL_CONFIG.bar.serieName.bold ? "bold" : "normal",
2196
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2197
- }, R(e.FINAL_CONFIG.bar.serieName.useAbbreviation ? e.abbreviate({ source: t.name, length: e.FINAL_CONFIG.bar.serieName.abbreviationSize }) : t.name), 13, Rl)) : u("", !0)
2198
- ], 64))), 128))
2199
- ], 64))), 128))
2200
- ])) : u("", !0),
2201
- e.FINAL_CONFIG.plot.labels.show && l.mutableConfig.dataLabels.show ? (r(), i("g", Bl, [
2202
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i(d, {
2203
- key: `xLabel_plot_${o}`
2204
- }, [
2205
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2206
- key: `xLabel_plot_${o}_${g}`
2207
- }, [
2208
- c && !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (r(), i("text", {
2209
- key: 0,
2210
- x: c.x,
2211
- y: c.y + e.FINAL_CONFIG.plot.labels.offsetY,
2212
- "text-anchor": "middle",
2213
- "font-size": l.fontSizes.plotLabels,
2214
- fill: e.FINAL_CONFIG.plot.labels.color,
2215
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2216
- }, R(e.canShowValue(c.value) ? e.applyDataLabel(
2217
- e.FINAL_CONFIG.plot.labels.formatter,
2218
- c.value,
2219
- e.dataLabel({
2220
- p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
2221
- v: c.value,
2222
- s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
2223
- r: e.FINAL_CONFIG.plot.labels.rounding
2224
- }),
2225
- {
2226
- datapoint: c,
2227
- serie: t
2228
- }
2229
- ) : ""), 13, Hl)) : u("", !0)
2230
- ], 64))), 128))
2231
- ], 64))), 128))
2232
- ])) : (r(), i("g", Dl, [
2233
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i(d, {
2234
- key: `xLabel_plot_${o}`
2235
- }, [
2236
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2237
- key: `xLabel_plot_${o}_${g}`
2238
- }, [
2239
- e.FINAL_CONFIG.plot.tag.followValue ? (r(), i(d, { key: 1 }, [
2240
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag ? (r(), i("line", {
2241
- key: 0,
2242
- class: "vue-ui-xy-tag-plot",
2243
- x1: e.drawingArea.left,
2244
- x2: e.drawingArea.right,
2245
- y1: c.y,
2246
- y2: c.y,
2247
- "stroke-width": 1,
2248
- "stroke-linecap": "round",
2249
- "stroke-dasharray": "2",
2250
- stroke: t.color
2251
- }, null, 8, ql)) : u("", !0)
2252
- ], 64)) : (r(), i(d, { key: 0 }, [
2253
- c && g === 0 && t.useTag && t.useTag === "start" ? (r(), i("foreignObject", {
2254
- key: 0,
2255
- x: c.x,
2256
- y: c.y - 20,
2257
- height: 24,
2258
- width: "150",
2259
- style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2260
- }, [
2261
- I("div", {
2262
- style: _(`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;`),
2263
- innerHTML: e.applyDataLabel(
2264
- e.FINAL_CONFIG.plot.tag.formatter,
2265
- c.value,
2266
- t.name,
2267
- {
2268
- datapoint: c,
2269
- seriesIndex: g,
2270
- serieName: t.name
2271
- }
2272
- )
2273
- }, null, 12, Wl)
2274
- ], 12, El)) : u("", !0),
2275
- c && g === t.plots.length - 1 && t.useTag && t.useTag === "end" ? (r(), i("foreignObject", {
2276
- key: 1,
2277
- x: c.x - t.name.length * (l.fontSizes.plotLabels / 2),
2278
- y: c.y - 20,
2279
- height: 24,
2280
- width: "150",
2281
- style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2282
- }, [
2283
- I("div", {
2284
- style: _(`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;`),
2285
- innerHTML: e.applyDataLabel(
2286
- e.FINAL_CONFIG.plot.tag.formatter,
2287
- c.value,
2288
- t.name,
2289
- {
2290
- datapoint: c,
2291
- seriesIndex: g,
2292
- serieName: t.name
2293
- }
2294
- )
2295
- }, null, 12, Xl)
2296
- ], 12, Yl)) : u("", !0)
2297
- ], 64))
2298
- ], 64))), 128))
2299
- ], 64))), 128))
2300
- ])),
2301
- e.FINAL_CONFIG.line.labels.show && l.mutableConfig.dataLabels.show ? (r(), i("g", Ul, [
2302
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i(d, {
2303
- key: `xLabel_line_${o}`
2304
- }, [
2305
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2306
- key: `xLabel_line_${o}_${g}`
2307
- }, [
2308
- c && !Object.hasOwn(t, "dataLabels") || t.dataLabels === !0 || l.selectedSerieIndex !== null && l.selectedSerieIndex === g || l.selectedMinimapIndex !== null && l.selectedMinimapIndex === g ? (r(), i("text", {
2309
- key: 0,
2310
- x: c.x,
2311
- y: c.y + (c.value >= 0 ? e.FINAL_CONFIG.line.labels.offsetY : -e.FINAL_CONFIG.line.labels.offsetY * 3),
2312
- "text-anchor": "middle",
2313
- "font-size": l.fontSizes.plotLabels,
2314
- fill: e.FINAL_CONFIG.line.labels.color,
2315
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2316
- }, R(e.canShowValue(c.value) ? e.applyDataLabel(
2317
- e.FINAL_CONFIG.line.labels.formatter,
2318
- c.value,
2319
- e.dataLabel({
2320
- p: t.prefix || e.FINAL_CONFIG.chart.labels.prefix,
2321
- v: c.value,
2322
- s: t.suffix || e.FINAL_CONFIG.chart.labels.suffix,
2323
- r: e.FINAL_CONFIG.line.labels.rounding
2324
- }),
2325
- {
2326
- datapoint: c,
2327
- serie: t
2328
- }
2329
- ) : ""), 13, Zl)) : u("", !0)
2330
- ], 64))), 128))
2331
- ], 64))), 128))
2332
- ])) : (r(), i("g", Jl, [
2333
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i(d, {
2334
- key: `xLabel_line_${o}`
2335
- }, [
2336
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2337
- key: `xLabel_line_${o}_${g}`
2338
- }, [
2339
- e.FINAL_CONFIG.line.tag.followValue ? (r(), i(d, { key: 1 }, [
2340
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag ? (r(), i("line", {
2341
- key: 0,
2342
- class: "vue-ui-xy-tag-line",
2343
- x1: e.drawingArea.left,
2344
- x2: e.drawingArea.right,
2345
- y1: c.y,
2346
- y2: c.y,
2347
- "stroke-width": 1,
2348
- "stroke-linecap": "round",
2349
- "stroke-dasharray": "2",
2350
- stroke: t.color
2351
- }, null, 8, es)) : u("", !0)
2352
- ], 64)) : (r(), i(d, { key: 0 }, [
2353
- c && g === 0 && t.useTag && t.useTag === "start" ? (r(), i("foreignObject", {
2354
- key: 0,
2355
- x: c.x,
2356
- y: c.y - 20,
2357
- height: 24,
2358
- width: "150",
2359
- style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2360
- }, [
2361
- I("div", {
2362
- style: _(`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;`),
2363
- innerHTML: e.applyDataLabel(
2364
- e.FINAL_CONFIG.line.tag.formatter,
2365
- c.value,
2366
- t.name,
2367
- {
2368
- datapoint: c,
2369
- seriesIndex: g,
2370
- serieName: t.name
2371
- }
2372
- )
2373
- }, null, 12, Ql)
2374
- ], 12, Kl)) : u("", !0),
2375
- c && g === t.plots.length - 1 && t.useTag && t.useTag === "end" ? (r(), i("foreignObject", {
2376
- key: 1,
2377
- x: c.x,
2378
- y: c.y - 20,
2379
- height: 24,
2380
- width: "150",
2381
- style: _(`overflow: visible; opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2382
- }, [
2383
- I("div", {
2384
- style: _(`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;`),
2385
- innerHTML: e.applyDataLabel(
2386
- e.FINAL_CONFIG.line.tag.formatter,
2387
- c.value,
2388
- t.name,
2389
- {
2390
- datapoint: c,
2391
- seriesIndex: g,
2392
- serieName: t.name
2393
- }
2394
- )
2395
- }, null, 12, $l)
2396
- ], 12, jl)) : u("", !0)
2397
- ], 64))
2398
- ], 64))), 128))
2399
- ], 64))), 128))
2400
- ])),
2401
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i(d, {
2402
- key: `xLabel_line_${o}`
2403
- }, [
2404
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2405
- key: `xLabel_line_${o}_${g}`
2406
- }, [
2407
- c && g === 0 && t.showSerieName && t.showSerieName === "start" ? (r(), i("text", {
2408
- key: 0,
2409
- x: c.x - l.fontSizes.plotLabels,
2410
- y: c.y,
2411
- "font-size": l.fontSizes.plotLabels,
2412
- "text-anchor": "end",
2413
- fill: t.color,
2414
- innerHTML: e.createTSpans({
2415
- content: t.name,
2416
- fontSize: l.fontSizes.plotLabels,
2417
- fill: t.color,
2418
- x: c.x - l.fontSizes.plotLabels,
2419
- y: c.y,
2420
- maxWords: 2
2421
- }),
2422
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2423
- }, null, 12, ts)) : u("", !0),
2424
- c && g === t.plots.length - 1 && t.showSerieName && t.showSerieName === "end" ? (r(), i("text", {
2425
- key: 1,
2426
- x: c.x + l.fontSizes.plotLabels,
2427
- y: c.y,
2428
- "font-size": l.fontSizes.plotLabels,
2429
- "text-anchor": "start",
2430
- fill: t.color,
2431
- innerHTML: e.createTSpans({
2432
- content: t.name,
2433
- fontSize: l.fontSizes.plotLabels,
2434
- fill: t.color,
2435
- x: c.x + l.fontSizes.plotLabels,
2436
- y: c.y,
2437
- maxWords: 2
2438
- }),
2439
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2440
- }, null, 12, ls)) : u("", !0)
2441
- ], 64))), 128))
2442
- ], 64))), 128)),
2443
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i(d, {
2444
- key: `xLabel_plot_${o}`
2445
- }, [
2446
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2447
- key: `xLabel_plot_${o}_${g}`
2448
- }, [
2449
- c && g === 0 && t.showSerieName && t.showSerieName === "start" ? (r(), i("text", {
2450
- key: 0,
2451
- x: c.x - l.fontSizes.plotLabels,
2452
- y: c.y,
2453
- "font-size": l.fontSizes.plotLabels,
2454
- "text-anchor": "end",
2455
- fill: t.color,
2456
- innerHTML: e.createTSpans({
2457
- content: t.name,
2458
- fontSize: l.fontSizes.plotLabels,
2459
- fill: t.color,
2460
- x: c.x - l.fontSizes.plotLabels,
2461
- y: c.y,
2462
- maxWords: 2
2463
- }),
2464
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2465
- }, null, 12, ss)) : u("", !0),
2466
- c && g === t.plots.length - 1 && t.showSerieName && t.showSerieName === "end" ? (r(), i("text", {
2467
- key: 1,
2468
- x: c.x + l.fontSizes.plotLabels,
2469
- y: c.y,
2470
- "font-size": l.fontSizes.plotLabels,
2471
- "text-anchor": "start",
2472
- fill: t.color,
2473
- innerHTML: e.createTSpans({
2474
- content: t.name,
2475
- fontSize: l.fontSizes.plotLabels,
2476
- fill: t.color,
2477
- x: c.x + l.fontSizes.plotLabels,
2478
- y: c.y,
2479
- maxWords: 2
2480
- }),
2481
- style: _(`opacity:${l.selectedScale ? l.selectedScale === t.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
2482
- }, null, 12, as)) : u("", !0)
2483
- ], 64))), 128))
2484
- ], 64))), 128)),
2485
- l.mutableConfig.useIndividualScale && !l.mutableConfig.isStacked ? (r(), i(d, { key: 11 }, [
2486
- I("defs", null, [
2487
- (r(!0), i(d, null, x(e.allScales, (t, o) => (r(), i("linearGradient", {
2488
- id: `individual_scale_gradient_${l.uniqueId}_${o}`,
2489
- x1: "0%",
2490
- x2: "100%",
2491
- y1: "0%",
2492
- y2: "0%"
2493
- }, [
2494
- I("stop", {
2495
- offset: "0%",
2496
- "stop-color": e.FINAL_CONFIG.chart.backgroundColor,
2497
- "stop-opacity": "0"
2498
- }, null, 8, is),
2499
- I("stop", {
2500
- offset: "100%",
2501
- "stop-color": t.color,
2502
- "stop-opacity": "0.2"
2503
- }, null, 8, ns)
2504
- ], 8, rs))), 256))
2505
- ]),
2506
- (r(!0), i(d, null, x(e.allScales, (t, o) => (r(), i("rect", {
2507
- x: t.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + e.xPadding,
2508
- y: e.drawingArea.top,
2509
- width: Math.max(0, e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth),
2510
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
2511
- fill: l.selectedScale === t.groupId ? `url(#individual_scale_gradient_${l.uniqueId}_${o})` : "transparent",
2512
- onMouseenter: (c) => l.selectedScale = t.groupId,
2513
- onMouseleave: n[0] || (n[0] = (c) => l.selectedScale = null)
2514
- }, null, 40, cs))), 256))
2515
- ], 64)) : u("", !0),
2516
- I("g", null, [
2517
- e.FINAL_CONFIG.chart.grid.labels.axis.yLabel && !l.mutableConfig.useIndividualScale ? (r(), i("text", {
2518
- key: 0,
2519
- ref: "yAxisLabel",
2520
- "font-size": l.fontSizes.yAxis,
2521
- fill: e.FINAL_CONFIG.chart.grid.labels.color,
2522
- transform: `translate(${l.scaleBox.x + e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`,
2523
- "text-anchor": "middle",
2524
- style: { transition: "none" }
2525
- }, R(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel), 9, os)) : u("", !0),
2526
- e.FINAL_CONFIG.chart.grid.labels.axis.xLabel ? (r(), i("text", {
2527
- key: 1,
2528
- ref: "xAxisLabel",
2529
- "text-anchor": "middle",
2530
- x: l.width / 2,
2531
- y: l.timeLabelBox.y + l.timeLabelBox.height + l.fontSizes.yAxis + e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,
2532
- "font-size": l.fontSizes.yAxis,
2533
- fill: e.FINAL_CONFIG.chart.grid.labels.color
2534
- }, R(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel), 9, hs)) : u("", !0)
2535
- ]),
2536
- e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (r(), i("g", us, [
2537
- s.$slots["time-label"] ? (r(!0), i(d, { key: 0 }, x(e.timeLabels, (t, o) => G(s.$slots, "time-label", ie({
2538
- key: `time_label_${o}`,
2539
- ref_for: !0
2540
- }, {
2541
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o + e.drawingArea.width / e.maxSeries / 2,
2542
- y: e.drawingArea.bottom + l.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,
2543
- fontSize: l.fontSizes.xAxis,
2544
- fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
2545
- 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})`,
2546
- absoluteIndex: t.absoluteIndex,
2547
- content: t.text,
2548
- textAnchor: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2549
- 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
2550
- }), void 0, !0)), 128)) : (r(!0), i(d, { key: 1 }, x(e.timeLabels, (t, o) => (r(), i("g", {
2551
- key: `time_label_${o}`
2552
- }, [
2553
- 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 ? (r(), i(d, { key: 0 }, [
2554
- String(t.text).includes(`
2555
- `) ? (r(), i("text", {
2556
- key: 1,
2557
- "text-anchor": e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2558
- "font-size": l.fontSizes.xAxis,
2559
- fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
2560
- 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})`,
2561
- style: _({
2562
- cursor: e.usesSelectTimeLabelEvent() ? "pointer" : "default"
2563
- }),
2564
- innerHTML: e.createTSpansFromLineBreaksOnX({
2565
- content: String(t.text),
2566
- fontSize: l.fontSizes.xAxis,
2567
- fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
2568
- x: 0,
2569
- y: 0
2570
- }),
2571
- onClick: () => e.selectTimeLabel(t, o)
2572
- }, null, 12, gs)) : (r(), i("text", {
2573
- key: 0,
2574
- "text-anchor": e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
2575
- "font-size": l.fontSizes.xAxis,
2576
- fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
2577
- 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})`,
2578
- style: _({
2579
- cursor: e.usesSelectTimeLabelEvent() ? "pointer" : "default"
2580
- }),
2581
- onClick: () => e.selectTimeLabel(t, o)
2582
- }, R(t.text || ""), 13, ds))
2583
- ], 64)) : u("", !0)
2584
- ]))), 128))
2585
- ], 512)) : u("", !0),
2586
- e.annotationsY.length && !l.mutableConfig.isStacked ? (r(), i("g", fs, [
2587
- (r(!0), i(d, null, x(e.annotationsY, (t) => (r(), i("g", {
2588
- key: t.uid
2589
- }, [
2590
- t.yTop && t.show ? (r(), i("line", {
2591
- key: 0,
2592
- x1: t.x1,
2593
- y1: t.yTop,
2594
- x2: t.x2,
2595
- y2: t.yTop,
2596
- stroke: t.config.line.stroke,
2597
- "stroke-width": t.config.line.strokeWidth,
2598
- "stroke-dasharray": t.config.line.strokeDasharray,
2599
- "stroke-linecap": "round",
2600
- style: { animation: "none !important" }
2601
- }, null, 8, Is)) : u("", !0),
2602
- t.yBottom && t.show ? (r(), i("line", {
2603
- key: 1,
2604
- x1: t.x1,
2605
- y1: t.yBottom,
2606
- x2: t.x2,
2607
- y2: t.yBottom,
2608
- stroke: t.config.line.stroke,
2609
- "stroke-width": t.config.line.strokeWidth,
2610
- "stroke-dasharray": t.config.line.strokeDasharray,
2611
- "stroke-linecap": "round",
2612
- style: { animation: "none !important" }
2613
- }, null, 8, xs)) : u("", !0),
2614
- t.hasArea && t.show ? (r(), i("rect", {
2615
- key: 2,
2616
- y: Math.min(t.yTop, t.yBottom),
2617
- x: t.x1,
2618
- width: Math.max(0, e.drawingArea.width),
2619
- height: e.checkNaN(t.areaHeight, 0),
2620
- fill: e.setOpacity(t.config.area.fill, t.config.area.opacity),
2621
- style: { animation: "none !important" }
2622
- }, null, 8, Ns)) : u("", !0),
2623
- t.config.label.text && t.show ? (r(), i("rect", ie({
2624
- key: 3,
2625
- class: "vue-ui-xy-annotation-label-box"
2626
- }, { ref_for: !0 }, t._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : u("", !0),
2627
- t.config.label.text && t.show ? (r(), i("text", {
2628
- key: 4,
2629
- id: t.id,
2630
- class: "vue-ui-xy-annotation-label",
2631
- x: t._text.x,
2632
- y: t._text.y,
2633
- "font-size": t.config.label.fontSize,
2634
- fill: t.config.label.color,
2635
- "text-anchor": t.config.label.textAnchor
2636
- }, R(t.config.label.text), 9, ms)) : u("", !0)
2637
- ]))), 128))
2638
- ])) : u("", !0),
2639
- I("g", null, [
2640
- (r(!0), i(d, null, x(e.maxSeries, (t, o) => (r(), i("rect", {
2641
- key: `tooltip_trap_${o}`,
2642
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * o,
2643
- y: e.drawingArea.top,
2644
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
2645
- width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
2646
- fill: "transparent",
2647
- onMouseenter: (c) => e.toggleTooltipVisibility(!0, o),
2648
- onMouseleave: n[1] || (n[1] = (c) => e.toggleTooltipVisibility(!1)),
2649
- onClick: (c) => e.selectX(o)
2650
- }, null, 40, bs))), 128))
2651
- ]),
2652
- e.FINAL_CONFIG.chart.timeTag.show && (![null, void 0].includes(l.selectedSerieIndex) || ![null, void 0].includes(l.selectedMinimapIndex)) ? (r(), i("g", Fs, [
2653
- (r(), i("foreignObject", {
2654
- 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,
2655
- y: e.drawingArea.bottom,
2656
- width: "200",
2657
- height: "40",
2658
- style: { overflow: "visible !important" }
2659
- }, [
2660
- I("div", {
2661
- class: "vue-ui-xy-time-tag",
2662
- style: _(`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`)
2663
- }, 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)
2664
- ], 8, _s)),
2665
- I("circle", {
2666
- 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,
2667
- cy: e.drawingArea.bottom,
2668
- r: e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,
2669
- fill: e.FINAL_CONFIG.chart.timeTag.circleMarker.color
2670
- }, null, 8, ys)
2671
- ])) : u("", !0)
2672
- ])) : u("", !0),
2673
- G(s.$slots, "svg", { svg: e.svg }, void 0, !0)
2674
- ], 512)
2675
- ], 14, dt)) : u("", !0),
2676
- s.$slots.watermark ? (r(), i("div", As, [
2677
- G(s.$slots, "watermark", $(ee({ isPrinting: l.isPrinting || l.isImaging })), void 0, !0)
2678
- ])) : u("", !0),
2679
- (r(!0), i(d, null, x(e.lineSet, (t, o) => (r(), i(d, {
2680
- key: `tag_line_${o}`
2681
- }, [
2682
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2683
- key: `tag_line_${o}_${g}`
2684
- }, [
2685
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "end" && e.FINAL_CONFIG.line.tag.followValue ? (r(), i("div", {
2686
- key: 0,
2687
- ref_for: !0,
2688
- ref: (z) => e.setTagRef(o, g, z, "right", "line"),
2689
- class: "vue-ui-xy-tag",
2690
- "data-tag": "right",
2691
- style: _({
2692
- position: "fixed",
2693
- top: e.placeXYTag({
2694
- svgElement: l.svgRef,
2695
- x: e.drawingArea.right + e.FINAL_CONFIG.line.tag.fontSize / 1.5,
2696
- y: c.y,
2697
- element: l.tagRefs[`${o}_${g}_right_line`],
2698
- position: "right"
2699
- }).top + "px",
2700
- left: e.placeXYTag({
2701
- svgElement: l.svgRef,
2702
- x: e.drawingArea.right + e.FINAL_CONFIG.line.tag.fontSize / 1.5,
2703
- y: c.y,
2704
- element: l.tagRefs[`${o}_${g}_right_line`],
2705
- position: "right"
2706
- }).left + "px",
2707
- height: "fit-content",
2708
- width: "fit-content",
2709
- background: t.color,
2710
- color: e.adaptColorToBackground(t.color),
2711
- padding: "0 6px",
2712
- fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
2713
- opacity: 1
2714
- })
2715
- }, [
2716
- (r(), i("svg", Ls, [
2717
- I("path", {
2718
- d: "M 0,10 10,0 10,20 Z",
2719
- fill: t.color,
2720
- stroke: "none"
2721
- }, null, 8, Cs)
2722
- ])),
2723
- I("div", {
2724
- class: "vue-ui-xy-tag-content",
2725
- innerHTML: e.applyDataLabel(
2726
- e.FINAL_CONFIG.line.tag.formatter,
2727
- c.value,
2728
- t.name,
2729
- {
2730
- datapoint: c,
2731
- seriesIndex: g,
2732
- serieName: t.name
2733
- }
2734
- )
2735
- }, null, 8, Ss)
2736
- ], 4)) : u("", !0),
2737
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "start" && e.FINAL_CONFIG.line.tag.followValue ? (r(), i("div", {
2738
- key: 1,
2739
- ref_for: !0,
2740
- ref: (z) => e.setTagRef(o, g, z, "left", "line"),
2741
- class: "vue-ui-xy-tag",
2742
- "data-tag": "left",
2743
- style: _({
2744
- position: "fixed",
2745
- top: e.placeXYTag({
2746
- svgElement: l.svgRef,
2747
- x: e.drawingArea.left - e.FINAL_CONFIG.line.tag.fontSize / 1.5,
2748
- y: c.y,
2749
- element: l.tagRefs[`${o}_${g}_left_line`],
2750
- position: "left"
2751
- }).top + "px",
2752
- left: e.placeXYTag({
2753
- svgElement: l.svgRef,
2754
- x: e.drawingArea.left - e.FINAL_CONFIG.line.tag.fontSize / 1.5,
2755
- y: c.y,
2756
- element: l.tagRefs[`${o}_${g}_left_line`],
2757
- position: "left"
2758
- }).left + "px",
2759
- height: "fit-content",
2760
- width: "fit-content",
2761
- background: t.color,
2762
- color: e.adaptColorToBackground(t.color),
2763
- padding: "0 6px",
2764
- fontSize: e.FINAL_CONFIG.line.tag.fontSize + "px",
2765
- opacity: 1
2766
- })
2767
- }, [
2768
- (r(), i("svg", ks, [
2769
- I("path", {
2770
- d: "M 0,0 10,10 0,20 Z",
2771
- fill: t.color,
2772
- stroke: "none"
2773
- }, null, 8, ws)
2774
- ])),
2775
- I("div", {
2776
- class: "vue-ui-xy-tag-content",
2777
- innerHTML: e.applyDataLabel(
2778
- e.FINAL_CONFIG.line.tag.formatter,
2779
- c.value,
2780
- t.name,
2781
- {
2782
- datapoint: c,
2783
- seriesIndex: g,
2784
- serieName: t.name
2785
- }
2786
- )
2787
- }, null, 8, Os)
2788
- ], 4)) : u("", !0)
2789
- ], 64))), 128))
2790
- ], 64))), 128)),
2791
- (r(!0), i(d, null, x(e.plotSet, (t, o) => (r(), i(d, {
2792
- key: `tag_plot_${o}`
2793
- }, [
2794
- (r(!0), i(d, null, x(t.plots, (c, g) => (r(), i(d, {
2795
- key: `tag_plot_${o}_${g}`
2796
- }, [
2797
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "end" && e.FINAL_CONFIG.plot.tag.followValue ? (r(), i("div", {
2798
- key: 0,
2799
- ref_for: !0,
2800
- ref: (z) => e.setTagRef(o, g, z, "right", "plot"),
2801
- class: "vue-ui-xy-tag",
2802
- "data-tag": "right",
2803
- style: _({
2804
- position: "fixed",
2805
- top: e.placeXYTag({
2806
- svgElement: l.svgRef,
2807
- x: e.drawingArea.right + e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
2808
- y: c.y,
2809
- element: l.tagRefs[`${o}_${g}_right_plot`],
2810
- position: "right"
2811
- }).top + "px",
2812
- left: e.placeXYTag({
2813
- svgElement: l.svgRef,
2814
- x: e.drawingArea.right + e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
2815
- y: c.y,
2816
- element: l.tagRefs[`${o}_${g}_right_plot`],
2817
- position: "right"
2818
- }).left + "px",
2819
- height: "fit-content",
2820
- width: "fit-content",
2821
- background: t.color,
2822
- color: e.adaptColorToBackground(t.color),
2823
- padding: "0 6px",
2824
- fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
2825
- opacity: 1
2826
- })
2827
- }, [
2828
- (r(), i("svg", Gs, [
2829
- I("path", {
2830
- d: "M 0,10 10,0 10,20 Z",
2831
- fill: t.color,
2832
- stroke: "none"
2833
- }, null, 8, vs)
2834
- ])),
2835
- I("div", {
2836
- class: "vue-ui-xy-tag-content",
2837
- innerHTML: e.applyDataLabel(
2838
- e.FINAL_CONFIG.plot.tag.formatter,
2839
- c.value,
2840
- t.name,
2841
- {
2842
- datapoint: c,
2843
- seriesIndex: g,
2844
- serieName: t.name
2845
- }
2846
- )
2847
- }, null, 8, ps)
2848
- ], 4)) : u("", !0),
2849
- [l.selectedMinimapIndex, l.selectedSerieIndex, l.selectedRowIndex].includes(g) && t.useTag && t.useTag === "start" && e.FINAL_CONFIG.plot.tag.followValue ? (r(), i("div", {
2850
- key: 1,
2851
- ref_for: !0,
2852
- ref: (z) => e.setTagRef(o, g, z, "left", "plot"),
2853
- class: "vue-ui-xy-tag",
2854
- "data-tag": "left",
2855
- style: _({
2856
- position: "fixed",
2857
- top: e.placeXYTag({
2858
- svgElement: l.svgRef,
2859
- x: e.drawingArea.left - e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
2860
- y: c.y,
2861
- element: l.tagRefs[`${o}_${g}_left_plot`],
2862
- position: "left"
2863
- }).top + "px",
2864
- left: e.placeXYTag({
2865
- svgElement: l.svgRef,
2866
- x: e.drawingArea.left - e.FINAL_CONFIG.plot.tag.fontSize / 1.5,
2867
- y: c.y,
2868
- element: l.tagRefs[`${o}_${g}_left_plot`],
2869
- position: "left"
2870
- }).left + "px",
2871
- height: "fit-content",
2872
- width: "fit-content",
2873
- background: t.color,
2874
- color: e.adaptColorToBackground(t.color),
2875
- padding: "0 6px",
2876
- fontSize: e.FINAL_CONFIG.plot.tag.fontSize + "px",
2877
- opacity: 1
2878
- })
2879
- }, [
2880
- (r(), i("svg", Ms, [
2881
- I("path", {
2882
- d: "M 0,0 10,10 0,20 Z",
2883
- fill: t.color,
2884
- stroke: "none"
2885
- }, null, 8, zs)
2886
- ])),
2887
- I("div", {
2888
- class: "vue-ui-xy-tag-content",
2889
- innerHTML: e.applyDataLabel(
2890
- e.FINAL_CONFIG.plot.tag.formatter,
2891
- c.value,
2892
- t.name,
2893
- {
2894
- datapoint: c,
2895
- seriesIndex: g,
2896
- serieName: t.name
2897
- }
2898
- )
2899
- }, null, 8, Ts)
2900
- ], 4)) : u("", !0)
2901
- ], 64))), 128))
2902
- ], 64))), 128)),
2903
- e.isDataset ? u("", !0) : (r(), U(F, {
2904
- key: 6,
2905
- config: {
2906
- type: "line",
2907
- style: {
2908
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
2909
- line: {
2910
- axis: {
2911
- color: e.FINAL_CONFIG.chart.grid.stroke
2912
- },
2913
- path: {
2914
- color: e.FINAL_CONFIG.chart.grid.stroke,
2915
- strokeWidth: 0.5
2916
- }
2917
- }
2918
- }
2919
- }
2920
- }, null, 8, ["config"])),
2921
- e.FINAL_CONFIG.chart.zoom.show && l.maxX > 6 && e.isDataset ? (r(), U(v, {
2922
- ref: "chartSlicer",
2923
- key: `slicer_${l.slicerStep}`,
2924
- background: e.FINAL_CONFIG.chart.zoom.color,
2925
- fontSize: e.FINAL_CONFIG.chart.zoom.fontSize,
2926
- useResetSlot: e.FINAL_CONFIG.chart.zoom.useResetSlot,
2927
- labelLeft: e.timeLabels[0].text,
2928
- labelRight: e.timeLabels.at(-1).text,
2929
- textColor: e.FINAL_CONFIG.chart.color,
2930
- inputColor: e.FINAL_CONFIG.chart.zoom.color,
2931
- selectColor: e.FINAL_CONFIG.chart.zoom.highlightColor,
2932
- borderColor: e.FINAL_CONFIG.chart.backgroundColor,
2933
- minimap: e.minimap,
2934
- smoothMinimap: e.FINAL_CONFIG.chart.zoom.minimap.smooth,
2935
- minimapSelectedColor: e.FINAL_CONFIG.chart.zoom.minimap.selectedColor,
2936
- minimapSelectionRadius: e.FINAL_CONFIG.chart.zoom.minimap.selectionRadius,
2937
- minimapLineColor: e.FINAL_CONFIG.chart.zoom.minimap.lineColor,
2938
- minimapSelectedColorOpacity: e.FINAL_CONFIG.chart.zoom.minimap.selectedColorOpacity,
2939
- minimapSelectedIndex: l.selectedSerieIndex,
2940
- minimapIndicatorColor: e.FINAL_CONFIG.chart.zoom.minimap.indicatorColor,
2941
- verticalHandles: e.FINAL_CONFIG.chart.zoom.minimap.verticalHandles,
2942
- max: l.maxX,
2943
- min: 0,
2944
- valueStart: l.slicer.start,
2945
- valueEnd: l.slicer.end,
2946
- start: l.slicer.start,
2947
- "onUpdate:start": n[2] || (n[2] = (t) => l.slicer.start = t),
2948
- end: l.slicer.end,
2949
- "onUpdate:end": n[3] || (n[3] = (t) => l.slicer.end = t),
2950
- refreshStartPoint: e.FINAL_CONFIG.chart.zoom.startIndex !== null ? e.FINAL_CONFIG.chart.zoom.startIndex : 0,
2951
- refreshEndPoint: e.FINAL_CONFIG.chart.zoom.endIndex !== null ? e.FINAL_CONFIG.chart.zoom.endIndex + 1 : Math.max(...h.dataset.map((t) => e.largestTriangleThreeBucketsArray({ data: t.series, threshold: e.FINAL_CONFIG.downsample.threshold }).length)),
2952
- enableRangeHandles: e.FINAL_CONFIG.chart.zoom.enableRangeHandles,
2953
- enableSelectionDrag: e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,
2954
- onReset: e.refreshSlicer,
2955
- onTrapMouse: e.selectMinimapIndex
2956
- }, {
2957
- "reset-action": D(({ reset: t }) => [
2958
- G(s.$slots, "reset-action", $(ee({ reset: t })), void 0, !0)
2959
- ]),
2960
- _: 3
2961
- }, 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"])) : u("", !0),
2962
- e.FINAL_CONFIG.chart.legend.show ? (r(), i("div", {
2963
- key: 8,
2964
- ref: "chartLegend",
2965
- class: "vue-ui-xy-legend",
2966
- style: _(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)
2967
- }, [
2968
- (r(!0), i(d, null, x(e.absoluteDataset, (t, o) => (r(), i("div", {
2969
- key: `div_legend_item_${o}`,
2970
- onClick: (c) => e.segregate(t),
2971
- class: j({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": l.segregatedSeries.includes(t.id) })
2972
- }, [
2973
- l.icons[t.type] === "line" ? (r(), i("svg", Ps, [
2974
- I("rect", {
2975
- x: "0",
2976
- y: "7.5",
2977
- rx: "1.5",
2978
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
2979
- "stroke-width": 0.5,
2980
- height: "3",
2981
- width: "20",
2982
- fill: t.color
2983
- }, null, 8, Rs),
2984
- le(N, {
2985
- plot: { x: 10, y: 9 },
2986
- radius: 4,
2987
- color: t.color,
2988
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle",
2989
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
2990
- strokeWidth: 0.5
2991
- }, null, 8, ["color", "shape", "stroke"])
2992
- ])) : l.icons[t.type] === "bar" ? (r(), i("svg", Bs, [
2993
- l.icons[t.type] === "bar" && s.$slots.pattern ? (r(), i("rect", {
2994
- key: 0,
2995
- x: "0",
2996
- y: "0",
2997
- rx: "1",
2998
- height: "40",
2999
- width: "40",
3000
- stroke: "none",
3001
- fill: t.color
3002
- }, null, 8, Hs)) : u("", !0),
3003
- l.icons[t.type] === "bar" ? (r(), i("rect", {
3004
- key: 1,
3005
- x: "0",
3006
- y: "0",
3007
- rx: "1",
3008
- height: "40",
3009
- width: "40",
3010
- stroke: "none",
3011
- fill: s.$slots.pattern ? `url(#pattern_${l.uniqueId}_${t.slotAbsoluteIndex})` : t.color
3012
- }, null, 8, Ds)) : u("", !0)
3013
- ])) : (r(), i("svg", Es, [
3014
- le(N, {
3015
- plot: { x: 6, y: 6 },
3016
- radius: 5,
3017
- color: t.color,
3018
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(t.shape) ? t.shape : "circle"
3019
- }, null, 8, ["color", "shape"])
3020
- ])),
3021
- I("span", {
3022
- style: _(`color:${e.FINAL_CONFIG.chart.legend.color}`)
3023
- }, R(t.name), 5)
3024
- ], 10, Vs))), 128))
3025
- ], 4)) : (r(), i("div", Ws, [
3026
- G(s.$slots, "legend", { legend: e.absoluteDataset }, void 0, !0)
3027
- ], 512)),
3028
- s.$slots.source ? (r(), i("div", Ys, [
3029
- G(s.$slots, "source", {}, void 0, !0)
3030
- ], 512)) : u("", !0),
3031
- le(m, {
3032
- show: l.mutableConfig.showTooltip && l.isTooltip,
3033
- backgroundColor: e.FINAL_CONFIG.chart.tooltip.backgroundColor,
3034
- color: e.FINAL_CONFIG.chart.tooltip.color,
3035
- fontSize: e.FINAL_CONFIG.chart.tooltip.fontSize,
3036
- borderRadius: e.FINAL_CONFIG.chart.tooltip.borderRadius,
3037
- borderColor: e.FINAL_CONFIG.chart.tooltip.borderColor,
3038
- borderWidth: e.FINAL_CONFIG.chart.tooltip.borderWidth,
3039
- backgroundOpacity: e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,
3040
- position: e.FINAL_CONFIG.chart.tooltip.position,
3041
- offsetY: e.FINAL_CONFIG.chart.tooltip.offsetY,
3042
- parent: s.$refs.chart,
3043
- content: e.tooltipContent,
3044
- isFullscreen: l.isFullscreen,
3045
- isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
3046
- }, {
3047
- "tooltip-before": D(() => [
3048
- G(s.$slots, "tooltip-before", $(ee({ ...e.dataTooltipSlot })), void 0, !0)
3049
- ]),
3050
- "tooltip-after": D(() => [
3051
- G(s.$slots, "tooltip-after", $(ee({ ...e.dataTooltipSlot })), void 0, !0)
3052
- ]),
3053
- _: 3
3054
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
3055
- e.isDataset ? (r(), U(B, {
3056
- key: 11,
3057
- hideDetails: "",
3058
- config: {
3059
- open: l.mutableConfig.showTable,
3060
- maxHeight: 1e4,
3061
- body: {
3062
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
3063
- color: e.FINAL_CONFIG.chart.color
3064
- },
3065
- head: {
3066
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
3067
- color: e.FINAL_CONFIG.chart.color
3068
- }
3069
- }
3070
- }, {
3071
- content: D(() => [
3072
- I("div", {
3073
- style: _(`${l.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
3074
- }, [
3075
- I("div", Xs, [
3076
- tt(I("input", {
3077
- type: "checkbox",
3078
- "onUpdate:modelValue": n[4] || (n[4] = (t) => l.showSparklineTable = t)
3079
- }, null, 512), [
3080
- [lt, l.showSparklineTable]
3081
- ]),
3082
- I("div", {
3083
- onClick: n[5] || (n[5] = (t) => l.showSparklineTable = !l.showSparklineTable),
3084
- style: { cursor: "pointer" }
3085
- }, [
3086
- le(L, {
3087
- name: "chartLine",
3088
- size: 20,
3089
- stroke: e.FINAL_CONFIG.chart.color
3090
- }, null, 8, ["stroke"])
3091
- ])
3092
- ]),
3093
- l.showSparklineTable ? (r(), U(b, {
3094
- key: `sparkline_${l.segregateStep}`,
3095
- dataset: e.tableSparklineDataset,
3096
- config: e.tableSparklineConfig
3097
- }, null, 8, ["dataset", "config"])) : (r(), U(p, {
3098
- key: `table_${l.tableStep}`,
3099
- colNames: e.dataTable.colNames,
3100
- head: e.dataTable.head,
3101
- body: e.dataTable.body,
3102
- config: e.dataTable.config,
3103
- title: `${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text ? ` : ${e.FINAL_CONFIG.chart.title.subtitle.text}` : ""}`,
3104
- onClose: n[6] || (n[6] = (t) => l.mutableConfig.showTable = !1)
3105
- }, {
3106
- th: D(({ th: t }) => [
3107
- I("div", { innerHTML: t }, null, 8, qs)
3108
- ]),
3109
- td: D(({ td: t }) => [
3110
- st(R(isNaN(Number(t)) ? t : e.dataLabel({
3111
- p: e.FINAL_CONFIG.chart.labels.prefix,
3112
- v: t,
3113
- s: e.FINAL_CONFIG.chart.labels.suffix,
3114
- r: e.FINAL_CONFIG.table.rounding
3115
- })), 1)
3116
- ]),
3117
- _: 1
3118
- }, 8, ["colNames", "head", "body", "config", "title"]))
3119
- ], 4)
3120
- ]),
3121
- _: 1
3122
- }, 8, ["config"])) : u("", !0)
3123
- ], 46, ht);
3124
- }
3125
- const sa = /* @__PURE__ */ nt(ot, [["render", Us], ["__scopeId", "data-v-a63aa4db"]]);
3126
- export {
3127
- sa as default
3128
- };