vue-data-ui 2.16.0 → 3.0.0-next.0

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