vue-data-ui 2.17.5 → 3.0.0-next.1

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