vue-data-ui 2.2.92 → 2.2.94

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 (58) hide show
  1. package/dist/index-DZlxUin4.js +57288 -0
  2. package/dist/{index.es-Dc9Fd4o6.js → index.es-Cgqo-FBk.js} +1 -1
  3. package/dist/style.css +1 -1
  4. package/dist/vue-data-ui.js +61 -455
  5. package/package.json +1 -1
  6. package/dist/data-table-d-VcuH-r.js +0 -1488
  7. package/dist/legend-DJCYLsl_.js +0 -61
  8. package/dist/themes-lgjsYHsH.js +0 -4967
  9. package/dist/title-BF-9Qcni.js +0 -56
  10. package/dist/tooltip-D85WEOKi.js +0 -94
  11. package/dist/user-options-DZgCz8UA.js +0 -415
  12. package/dist/vue-ui-3d-bar-DW7kGJSz.js +0 -20360
  13. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +0 -781
  14. package/dist/vue-ui-annotator-C83FVvl8.js +0 -2175
  15. package/dist/vue-ui-candlestick-diclGj95.js +0 -807
  16. package/dist/vue-ui-chestnut-ACetHLdG.js +0 -1049
  17. package/dist/vue-ui-cursor-Rx7UNaYT.js +0 -229
  18. package/dist/vue-ui-dashboard-B3PlN0ks.js +0 -231
  19. package/dist/vue-ui-digits-CxMXID42.js +0 -154
  20. package/dist/vue-ui-donut-DMiwVXNd.js +0 -1534
  21. package/dist/vue-ui-dumbbell-B_X1T8TR.js +0 -621
  22. package/dist/vue-ui-flow-B72wzQ6V.js +0 -451
  23. package/dist/vue-ui-galaxy-DXX5yivT.js +0 -482
  24. package/dist/vue-ui-gauge-Cs9PDurH.js +0 -466
  25. package/dist/vue-ui-heatmap-PcoNSLdN.js +0 -581
  26. package/dist/vue-ui-kpi-DchEmPtB.js +0 -55
  27. package/dist/vue-ui-mini-loader-DltJLkqy.js +0 -131
  28. package/dist/vue-ui-molecule-CWvukBzs.js +0 -746
  29. package/dist/vue-ui-mood-radar-DEfdtIi8.js +0 -544
  30. package/dist/vue-ui-nested-donuts-9URpqgXE.js +0 -768
  31. package/dist/vue-ui-onion-C0eowUT6.js +0 -551
  32. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +0 -647
  33. package/dist/vue-ui-quadrant-_ddVAm9V.js +0 -1174
  34. package/dist/vue-ui-quick-chart-Cio0hDYO.js +0 -1310
  35. package/dist/vue-ui-radar-Dyg38i33.js +0 -853
  36. package/dist/vue-ui-rating-CE1Lmwd2.js +0 -271
  37. package/dist/vue-ui-relation-circle-BMlB3k3d.js +0 -303
  38. package/dist/vue-ui-rings-BuXeijvb.js +0 -507
  39. package/dist/vue-ui-scatter-B1hZfOua.js +0 -870
  40. package/dist/vue-ui-screenshot-0QXgxzGs.js +0 -160
  41. package/dist/vue-ui-smiley-B7kR7exr.js +0 -763
  42. package/dist/vue-ui-spark-trend-BmL2KiYL.js +0 -245
  43. package/dist/vue-ui-sparkgauge-BMzFv14L.js +0 -158
  44. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +0 -243
  45. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +0 -244
  46. package/dist/vue-ui-strip-plot-DyN6P0JO.js +0 -614
  47. package/dist/vue-ui-table-DM3zL89q.js +0 -2180
  48. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +0 -237
  49. package/dist/vue-ui-thermometer-Bcqv5kd_.js +0 -384
  50. package/dist/vue-ui-timer-BIFxjujK.js +0 -451
  51. package/dist/vue-ui-tiremarks-zBwHpED_.js +0 -248
  52. package/dist/vue-ui-treemap-BaplVc_z.js +0 -719
  53. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +0 -734
  54. package/dist/vue-ui-waffle-COOzH7M3.js +0 -635
  55. package/dist/vue-ui-wheel-BEpuVTBk.js +0 -226
  56. package/dist/vue-ui-word-cloud-DNqxAAiX.js +0 -344
  57. package/dist/vue-ui-xy-_mHq-czW.js +0 -2058
  58. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +0 -1003
