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

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