vue-data-ui 2.14.0 → 2.14.1

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