@@ -1,2058 +0,0 @@
1
- import { S as U, A as J, u as K, p as Q, s as j } from "./vue-ui-3d-bar-DW7kGJSz.js";
2
- import { e as Z, _ as $, D as ee, a as te, B as le, f as ae, o as ie, p as re, d as X, b as M, H as se, U as oe, A as ne, V as he, N as ce, W as ue, t as de, x as ge, h as fe, c as be, g as Ie, w as me, v as Ne, F as _e, S as Fe, Y as xe, n as ye, y as Ae, z as Se, j as Le, i as Ce, Z as ke, E as we } from "./data-table-d-VcuH-r.js";
3
- import { t as Oe } from "./themes-lgjsYHsH.js";
4
- import { _ as ve, u as q } from "./title-BF-9Qcni.js";
5
- import { _ as Ge, u as ze } from "./tooltip-D85WEOKi.js";
6
- import { U as pe } from "./user-options-DZgCz8UA.js";
7
- import { T as Te } from "./vue-ui-table-DM3zL89q.js";
8
- import { S as Me } from "./vue-ui-candlestick-diclGj95.js";
9
- import { resolveComponent as P, openBlock as i, createElementBlock as r, normalizeClass as T, normalizeStyle as S, createVNode as W, createCommentVNode as h, createBlock as V, createSlots as Pe, withCtx as z, renderSlot as G, normalizeProps as Y, guardReactiveProps as E, createElementVNode as d, Fragment as I, renderList as m, toDisplayString as C, withDirectives as Ve, vModelCheckbox as Re, createTextVNode as De } from "vue";
10
- const He = Z(), Be = {
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
- DataTable: ee,
28
- Shape: te,
29
- Title: ve,
30
- Tooltip: Ge,
31
- UserOptions: pe,
32
- BaseIcon: le,
33
- TableSparkline: Te,
34
- Skeleton: U,
35
- Slicer: Me,
36
- Accordion: J
37
- },
38
- data() {
39
- this.dataset.forEach((c, b) => {
40
- [null, void 0].includes(c.series) && this.error({
41
- componentName: "VueUiXy",
42
- type: "datasetSerieAttribute",
43
- property: "series (number[])",
44
- index: b
45
- });
46
- });
47
- const a = Math.max(...this.dataset.map((c) => c.series.length)), o = {
48
- start: 0,
49
- end: a
50
- };
51
- return {
52
- themePalettes: ae,
53
- themes: Oe,
54
- slicerStep: 0,
55
- selectedScale: null,
56
- CTX: null,
57
- CANVAS: null,
58
- opacity: ie,
59
- useSafeValues: !0,
60
- palette: re,
61
- height: 600,
62
- width: 1e3,
63
- viewBox: "0 0 1000 600",
64
- clientPosition: {
65
- x: 0,
66
- y: 0
67
- },
68
- canvasClientPosition: {
69
- x: 0,
70
- y: 0
71
- },
72
- icons: {
73
- line: "line",
74
- bar: "bar",
75
- plot: "plot"
76
- },
77
- isFullscreen: !1,
78
- isPrinting: !1,
79
- isImaging: !1,
80
- isTooltip: !1,
81
- mutableConfig: {
82
- dataLabels: {
83
- show: !0
84
- },
85
- showTooltip: !0,
86
- showTable: !1,
87
- isStacked: !1,
88
- useIndividualScale: !1
89
- },
90
- selectedSerieIndex: null,
91
- selectedRowIndex: null,
92
- segregatedSeries: [],
93
- uniqueId: Z(),
94
- step: 0,
95
- slicer: o,
96
- __to__: null,
97
- maxX: a,
98
- showSparklineTable: !0,
99
- segregateStep: 0,
100
- sliderId: He,
101
- fontSizes: {
102
- xAxis: 18,
103
- yAxis: 12,
104
- dataLabels: 20,
105
- plotLabels: 10
106
- },
107
- plotRadii: {
108
- plot: 3,
109
- line: 3
110
- }
111
- };
112
- },
113
- computed: {
114
- customPalette() {
115
- return this.convertCustomPalette(this.FINAL_CONFIG.customPalette);
116
- },
117
- backgroundColor() {
118
- return this.FINAL_CONFIG.chart.backgroundColor;
119
- },
120
- slicerColor() {
121
- return this.FINAL_CONFIG.chart.zoom.color;
122
- },
123
- allScales() {
124
- const a = this.lineSet.map((t) => ({
125
- name: t.name,
126
- color: t.color,
127
- scale: t.individualScale,
128
- scaleYLabels: t.scaleYLabels,
129
- zero: t.zeroPosition,
130
- max: t.individualMax,
131
- scaleLabel: t.scaleLabel || "",
132
- id: t.id,
133
- yOffset: t.yOffset || 0,
134
- individualHeight: t.individualHeight || this.drawingArea.height,
135
- autoScaleYLabels: t.autoScaleYLabels
136
- })), o = this.barSet.map((t) => ({
137
- name: t.name,
138
- color: t.color,
139
- scale: t.individualScale,
140
- scaleYLabels: t.scaleYLabels,
141
- zero: t.zeroPosition,
142
- max: t.individualMax,
143
- scaleLabel: t.scaleLabel || "",
144
- id: t.id,
145
- yOffset: t.yOffset || 0,
146
- individualHeight: t.individualHeight || this.drawingArea.height
147
- })), c = this.plotSet.map((t) => ({
148
- name: t.name,
149
- color: t.color,
150
- scale: t.individualScale,
151
- scaleYLabels: t.scaleYLabels,
152
- // FIX
153
- zero: t.zeroPosition,
154
- max: t.individualMax,
155
- scaleLabel: t.scaleLabel || "",
156
- id: t.id,
157
- yOffset: t.yOffset || 0,
158
- individualHeight: t.individualHeight || this.drawingArea.height
159
- })), b = [...a, ...o, ...c].flatMap((t) => t).length;
160
- return [...a, ...o, ...c].flatMap((t, e) => ({
161
- id: t.id,
162
- scaleLabel: t.scaleLabel,
163
- name: t.name,
164
- color: t.color,
165
- scale: t.scale,
166
- yOffset: t.yOffset,
167
- individualHeight: t.individualHeight,
168
- x: this.mutableConfig.isStacked ? this.drawingArea.left : this.drawingArea.left / b * (e + 1),
169
- yLabels: t.scaleYLabels || t.scale.ticks.map((N) => ({
170
- y: N >= 0 ? t.zero - t.individualHeight * (N / t.max) : t.zero + t.individualHeight * Math.abs(N) / t.max,
171
- value: N
172
- }))
173
- }));
174
- },
175
- isDataset() {
176
- return !!this.dataset && this.dataset.length;
177
- },
178
- chartFont() {
179
- const a = document.getElementById(`vue-ui-xy_${this.uniqueId}`);
180
- return window.getComputedStyle(a, null).getPropertyValue("font-family");
181
- },
182
- FINAL_CONFIG: {
183
- get: function() {
184
- const a = K().vue_ui_xy;
185
- if (!Object.keys(this.config || {}).length)
186
- return a;
187
- const o = this.useNestedProp({
188
- userConfig: this.config,
189
- defaultConfig: a
190
- });
191
- return o.theme ? {
192
- ...q({
193
- userConfig: this.themes.vue_ui_xy[o.theme] || this.config,
194
- defaultConfig: o
195
- }),
196
- customPalette: this.themePalettes[o.theme] || this.palette
197
- } : o;
198
- },
199
- set: function(a) {
200
- return a;
201
- }
202
- },
203
- hasHighlightArea() {
204
- return this.FINAL_CONFIG.chart.highlightArea && this.FINAL_CONFIG.chart.highlightArea.show;
205
- },
206
- highlightAreaSpan() {
207
- const { from: a, to: o } = this.FINAL_CONFIG.chart.highlightArea;
208
- return a === o ? 1 : o < a ? 0 : o - a + 1;
209
- },
210
- relativeZero() {
211
- return this.niceScale.min >= 0 ? 0 : Math.abs(this.niceScale.min);
212
- },
213
- absoluteMax() {
214
- return this.niceScale.max + this.relativeZero;
215
- },
216
- safeDataset() {
217
- return this.useSafeValues ? this.dataset.map((a, o) => ({
218
- ...a,
219
- series: a.series.map((c) => this.isSafeValue(c) ? c : null).slice(this.slicer.start, this.slicer.end),
220
- color: this.convertColorToHex(a.color ? a.color : this.customPalette[o] ? this.customPalette[o] : this.palette[o]),
221
- id: `uniqueId_${o}`
222
- })) : this.dataset;
223
- },
224
- relativeDataset() {
225
- return this.safeDataset.map((a, o) => ({
226
- ...a,
227
- series: a.series.map((c) => c + this.relativeZero),
228
- absoluteValues: a.series
229
- })).filter((a) => !this.segregatedSeries.includes(a.id));
230
- },
231
- tableSparklineDataset() {
232
- return this.relativeDataset.map((a) => {
233
- const o = a.absoluteValues.map((c) => [void 0, null].includes(c) ? 0 : c);
234
- return {
235
- id: a.id,
236
- name: a.name,
237
- color: a.color,
238
- values: this.fillArray(this.maxSeries, o)
239
- };
240
- });
241
- },
242
- tableSparklineConfig() {
243
- return {
244
- responsiveBreakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint,
245
- roundingValues: this.FINAL_CONFIG.table.rounding,
246
- showAverage: !1,
247
- showMedian: !1,
248
- showTotal: !1,
249
- fontFamily: this.FINAL_CONFIG.chart.fontFamily,
250
- colNames: JSON.parse(JSON.stringify(this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values)),
251
- thead: {
252
- backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
253
- color: this.FINAL_CONFIG.table.th.color,
254
- outline: this.FINAL_CONFIG.table.th.outline
255
- },
256
- tbody: {
257
- backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
258
- color: this.FINAL_CONFIG.table.td.color,
259
- outline: this.FINAL_CONFIG.table.td.outline
260
- },
261
- userOptions: {
262
- show: !1
263
- }
264
- };
265
- },
266
- absoluteDataset() {
267
- return this.safeDataset.map((a, o) => ({
268
- absoluteIndex: o,
269
- ...a,
270
- series: a.series.map((c) => c + this.relativeZero),
271
- absoluteValues: a.series,
272
- segregate: () => this.segregate(a),
273
- isSegregated: this.segregatedSeries.includes(a.id)
274
- }));
275
- },
276
- barSet() {
277
- return this.activeSeriesWithStackRatios.filter((a) => a.type === "bar").map((a, o) => {
278
- this.checkAutoScaleError(a);
279
- const c = Math.min(...a.absoluteValues.filter((u) => ![null, void 0].includes(u))), b = Math.max(...a.absoluteValues.filter((u) => ![null, void 0].includes(u))), e = {
280
- ratios: a.absoluteValues.filter((u) => ![null, void 0].includes(u)).map((u) => (u - c) / (b - c)),
281
- valueMin: c,
282
- valueMax: b < 0 ? 0 : b
283
- }, N = {
284
- max: a.scaleMax || Math.max(...a.absoluteValues) || 1,
285
- min: a.scaleMin || Math.min(...a.absoluteValues.filter((u) => ![void 0, null].includes(u))) > 0 ? 0 : Math.min(...a.absoluteValues.filter((u) => ![null, void 0].includes(u)))
286
- }, A = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, f = this.calculateNiceScale(N.min, N.max, A), F = this.calculateNiceScale(e.valueMin, e.valueMax, A), p = f.min >= 0 ? 0 : Math.abs(f.min), k = 0, w = f.max + p, v = F.max + Math.abs(k), _ = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - a.cumulatedStackRatio) : 0, L = this.mutableConfig.isStacked ? this.drawingArea.height * a.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, l = this.drawingArea.bottom - _ - L * p / w, n = this.drawingArea.bottom - _ - L * k / v, s = this.absoluteDataset.filter((u) => u.type === "bar").filter((u) => !this.segregatedSeries.includes(u.id)).length, g = a.series.map((u, x) => {
287
- const H = this.mutableConfig.useIndividualScale ? (a.absoluteValues[x] + p) / w : this.ratioToMax(u), B = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * x : this.drawingArea.left + this.slot.bar * o + this.slot.bar * x * s - this.barSlot / 2 - o * this.barPeriodGap;
288
- return {
289
- yOffset: _,
290
- individualHeight: L,
291
- x: B,
292
- y: this.drawingArea.bottom - _ - L * H,
293
- value: a.absoluteValues[x],
294
- zeroPosition: l,
295
- individualMax: w,
296
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[x] || ""
297
- };
298
- }), D = a.absoluteValues.map((u) => F.min >= 0 ? (u - Math.abs(F.min)) / (F.max - Math.abs(F.min)) : (u + Math.abs(F.min)) / (F.max + Math.abs(F.min))), R = a.series.map((u, x) => {
299
- const H = this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.drawingArea.left + this.drawingArea.width / this.maxSeries * x : this.drawingArea.left - this.slot.bar / 2 + this.slot.bar * o + this.slot.bar * x * this.absoluteDataset.filter((B) => B.type === "bar").filter((B) => !this.segregatedSeries.includes(B.id)).length;
300
- return {
301
- yOffset: _,
302
- individualHeight: L,
303
- x: H,
304
- y: this.drawingArea.bottom - _ - (L * D[x] || 0),
305
- value: a.absoluteValues[x],
306
- zeroPosition: l,
307
- individualMax: w,
308
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[x] || ""
309
- };
310
- }), y = f.ticks.map((u) => ({
311
- y: u >= 0 ? l - L * (u / w) : l + L * Math.abs(u) / w,
312
- value: u
313
- })), O = F.ticks.map((u) => {
314
- const x = (u - F.min) / (F.max - F.min);
315
- return {
316
- y: u >= 0 ? n - L * x : n + L * x,
317
- value: u
318
- };
319
- });
320
- return {
321
- ...a,
322
- yOffset: _,
323
- autoScaleYLabels: O,
324
- individualHeight: L,
325
- scaleYLabels: a.autoScaling ? O : y,
326
- individualScale: a.autoScaling ? F : f,
327
- individualMax: a.autoScaling ? v : w,
328
- zeroPosition: a.autoScaling ? n : l,
329
- plots: a.autoScaling ? R : g
330
- };
331
- });
332
- },
333
- activeSeriesLength() {
334
- return this.absoluteDataset.length;
335
- },
336
- activeSeriesWithStackRatios() {
337
- return this.assignStackRatios(this.absoluteDataset.filter((a) => !this.segregatedSeries.includes(a.id)));
338
- },
339
- lineSet() {
340
- return this.activeSeriesWithStackRatios.filter((a) => a.type === "line").map((a) => {
341
- this.checkAutoScaleError(a);
342
- const o = Math.min(...a.absoluteValues.filter((u) => ![void 0, null].includes(u))), c = Math.max(...a.absoluteValues.filter((u) => ![void 0, null].includes(u))) || 1, t = {
343
- ratios: a.absoluteValues.filter((u) => ![null, void 0].includes(u)).map((u) => (u - o) / (c - o)),
344
- valueMin: o,
345
- valueMax: c
346
- }, e = {
347
- max: a.scaleMax || Math.max(...a.absoluteValues) || 1,
348
- min: a.scaleMin || (Math.min(...a.absoluteValues) > 0 ? 0 : Math.min(...a.absoluteValues))
349
- }, N = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = this.calculateNiceScale(e.min, e.max, N), f = this.calculateNiceScale(t.valueMin, t.valueMax, N), F = A.min >= 0 ? 0 : Math.abs(A.min), p = 0, k = A.max + Math.abs(F), w = f.max + Math.abs(p), v = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - a.cumulatedStackRatio) : 0, _ = this.mutableConfig.isStacked ? this.drawingArea.height * a.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, L = this.drawingArea.bottom - v - _ * F / k, l = this.drawingArea.bottom - v - _ * p / w, n = a.series.map((u, x) => {
350
- const H = this.mutableConfig.useIndividualScale ? (a.absoluteValues[x] + Math.abs(F)) / k : this.ratioToMax(u);
351
- return {
352
- x: this.drawingArea.left + this.slot.line / 2 + this.slot.line * x,
353
- y: this.drawingArea.bottom - v - _ * H,
354
- value: a.absoluteValues[x],
355
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[x] || ""
356
- };
357
- }), s = a.absoluteValues.map((u) => f.min >= 0 ? (u - Math.abs(f.min)) / (f.max - Math.abs(f.min)) : (u + Math.abs(f.min)) / (f.max + Math.abs(f.min))), g = a.series.map((u, x) => {
358
- if (![void 0, null].includes(a.absoluteValues[x]))
359
- return {
360
- x: this.drawingArea.left + this.slot.line / 2 + this.slot.line * x,
361
- y: this.drawingArea.bottom - v - (_ * s[x] || 0),
362
- value: a.absoluteValues[x],
363
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[x] || ""
364
- };
365
- }), D = this.createSmoothPath(n), R = this.createSmoothPath(g), y = A.ticks.map((u) => ({
366
- y: u >= 0 ? L - _ * (u / k) : L + _ * Math.abs(u) / k,
367
- value: u
368
- })), O = f.ticks.map((u) => {
369
- const x = (u - f.min) / (f.max - f.min);
370
- return {
371
- y: u >= 0 ? l - _ * x : l + _ * x,
372
- value: u
373
- };
374
- });
375
- return {
376
- ...a,
377
- yOffset: v,
378
- autoScaleYLabels: O,
379
- individualHeight: _,
380
- scaleYLabels: a.autoScaling ? O : y,
381
- individualScale: a.autoScaling ? f : A,
382
- individualMax: a.autoScaling ? w : k,
383
- zeroPosition: a.autoScaling ? l : L,
384
- curve: a.autoScaling ? R : D,
385
- plots: a.autoScaling ? g : n,
386
- area: a.useArea ? this.mutableConfig.useIndividualScale ? this.createIndividualArea(a.autoScaling ? g : n, a.autoScaling ? l : L) : this.createArea(n) : ""
387
- };
388
- });
389
- },
390
- plotSet() {
391
- return this.activeSeriesWithStackRatios.filter((a) => a.type === "plot").map((a) => {
392
- this.checkAutoScaleError(a);
393
- const o = Math.min(...a.absoluteValues.filter((y) => ![null, void 0].includes(y))), c = Math.max(...a.absoluteValues.filter((y) => ![null, void 0].includes(y))) || 1, t = {
394
- ratios: a.absoluteValues.filter((y) => ![null, void 0].includes(y)).map((y) => (y - o) / (c - o)),
395
- valueMin: o,
396
- valueMax: c
397
- }, e = {
398
- max: a.scaleMax || Math.max(...a.absoluteValues) || 1,
399
- min: a.scaleMin || Math.min(...a.absoluteValues) > 0 ? 0 : Math.min(...a.absoluteValues)
400
- }, N = a.scaleSteps || this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps, A = this.calculateNiceScale(e.min, e.max, N), f = this.calculateNiceScale(t.valueMin, t.valueMax, N), F = A.min >= 0 ? 0 : Math.abs(A.min), p = 0, k = A.max + F, w = f.max + Math.abs(p), v = this.mutableConfig.isStacked ? this.drawingArea.height * (1 - a.cumulatedStackRatio) : 0, _ = this.mutableConfig.isStacked ? this.drawingArea.height * a.stackRatio - this.FINAL_CONFIG.chart.grid.labels.yAxis.gap : this.drawingArea.height, L = this.drawingArea.bottom - v - _ * F / k, l = this.drawingArea.bottom - v - _ * p / w, n = a.series.map((y, O) => {
401
- const u = this.mutableConfig.useIndividualScale ? (a.absoluteValues[O] + Math.abs(F)) / k : this.ratioToMax(y);
402
- return {
403
- x: this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * O,
404
- y: this.drawingArea.bottom - v - _ * u,
405
- value: a.absoluteValues[O],
406
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[O] || ""
407
- };
408
- }), s = a.absoluteValues.map((y) => f.min >= 0 ? (y - Math.abs(f.min)) / (f.max - Math.abs(f.min)) : (y + Math.abs(f.min)) / (f.max + Math.abs(f.min))), g = a.series.map((y, O) => ({
409
- x: this.drawingArea.left + this.slot.plot / 2 + this.slot.plot * O,
410
- y: this.drawingArea.bottom - v - (_ * s[O] || 0),
411
- value: a.absoluteValues[O],
412
- comment: a.comments && a.comments.slice(this.slicer.start, this.slicer.end)[O] || ""
413
- })), D = A.ticks.map((y) => ({
414
- y: y >= 0 ? L - _ * (y / k) : L + _ * Math.abs(y) / k,
415
- value: y
416
- })), R = f.ticks.map((y) => {
417
- const O = (y - f.min) / (f.max - f.min);
418
- return {
419
- y: y >= 0 ? l - _ * O : l + _ * O,
420
- value: y
421
- };
422
- });
423
- return {
424
- ...a,
425
- yOffset: v,
426
- autoScaleYLabels: R,
427
- individualHeight: _,
428
- scaleYLabels: a.autoScaling ? R : D,
429
- individualScale: a.autoScaling ? f : A,
430
- individualMax: a.autoScaling ? w : k,
431
- zeroPosition: a.autoScaling ? l : L,
432
- plots: a.autoScaling ? g : n
433
- };
434
- });
435
- },
436
- drawingArea() {
437
- const a = this.mutableConfig.useIndividualScale && this.FINAL_CONFIG.chart.grid.labels.show ? this.absoluteDataset.filter((o) => !this.segregatedSeries.includes(o.id)).length * (this.mutableConfig.isStacked ? 0 : this.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth) : 0;
438
- return {
439
- top: this.FINAL_CONFIG.chart.padding.top,
440
- right: this.width - this.FINAL_CONFIG.chart.padding.right,
441
- bottom: this.height - this.FINAL_CONFIG.chart.padding.bottom,
442
- left: this.FINAL_CONFIG.chart.padding.left + a,
443
- height: this.height - (this.FINAL_CONFIG.chart.padding.top + this.FINAL_CONFIG.chart.padding.bottom),
444
- width: this.width - (this.FINAL_CONFIG.chart.padding.right + this.FINAL_CONFIG.chart.padding.left + a)
445
- };
446
- },
447
- max() {
448
- return Math.max(...this.safeDataset.filter((a) => !this.segregatedSeries.includes(a.id)).map((a) => Math.max(...a.series)));
449
- },
450
- min() {
451
- const a = Math.min(...this.safeDataset.filter((o) => !this.segregatedSeries.includes(o.id)).map((o) => Math.min(...o.series)));
452
- return a > 0 ? 0 : a;
453
- },
454
- niceScale() {
455
- return this.calculateNiceScale(this.min, this.max < 0 ? 0 : this.max, this.FINAL_CONFIG.chart.grid.labels.yAxis.commonScaleSteps);
456
- },
457
- maxSeries() {
458
- return this.slicer.end - this.slicer.start;
459
- },
460
- timeLabels() {
461
- return this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values.slice(this.slicer.start, this.slicer.end);
462
- },
463
- slot() {
464
- return {
465
- bar: this.drawingArea.width / this.maxSeries / this.safeDataset.filter((a) => a.type === "bar").filter((a) => !this.segregatedSeries.includes(a.id)).length,
466
- plot: this.drawingArea.width / this.maxSeries,
467
- line: this.drawingArea.width / this.maxSeries
468
- };
469
- },
470
- barSlot() {
471
- const a = this.safeDataset.filter((o) => o.type === "bar").filter((o) => !this.segregatedSeries.includes(o.id)).length;
472
- return this.drawingArea.width / this.maxSeries / a - this.barPeriodGap * a;
473
- },
474
- barPeriodGap() {
475
- return this.slot.line * this.FINAL_CONFIG.bar.periodGap;
476
- },
477
- maxSlot() {
478
- return Math.max(...Object.values(this.slot).filter((a) => a !== 1 / 0));
479
- },
480
- table() {
481
- if (this.safeDataset.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
482
- const a = this.relativeDataset.map((c) => ({
483
- label: c.name,
484
- color: c.color,
485
- type: c.type
486
- })), o = [];
487
- return this.timeLabels.forEach((c, b) => {
488
- const t = [c];
489
- this.relativeDataset.forEach((e) => {
490
- t.push(this.canShowValue(e.absoluteValues[b]) ? Number(e.absoluteValues[b].toFixed(this.FINAL_CONFIG.table.rounding)) : "");
491
- }), o.push(t);
492
- }), { head: a, body: o };
493
- },
494
- dataTable() {
495
- const a = [""].concat(this.relativeDataset.map((t) => t.name)).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>');
496
- let o = [];
497
- for (let t = 0; t < this.maxSeries; t += 1) {
498
- const e = this.relativeDataset.map((N) => N.absoluteValues[t] ?? 0).reduce((N, A) => N + A, 0);
499
- o.push([this.timeLabels[t] ?? "-"].concat(this.relativeDataset.map((N) => (N.absoluteValues[t] ?? 0).toFixed(this.FINAL_CONFIG.table.rounding))).concat((e ?? 0).toFixed(this.FINAL_CONFIG.table.rounding)));
500
- }
501
- const c = {
502
- th: {
503
- backgroundColor: this.FINAL_CONFIG.table.th.backgroundColor,
504
- color: this.FINAL_CONFIG.table.th.color,
505
- outline: this.FINAL_CONFIG.table.th.outline
506
- },
507
- td: {
508
- backgroundColor: this.FINAL_CONFIG.table.td.backgroundColor,
509
- color: this.FINAL_CONFIG.table.td.color,
510
- outline: this.FINAL_CONFIG.table.td.outline
511
- },
512
- breakpoint: this.FINAL_CONFIG.table.responsiveBreakpoint
513
- }, b = [this.FINAL_CONFIG.table.columnNames.period].concat(this.relativeDataset.map((t) => t.name)).concat(this.FINAL_CONFIG.table.columnNames.total);
514
- return { head: a, body: o, config: c, colNames: b };
515
- },
516
- dataTooltipSlot() {
517
- return {
518
- datapoint: this.selectedSeries,
519
- seriesIndex: this.selectedSerieIndex,
520
- series: this.absoluteDataset,
521
- bars: this.barSet,
522
- lines: this.lineSet,
523
- plots: this.plotSet,
524
- config: this.FINAL_CONFIG
525
- };
526
- },
527
- selectedSeries() {
528
- return this.relativeDataset.map((a) => ({
529
- shape: a.shape || null,
530
- name: a.name,
531
- color: a.color,
532
- type: a.type,
533
- value: a.absoluteValues.find((o, c) => c === this.selectedSerieIndex),
534
- comments: a.comments || []
535
- }));
536
- },
537
- tooltipContent() {
538
- let a = "", o = this.selectedSeries.map((t) => t.value).filter((t) => this.isSafeValue(t) && t !== null).reduce((t, e) => Math.abs(t) + Math.abs(e), 0);
539
- const c = this.timeLabels[this.selectedSerieIndex], b = this.FINAL_CONFIG.chart.tooltip.customFormat;
540
- return this.isFunction(b) && this.functionReturnsString(() => b({
541
- seriesIndex: this.selectedSerieIndex,
542
- datapoint: this.selectedSeries,
543
- series: this.absoluteDataset,
544
- bars: this.barSet,
545
- lines: this.lineSet,
546
- plots: this.plotSet,
547
- config: this.FINAL_CONFIG
548
- })) ? b({
549
- seriesIndex: this.selectedSerieIndex,
550
- datapoint: this.selectedSeries,
551
- series: this.absoluteDataset,
552
- bars: this.barSet,
553
- lines: this.lineSet,
554
- plots: this.plotSet,
555
- config: this.FINAL_CONFIG
556
- }) : (c && (a += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${this.FINAL_CONFIG.chart.tooltip.borderColor}; width:100%">${c}</div>`), this.selectedSeries.forEach((t) => {
557
- if (this.isSafeValue(t.value)) {
558
- let e = "", N = "";
559
- switch (this.icons[t.type]) {
560
- case "bar":
561
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" rx="1" stroke="none" height="12" width="12" fill="${t.color}" /></svg>`;
562
- break;
563
- case "line":
564
- !t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape) ? N = `<circle cx="10" cy="8" r="4" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" />` : t.shape === "triangle" ? N = `<path d="${M({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />` : t.shape === "square" ? N = `<path d="${M({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />` : t.shape === "diamond" ? N = `<path d="${M({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />` : t.shape === "pentagon" ? N = `<path d="${M({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />` : t.shape === "hexagon" ? N = `<path d="${M({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" />` : t.shape === "star" && (N = `<polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" points="${X({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), e = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="3" x="0" y="6" stroke="none" height="4" width="20" fill="${t.color}" />${N}</svg>`;
565
- break;
566
- case "plot":
567
- if (!t.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(t.shape)) {
568
- 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="${t.color}" /></svg>`;
569
- break;
570
- }
571
- if (t.shape === "star") {
572
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" fill="${t.color}" points="${X({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
573
- break;
574
- }
575
- if (t.shape === "triangle") {
576
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${M({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
577
- break;
578
- }
579
- if (t.shape === "square") {
580
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${M({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
581
- break;
582
- }
583
- if (t.shape === "diamond") {
584
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${M({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
585
- break;
586
- }
587
- if (t.shape === "pentagon") {
588
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${M({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
589
- break;
590
- }
591
- if (t.shape === "hexagon") {
592
- e = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${M({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${t.color}" stroke="${this.FINAL_CONFIG.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
593
- break;
594
- }
595
- }
596
- a += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${e}</div> ${t.name}: <b>${this.FINAL_CONFIG.chart.tooltip.showValue ? this.dataLabel({ p: this.FINAL_CONFIG.chart.labels.prefix, v: t.value, s: this.FINAL_CONFIG.chart.labels.suffix, r: this.FINAL_CONFIG.chart.tooltip.roundingValue }) : ""}</b> ${this.FINAL_CONFIG.chart.tooltip.showPercentage ? `(${this.checkNaN(Math.abs(t.value) / o * 100).toFixed(this.FINAL_CONFIG.chart.tooltip.roundingPercentage)}%)` : ""}</div>`, this.FINAL_CONFIG.chart.comments.showInTooltip && t.comments.length && t.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex] && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${t.color}">${t.comments.slice(this.slicer.start, this.slicer.end)[this.selectedSerieIndex]}</div>`);
597
- }
598
- }), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${this.FINAL_CONFIG.chart.tooltip.color}">${a}</div>`);
599
- },
600
- svg() {
601
- return {
602
- height: this.height,
603
- width: this.width
604
- };
605
- },
606
- yLabels() {
607
- return this.niceScale.ticks.map((a) => ({
608
- y: a >= 0 ? this.zero - this.drawingArea.height * this.ratioToMax(a) : this.zero + this.drawingArea.height * this.ratioToMax(Math.abs(a)),
609
- value: a
610
- }));
611
- },
612
- zero() {
613
- return this.drawingArea.bottom - this.drawingArea.height * this.ratioToMax(this.relativeZero);
614
- }
615
- },
616
- mounted() {
617
- if (this.objectIsEmpty(this.dataset) ? this.error({
618
- componentName: "VueUiXy",
619
- type: "dataset"
620
- }) : this.dataset.forEach((a, o) => {
621
- [null, void 0].includes(a.name) && this.error({
622
- componentName: "VueUiXy",
623
- type: "datasetSerieAttribute",
624
- property: "name (string)",
625
- index: o
626
- });
627
- }), this.FINAL_CONFIG.showWarnings && this.dataset.forEach((a) => {
628
- a.series.forEach((o, c) => {
629
- this.isSafeValue(o) || console.warn(`SmartXY has detected an unsafe value in your dataset:
630
- -----> The serie '${a.name}' contains the value '${o}' at index ${c}.
631
- '${o}' was converted to null to allow the chart to display.`);
632
- });
633
- }), document.addEventListener("mousemove", (a) => {
634
- this.clientPosition = {
635
- x: a.clientX,
636
- y: a.clientY
637
- };
638
- }), this.mutableConfig = {
639
- dataLabels: {
640
- show: !0
641
- },
642
- showTooltip: this.FINAL_CONFIG.chart.tooltip.show === !0,
643
- showTable: this.FINAL_CONFIG.showTable === !0,
644
- isStacked: this.FINAL_CONFIG.chart.grid.labels.yAxis.stacked,
645
- useIndividualScale: this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale
646
- }, this.FINAL_CONFIG.responsive) {
647
- const o = this.$refs.chart.parentNode, { height: c, width: b } = o.getBoundingClientRect();
648
- let t = null, e = 0;
649
- this.FINAL_CONFIG.chart.title.show && (t = this.$refs.chartTitle, e = t.getBoundingClientRect().height);
650
- let N = null, A = 0;
651
- this.FINAL_CONFIG.chart.zoom.show && this.maxX > 6 && this.isDataset && (N = this.$refs.chartSlicer.$el, A = N.getBoundingClientRect().height);
652
- let f = null, F = 0;
653
- this.FINAL_CONFIG.chart.legend.show && (f = this.$refs.chartLegend, F = f.getBoundingClientRect().height), this.height = c - e - F - A, this.width = b, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes(), new ResizeObserver((k) => {
654
- for (const w of k)
655
- t && (e = t.getBoundingClientRect().height), N && (A = N.getBoundingClientRect().height), f && (F = f.getBoundingClientRect().height), this.height = w.contentBoxSize[0].blockSize - e - F - A - 24, this.width = w.contentBoxSize[0].inlineSize, this.viewBox = `0 0 ${this.width < 0 ? 10 : this.width} ${this.height < 0 ? 10 : this.height}`, this.convertSizes();
656
- }).observe(o);
657
- } else
658
- this.height = this.FINAL_CONFIG.chart.height, this.width = this.FINAL_CONFIG.chart.width, this.viewBox = `0 0 ${this.width} ${this.height}`, this.fontSizes.dataLabels = this.FINAL_CONFIG.chart.grid.labels.fontSize, this.fontSizes.yAxis = this.FINAL_CONFIG.chart.grid.labels.axis.fontSize, this.fontSizes.xAxis = this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize, this.fontSizes.plotLabels = this.FINAL_CONFIG.chart.labels.fontSize, this.plotRadii.plot = this.FINAL_CONFIG.plot.radius, this.plotRadii.line = this.FINAL_CONFIG.line.radius;
659
- },
660
- methods: {
661
- abbreviate: se,
662
- assignStackRatios: oe,
663
- calculateNiceScale: ne,
664
- checkNaN: he,
665
- createSmoothPath: ce,
666
- isSafeValue: ue,
667
- treeShake: de,
668
- shiftHue: ge,
669
- pdf: Q,
670
- img: j,
671
- convertColorToHex: fe,
672
- convertConfigColors: be,
673
- convertCustomPalette: Ie,
674
- downloadCsv: me,
675
- createCsvContent: Ne,
676
- adaptColorToBackground: _e,
677
- calcLinearProgression: Fe,
678
- useMouse: ze,
679
- closestDecimal: xe,
680
- dataLabel: ye,
681
- isFunction: Ae,
682
- functionReturnsString: Se,
683
- error: Le,
684
- objectIsEmpty: Ce,
685
- createTSpans: ke,
686
- useNestedProp: q,
687
- translateSize: we,
688
- convertSizes() {
689
- this.fontSizes.dataLabels = this.translateSize({
690
- relator: this.height,
691
- adjuster: 400,
692
- source: this.FINAL_CONFIG.chart.grid.labels.fontSize,
693
- threshold: 10,
694
- fallback: 10
695
- }), this.fontSizes.yAxis = this.translateSize({
696
- relator: this.width,
697
- adjuster: 1e3,
698
- source: this.FINAL_CONFIG.chart.grid.labels.axis.fontSize,
699
- threshold: 10,
700
- fallback: 10
701
- }), this.fontSizes.xAxis = this.translateSize({
702
- relator: this.width,
703
- adjuster: 1e3,
704
- source: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.fontSize,
705
- threshold: 10,
706
- fallback: 10
707
- }), this.fontSizes.plotLabels = this.translateSize({
708
- relator: this.width,
709
- adjuster: 800,
710
- source: this.FINAL_CONFIG.chart.labels.fontSize,
711
- threshold: 10,
712
- fallback: 10
713
- }), this.plotRadii.plot = this.translateSize({
714
- relator: this.width,
715
- adjuster: 800,
716
- source: this.FINAL_CONFIG.plot.radius,
717
- threshold: 1,
718
- fallback: 1
719
- }), this.plotRadii.line = this.translateSize({
720
- relator: this.width,
721
- adjuster: 800,
722
- source: this.FINAL_CONFIG.line.radius,
723
- threshold: 1,
724
- fallback: 1
725
- });
726
- },
727
- toggleStack() {
728
- this.mutableConfig.isStacked = !this.mutableConfig.isStacked, this.mutableConfig.isStacked ? this.mutableConfig.useIndividualScale = !0 : this.mutableConfig.useIndividualScale = this.FINAL_CONFIG.chart.grid.labels.yAxis.useIndividualScale;
729
- },
730
- toggleTable() {
731
- this.mutableConfig.showTable = !this.mutableConfig.showTable;
732
- },
733
- toggleLabels() {
734
- this.mutableConfig.dataLabels.show = !this.mutableConfig.dataLabels.show;
735
- },
736
- toggleTooltip() {
737
- this.mutableConfig.showTooltip = !this.mutableConfig.showTooltip;
738
- },
739
- checkAutoScaleError(a) {
740
- 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`));
741
- },
742
- createArea(a) {
743
- if (!a[0]) return [-10, -10, "", -10, -10];
744
- const o = { x: a[0].x, y: this.zero }, c = { x: a.at(-1).x, y: this.zero }, b = [];
745
- return a.forEach((t) => {
746
- b.push(`${t.x},${t.y} `);
747
- }), [o.x, o.y, ...b, c.x, c.y].toString();
748
- },
749
- createIndividualArea(a, o) {
750
- if (!a[0]) return [-10, -10, "", -10, -10];
751
- const c = { x: a[0] ? a[0].x : Math.min(...a.filter((e) => !!e).map((e) => e.x)), y: o }, b = { x: a.at(-1) ? a.at(-1).x : Math.min(...a.filter((e) => !!e).map((e) => e.x)), y: o }, t = [];
752
- return a.filter((e) => !!e).forEach((e) => {
753
- t.push(`${e.x},${e.y} `);
754
- }), [c.x, c.y, ...t, b.x, b.y].toString();
755
- },
756
- createStar: X,
757
- createPolygonPath: M,
758
- /////////////////////////////// CANVAS /////////////////////////////////
759
- fillArray(a, o) {
760
- let c = Array(a).fill(0);
761
- for (let b = 0; b < o.length && b < a; b += 1)
762
- c[b] = o[b];
763
- return c;
764
- },
765
- refreshSlicer() {
766
- this.slicer = {
767
- start: 0,
768
- end: Math.max(...this.dataset.map((a) => a.series.length))
769
- }, this.slicerStep += 1;
770
- },
771
- calcRectHeight(a) {
772
- return a.value >= 0 ? this.zero - a.y <= 0 ? 1e-5 : this.zero - a.y : a.y - this.zero <= 0 ? 1e-5 : a.y - this.zero;
773
- },
774
- calcIndividualHeight(a) {
775
- return a.value >= 0 ? a.zeroPosition - a.y <= 0 ? 1e-5 : a.zeroPosition - a.y : a.y - a.zeroPosition <= 0 ? 1e-5 : a.zeroPosition - a.y;
776
- },
777
- calcRectWidth() {
778
- return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? this.slot.line - this.drawingArea.width / this.maxSeries * 0.1 : this.slot.bar;
779
- },
780
- calcRectX(a) {
781
- return this.mutableConfig.useIndividualScale && this.mutableConfig.isStacked ? a.x + this.drawingArea.width / this.maxSeries * 0.05 : a.x + this.slot.bar / 2;
782
- },
783
- calcRectY(a) {
784
- return a.value >= 0 ? a.y : this.zero;
785
- },
786
- calcIndividualRectY(a) {
787
- return a.value >= 0 ? a.y : a.zeroPosition;
788
- },
789
- canShowValue(a) {
790
- return ![null, void 0, NaN].includes(a);
791
- },
792
- findClosestValue(a, o) {
793
- let c = o[0], b = Math.abs(a - o[0]);
794
- for (let t = 1; t < o.length; t += 1) {
795
- const e = Math.abs(a - o[t]);
796
- e < b && o[t] < a && (c = o[t], b = e);
797
- }
798
- return c;
799
- },
800
- ratioToMax(a) {
801
- return a / this.absoluteMax;
802
- },
803
- selectX(a) {
804
- this.$emit(
805
- "selectX",
806
- {
807
- dataset: this.relativeDataset.map((o) => ({
808
- name: o.name,
809
- value: [null, void 0, NaN].includes(o.absoluteValues[a]) ? null : o.absoluteValues[a],
810
- color: o.color,
811
- type: o.type
812
- })),
813
- index: a,
814
- indexLabel: this.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[a]
815
- }
816
- );
817
- },
818
- getData() {
819
- return this.absoluteDataset.map((a) => ({
820
- values: a.absoluteValues,
821
- color: a.color,
822
- name: a.name,
823
- type: a.type
824
- }));
825
- },
826
- segregate(a) {
827
- if (this.segregatedSeries.includes(a.id))
828
- this.segregatedSeries = this.segregatedSeries.filter((o) => o !== a.id);
829
- else {
830
- if (this.segregatedSeries.length + 1 === this.safeDataset.length) return;
831
- this.segregatedSeries.push(a.id);
832
- }
833
- this.$emit("selectLegend", this.relativeDataset.map((o) => ({
834
- name: o.name,
835
- values: o.absoluteValues,
836
- color: o.color,
837
- type: o.type
838
- }))), this.segregateStep += 1;
839
- },
840
- toggleTooltipVisibility(a, o = null) {
841
- this.isTooltip = a, a ? this.selectedSerieIndex = o : this.selectedSerieIndex = null;
842
- },
843
- toggleFullscreen(a) {
844
- this.isFullscreen = a, this.step += 1;
845
- },
846
- showSpinnerPdf() {
847
- this.isPrinting = !0;
848
- },
849
- generatePdf() {
850
- this.showSpinnerPdf(), clearTimeout(this.__to__), this.__to__ = setTimeout(() => {
851
- this.pdf({
852
- domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
853
- fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy"
854
- }).finally(() => {
855
- this.isPrinting = !1;
856
- });
857
- }, 100);
858
- },
859
- generateCsv() {
860
- const a = [[this.FINAL_CONFIG.chart.title.text], [this.FINAL_CONFIG.chart.title.subtitle.text], [""]], o = ["", ...this.table.head.map((e) => e.label)], c = this.table.body, b = a.concat([o]).concat(c), t = this.createCsvContent(b);
861
- this.downloadCsv({ csvContent: t, title: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy" });
862
- },
863
- showSpinnerImage() {
864
- this.isImaging = !0;
865
- },
866
- generateImage() {
867
- this.showSpinnerImage(), clearTimeout(this.__to__), this.__to__ = setTimeout(() => {
868
- this.img({
869
- domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
870
- fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
871
- format: "png"
872
- }).finally(() => {
873
- this.isImaging = !1;
874
- });
875
- }, 100);
876
- }
877
- }
878
- }, We = ["id"], Ye = ["viewBox"], Ee = { key: 0 }, Xe = { class: "vue-ui-xy-grid" }, qe = ["stroke", "x1", "x2", "y1", "y2"], Ze = ["stroke", "x1", "x2", "y1", "y2"], Ue = { key: 1 }, Je = ["x1", "x2", "y1", "y2", "stroke"], Ke = ["x1", "x2", "y1", "y2", "stroke"], Qe = ["x1", "x2", "y1", "y2", "stroke"], je = { key: 3 }, $e = ["x1", "x2", "y1", "y2", "stroke"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], at = ["stop-color"], it = ["id"], rt = ["stop-color"], st = ["stop-color"], ot = ["stop-color"], nt = ["id"], ht = ["stop-color"], ct = ["stop-color"], ut = ["id"], dt = ["stop-color"], gt = ["stop-color"], ft = ["id"], bt = ["stop-color"], It = ["stop-color"], mt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Nt = ["width", "x", "y"], _t = { key: 0 }, Ft = ["id"], xt = ["fill"], yt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], At = ["x", "y", "font-size", "fill"], St = ["stroke", "x1", "x2", "y1", "y2"], Lt = ["width", "x", "y"], Ct = { style: { width: "100%" } }, kt = { key: 0 }, wt = ["id"], Ot = ["fill"], vt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Gt = ["x", "y", "font-size", "fill"], zt = ["d", "stroke", "stroke-width", "stroke-dasharray"], pt = { key: 1 }, Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Mt = { key: 0 }, Pt = ["d", "fill"], Vt = ["d", "fill"], Rt = ["d", "stroke", "stroke-width", "stroke-dasharray"], Dt = { key: 2 }, Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Bt = ["width", "x", "y"], Wt = { style: { width: "100%" } }, Yt = { key: 3 }, Et = ["id"], Xt = ["fill"], qt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Zt = ["x", "y", "font-size", "fill"], Ut = { key: 2 }, Jt = ["x", "y", "font-size", "fill"], Kt = ["x", "y", "font-size", "fill", "font-weight"], Qt = { key: 3 }, jt = ["x", "y", "font-size", "fill"], $t = ["x", "y"], el = ["x", "y"], tl = { key: 4 }, ll = ["x", "y", "font-size", "fill"], al = ["x", "y"], il = ["x", "y"], rl = { key: 5 }, sl = ["x", "y", "height", "width", "fill"], ol = ["x", "y", "width"], nl = ["y", "width", "height", "fill"], hl = ["x", "y", "width", "height", "fill"], cl = ["x", "y", "font-size", "fill", "innerHTML"], ul = ["x", "y", "font-size", "fill", "innerHTML"], dl = ["x", "y", "font-size", "fill", "innerHTML"], gl = ["x", "y", "font-size", "fill", "innerHTML"], fl = { key: 6 }, bl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Il = ["fill", "font-size", "transform"], ml = ["x1", "x2", "y1", "y2", "stroke"], Nl = ["x", "y", "font-size", "fill"], _l = ["x1", "x2", "y1", "y2", "stroke"], Fl = ["x", "y", "font-size", "fill"], xl = ["x", "y", "width", "height", "fill", "onMouseenter"], yl = ["font-size", "fill", "transform"], Al = ["x", "y", "font-size", "fill"], Sl = { key: 8 }, Ll = ["text-anchor", "font-size", "fill", "transform"], Cl = ["x", "y", "height", "width", "fill", "onMouseenter", "onClick"], kl = { key: 9 }, wl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ol = { key: 10 }, vl = ["x", "y"], Gl = ["cx", "cy", "r", "fill"], zl = ["onClick"], pl = {
879
- key: 0,
880
- viewBox: "0 0 20 12",
881
- height: "14",
882
- width: "20"
883
- }, Tl = ["fill"], Ml = {
884
- key: 1,
885
- viewBox: "0 0 12 12",
886
- height: "14",
887
- width: "14"
888
- }, Pl = ["fill"], Vl = {
889
- key: 6,
890
- ref: "chartLegend"
891
- }, Rl = {
892
- style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
893
- "data-html2canvas-ignore": ""
894
- }, Dl = ["innerHTML"];
895
- function Hl(a, o, c, b, t, e) {
896
- const N = P("Title"), A = P("UserOptions"), f = P("Shape"), F = P("Skeleton"), p = P("Slicer"), k = P("Tooltip"), w = P("BaseIcon"), v = P("TableSparkline"), _ = P("DataTable"), L = P("Accordion");
897
- return i(), r("div", {
898
- id: `vue-ui-xy_${t.uniqueId}`,
899
- class: T(`vue-ui-xy ${t.isFullscreen ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.FINAL_CONFIG.useCssAnimation ? "" : "vue-ui-dna"}`),
900
- ref: "chart",
901
- style: S(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color};width:100%;${e.FINAL_CONFIG.chart.title.text ? "" : "padding-top:36px"};font-family:${e.FINAL_CONFIG.chart.fontFamily};${e.FINAL_CONFIG.responsive ? "height: 100%" : ""}`)
902
- }, [
903
- e.FINAL_CONFIG.chart.title.show ? (i(), r("div", {
904
- key: 0,
905
- ref: "chartTitle",
906
- class: "vue-ui-xy-title",
907
- style: S(`font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
908
- }, [
909
- W(N, {
910
- config: {
911
- title: {
912
- cy: "xy-div-title",
913
- ...e.FINAL_CONFIG.chart.title
914
- },
915
- subtitle: {
916
- cy: "xy-div-subtitle",
917
- ...e.FINAL_CONFIG.chart.title.subtitle
918
- }
919
- }
920
- }, null, 8, ["config"])
921
- ], 4)) : h("", !0),
922
- e.FINAL_CONFIG.chart.userOptions.show && e.isDataset ? (i(), V(A, {
923
- ref: "defails",
924
- key: `user_options_${t.step}`,
925
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
926
- color: e.FINAL_CONFIG.chart.color,
927
- isPrinting: t.isPrinting,
928
- isImaging: t.isImaging,
929
- uid: t.uniqueId,
930
- hasTooltip: e.FINAL_CONFIG.chart.userOptions.buttons.tooltip && e.FINAL_CONFIG.chart.tooltip.show,
931
- hasPdf: e.FINAL_CONFIG.chart.userOptions.buttons.pdf,
932
- hasXls: e.FINAL_CONFIG.chart.userOptions.buttons.csv,
933
- hasImg: e.FINAL_CONFIG.chart.userOptions.buttons.img,
934
- hasLabel: e.FINAL_CONFIG.chart.userOptions.buttons.labels,
935
- hasTable: e.FINAL_CONFIG.chart.userOptions.buttons.table,
936
- hasStack: c.dataset.length > 1 && e.FINAL_CONFIG.chart.userOptions.buttons.stack,
937
- hasFullscreen: e.FINAL_CONFIG.chart.userOptions.buttons.fullscreen,
938
- isStacked: t.mutableConfig.isStacked,
939
- isFullscreen: t.isFullscreen,
940
- chartElement: a.$refs.chart,
941
- isTooltip: t.mutableConfig.showTooltip,
942
- titles: { ...e.FINAL_CONFIG.chart.userOptions.buttonTitles },
943
- onToggleFullscreen: e.toggleFullscreen,
944
- onGeneratePdf: e.generatePdf,
945
- onGenerateCsv: e.generateCsv,
946
- onGenerateImage: e.generateImage,
947
- onToggleTable: e.toggleTable,
948
- onToggleLabels: e.toggleLabels,
949
- onToggleStack: e.toggleStack,
950
- onToggleTooltip: e.toggleTooltip
951
- }, Pe({ _: 2 }, [
952
- a.$slots.optionTooltip ? {
953
- name: "optionTooltip",
954
- fn: z(() => [
955
- G(a.$slots, "optionTooltip", {}, void 0, !0)
956
- ]),
957
- key: "0"
958
- } : void 0,
959
- a.$slots.optionPdf ? {
960
- name: "optionPdf",
961
- fn: z(() => [
962
- G(a.$slots, "optionPdf", {}, void 0, !0)
963
- ]),
964
- key: "1"
965
- } : void 0,
966
- a.$slots.optionCsv ? {
967
- name: "optionCsv",
968
- fn: z(() => [
969
- G(a.$slots, "optionCsv", {}, void 0, !0)
970
- ]),
971
- key: "2"
972
- } : void 0,
973
- a.$slots.optionImg ? {
974
- name: "optionImg",
975
- fn: z(() => [
976
- G(a.$slots, "optionImg", {}, void 0, !0)
977
- ]),
978
- key: "3"
979
- } : void 0,
980
- a.$slots.optionTable ? {
981
- name: "optionTable",
982
- fn: z(() => [
983
- G(a.$slots, "optionTable", {}, void 0, !0)
984
- ]),
985
- key: "4"
986
- } : void 0,
987
- a.$slots.optionLabels ? {
988
- name: "optionLabels",
989
- fn: z(() => [
990
- G(a.$slots, "optionLabels", {}, void 0, !0)
991
- ]),
992
- key: "5"
993
- } : void 0,
994
- a.$slots.optionStack ? {
995
- name: "optionStack",
996
- fn: z(() => [
997
- G(a.$slots, "optionStack", {}, void 0, !0)
998
- ]),
999
- key: "6"
1000
- } : void 0,
1001
- a.$slots.optionFullscreen ? {
1002
- name: "optionFullscreen",
1003
- fn: z(({ toggleFullscreen: l, isFullscreen: n }) => [
1004
- G(a.$slots, "optionFullscreen", Y(E({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
1005
- ]),
1006
- key: "7"
1007
- } : void 0
1008
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "isTooltip", "titles", "onToggleFullscreen", "onGeneratePdf", "onGenerateCsv", "onGenerateImage", "onToggleTable", "onToggleLabels", "onToggleStack", "onToggleTooltip"])) : h("", !0),
1009
- e.isDataset ? (i(), r("svg", {
1010
- key: 2,
1011
- xmlns: "http://www.w3.org/2000/svg",
1012
- class: T([{ "vue-data-ui-fullscreen--on": t.isFullscreen, "vue-data-ui-fulscreen--off": !t.isFullscreen }, "vue-ui-xy-svg"]),
1013
- width: "100%",
1014
- viewBox: t.viewBox,
1015
- style: S(`background:${e.FINAL_CONFIG.chart.backgroundColor}; color:${e.FINAL_CONFIG.chart.color}; font-family:${e.FINAL_CONFIG.chart.fontFamily}`)
1016
- }, [
1017
- e.maxSeries > 0 ? (i(), r("g", Ee, [
1018
- d("g", Xe, [
1019
- e.FINAL_CONFIG.chart.grid.labels.xAxis.showBaseline ? (i(), r("line", {
1020
- key: 0,
1021
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1022
- "stroke-width": "1",
1023
- x1: e.drawingArea.left,
1024
- x2: e.drawingArea.right,
1025
- y1: e.drawingArea.bottom,
1026
- y2: e.drawingArea.bottom,
1027
- "stroke-linecap": "round"
1028
- }, null, 8, qe)) : h("", !0),
1029
- t.mutableConfig.useIndividualScale ? e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (i(!0), r(I, { key: 2 }, m(e.allScales, (l) => (i(), r("g", null, [
1030
- l.id === t.selectedScale && l.yLabels.length ? (i(!0), r(I, { key: 0 }, m(l.yLabels, (n) => (i(), r("line", {
1031
- x1: e.drawingArea.left,
1032
- x2: e.drawingArea.right,
1033
- y1: n.y,
1034
- y2: n.y,
1035
- stroke: l.color,
1036
- "stroke-width": 0.5,
1037
- "stroke-linecap": "round"
1038
- }, null, 8, Ke))), 256)) : l.yLabels.length ? (i(!0), r(I, { key: 1 }, m(l.yLabels, (n) => (i(), r("line", {
1039
- x1: e.drawingArea.left,
1040
- x2: e.drawingArea.right,
1041
- y1: n.y,
1042
- y2: n.y,
1043
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1044
- "stroke-width": 0.5,
1045
- "stroke-linecap": "round"
1046
- }, null, 8, Qe))), 256)) : h("", !0)
1047
- ]))), 256)) : h("", !0) : (i(), r(I, { key: 1 }, [
1048
- e.FINAL_CONFIG.chart.grid.labels.yAxis.showBaseline ? (i(), r("line", {
1049
- key: 0,
1050
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1051
- "stroke-width": "1",
1052
- x1: e.drawingArea.left,
1053
- x2: e.drawingArea.left,
1054
- y1: e.drawingArea.top,
1055
- y2: e.drawingArea.bottom,
1056
- "stroke-linecap": "round"
1057
- }, null, 8, Ze)) : h("", !0),
1058
- e.FINAL_CONFIG.chart.grid.showHorizontalLines ? (i(), r("g", Ue, [
1059
- (i(!0), r(I, null, m(e.yLabels, (l) => (i(), r("line", {
1060
- x1: e.drawingArea.left,
1061
- x2: e.drawingArea.right,
1062
- y1: l.y,
1063
- y2: l.y,
1064
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1065
- "stroke-width": 0.5,
1066
- "stroke-linecap": "round"
1067
- }, null, 8, Je))), 256))
1068
- ])) : h("", !0)
1069
- ], 64)),
1070
- e.FINAL_CONFIG.chart.grid.showVerticalLines ? (i(), r("g", je, [
1071
- (i(!0), r(I, null, m(e.maxSeries + 1, (l, n) => (i(), r("line", {
1072
- key: `grid_vertical_line_${n}`,
1073
- x1: e.drawingArea.width / e.maxSeries * n + e.drawingArea.left,
1074
- x2: e.drawingArea.width / e.maxSeries * n + e.drawingArea.left,
1075
- y1: e.drawingArea.top,
1076
- y2: e.drawingArea.bottom,
1077
- "stroke-width": "0.5",
1078
- stroke: e.FINAL_CONFIG.chart.grid.stroke
1079
- }, null, 8, $e))), 128))
1080
- ])) : h("", !0)
1081
- ]),
1082
- (i(!0), r(I, null, m(e.barSet, (l, n) => (i(), r("defs", {
1083
- key: `def_rect_${n}`
1084
- }, [
1085
- d("linearGradient", {
1086
- id: `rectGradient_pos_${n}_${t.uniqueId}`,
1087
- x2: "0%",
1088
- y2: "100%"
1089
- }, [
1090
- d("stop", {
1091
- offset: "0%",
1092
- "stop-color": l.color
1093
- }, null, 8, tt),
1094
- d("stop", {
1095
- offset: "62%",
1096
- "stop-color": `${e.shiftHue(l.color, 0.02)}DE`
1097
- }, null, 8, lt),
1098
- d("stop", {
1099
- offset: "100%",
1100
- "stop-color": `${e.shiftHue(l.color, 0.05)}66`
1101
- }, null, 8, at)
1102
- ], 8, et),
1103
- d("linearGradient", {
1104
- id: `rectGradient_neg_${n}_${t.uniqueId}`,
1105
- x2: "0%",
1106
- y2: "100%"
1107
- }, [
1108
- d("stop", {
1109
- offset: "0%",
1110
- "stop-color": `${e.shiftHue(l.color, 0.05)}66`
1111
- }, null, 8, rt),
1112
- d("stop", {
1113
- offset: "38%",
1114
- "stop-color": `${e.shiftHue(l.color, 0.02)}DE`
1115
- }, null, 8, st),
1116
- d("stop", {
1117
- offset: "100%",
1118
- "stop-color": l.color
1119
- }, null, 8, ot)
1120
- ], 8, it)
1121
- ]))), 128)),
1122
- (i(!0), r(I, null, m(e.plotSet, (l, n) => (i(), r("defs", {
1123
- key: `def_plot_${n}`
1124
- }, [
1125
- d("radialGradient", {
1126
- id: `plotGradient_${n}_${t.uniqueId}`,
1127
- cx: "50%",
1128
- cy: "50%",
1129
- r: "50%",
1130
- fx: "50%",
1131
- fy: "50%"
1132
- }, [
1133
- d("stop", {
1134
- offset: "0%",
1135
- "stop-color": `${e.shiftHue(l.color, 0.05)}`
1136
- }, null, 8, ht),
1137
- d("stop", {
1138
- offset: "100%",
1139
- "stop-color": l.color
1140
- }, null, 8, ct)
1141
- ], 8, nt)
1142
- ]))), 128)),
1143
- (i(!0), r(I, null, m(e.lineSet, (l, n) => (i(), r("defs", {
1144
- key: `def_line_${n}`
1145
- }, [
1146
- d("radialGradient", {
1147
- id: `lineGradient_${n}_${t.uniqueId}`,
1148
- cx: "50%",
1149
- cy: "50%",
1150
- r: "50%",
1151
- fx: "50%",
1152
- fy: "50%"
1153
- }, [
1154
- d("stop", {
1155
- offset: "0%",
1156
- "stop-color": `${e.shiftHue(l.color, 0.05)}`
1157
- }, null, 8, dt),
1158
- d("stop", {
1159
- offset: "100%",
1160
- "stop-color": l.color
1161
- }, null, 8, gt)
1162
- ], 8, ut),
1163
- d("linearGradient", {
1164
- id: `areaGradient_${n}_${t.uniqueId}`,
1165
- x1: "0%",
1166
- x2: "100%",
1167
- y1: "0%",
1168
- y2: "0%"
1169
- }, [
1170
- d("stop", {
1171
- offset: "0%",
1172
- "stop-color": `${e.shiftHue(l.color, 0.03)}${t.opacity[e.FINAL_CONFIG.line.area.opacity]}`
1173
- }, null, 8, bt),
1174
- d("stop", {
1175
- offset: "100%",
1176
- "stop-color": `${l.color}${t.opacity[e.FINAL_CONFIG.line.area.opacity]}`
1177
- }, null, 8, It)
1178
- ], 8, ft)
1179
- ]))), 128)),
1180
- e.barSet.length ? (i(!0), r(I, { key: 0 }, m(e.barSet, (l, n) => (i(), r("g", {
1181
- key: `serie_bar_${n}`,
1182
- class: T(`serie_bar_${n}`),
1183
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1184
- }, [
1185
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1186
- key: `bar_plot_${n}_${g}`
1187
- }, [
1188
- e.canShowValue(s.value) ? (i(), r("rect", {
1189
- key: 0,
1190
- x: e.calcRectX(s),
1191
- y: t.mutableConfig.useIndividualScale ? e.calcIndividualRectY(s) : e.calcRectY(s),
1192
- height: t.mutableConfig.useIndividualScale ? Math.abs(e.calcIndividualHeight(s)) : Math.abs(e.calcRectHeight(s)),
1193
- width: e.calcRectWidth() - (t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? 0 : e.barPeriodGap),
1194
- rx: e.FINAL_CONFIG.bar.borderRadius,
1195
- fill: e.FINAL_CONFIG.bar.useGradient ? s.value >= 0 ? `url(#rectGradient_pos_${n}_${t.uniqueId})` : `url(#rectGradient_neg_${n}_${t.uniqueId})` : l.color,
1196
- stroke: e.FINAL_CONFIG.bar.border.useSerieColor ? l.color : e.FINAL_CONFIG.bar.border.stroke,
1197
- "stroke-width": e.FINAL_CONFIG.bar.border.strokeWidth
1198
- }, null, 8, mt)) : h("", !0),
1199
- s.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), r("foreignObject", {
1200
- key: 1,
1201
- style: { overflow: "visible" },
1202
- height: "12",
1203
- width: (e.calcRectWidth() - (t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? 0 : e.barPeriodGap) < 0 ? 1e-5 : e.calcRectWidth() - (t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? 0 : e.barPeriodGap) / 2) + e.FINAL_CONFIG.chart.comments.width,
1204
- x: e.calcRectX(s) - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
1205
- y: s.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
1206
- }, [
1207
- G(a.$slots, "plot-comment", {
1208
- plot: { ...s, color: l.color }
1209
- }, void 0, !0)
1210
- ], 8, Nt)) : h("", !0)
1211
- ]))), 128)),
1212
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(e.calcLinearProgression(l.plots).trend) ? (i(), r("g", _t, [
1213
- d("defs", null, [
1214
- d("marker", {
1215
- id: `bar_arrow_${n}`,
1216
- markerWidth: 7,
1217
- markerHeight: 7,
1218
- refX: "0",
1219
- refY: 7 / 2,
1220
- orient: "auto"
1221
- }, [
1222
- d("polygon", {
1223
- points: `0 0, 7 ${7 / 2}, 0 7`,
1224
- fill: l.color
1225
- }, null, 8, xt)
1226
- ], 8, Ft)
1227
- ]),
1228
- l.plots.length > 1 ? (i(), r("line", {
1229
- key: 0,
1230
- x1: e.calcLinearProgression(l.plots).x1,
1231
- x2: e.calcLinearProgression(l.plots).x2,
1232
- y1: e.calcLinearProgression(l.plots).y1,
1233
- y2: e.calcLinearProgression(l.plots).y2,
1234
- "stroke-width": 1,
1235
- stroke: l.color,
1236
- "stroke-dasharray": 2,
1237
- "marker-end": `url(#bar_arrow_${n})`
1238
- }, null, 8, yt)) : h("", !0),
1239
- l.plots.length > 1 ? (i(), r("text", {
1240
- key: 1,
1241
- "text-anchor": "middle",
1242
- x: e.calcLinearProgression(l.plots).x2,
1243
- y: e.calcLinearProgression(l.plots).y2 - 6,
1244
- "font-size": t.fontSizes.plotLabels,
1245
- fill: l.color
1246
- }, C(e.dataLabel({
1247
- v: e.calcLinearProgression(l.plots).trend * 100,
1248
- s: "%",
1249
- r: 2
1250
- })), 9, At)) : h("", !0)
1251
- ])) : h("", !0)
1252
- ], 6))), 128)) : h("", !0),
1253
- !t.mutableConfig.useIndividualScale && e.FINAL_CONFIG.chart.grid.labels.zeroLine.show ? (i(), r("line", {
1254
- key: 1,
1255
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1256
- "stroke-width": "1",
1257
- x1: e.drawingArea.left,
1258
- x2: e.drawingArea.right,
1259
- y1: e.zero,
1260
- y2: e.zero,
1261
- "stroke-linecap": "round"
1262
- }, null, 8, St)) : h("", !0),
1263
- (i(!0), r(I, null, m(e.plotSet, (l, n) => (i(), r("g", {
1264
- key: `serie_plot_${n}`,
1265
- class: T(`serie_plot_${n}`),
1266
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1267
- }, [
1268
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1269
- key: `circle_plot_${n}_${g}`
1270
- }, [
1271
- e.canShowValue(s.value) ? (i(), V(f, {
1272
- key: 0,
1273
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
1274
- color: e.FINAL_CONFIG.plot.useGradient ? `url(#plotGradient_${n}_${t.uniqueId})` : l.color,
1275
- plot: { x: s.x, y: s.y },
1276
- radius: t.selectedSerieIndex !== null && t.selectedSerieIndex === g ? (t.plotRadii.plot || 6) * 1.5 : t.plotRadii.plot || 6,
1277
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
1278
- strokeWidth: 0.5
1279
- }, null, 8, ["shape", "color", "plot", "radius", "stroke"])) : h("", !0),
1280
- s.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), r("foreignObject", {
1281
- key: 1,
1282
- style: { overflow: "visible" },
1283
- height: "12",
1284
- width: e.FINAL_CONFIG.chart.comments.width,
1285
- x: s.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
1286
- y: s.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
1287
- }, [
1288
- d("div", Ct, [
1289
- G(a.$slots, "plot-comment", {
1290
- plot: { ...s, color: l.color }
1291
- }, void 0, !0)
1292
- ])
1293
- ], 8, Lt)) : h("", !0)
1294
- ]))), 128)),
1295
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(e.calcLinearProgression(l.plots).trend) ? (i(), r("g", kt, [
1296
- d("defs", null, [
1297
- d("marker", {
1298
- id: `plot_arrow_${n}`,
1299
- markerWidth: 7,
1300
- markerHeight: 7,
1301
- refX: "0",
1302
- refY: 7 / 2,
1303
- orient: "auto"
1304
- }, [
1305
- d("polygon", {
1306
- points: `0 0, 7 ${7 / 2}, 0 7`,
1307
- fill: l.color
1308
- }, null, 8, Ot)
1309
- ], 8, wt)
1310
- ]),
1311
- l.plots.length > 1 ? (i(), r("line", {
1312
- key: 0,
1313
- x1: e.calcLinearProgression(l.plots).x1,
1314
- x2: e.calcLinearProgression(l.plots).x2,
1315
- y1: e.calcLinearProgression(l.plots).y1,
1316
- y2: e.calcLinearProgression(l.plots).y2,
1317
- "stroke-width": 1,
1318
- stroke: l.color,
1319
- "stroke-dasharray": 2,
1320
- "marker-end": `url(#plot_arrow_${n})`
1321
- }, null, 8, vt)) : h("", !0),
1322
- l.plots.length > 1 ? (i(), r("text", {
1323
- key: 1,
1324
- "text-anchor": "middle",
1325
- x: e.calcLinearProgression(l.plots).x2,
1326
- y: e.calcLinearProgression(l.plots).y2 - 6,
1327
- "font-size": t.fontSizes.plotLabels,
1328
- fill: l.color
1329
- }, C(e.dataLabel({
1330
- v: e.calcLinearProgression(l.plots).trend * 100,
1331
- s: "%",
1332
- r: 2
1333
- })), 9, Gt)) : h("", !0)
1334
- ])) : h("", !0)
1335
- ], 6))), 128)),
1336
- (i(!0), r(I, null, m(e.lineSet, (l, n) => (i(), r("g", {
1337
- key: `serie_line_${n}`,
1338
- class: T(`serie_line_${n}`),
1339
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1340
- }, [
1341
- l.smooth && l.plots.length > 1 ? (i(), r("path", {
1342
- key: 0,
1343
- d: `M${l.curve}`,
1344
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
1345
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
1346
- "stroke-dasharray": l.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
1347
- fill: "none"
1348
- }, null, 8, zt)) : l.plots.length > 1 ? (i(), r("g", pt, [
1349
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1350
- key: `line_${n}_${g}`
1351
- }, [
1352
- s && g < l.plots.length - 1 && l.plots[g + 1] && e.canShowValue(s.value) && e.canShowValue(l.plots[g + 1].value) ? (i(), r("line", {
1353
- key: 0,
1354
- x1: s.x,
1355
- x2: l.plots[g + 1].x,
1356
- y1: s.y,
1357
- y2: l.plots[g + 1].y,
1358
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
1359
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth + 1,
1360
- "stroke-dasharray": l.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
1361
- "stroke-linejoin": "round",
1362
- "stroke-linecap": "round"
1363
- }, null, 8, Tt)) : h("", !0)
1364
- ]))), 128))
1365
- ])) : h("", !0)
1366
- ], 6))), 128)),
1367
- (i(!0), r(I, null, m(e.lineSet, (l, n) => (i(), r("g", {
1368
- key: `serie_line_${n}`,
1369
- class: T(`serie_line_${n}`),
1370
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1371
- }, [
1372
- l.useArea && l.plots.length > 1 ? (i(), r("g", Mt, [
1373
- l.smooth ? (i(), r("path", {
1374
- key: 0,
1375
- d: `M ${l.plots[0] ? l.plots[0].x : Math.min(...l.plots.filter((s) => !!s).map((s) => s.x))},${t.mutableConfig.isStacked ? e.drawingArea.bottom - l.yOffset : e.drawingArea.bottom} ${l.curve} L ${l.plots.at(-1) ? l.plots.at(-1).x : e.drawingArea.left + e.slot.line * n + e.slot.line / 2},${t.mutableConfig.isStacked ? e.drawingArea.bottom - l.yOffset : e.drawingArea.bottom} Z`,
1376
- fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${n}_${t.uniqueId})` : `${l.color}${t.opacity[e.FINAL_CONFIG.line.area.opacity]}`
1377
- }, null, 8, Pt)) : (i(), r("path", {
1378
- key: 1,
1379
- d: `M${l.area}Z`,
1380
- fill: e.FINAL_CONFIG.line.area.useGradient ? `url(#areaGradient_${n}_${t.uniqueId})` : `${l.color}${t.opacity[e.FINAL_CONFIG.line.area.opacity]}`
1381
- }, null, 8, Vt))
1382
- ])) : h("", !0),
1383
- l.smooth && l.plots.length > 1 ? (i(), r("path", {
1384
- key: 1,
1385
- d: `M${l.curve}`,
1386
- stroke: l.color,
1387
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
1388
- "stroke-dasharray": l.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
1389
- fill: "none"
1390
- }, null, 8, Rt)) : l.plots.length > 1 ? (i(), r("g", Dt, [
1391
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1392
- key: `line_${n}_${g}`
1393
- }, [
1394
- s && g < l.plots.length - 1 && l.plots[g + 1] && e.canShowValue(s.value) && e.canShowValue(l.plots[g + 1].value) ? (i(), r("line", {
1395
- key: 0,
1396
- x1: s.x,
1397
- x2: l.plots[g + 1].x,
1398
- y1: s.y,
1399
- y2: l.plots[g + 1].y,
1400
- stroke: l.color,
1401
- "stroke-width": e.FINAL_CONFIG.line.strokeWidth,
1402
- "stroke-dasharray": l.dashed ? e.FINAL_CONFIG.line.strokeWidth * 2 : 0,
1403
- "stroke-linejoin": "round",
1404
- "stroke-linecap": "round"
1405
- }, null, 8, Ht)) : h("", !0)
1406
- ]))), 128))
1407
- ])) : h("", !0),
1408
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1409
- key: `circle_line_${n}_${g}`
1410
- }, [
1411
- s && e.canShowValue(s.value) ? (i(), V(f, {
1412
- key: 0,
1413
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
1414
- color: e.FINAL_CONFIG.line.useGradient ? `url(#lineGradient_${n}_${t.uniqueId})` : l.color,
1415
- plot: { x: s.x, y: s.y },
1416
- radius: t.selectedSerieIndex !== null && t.selectedSerieIndex === g ? (t.plotRadii.line || 6) * 1.5 : t.plotRadii.line,
1417
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
1418
- strokeWidth: 0.5
1419
- }, null, 8, ["shape", "color", "plot", "radius", "stroke"])) : h("", !0),
1420
- s.comment && e.FINAL_CONFIG.chart.comments.show ? (i(), r("foreignObject", {
1421
- key: 1,
1422
- style: { overflow: "visible" },
1423
- height: "12",
1424
- width: e.FINAL_CONFIG.chart.comments.width,
1425
- x: s.x - e.FINAL_CONFIG.chart.comments.width / 2 + e.FINAL_CONFIG.chart.comments.offsetX,
1426
- y: s.y + e.FINAL_CONFIG.chart.comments.offsetY + 6
1427
- }, [
1428
- d("div", Wt, [
1429
- G(a.$slots, "plot-comment", {
1430
- plot: { ...s, color: l.color }
1431
- }, void 0, !0)
1432
- ])
1433
- ], 8, Bt)) : h("", !0)
1434
- ]))), 128)),
1435
- Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(e.calcLinearProgression(l.plots).trend) ? (i(), r("g", Yt, [
1436
- d("defs", null, [
1437
- d("marker", {
1438
- id: `line_arrow_${n}`,
1439
- markerWidth: 7,
1440
- markerHeight: 7,
1441
- refX: "0",
1442
- refY: 7 / 2,
1443
- orient: "auto"
1444
- }, [
1445
- d("polygon", {
1446
- points: `0 0, 7 ${7 / 2}, 0 7`,
1447
- fill: l.color
1448
- }, null, 8, Xt)
1449
- ], 8, Et)
1450
- ]),
1451
- l.plots.length > 1 ? (i(), r("line", {
1452
- key: 0,
1453
- x1: e.calcLinearProgression(l.plots).x1,
1454
- x2: e.calcLinearProgression(l.plots).x2,
1455
- y1: e.calcLinearProgression(l.plots).y1,
1456
- y2: e.calcLinearProgression(l.plots).y2,
1457
- "stroke-width": 1,
1458
- stroke: l.color,
1459
- "stroke-dasharray": 2,
1460
- "marker-end": `url(#line_arrow_${n})`
1461
- }, null, 8, qt)) : h("", !0),
1462
- l.plots.length > 1 ? (i(), r("text", {
1463
- key: 1,
1464
- "text-anchor": "middle",
1465
- x: e.calcLinearProgression(l.plots).x2,
1466
- y: e.calcLinearProgression(l.plots).y2 - 6,
1467
- "font-size": t.fontSizes.plotLabels,
1468
- fill: l.color
1469
- }, C(e.dataLabel({
1470
- v: e.calcLinearProgression(l.plots).trend * 100,
1471
- s: "%",
1472
- r: 2
1473
- })), 9, Zt)) : h("", !0)
1474
- ])) : h("", !0)
1475
- ], 6))), 128)),
1476
- (e.FINAL_CONFIG.bar.labels.show || e.FINAL_CONFIG.bar.serieName.show) && t.mutableConfig.dataLabels.show ? (i(), r("g", Ut, [
1477
- (i(!0), r(I, null, m(e.barSet, (l, n) => (i(), r("g", {
1478
- key: `xLabel_bar_${n}`,
1479
- class: T(`xLabel_bar_${n}`),
1480
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1481
- }, [
1482
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1483
- key: `xLabel_bar_${n}_${g}`
1484
- }, [
1485
- s && (!Object.hasOwn(l, "dataLabels") || l.dataLabels === !0) && e.FINAL_CONFIG.bar.labels.show ? (i(), r("text", {
1486
- key: 0,
1487
- x: t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? s.x + e.slot.line / 2 : e.calcRectX(s) + e.calcRectWidth() / 2 - e.barPeriodGap / 2,
1488
- y: s.y + (s.value > 0 ? e.FINAL_CONFIG.bar.labels.offsetY : -e.FINAL_CONFIG.bar.labels.offsetY * 3),
1489
- "text-anchor": "middle",
1490
- "font-size": t.fontSizes.plotLabels,
1491
- fill: e.FINAL_CONFIG.bar.labels.color
1492
- }, C(e.canShowValue(s.value) ? e.dataLabel({ p: e.FINAL_CONFIG.chart.labels.prefix, v: s.value, s: e.FINAL_CONFIG.chart.labels.suffix, r: e.FINAL_CONFIG.bar.labels.rounding }) : ""), 9, Jt)) : h("", !0),
1493
- s && e.FINAL_CONFIG.bar.serieName.show ? (i(), r("text", {
1494
- key: 1,
1495
- x: t.mutableConfig.useIndividualScale && t.mutableConfig.isStacked ? s.x + e.slot.line / 2 : s.x + e.calcRectWidth() * 1.1,
1496
- y: s.y + (s.value > 0 ? e.FINAL_CONFIG.bar.serieName.offsetY : -e.FINAL_CONFIG.bar.serieName.offsetY * 3),
1497
- "text-anchor": "middle",
1498
- "font-size": t.fontSizes.plotLabels,
1499
- fill: e.FINAL_CONFIG.bar.serieName.useSerieColor ? l.color : e.FINAL_CONFIG.bar.serieName.color,
1500
- "font-weight": e.FINAL_CONFIG.bar.serieName.bold ? "bold" : "normal"
1501
- }, C(e.FINAL_CONFIG.bar.serieName.useAbbreviation ? e.abbreviate({ source: l.name, length: e.FINAL_CONFIG.bar.serieName.abbreviationSize }) : l.name), 9, Kt)) : h("", !0)
1502
- ]))), 128))
1503
- ], 6))), 128))
1504
- ])) : h("", !0),
1505
- e.FINAL_CONFIG.plot.labels.show && t.mutableConfig.dataLabels.show ? (i(), r("g", Qt, [
1506
- (i(!0), r(I, null, m(e.plotSet, (l, n) => (i(), r("g", {
1507
- key: `xLabel_plot_${n}`,
1508
- class: T(`xLabel_plot_${n}`),
1509
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1510
- }, [
1511
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1512
- key: `xLabel_plot_${n}_${g}`
1513
- }, [
1514
- s && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 ? (i(), r("text", {
1515
- key: 0,
1516
- x: s.x,
1517
- y: s.y + e.FINAL_CONFIG.plot.labels.offsetY,
1518
- "text-anchor": "middle",
1519
- "font-size": t.fontSizes.plotLabels,
1520
- fill: e.FINAL_CONFIG.plot.labels.color
1521
- }, C(e.canShowValue(s.value) ? e.dataLabel({ p: e.FINAL_CONFIG.chart.labels.prefix, v: s.value, s: e.FINAL_CONFIG.chart.labels.suffix, r: e.FINAL_CONFIG.plot.labels.rounding }) : ""), 9, jt)) : h("", !0),
1522
- s && g === 0 && l.useTag && l.useTag === "start" ? (i(), r("foreignObject", {
1523
- key: 1,
1524
- x: s.x,
1525
- y: s.y - 20,
1526
- height: 24,
1527
- width: "150",
1528
- style: { overflow: "visible" }
1529
- }, [
1530
- d("div", {
1531
- style: S(`padding: 3px; background:${l.color}${t.opacity[80]};color:${e.adaptColorToBackground(l.color)};width:fit-content;font-size:${t.fontSizes.plotLabels}px;border-radius: 2px;`)
1532
- }, C(l.name), 5)
1533
- ], 8, $t)) : h("", !0),
1534
- s && g === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (i(), r("foreignObject", {
1535
- key: 2,
1536
- x: s.x - l.name.length * (t.fontSizes.plotLabels / 2),
1537
- y: s.y - 20,
1538
- height: 24,
1539
- width: "150",
1540
- style: { overflow: "visible" }
1541
- }, [
1542
- d("div", {
1543
- style: S(`padding: 3px; background:${l.color}${t.opacity[80]};color:${e.adaptColorToBackground(l.color)};width:fit-content;font-size:${t.fontSizes.plotLabels}px;border-radius: 2px;`)
1544
- }, C(l.name), 5)
1545
- ], 8, el)) : h("", !0)
1546
- ]))), 128))
1547
- ], 6))), 128))
1548
- ])) : h("", !0),
1549
- e.FINAL_CONFIG.line.labels.show && t.mutableConfig.dataLabels.show ? (i(), r("g", tl, [
1550
- (i(!0), r(I, null, m(e.lineSet, (l, n) => (i(), r("g", {
1551
- key: `xLabel_line_${n}`,
1552
- class: T(`xLabel_line_${n}`),
1553
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1554
- }, [
1555
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1556
- key: `xLabel_line_${n}_${g}`
1557
- }, [
1558
- s && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 ? (i(), r("text", {
1559
- key: 0,
1560
- x: s.x,
1561
- y: s.y + (s.value > 0 ? e.FINAL_CONFIG.line.labels.offsetY : -e.FINAL_CONFIG.line.labels.offsetY * 3),
1562
- "text-anchor": "middle",
1563
- "font-size": t.fontSizes.plotLabels,
1564
- fill: e.FINAL_CONFIG.line.labels.color
1565
- }, C(e.canShowValue(s.value) ? e.dataLabel({ p: e.FINAL_CONFIG.chart.labels.prefix, v: s.value, s: e.FINAL_CONFIG.chart.labels.suffix, r: e.FINAL_CONFIG.line.labels.rounding }) : ""), 9, ll)) : h("", !0),
1566
- s && g === 0 && l.useTag && l.useTag === "start" ? (i(), r("foreignObject", {
1567
- key: 1,
1568
- x: s.x,
1569
- y: s.y - 20,
1570
- height: 24,
1571
- width: "150",
1572
- style: { overflow: "visible" }
1573
- }, [
1574
- d("div", {
1575
- style: S(`padding: 3px; background:${l.color}${t.opacity[80]};color:${e.adaptColorToBackground(l.color)};width:fit-content;font-size:${t.fontSizes.plotLabels}px;border-radius: 2px;`)
1576
- }, C(l.name), 5)
1577
- ], 8, al)) : h("", !0),
1578
- s && g === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (i(), r("foreignObject", {
1579
- key: 2,
1580
- x: s.x - l.name.length * (t.fontSizes.plotLabels / 2),
1581
- y: s.y - 20,
1582
- height: 24,
1583
- width: "150",
1584
- style: { overflow: "visible" }
1585
- }, [
1586
- d("div", {
1587
- style: S(`padding: 3px; background:${l.color}${t.opacity[80]};color:${e.adaptColorToBackground(l.color)};width:fit-content;font-size:${t.fontSizes.plotLabels}px;border-radius: 2px;`)
1588
- }, C(l.name), 5)
1589
- ], 8, il)) : h("", !0)
1590
- ]))), 128))
1591
- ], 6))), 128))
1592
- ])) : h("", !0),
1593
- e.hasHighlightArea ? (i(), r("g", rl, [
1594
- d("rect", {
1595
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (e.FINAL_CONFIG.chart.highlightArea.from - t.slicer.start),
1596
- y: e.drawingArea.top,
1597
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1598
- width: e.drawingArea.width / e.maxSeries * e.highlightAreaSpan < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries * e.highlightAreaSpan,
1599
- fill: `${e.FINAL_CONFIG.chart.highlightArea.color}${t.opacity[e.FINAL_CONFIG.chart.highlightArea.opacity]}`
1600
- }, null, 8, sl),
1601
- e.FINAL_CONFIG.chart.highlightArea.caption.text ? (i(), r("foreignObject", {
1602
- key: 0,
1603
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * (e.FINAL_CONFIG.chart.highlightArea.from - t.slicer.start) - (e.FINAL_CONFIG.chart.highlightArea.caption.width === "auto" ? 0 : e.FINAL_CONFIG.chart.highlightArea.caption.width / 2 - e.drawingArea.width / e.maxSeries * e.highlightAreaSpan / 2),
1604
- y: e.drawingArea.top + e.FINAL_CONFIG.chart.highlightArea.caption.offsetY,
1605
- style: { overflow: "visible" },
1606
- height: "1",
1607
- width: e.FINAL_CONFIG.chart.highlightArea.caption.width === "auto" ? e.drawingArea.width / e.maxSeries * e.highlightAreaSpan : e.FINAL_CONFIG.chart.highlightArea.caption.width
1608
- }, [
1609
- d("div", {
1610
- style: S(`padding:${e.FINAL_CONFIG.chart.highlightArea.caption.padding}px;text-align:${e.FINAL_CONFIG.chart.highlightArea.caption.textAlign};font-size:${e.FINAL_CONFIG.chart.highlightArea.caption.fontSize}px;color:${e.FINAL_CONFIG.chart.highlightArea.caption.color};font-weight:${e.FINAL_CONFIG.chart.highlightArea.caption.bold ? "bold" : "normal"}`)
1611
- }, C(e.FINAL_CONFIG.chart.highlightArea.caption.text), 5)
1612
- ], 8, ol)) : h("", !0)
1613
- ])) : h("", !0),
1614
- d("g", null, [
1615
- d("rect", {
1616
- x: 0,
1617
- y: e.drawingArea.top,
1618
- width: e.FINAL_CONFIG.chart.padding.left - 1,
1619
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1620
- fill: e.FINAL_CONFIG.chart.backgroundColor
1621
- }, null, 8, nl),
1622
- d("rect", {
1623
- x: e.drawingArea.right + 1,
1624
- y: e.drawingArea.top,
1625
- width: e.FINAL_CONFIG.chart.padding.right,
1626
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1627
- fill: e.FINAL_CONFIG.chart.backgroundColor
1628
- }, null, 8, hl)
1629
- ]),
1630
- (i(!0), r(I, null, m(e.lineSet, (l, n) => (i(), r("g", {
1631
- key: `xLabel_line_${n}`,
1632
- class: T(`xLabel_line_${n}`),
1633
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1634
- }, [
1635
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1636
- key: `xLabel_line_${n}_${g}`
1637
- }, [
1638
- s && g === 0 && l.showSerieName && l.showSerieName === "start" ? (i(), r("text", {
1639
- key: 0,
1640
- x: s.x - t.fontSizes.plotLabels,
1641
- y: s.y,
1642
- "font-size": t.fontSizes.plotLabels,
1643
- "text-anchor": "end",
1644
- fill: l.color,
1645
- innerHTML: e.createTSpans({
1646
- content: l.name,
1647
- fontSize: t.fontSizes.plotLabels,
1648
- fill: l.color,
1649
- x: s.x - t.fontSizes.plotLabels,
1650
- y: s.y,
1651
- maxWords: 2
1652
- })
1653
- }, null, 8, cl)) : h("", !0),
1654
- s && g === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (i(), r("text", {
1655
- key: 1,
1656
- x: s.x + t.fontSizes.plotLabels,
1657
- y: s.y,
1658
- "font-size": t.fontSizes.plotLabels,
1659
- "text-anchor": "start",
1660
- fill: l.color,
1661
- innerHTML: e.createTSpans({
1662
- content: l.name,
1663
- fontSize: t.fontSizes.plotLabels,
1664
- fill: l.color,
1665
- x: s.x + t.fontSizes.plotLabels,
1666
- y: s.y,
1667
- maxWords: 2
1668
- })
1669
- }, null, 8, ul)) : h("", !0)
1670
- ]))), 128))
1671
- ], 6))), 128)),
1672
- (i(!0), r(I, null, m(e.plotSet, (l, n) => (i(), r("g", {
1673
- key: `xLabel_plot_${n}`,
1674
- class: T(`xLabel_plot_${n}`),
1675
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
1676
- }, [
1677
- (i(!0), r(I, null, m(l.plots, (s, g) => (i(), r("g", {
1678
- key: `xLabel_plot_${n}_${g}`
1679
- }, [
1680
- s && g === 0 && l.showSerieName && l.showSerieName === "start" ? (i(), r("text", {
1681
- key: 0,
1682
- x: s.x - t.fontSizes.plotLabels,
1683
- y: s.y,
1684
- "font-size": t.fontSizes.plotLabels,
1685
- "text-anchor": "end",
1686
- fill: l.color,
1687
- innerHTML: e.createTSpans({
1688
- content: l.name,
1689
- fontSize: t.fontSizes.plotLabels,
1690
- fill: l.color,
1691
- x: s.x - t.fontSizes.plotLabels,
1692
- y: s.y,
1693
- maxWords: 2
1694
- })
1695
- }, null, 8, dl)) : h("", !0),
1696
- s && g === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (i(), r("text", {
1697
- key: 1,
1698
- x: s.x + t.fontSizes.plotLabels,
1699
- y: s.y,
1700
- "font-size": t.fontSizes.plotLabels,
1701
- "text-anchor": "start",
1702
- fill: l.color,
1703
- innerHTML: e.createTSpans({
1704
- content: l.name,
1705
- fontSize: t.fontSizes.plotLabels,
1706
- fill: l.color,
1707
- x: s.x + t.fontSizes.plotLabels,
1708
- y: s.y,
1709
- maxWords: 2
1710
- })
1711
- }, null, 8, gl)) : h("", !0)
1712
- ]))), 128))
1713
- ], 6))), 128)),
1714
- e.FINAL_CONFIG.chart.grid.labels.show ? (i(), r("g", fl, [
1715
- t.mutableConfig.useIndividualScale ? (i(), r(I, { key: 0 }, [
1716
- (i(!0), r(I, null, m(e.allScales, (l) => (i(), r("g", null, [
1717
- d("line", {
1718
- x1: l.x,
1719
- x2: l.x,
1720
- y1: t.mutableConfig.isStacked ? e.drawingArea.bottom - l.yOffset - l.individualHeight : e.drawingArea.top,
1721
- y2: t.mutableConfig.isStacked ? e.drawingArea.bottom - l.yOffset : e.drawingArea.bottom,
1722
- stroke: l.color,
1723
- "stroke-width": e.FINAL_CONFIG.chart.grid.stroke,
1724
- "stroke-linecap": "round",
1725
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
1726
- }, null, 12, bl)
1727
- ]))), 256)),
1728
- (i(!0), r(I, null, m(e.allScales, (l) => (i(), r("g", {
1729
- style: S(`opacity:${t.selectedScale ? t.selectedScale === l.id ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
1730
- }, [
1731
- d("text", {
1732
- fill: l.color,
1733
- "font-size": t.fontSizes.dataLabels,
1734
- "text-anchor": "middle",
1735
- transform: `translate(${l.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5}, ${t.mutableConfig.isStacked ? e.drawingArea.bottom - l.yOffset - l.individualHeight / 2 : e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`
1736
- }, C(l.name) + " " + C(l.scaleLabel ? `- ${l.scaleLabel}` : ""), 9, Il),
1737
- (i(!0), r(I, null, m(l.yLabels, (n, s) => (i(), r("line", {
1738
- x1: l.x - 3,
1739
- x2: l.x,
1740
- y1: n.y,
1741
- y2: n.y,
1742
- stroke: l.color,
1743
- "stroke-width": 1,
1744
- "stroke-linecap": "round"
1745
- }, null, 8, ml))), 256)),
1746
- (i(!0), r(I, null, m(l.yLabels, (n, s) => (i(), r("text", {
1747
- x: l.x - 5,
1748
- y: n.y,
1749
- "font-size": t.fontSizes.dataLabels,
1750
- "text-anchor": "end",
1751
- fill: l.color
1752
- }, C(e.dataLabel({ p: e.FINAL_CONFIG.chart.labels.prefix, v: n.value, s: e.FINAL_CONFIG.chart.labels.suffix, r: 1 })), 9, Nl))), 256))
1753
- ], 4))), 256))
1754
- ], 64)) : (i(!0), r(I, { key: 1 }, m(e.yLabels, (l, n) => (i(), r("g", {
1755
- key: `yLabel_${n}`
1756
- }, [
1757
- e.canShowValue(l) && l.value >= e.niceScale.min && l.value <= e.niceScale.max ? (i(), r("line", {
1758
- key: 0,
1759
- x1: e.drawingArea.left,
1760
- x2: e.drawingArea.left - 5,
1761
- y1: l.y,
1762
- y2: l.y,
1763
- stroke: e.FINAL_CONFIG.chart.grid.stroke,
1764
- "stroke-width": "1",
1765
- "stroke-linecap": "round"
1766
- }, null, 8, _l)) : h("", !0),
1767
- l.value >= e.niceScale.min && l.value <= e.niceScale.max ? (i(), r("text", {
1768
- key: 1,
1769
- x: e.drawingArea.left - 7,
1770
- y: l.y + t.fontSizes.dataLabels / 3,
1771
- "font-size": t.fontSizes.dataLabels,
1772
- "text-anchor": "end",
1773
- fill: e.FINAL_CONFIG.chart.grid.labels.color
1774
- }, C(e.canShowValue(l.value) ? e.dataLabel({ p: e.FINAL_CONFIG.chart.labels.prefix, v: l.value, s: e.FINAL_CONFIG.chart.labels.suffix, r: 1 }) : ""), 9, Fl)) : h("", !0)
1775
- ]))), 128))
1776
- ])) : h("", !0),
1777
- t.mutableConfig.useIndividualScale && !t.mutableConfig.isStacked ? (i(!0), r(I, { key: 7 }, m(e.allScales, (l) => (i(), r("rect", {
1778
- x: l.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,
1779
- y: e.drawingArea.top,
1780
- width: e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth,
1781
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1782
- fill: t.selectedScale === l.id ? `${l.color}20` : "transparent",
1783
- onMouseenter: (n) => t.selectedScale = l.id,
1784
- onMouseleave: o[0] || (o[0] = (n) => t.selectedScale = null)
1785
- }, null, 40, xl))), 256)) : h("", !0),
1786
- d("g", null, [
1787
- e.FINAL_CONFIG.chart.grid.labels.axis.yLabel && !t.mutableConfig.useIndividualScale ? (i(), r("text", {
1788
- key: 0,
1789
- "font-size": t.fontSizes.yAxis,
1790
- fill: e.FINAL_CONFIG.chart.grid.labels.color,
1791
- transform: `translate(${t.fontSizes.yAxis + e.FINAL_CONFIG.chart.grid.labels.axis.yLabelOffsetX}, ${e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`,
1792
- "text-anchor": "middle",
1793
- style: { transition: "none" }
1794
- }, C(e.FINAL_CONFIG.chart.grid.labels.axis.yLabel), 9, yl)) : h("", !0),
1795
- e.FINAL_CONFIG.chart.grid.labels.axis.xLabel ? (i(), r("text", {
1796
- key: 1,
1797
- "text-anchor": "middle",
1798
- x: t.width / 2,
1799
- y: e.drawingArea.bottom + t.fontSizes.yAxis + t.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.axis.xLabelOffsetY,
1800
- "font-size": t.fontSizes.yAxis,
1801
- fill: e.FINAL_CONFIG.chart.grid.labels.color
1802
- }, C(e.FINAL_CONFIG.chart.grid.labels.axis.xLabel), 9, Al)) : h("", !0)
1803
- ]),
1804
- e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.show ? (i(), r("g", Sl, [
1805
- (i(!0), r(I, null, m(e.timeLabels, (l, n) => (i(), r("g", {
1806
- key: `time_label_${n}`
1807
- }, [
1808
- l && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (n === 0 || n === e.timeLabels.length - 1) && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && t.selectedSerieIndex === n && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.showOnlyAtModulo && n % Math.floor((this.slicer.end - this.slicer.start) / e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.modulo) === 0 ? (i(), r("text", {
1809
- key: 0,
1810
- "text-anchor": e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
1811
- "font-size": t.fontSizes.xAxis,
1812
- fill: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.color,
1813
- transform: `translate(${e.drawingArea.left + e.drawingArea.width / e.maxSeries * n + e.drawingArea.width / e.maxSeries / 2}, ${e.drawingArea.bottom + t.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.rotation})`
1814
- }, C(l || ""), 9, Ll)) : h("", !0)
1815
- ]))), 128))
1816
- ])) : h("", !0),
1817
- d("g", null, [
1818
- (i(!0), r(I, null, m(e.maxSeries, (l, n) => (i(), r("g", {
1819
- key: `tooltip_trap_${n}`
1820
- }, [
1821
- d("rect", {
1822
- "data-cy-trap": "",
1823
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * n,
1824
- y: e.drawingArea.top,
1825
- height: e.drawingArea.height < 0 ? 10 : e.drawingArea.height,
1826
- width: e.drawingArea.width / e.maxSeries < 0 ? 1e-5 : e.drawingArea.width / e.maxSeries,
1827
- fill: t.selectedSerieIndex === n || t.selectedRowIndex === n ? `${e.FINAL_CONFIG.chart.highlighter.color}${t.opacity[e.FINAL_CONFIG.chart.highlighter.opacity]}` : "transparent",
1828
- onMouseenter: (s) => e.toggleTooltipVisibility(!0, n),
1829
- onMouseleave: o[1] || (o[1] = (s) => e.toggleTooltipVisibility(!1)),
1830
- onClick: (s) => e.selectX(n)
1831
- }, null, 40, Cl)
1832
- ]))), 128))
1833
- ]),
1834
- e.FINAL_CONFIG.chart.highlighter.useLine && ![null, void 0].includes(t.selectedSerieIndex) ? (i(), r("g", kl, [
1835
- d("line", {
1836
- x1: e.drawingArea.left + e.drawingArea.width / e.maxSeries * t.selectedSerieIndex + e.drawingArea.width / e.maxSeries / 2,
1837
- x2: e.drawingArea.left + e.drawingArea.width / e.maxSeries * t.selectedSerieIndex + e.drawingArea.width / e.maxSeries / 2,
1838
- y1: e.drawingArea.top,
1839
- y2: e.drawingArea.bottom,
1840
- stroke: e.FINAL_CONFIG.chart.highlighter.color,
1841
- "stroke-width": e.FINAL_CONFIG.chart.highlighter.lineWidth,
1842
- "stroke-dasharray": e.FINAL_CONFIG.chart.highlighter.lineDasharray,
1843
- "stroke-linecap": "round",
1844
- style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
1845
- }, null, 8, wl)
1846
- ])) : h("", !0),
1847
- e.FINAL_CONFIG.chart.timeTag.show && ![null, void 0].includes(t.selectedSerieIndex) ? (i(), r("g", Ol, [
1848
- (i(), r("foreignObject", {
1849
- x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * t.selectedSerieIndex - 100 + e.drawingArea.width / e.maxSeries / 2,
1850
- y: e.drawingArea.bottom,
1851
- width: "200",
1852
- height: "40",
1853
- style: { overflow: "visible !important" }
1854
- }, [
1855
- d("div", {
1856
- class: "vue-ui-xy-time-tag",
1857
- style: S(`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`)
1858
- }, C(e.timeLabels[t.selectedSerieIndex] || t.selectedSerieIndex), 5)
1859
- ], 8, vl)),
1860
- d("circle", {
1861
- cx: e.drawingArea.left + e.drawingArea.width / e.maxSeries * t.selectedSerieIndex + e.drawingArea.width / e.maxSeries / 2,
1862
- cy: e.drawingArea.bottom,
1863
- r: e.FINAL_CONFIG.chart.timeTag.circleMarker.radius,
1864
- fill: e.FINAL_CONFIG.chart.timeTag.circleMarker.color
1865
- }, null, 8, Gl)
1866
- ])) : h("", !0)
1867
- ])) : h("", !0),
1868
- G(a.$slots, "svg", { svg: e.svg }, void 0, !0)
1869
- ], 14, Ye)) : h("", !0),
1870
- e.isDataset ? h("", !0) : (i(), V(F, {
1871
- key: 3,
1872
- config: {
1873
- type: "line",
1874
- style: {
1875
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
1876
- line: {
1877
- axis: {
1878
- color: e.FINAL_CONFIG.chart.grid.stroke
1879
- },
1880
- path: {
1881
- color: e.FINAL_CONFIG.chart.grid.stroke,
1882
- strokeWidth: 0.5
1883
- }
1884
- }
1885
- }
1886
- }
1887
- }, null, 8, ["config"])),
1888
- e.FINAL_CONFIG.chart.zoom.show && t.maxX > 6 && e.isDataset ? (i(), V(p, {
1889
- ref: "chartSlicer",
1890
- key: `slicer_${t.slicerStep}`,
1891
- background: e.FINAL_CONFIG.chart.zoom.color,
1892
- fontSize: e.FINAL_CONFIG.chart.zoom.fontSize,
1893
- useResetSlot: e.FINAL_CONFIG.chart.zoom.useResetSlot,
1894
- labelLeft: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[t.slicer.start],
1895
- labelRight: e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.values[t.slicer.end - 1],
1896
- textColor: e.FINAL_CONFIG.chart.color,
1897
- inputColor: e.FINAL_CONFIG.chart.zoom.color,
1898
- selectColor: e.FINAL_CONFIG.chart.zoom.highlightColor,
1899
- borderColor: e.FINAL_CONFIG.chart.backgroundColor,
1900
- max: t.maxX,
1901
- min: 0,
1902
- valueStart: t.slicer.start,
1903
- valueEnd: t.slicer.end,
1904
- start: t.slicer.start,
1905
- "onUpdate:start": o[2] || (o[2] = (l) => t.slicer.start = l),
1906
- end: t.slicer.end,
1907
- "onUpdate:end": o[3] || (o[3] = (l) => t.slicer.end = l),
1908
- onReset: e.refreshSlicer
1909
- }, {
1910
- "reset-action": z(({ reset: l }) => [
1911
- G(a.$slots, "reset-action", Y(E({ reset: l })), void 0, !0)
1912
- ]),
1913
- _: 3
1914
- }, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "max", "valueStart", "valueEnd", "start", "end", "onReset"])) : h("", !0),
1915
- e.FINAL_CONFIG.chart.legend.show ? (i(), r("div", {
1916
- key: 5,
1917
- ref: "chartLegend",
1918
- class: "vue-ui-xy-legend",
1919
- style: S(`font-size:${e.FINAL_CONFIG.chart.legend.fontSize}px`)
1920
- }, [
1921
- (i(!0), r(I, null, m(e.absoluteDataset, (l, n) => (i(), r("div", {
1922
- key: `div_legend_item_${n}`,
1923
- onClick: (s) => e.segregate(l),
1924
- class: T({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": t.segregatedSeries.includes(l.id) })
1925
- }, [
1926
- t.icons[l.type] === "line" ? (i(), r("svg", pl, [
1927
- d("rect", {
1928
- x: "0",
1929
- y: "7",
1930
- rx: "3",
1931
- stroke: "none",
1932
- height: "4",
1933
- width: "20",
1934
- fill: l.color
1935
- }, null, 8, Tl),
1936
- W(f, {
1937
- plot: { x: 10, y: 9 },
1938
- radius: 4,
1939
- color: l.color,
1940
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
1941
- stroke: e.FINAL_CONFIG.chart.backgroundColor,
1942
- strokeWidth: 1
1943
- }, null, 8, ["color", "shape", "stroke"])
1944
- ])) : (i(), r("svg", Ml, [
1945
- t.icons[l.type] === "bar" ? (i(), r("rect", {
1946
- key: 0,
1947
- x: "0",
1948
- y: "0",
1949
- rx: "1",
1950
- height: "12",
1951
- width: "12",
1952
- stroke: "none",
1953
- fill: l.color
1954
- }, null, 8, Pl)) : (i(), V(f, {
1955
- key: 1,
1956
- plot: { x: 6, y: 6 },
1957
- radius: 5,
1958
- color: l.color,
1959
- shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle"
1960
- }, null, 8, ["color", "shape"]))
1961
- ])),
1962
- d("span", {
1963
- style: S(`color:${e.FINAL_CONFIG.chart.legend.color}`)
1964
- }, C(l.name), 5)
1965
- ], 10, zl))), 128))
1966
- ], 4)) : (i(), r("div", Vl, [
1967
- G(a.$slots, "legend", { legend: e.absoluteDataset }, void 0, !0)
1968
- ], 512)),
1969
- W(k, {
1970
- show: t.mutableConfig.showTooltip && t.isTooltip,
1971
- backgroundColor: e.FINAL_CONFIG.chart.tooltip.backgroundColor,
1972
- color: e.FINAL_CONFIG.chart.tooltip.color,
1973
- fontSize: e.FINAL_CONFIG.chart.tooltip.fontSize,
1974
- borderRadius: e.FINAL_CONFIG.chart.tooltip.borderRadius,
1975
- borderColor: e.FINAL_CONFIG.chart.tooltip.borderColor,
1976
- borderWidth: e.FINAL_CONFIG.chart.tooltip.borderWidth,
1977
- backgroundOpacity: e.FINAL_CONFIG.chart.tooltip.backgroundOpacity,
1978
- parent: a.$refs.chart,
1979
- content: e.tooltipContent,
1980
- isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
1981
- }, {
1982
- "tooltip-before": z(() => [
1983
- G(a.$slots, "tooltip-before", Y(E({ ...e.dataTooltipSlot })), void 0, !0)
1984
- ]),
1985
- "tooltip-after": z(() => [
1986
- G(a.$slots, "tooltip-after", Y(E({ ...e.dataTooltipSlot })), void 0, !0)
1987
- ]),
1988
- _: 3
1989
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "parent", "content", "isCustom"]),
1990
- e.isDataset ? (i(), V(L, {
1991
- key: 7,
1992
- hideDetails: "",
1993
- config: {
1994
- open: t.mutableConfig.showTable,
1995
- maxHeight: 1e4,
1996
- body: {
1997
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
1998
- color: e.FINAL_CONFIG.chart.color
1999
- },
2000
- head: {
2001
- backgroundColor: e.FINAL_CONFIG.chart.backgroundColor,
2002
- color: e.FINAL_CONFIG.chart.color
2003
- }
2004
- }
2005
- }, {
2006
- content: z(() => [
2007
- d("div", {
2008
- style: S(`${t.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
2009
- }, [
2010
- d("div", Rl, [
2011
- Ve(d("input", {
2012
- type: "checkbox",
2013
- "onUpdate:modelValue": o[4] || (o[4] = (l) => t.showSparklineTable = l)
2014
- }, null, 512), [
2015
- [Re, t.showSparklineTable]
2016
- ]),
2017
- d("div", {
2018
- onClick: o[5] || (o[5] = (l) => t.showSparklineTable = !t.showSparklineTable),
2019
- style: { cursor: "pointer" }
2020
- }, [
2021
- W(w, {
2022
- name: "chartLine",
2023
- size: 20,
2024
- stroke: e.FINAL_CONFIG.chart.color
2025
- }, null, 8, ["stroke"])
2026
- ])
2027
- ]),
2028
- t.showSparklineTable ? (i(), V(v, {
2029
- key: `sparkline_${t.segregateStep}`,
2030
- dataset: e.tableSparklineDataset,
2031
- config: e.tableSparklineConfig
2032
- }, null, 8, ["dataset", "config"])) : (i(), V(_, {
2033
- key: 1,
2034
- colNames: e.dataTable.colNames,
2035
- head: e.dataTable.head,
2036
- body: e.dataTable.body,
2037
- config: e.dataTable.config,
2038
- title: `${e.FINAL_CONFIG.chart.title.text}${e.FINAL_CONFIG.chart.title.subtitle.text ? ` : ${e.FINAL_CONFIG.chart.title.subtitle.text}` : ""}`,
2039
- onClose: o[6] || (o[6] = (l) => t.mutableConfig.showTable = !1)
2040
- }, {
2041
- th: z(({ th: l }) => [
2042
- d("div", { innerHTML: l }, null, 8, Dl)
2043
- ]),
2044
- td: z(({ td: l }) => [
2045
- De(C(l), 1)
2046
- ]),
2047
- _: 1
2048
- }, 8, ["colNames", "head", "body", "config", "title"]))
2049
- ], 4)
2050
- ]),
2051
- _: 1
2052
- }, 8, ["config"])) : h("", !0)
2053
- ], 14, We);
2054
- }
2055
- const Kl = /* @__PURE__ */ $(Be, [["render", Hl], ["__scopeId", "data-v-185b12a6"]]);
2056
- export {
2057
- Kl as default
2058
- };