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