vue-data-ui 3.0.1 → 3.0.3
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-DQoWnUfD.js → Arrow-CUUMjZed.js} +1 -1
- package/dist/{BaseDraggableDialog-DEw6oieL.js → BaseDraggableDialog-DgADqZE_.js} +2 -2
- package/dist/{BaseIcon-DEl03NUZ.js → BaseIcon-DLm6QTwr.js} +1 -1
- package/dist/{ColorPicker-CrivFZqC.js → ColorPicker-Crz_B792.js} +2 -2
- package/dist/{DataTable-ClgCsiJA.js → DataTable-CWzb1j8d.js} +2 -2
- package/dist/{Legend-CMvJ6X5j.js → Legend-CevCqVZ5.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B2Wvbl3p.js → NonSvgPenAndPaper-DOG92bzo.js} +3 -3
- package/dist/{PackageVersion-CD5VH_Al.js → PackageVersion-n4qokxnx.js} +1 -1
- package/dist/{PenAndPaper-D3WRn-G2.js → PenAndPaper-C_R9vJkU.js} +3 -3
- package/dist/{Shape-Adi9i_-f.js → Shape-BHVN6hj0.js} +1 -1
- package/dist/{Slicer-t6e1t2iM.js → Slicer-BBjJsLlJ.js} +2 -2
- package/dist/{SparkTooltip-B8OnBSvk.js → SparkTooltip-BHlSggBm.js} +1 -1
- package/dist/{Title-xTWR-Vil.js → Title-CINHji0n.js} +1 -1
- package/dist/{Tooltip-BH3CiANh.js → Tooltip-hfdFRoLp.js} +1 -1
- package/dist/{UserOptions-CKKPgDLV.js → UserOptions-r0epwyXR.js} +2 -2
- package/dist/{dom-to-png-C4hj491O.js → dom-to-png-m7MwDfMh.js} +1 -1
- package/dist/{img-Vb4QHAHI.js → img-CBdOMFyn.js} +1 -1
- package/dist/{index-Dzc2Gi60.js → index-DrRiscPm.js} +908 -871
- package/dist/{pdf-ddpqw-dt.js → pdf-CITAFtf8.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +23 -0
- package/dist/types/vue-data-ui.d.ts +23 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js → useAutoSizeLabelsInsideViewbox-C0d8h29h.js} +1 -1
- package/dist/{useNestedProp-CjnS13nF.js → useNestedProp-BXhArS-K.js} +1 -1
- package/dist/{usePrinter-DBRh8ZvS.js → usePrinter-CZk2ISUm.js} +2 -2
- package/dist/{vue-data-ui-B7ztqj9-.js → vue-data-ui-omyV52aJ.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DUmYPtHl.js → vue-ui-3d-bar-ByS7XX4A.js} +6 -6
- package/dist/{vue-ui-accordion-CPk8wAuj.js → vue-ui-accordion-s_m_NJzJ.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Bv5HmeXj.js → vue-ui-age-pyramid-BJRjKF9G.js} +6 -6
- package/dist/{vue-ui-annotator-KXWlIhtd.js → vue-ui-annotator-BcdnqcBy.js} +2 -2
- package/dist/{vue-ui-bullet-B4N4mBk9.js → vue-ui-bullet-D82pT7tL.js} +199 -186
- package/dist/{vue-ui-candlestick-DENvPnUO.js → vue-ui-candlestick-ThIDj7Q5.js} +7 -7
- package/dist/{vue-ui-carousel-table-vC2bHBaY.js → vue-ui-carousel-table-BHOAO0Gj.js} +4 -4
- package/dist/{vue-ui-chestnut-2nS0StrY.js → vue-ui-chestnut-3sjb4gzU.js} +5 -5
- package/dist/{vue-ui-chord-CyfS6vNM.js → vue-ui-chord-CfVEqNV6.js} +377 -366
- package/dist/{vue-ui-circle-pack-C4JR-0fx.js → vue-ui-circle-pack-u4ABWUZI.js} +6 -6
- package/dist/{vue-ui-cursor-BgeSDtQh.js → vue-ui-cursor-ByfhuSzG.js} +2 -2
- package/dist/{vue-ui-dashboard-9DWUBJ-I.js → vue-ui-dashboard-CBCck-UI.js} +62 -62
- package/dist/{vue-ui-digits-BQO7IBFA.js → vue-ui-digits-BU-8e-1s.js} +2 -2
- package/dist/{vue-ui-donut-evolution-B870IrQA.js → vue-ui-donut-evolution-B4lDDX7G.js} +388 -377
- package/dist/{vue-ui-donut-C-ZJXJ74.js → vue-ui-donut-g5x3IpMV.js} +345 -334
- package/dist/{vue-ui-dumbbell-Cfs2Uotx.js → vue-ui-dumbbell-BJ8qcUud.js} +354 -343
- package/dist/{vue-ui-flow-DnaUVVAD.js → vue-ui-flow-CRwGogHq.js} +299 -288
- package/dist/{vue-ui-funnel-B9s-H5ZG.js → vue-ui-funnel-DzF_UOAJ.js} +6 -6
- package/dist/{vue-ui-galaxy-BoJOczdh.js → vue-ui-galaxy-BqunXfkx.js} +252 -241
- package/dist/{vue-ui-gauge-qjm4BqZR.js → vue-ui-gauge-DPjvYyeF.js} +7 -7
- package/dist/{vue-ui-gizmo-fn7ZaMTI.js → vue-ui-gizmo-CU7HsWOV.js} +3 -3
- package/dist/{vue-ui-heatmap-CIBDKhh8.js → vue-ui-heatmap-CFh-br8X.js} +7 -7
- package/dist/{vue-ui-history-plot-bbNxldYG.js → vue-ui-history-plot-OdhJu988.js} +283 -270
- package/dist/{vue-ui-kpi-BX-2jhLx.js → vue-ui-kpi-CVp3sMeg.js} +3 -3
- package/dist/{vue-ui-mini-loader-Bn1Bb8-J.js → vue-ui-mini-loader-LtGcTTh2.js} +2 -2
- package/dist/{vue-ui-molecule-DQ3qFtBq.js → vue-ui-molecule-DklqwI8c.js} +5 -5
- package/dist/{vue-ui-mood-radar-Cf-ehIo1.js → vue-ui-mood-radar-CGuHZngw.js} +264 -253
- package/dist/{vue-ui-nested-donuts-CWg5BEi-.js → vue-ui-nested-donuts-CHrryP89.js} +377 -366
- package/dist/{vue-ui-onion-sHgQTYfa.js → vue-ui-onion-n74T6frI.js} +265 -254
- package/dist/{vue-ui-parallel-coordinate-plot-Ki3ITp_s.js → vue-ui-parallel-coordinate-plot-DtQi0qWp.js} +276 -265
- package/dist/{vue-ui-quadrant-BIVqW7U7.js → vue-ui-quadrant-CZn3Ab1f.js} +356 -345
- package/dist/{vue-ui-quick-chart-C_hvHc1b.js → vue-ui-quick-chart-CUBOj0Y6.js} +639 -628
- package/dist/{vue-ui-radar-RZUPyPwB.js → vue-ui-radar-BAazL3Qv.js} +254 -243
- package/dist/{vue-ui-rating-BI8Vk7dO.js → vue-ui-rating-CPa7MotU.js} +2 -2
- package/dist/{vue-ui-relation-circle-TVMUEtxK.js → vue-ui-relation-circle-g6pCa6y9.js} +7 -7
- package/dist/{vue-ui-ridgeline-DQeXHQG4.js → vue-ui-ridgeline-C_Mpseru.js} +8 -8
- package/dist/{vue-ui-rings-BH81WmMS.js → vue-ui-rings-grCm0xEc.js} +250 -239
- package/dist/{vue-ui-scatter-Cy7Tz_An.js → vue-ui-scatter-CEr615c-.js} +383 -372
- package/dist/{vue-ui-skeleton-CF50qQxr.js → vue-ui-skeleton-BaqJKjqR.js} +3 -3
- package/dist/{vue-ui-smiley-CrFXEbJs.js → vue-ui-smiley-DyIfQ5KW.js} +2 -2
- package/dist/{vue-ui-spark-trend-DtHArnot.js → vue-ui-spark-trend-CqVF6MXT.js} +3 -3
- package/dist/{vue-ui-sparkbar-CIOwFFgA.js → vue-ui-sparkbar-DwSd_DZu.js} +3 -3
- package/dist/{vue-ui-sparkgauge-E0DdGotz.js → vue-ui-sparkgauge-Bm4UGamr.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-Dm7WoyjY.js → vue-ui-sparkhistogram-DTZK4gCA.js} +4 -4
- package/dist/{vue-ui-sparkline-DoW6DDKT.js → vue-ui-sparkline-DGfIevXQ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-BJnPUWY4.js → vue-ui-sparkstackbar-RT_LpLKL.js} +3 -3
- package/dist/{vue-ui-stackbar-Du42smPs.js → vue-ui-stackbar-9Yxdd7ko.js} +443 -432
- package/dist/{vue-ui-strip-plot-DnenGI-d.js → vue-ui-strip-plot--2bdwjUL.js} +7 -7
- package/dist/{vue-ui-table-BQOQVlHr.js → vue-ui-table-BSNxwgTV.js} +4 -9
- package/dist/{vue-ui-table-heatmap-BzK4_gsP.js → vue-ui-table-heatmap-BaK9FRE1.js} +5 -5
- package/dist/{vue-ui-table-sparkline-B-IwcT8I.js → vue-ui-table-sparkline-Dbi7H7Xb.js} +4 -4
- package/dist/{vue-ui-thermometer-06ao_Pj5.js → vue-ui-thermometer-9EIYVN0g.js} +7 -7
- package/dist/{vue-ui-timer-CxQq4roK.js → vue-ui-timer-OH8HQjpu.js} +5 -5
- package/dist/{vue-ui-tiremarks-CuTxkByj.js → vue-ui-tiremarks-D6JpH-vv.js} +6 -6
- package/dist/{vue-ui-treemap-BgHhRpiV.js → vue-ui-treemap-DqEQgjj-.js} +356 -345
- package/dist/{vue-ui-vertical-bar-CAcsUUCo.js → vue-ui-vertical-bar-BfnMDmGN.js} +9 -9
- package/dist/{vue-ui-waffle-Ct3Upw3m.js → vue-ui-waffle-BJu7n_i7.js} +306 -295
- package/dist/{vue-ui-wheel-oz06Kt-p.js → vue-ui-wheel-KDWfx0os.js} +6 -6
- package/dist/{vue-ui-word-cloud-BRy7fg4S.js → vue-ui-word-cloud-Dcg3uI2O.js} +6 -6
- package/dist/{vue-ui-world-CTV-YfFN.js → vue-ui-world-SYtMz1jo.js} +343 -329
- package/dist/{vue-ui-xy-canvas-BZdhKUIp.js → vue-ui-xy-canvas-BGJg2doK.js} +305 -294
- package/dist/vue-ui-xy-qzB1oN1A.js +3819 -0
- package/package.json +1 -1
- package/dist/vue-ui-xy-DqCy9dpa.js +0 -3808
|
@@ -0,0 +1,3819 @@
|
|
|
1
|
+
import { useCssVars as no, computed as k, ref as p, onMounted as rt, onBeforeUnmount as ct, watch as al, nextTick as Kl, onUpdated as io, createElementBlock as i, openBlock as n, createElementVNode as b, createCommentVNode as f, renderSlot as Q, normalizeStyle as _, createVNode as ql, withDirectives as Yt, unref as v, Fragment as x, renderList as L, normalizeClass as Ne, withKeys as La, vModelText as Ma, toDisplayString as te, defineAsyncComponent as kl, useSlots as so, getCurrentInstance as ro, toRefs as co, watchEffect as vo, createBlock as Be, createSlots as ho, withCtx as me, normalizeProps as il, guardReactiveProps as wl, mergeProps as _t, Teleport as fo, vModelCheckbox as go, createTextVNode as mo } from "vue";
|
|
2
|
+
import { c as Ct, V as zt, U as It, X as xo, F as qe, u as bo, f as Ft, t as po, a4 as Ue, d as yo, D as st, ac as Nl, e as ko, p as wo, ad as Lt, a9 as D, ae as So, h as V, af as Aa, ag as Ca, ah as $o, ai as za, aj as Ia, k as pe, y as _o, z as Lo, _ as Ta, R as tl, i as Fe, x as Ol, s as Ze, a7 as j, L as Mo, ak as Mt, I as Ao, al as Sl, C as We, a as Co, b as zo, o as Na, v as Io, w as To, E as Zl } from "./index-DrRiscPm.js";
|
|
3
|
+
import { t as Dt, u as No } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Oo } from "./usePrinter-CZk2ISUm.js";
|
|
5
|
+
import { u as Ro, B as Po } from "./useLoading-D7YHNtLX.js";
|
|
6
|
+
import { u as Wt } from "./useNestedProp-BXhArS-K.js";
|
|
7
|
+
import { u as Oa } from "./useTimeLabels-DkzmKfZn.js";
|
|
8
|
+
import { u as Ho } from "./useTimeLabelCollider-CIsgDrl9.js";
|
|
9
|
+
import Vo from "./img-CBdOMFyn.js";
|
|
10
|
+
import Eo from "./Title-CINHji0n.js";
|
|
11
|
+
import { S as Bo } from "./Slicer-BBjJsLlJ.js";
|
|
12
|
+
import { _ as At } from "./Shape-BHVN6hj0.js";
|
|
13
|
+
import Fo from "./BaseIcon-DLm6QTwr.js";
|
|
14
|
+
import { _ as Ra } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
const Wo = {
|
|
16
|
+
class: "vue-data-ui-slicer-labels",
|
|
17
|
+
style: { position: "relative", "z-index": "1", "pointer-events": "none" }
|
|
18
|
+
}, Yo = {
|
|
19
|
+
key: 0,
|
|
20
|
+
style: { width: "100%", position: "relative" }
|
|
21
|
+
}, Do = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "minimap",
|
|
24
|
+
style: { width: "100%" }
|
|
25
|
+
}, Xo = ["xmlns", "viewBox"], Go = ["id"], Uo = ["stop-color"], Zo = ["d", "stroke"], qo = ["x", "width", "height", "fill", "rx"], Ko = ["d", "fill"], Jo = ["x", "width", "height", "rx", "fill"], Qo = ["x", "width", "height", "fill", "rx"], jo = ["d", "fill"], eu = ["d", "stroke"], lu = ["cx", "cy", "stroke", "fill"], tu = ["cx", "cy", "stroke", "fill"], au = ["x1", "x2", "y2", "stroke"], ou = ["x", "height", "width", "onMouseenter"], uu = ["min", "max"], nu = ["min", "max"], iu = {
|
|
26
|
+
__name: "SlicerPreview",
|
|
27
|
+
props: {
|
|
28
|
+
background: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "#FFFFFF"
|
|
31
|
+
},
|
|
32
|
+
borderColor: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "#FFFFFF"
|
|
35
|
+
},
|
|
36
|
+
fontSize: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 14
|
|
39
|
+
},
|
|
40
|
+
labelLeft: {
|
|
41
|
+
type: [String, Number],
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
labelRight: {
|
|
45
|
+
type: [String, Number],
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
textColor: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "#1A1A1A"
|
|
51
|
+
},
|
|
52
|
+
inputColor: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "#1A1A1A"
|
|
55
|
+
},
|
|
56
|
+
max: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
},
|
|
60
|
+
min: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0
|
|
63
|
+
},
|
|
64
|
+
selectColor: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "#4A4A4A"
|
|
67
|
+
},
|
|
68
|
+
useResetSlot: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
valueStart: {
|
|
73
|
+
type: [Number, String],
|
|
74
|
+
default: 0
|
|
75
|
+
},
|
|
76
|
+
valueEnd: {
|
|
77
|
+
type: [Number, String],
|
|
78
|
+
default: 0
|
|
79
|
+
},
|
|
80
|
+
minimap: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default: []
|
|
83
|
+
},
|
|
84
|
+
smoothMinimap: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: !1
|
|
87
|
+
},
|
|
88
|
+
minimapSelectedColor: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "#1f77b4"
|
|
91
|
+
},
|
|
92
|
+
minimapSelectionRadius: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 12
|
|
95
|
+
},
|
|
96
|
+
minimapLineColor: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "#2D353C"
|
|
99
|
+
},
|
|
100
|
+
minimapSelectedColorOpacity: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 0.2
|
|
103
|
+
},
|
|
104
|
+
minimapSelectedIndex: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: null
|
|
107
|
+
},
|
|
108
|
+
minimapIndicatorColor: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: "#2D353C"
|
|
111
|
+
},
|
|
112
|
+
refreshStartPoint: {
|
|
113
|
+
type: Number,
|
|
114
|
+
default: 0
|
|
115
|
+
},
|
|
116
|
+
refreshEndPoint: {
|
|
117
|
+
type: Number,
|
|
118
|
+
default: null
|
|
119
|
+
},
|
|
120
|
+
enableRangeHandles: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
enableSelectionDrag: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: !0
|
|
127
|
+
},
|
|
128
|
+
verticalHandles: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: !1
|
|
131
|
+
},
|
|
132
|
+
timeLabels: {
|
|
133
|
+
type: Array
|
|
134
|
+
},
|
|
135
|
+
isPreview: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: !1
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
emits: ["futureStart", "futureEnd", "update:start", "update:end", "reset", "trapMouse"],
|
|
141
|
+
setup(C, { expose: Tt, emit: Nt }) {
|
|
142
|
+
no((m) => ({
|
|
143
|
+
"08ee7c46": cl.value,
|
|
144
|
+
d9036b5e: Ke.value,
|
|
145
|
+
"4e6bd1fc": Ll.value,
|
|
146
|
+
"73b38b81": C.selectColor,
|
|
147
|
+
"07444d8f": _l.value
|
|
148
|
+
}));
|
|
149
|
+
const d = C, Oe = p(null), de = p(d.min), he = p(d.max), $l = k(() => !!d.minimap.length), Jl = p(Ct()), Rl = p(0), sl = k({
|
|
150
|
+
get() {
|
|
151
|
+
return de.value;
|
|
152
|
+
},
|
|
153
|
+
set(m) {
|
|
154
|
+
const h = Math.min(m, he.value - 1);
|
|
155
|
+
de.value = h, dl.value && (dl.value.value = String(h)), Ye("futureStart", h);
|
|
156
|
+
}
|
|
157
|
+
}), rl = k({
|
|
158
|
+
get() {
|
|
159
|
+
return he.value;
|
|
160
|
+
},
|
|
161
|
+
set(m) {
|
|
162
|
+
const h = Math.max(m, de.value + 1);
|
|
163
|
+
he.value = h, Ql.value && (Ql.value.value = String(h)), Ye("futureEnd", h);
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
rt(() => {
|
|
167
|
+
const m = () => {
|
|
168
|
+
Oe.value && (Rl.value = Oe.value.getBoundingClientRect().width);
|
|
169
|
+
};
|
|
170
|
+
m();
|
|
171
|
+
const h = Dt(m, 50);
|
|
172
|
+
window.addEventListener("resize", h), ct(() => {
|
|
173
|
+
window.removeEventListener("resize", h);
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
let Pl = null;
|
|
177
|
+
function Re() {
|
|
178
|
+
clearTimeout(Pl), Ye("update:start", Number(de.value)), Ye("update:end", Number(he.value));
|
|
179
|
+
}
|
|
180
|
+
const Ot = k(() => d.refreshEndPoint === null ? d.max : d.refreshEndPoint), Ye = Nt, ue = k(() => {
|
|
181
|
+
const m = d.max - d.min, h = (de.value - d.min) / m * 100, w = (he.value - d.min) / m * 100, g = (h + w) / 2, ie = Ae.value ? `calc(${g}% - ${e.value.width}px)` : ol.value ? `calc(${g}%)` : `calc(${g}% - ${e.value.width / 2}px)`;
|
|
182
|
+
return {
|
|
183
|
+
left: `${h}%`,
|
|
184
|
+
width: `${w - h}%`,
|
|
185
|
+
background: d.selectColor,
|
|
186
|
+
tooltipLeft: `calc(${h}% - ${ol.value ? 0 : Al.value / 2}px)`,
|
|
187
|
+
tooltipRight: `calc(${w}% - ${Ae.value ? Cl.value : Cl.value / 2}px)`,
|
|
188
|
+
tooltipCenter: ie,
|
|
189
|
+
arrowLeft: !ol.value,
|
|
190
|
+
arrowRight: !Ae.value
|
|
191
|
+
};
|
|
192
|
+
}), ol = k(() => Oe.value ? Oe.value.getBoundingClientRect().width * ((de.value - d.min) / (d.max - d.min)) - Al.value / 2 < 0 : !1), Ae = k(() => Oe.value ? Oe.value.getBoundingClientRect().width * ((he.value - d.min) / (d.max - d.min)) + Cl.value / 2 > Oe.value.getBoundingClientRect().width : !1), cl = k(() => d.inputColor), _l = k(() => d.background), Ll = k(() => `${d.selectColor}33`), Ke = k(() => d.borderColor), Hl = k(() => {
|
|
193
|
+
let m = [];
|
|
194
|
+
for (let h = 0; h < d.minimap.length; h += 1)
|
|
195
|
+
m.push(h);
|
|
196
|
+
return m;
|
|
197
|
+
});
|
|
198
|
+
function Vl() {
|
|
199
|
+
Ye("reset");
|
|
200
|
+
}
|
|
201
|
+
p({
|
|
202
|
+
start: de.value,
|
|
203
|
+
end: he.value
|
|
204
|
+
}), al(
|
|
205
|
+
() => d.min,
|
|
206
|
+
(m) => {
|
|
207
|
+
Number(de.value) < Number(m) && (de.value = Number(m)), Number(he.value) < Number(m) && (he.value = Number(m));
|
|
208
|
+
}
|
|
209
|
+
), al(
|
|
210
|
+
() => d.max,
|
|
211
|
+
(m) => {
|
|
212
|
+
Number(de.value) > Number(m) && (de.value = Number(m)), Number(he.value) > Number(m) && (he.value = Number(m));
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
const Je = p(null), q = p({
|
|
216
|
+
width: 1,
|
|
217
|
+
height: 1
|
|
218
|
+
}), $e = p(null);
|
|
219
|
+
rt(() => {
|
|
220
|
+
if ($l.value) {
|
|
221
|
+
const m = Dt(() => {
|
|
222
|
+
const { width: h, height: w } = No({
|
|
223
|
+
chart: Je.value
|
|
224
|
+
});
|
|
225
|
+
q.value.width = h, q.value.height = w - 47;
|
|
226
|
+
});
|
|
227
|
+
$e.value = new ResizeObserver(m), $e.value.observe(Je.value);
|
|
228
|
+
}
|
|
229
|
+
}), ct(() => {
|
|
230
|
+
$e.value && $e.value.disconnect();
|
|
231
|
+
});
|
|
232
|
+
const fe = k(() => d.minimap.length ? q.value.width / d.minimap.length : 0), ye = k(() => {
|
|
233
|
+
if (!d.minimap.length) return [];
|
|
234
|
+
const m = Math.max(...d.minimap), h = Math.min(...d.minimap) - 10, w = m - (h > 0 ? 0 : h), g = d.minimap.map((Xl, Rt) => {
|
|
235
|
+
const et = Xl - h;
|
|
236
|
+
return {
|
|
237
|
+
x: q.value.width / d.minimap.length * Rt + fe.value / 2,
|
|
238
|
+
y: q.value.height - et / w * (q.value.height * 0.9)
|
|
239
|
+
};
|
|
240
|
+
}), ie = d.smoothMinimap ? zt(g) : It(g), xl = [...g].slice(d.valueStart, d.valueEnd), ft = d.smoothMinimap ? zt(xl) : It(xl);
|
|
241
|
+
return {
|
|
242
|
+
fullSet: ie,
|
|
243
|
+
selectionSet: ft,
|
|
244
|
+
sliced: xl,
|
|
245
|
+
firstPlot: g[d.valueStart],
|
|
246
|
+
lastPlot: g[d.valueEnd - 1]
|
|
247
|
+
};
|
|
248
|
+
}), M = k(() => ({
|
|
249
|
+
x: fe.value * de.value + fe.value / 2,
|
|
250
|
+
width: q.value.width * ((he.value - de.value) / d.max) - fe.value
|
|
251
|
+
})), vl = p(d.minimapSelectedIndex);
|
|
252
|
+
al(() => d.minimapSelectedIndex, (m) => {
|
|
253
|
+
vl.value = m + d.valueStart;
|
|
254
|
+
}, { immediate: !0 });
|
|
255
|
+
function xe(m) {
|
|
256
|
+
vl.value = m, m >= d.valueStart && m < d.valueEnd && Ye("trapMouse", m - d.valueStart);
|
|
257
|
+
}
|
|
258
|
+
const ne = p(0), dl = p(null), Ql = p(null);
|
|
259
|
+
function hl(m) {
|
|
260
|
+
if (typeof m == "object" && m && "target" in m) {
|
|
261
|
+
const w = m.target, g = "valueAsNumber" in w ? w.valueAsNumber : +w.value;
|
|
262
|
+
return Number.isFinite(g) ? g : NaN;
|
|
263
|
+
}
|
|
264
|
+
const h = +m;
|
|
265
|
+
return Number.isFinite(h) ? h : NaN;
|
|
266
|
+
}
|
|
267
|
+
function fl(m) {
|
|
268
|
+
const h = hl(m);
|
|
269
|
+
Number.isFinite(h) && (sl.value = h);
|
|
270
|
+
}
|
|
271
|
+
function ul(m) {
|
|
272
|
+
const h = hl(m);
|
|
273
|
+
Number.isFinite(h) && (rl.value = h);
|
|
274
|
+
}
|
|
275
|
+
const El = k(() => d.valueEnd - d.valueStart), Ce = p(!1);
|
|
276
|
+
let ae = p(null);
|
|
277
|
+
const X = k(() => (Rl.value - 48) / (d.max - d.min)), vt = k(() => (Rl.value - 48) / (d.max - d.min) * El.value), dt = p(2.5), jl = k(() => {
|
|
278
|
+
const m = Rl.value - 48;
|
|
279
|
+
return Math.ceil(
|
|
280
|
+
(d.max - d.min) / ((m - vt.value) / dt.value)
|
|
281
|
+
);
|
|
282
|
+
});
|
|
283
|
+
let _e = null, Pe = null, z = null, De = null;
|
|
284
|
+
const Bl = (m) => {
|
|
285
|
+
if (y.value = !0, !d.enableSelectionDrag) return;
|
|
286
|
+
const h = m.type === "touchstart", w = h && m.targetTouches && m.targetTouches[0] ? m.targetTouches[0] : null, g = h ? w ? w.target : null : m.target;
|
|
287
|
+
!g || !(g instanceof Element) || g.classList && g.classList.contains("range-handle") || (Ce.value = !0, ae.value = h ? w ? w.clientX : 0 : m.clientX, _e = h ? "touchmove" : "mousemove", Pe = h ? "touchend" : "mouseup", z = h ? ke : Fl, De = h ? ht : Wl, window.addEventListener(_e, z, { passive: !1 }), window.addEventListener(Pe, De));
|
|
288
|
+
};
|
|
289
|
+
function Fl(m) {
|
|
290
|
+
Ce.value && He(m.clientX);
|
|
291
|
+
}
|
|
292
|
+
function ke(m) {
|
|
293
|
+
if (!Ce.value || !Oe.value) return;
|
|
294
|
+
const h = m.target;
|
|
295
|
+
if (!(h instanceof Element) || !Oe.value.contains(h) || h.classList && h.classList.contains("range-handle")) return;
|
|
296
|
+
m.preventDefault();
|
|
297
|
+
const w = m.targetTouches && m.targetTouches[0] ? m.targetTouches[0] : null;
|
|
298
|
+
w && He(w.clientX);
|
|
299
|
+
}
|
|
300
|
+
function He(m) {
|
|
301
|
+
if (!Ce.value) return;
|
|
302
|
+
const h = m - ae.value;
|
|
303
|
+
if (Math.abs(h) > X.value) {
|
|
304
|
+
if (h > 0) {
|
|
305
|
+
const w = Math.min(d.max, he.value + jl.value);
|
|
306
|
+
rl.value = w, sl.value = w - El.value;
|
|
307
|
+
} else {
|
|
308
|
+
const w = Math.max(d.min, de.value - jl.value);
|
|
309
|
+
sl.value = w, rl.value = w + El.value;
|
|
310
|
+
}
|
|
311
|
+
ae.value = m;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
function Wl() {
|
|
315
|
+
S();
|
|
316
|
+
}
|
|
317
|
+
function ht() {
|
|
318
|
+
S();
|
|
319
|
+
}
|
|
320
|
+
function S() {
|
|
321
|
+
Ce.value = !1, _e && z && window.removeEventListener(_e, z), Pe && De && window.removeEventListener(Pe, De), _e = Pe = null, z = De = null, Re();
|
|
322
|
+
}
|
|
323
|
+
const gl = p(!1), Ml = p(null), ml = p(null), Al = p(1), Cl = p(1), y = p(!1);
|
|
324
|
+
function Yl() {
|
|
325
|
+
Ml.value && (Al.value = Ml.value.getBoundingClientRect().width);
|
|
326
|
+
}
|
|
327
|
+
function $() {
|
|
328
|
+
ml.value && (Cl.value = ml.value.getBoundingClientRect().width);
|
|
329
|
+
}
|
|
330
|
+
const Le = p(0);
|
|
331
|
+
function Dl(m) {
|
|
332
|
+
Le.value = m === "start" ? 1 : 0;
|
|
333
|
+
}
|
|
334
|
+
const Qe = p(!1), e = p({
|
|
335
|
+
width: 0,
|
|
336
|
+
left: 0
|
|
337
|
+
});
|
|
338
|
+
al([de, he], async () => {
|
|
339
|
+
if (await Kl(), !Ml.value || !ml.value) {
|
|
340
|
+
Qe.value = !1, e.value = { width: 0, left: 0 };
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const m = Ml.value.getBoundingClientRect(), h = ml.value.getBoundingClientRect();
|
|
344
|
+
Qe.value = m.x + m.width > h.x;
|
|
345
|
+
const w = m.x + m.width / 2, g = h.x + h.width / 2, ie = m.width + h.width, xl = (w + g) / 2;
|
|
346
|
+
e.value = {
|
|
347
|
+
width: ie,
|
|
348
|
+
left: xl - ie / 2
|
|
349
|
+
};
|
|
350
|
+
}), io(() => {
|
|
351
|
+
Yl(), $();
|
|
352
|
+
}), al(() => d.labelLeft, () => {
|
|
353
|
+
Kl(Yl);
|
|
354
|
+
}, { deep: !0 }), al(() => d.labelRight, () => {
|
|
355
|
+
Kl($);
|
|
356
|
+
}, { deep: !0 });
|
|
357
|
+
const B = k(() => {
|
|
358
|
+
const m = d.timeLabels.find((w) => w.absoluteIndex === de.value), h = d.timeLabels.find((w) => w.absoluteIndex === he.value - 1);
|
|
359
|
+
return {
|
|
360
|
+
left: m ? m.text : "",
|
|
361
|
+
right: h ? h.text : ""
|
|
362
|
+
};
|
|
363
|
+
});
|
|
364
|
+
return ct(() => {
|
|
365
|
+
$e.value && $e.value.disconnect(), _e && z && window.removeEventListener(_e, z), Pe && De && window.removeEventListener(Pe, De), _e = Pe = null, z = De = null, clearTimeout(Pl);
|
|
366
|
+
}), Tt({
|
|
367
|
+
setStartValue: fl,
|
|
368
|
+
setEndValue: ul
|
|
369
|
+
}), (m, h) => (n(), i("div", {
|
|
370
|
+
"data-dom-to-png-ignore": "",
|
|
371
|
+
style: { padding: "0 24px" },
|
|
372
|
+
class: "vue-data-ui-zoom",
|
|
373
|
+
ref_key: "zoomWrapper",
|
|
374
|
+
ref: Oe,
|
|
375
|
+
onMousedown: Bl,
|
|
376
|
+
onTouchstart: Bl
|
|
377
|
+
}, [
|
|
378
|
+
b("div", Wo, [
|
|
379
|
+
C.valueStart !== C.refreshStartPoint || C.valueEnd !== Ot.value ? (n(), i("div", Yo, [
|
|
380
|
+
C.useResetSlot ? Q(m.$slots, "reset-action", {
|
|
381
|
+
key: 1,
|
|
382
|
+
reset: Vl
|
|
383
|
+
}, void 0, !0) : (n(), i("button", {
|
|
384
|
+
key: 0,
|
|
385
|
+
tabindex: "0",
|
|
386
|
+
role: "button",
|
|
387
|
+
class: "vue-data-ui-refresh-button",
|
|
388
|
+
style: _({
|
|
389
|
+
top: $l.value ? "36px" : "-16px",
|
|
390
|
+
pointerEvents: "all !important"
|
|
391
|
+
}),
|
|
392
|
+
onClick: Vl
|
|
393
|
+
}, [
|
|
394
|
+
ql(Fo, {
|
|
395
|
+
name: "refresh",
|
|
396
|
+
stroke: C.textColor
|
|
397
|
+
}, null, 8, ["stroke"])
|
|
398
|
+
], 4))
|
|
399
|
+
])) : f("", !0)
|
|
400
|
+
]),
|
|
401
|
+
b("div", {
|
|
402
|
+
class: "double-range-slider",
|
|
403
|
+
ref_key: "minimapWrapper",
|
|
404
|
+
ref: Je,
|
|
405
|
+
style: { "z-index": "0" },
|
|
406
|
+
onMouseenter: h[13] || (h[13] = (w) => y.value = !0),
|
|
407
|
+
onMouseleave: h[14] || (h[14] = (w) => y.value = !1)
|
|
408
|
+
}, [
|
|
409
|
+
$l.value ? (n(), i("div", Do, [
|
|
410
|
+
(n(), i("svg", {
|
|
411
|
+
xmlns: v(xo),
|
|
412
|
+
viewBox: `0 0 ${q.value.width < 0 ? 0 : q.value.width} ${q.value.height < 0 ? 0 : q.value.height}`
|
|
413
|
+
}, [
|
|
414
|
+
b("defs", null, [
|
|
415
|
+
b("linearGradient", {
|
|
416
|
+
id: Jl.value,
|
|
417
|
+
x1: "0%",
|
|
418
|
+
y1: "0%",
|
|
419
|
+
x2: "0%",
|
|
420
|
+
y2: "100%"
|
|
421
|
+
}, [
|
|
422
|
+
b("stop", {
|
|
423
|
+
offset: "0%",
|
|
424
|
+
"stop-color": `${C.minimapLineColor}50`
|
|
425
|
+
}, null, 8, Uo),
|
|
426
|
+
h[15] || (h[15] = b("stop", {
|
|
427
|
+
offset: "100%",
|
|
428
|
+
"stop-color": "transparent"
|
|
429
|
+
}, null, -1))
|
|
430
|
+
], 8, Go)
|
|
431
|
+
]),
|
|
432
|
+
b("path", {
|
|
433
|
+
d: `M${ye.value.fullSet}`,
|
|
434
|
+
stroke: `${C.minimapLineColor}`,
|
|
435
|
+
fill: "none",
|
|
436
|
+
"stroke-width": "1",
|
|
437
|
+
"stroke-linecap": "round",
|
|
438
|
+
"stroke-linejoin": "round",
|
|
439
|
+
style: { opacity: "1" }
|
|
440
|
+
}, null, 8, Zo),
|
|
441
|
+
b("rect", {
|
|
442
|
+
x: M.value.x,
|
|
443
|
+
width: M.value.width < 0 ? 0 : M.value.width,
|
|
444
|
+
height: Math.max(q.value.height, 0),
|
|
445
|
+
y: 0,
|
|
446
|
+
fill: Ke.value,
|
|
447
|
+
rx: C.minimapSelectionRadius,
|
|
448
|
+
stroke: "none"
|
|
449
|
+
}, null, 8, qo),
|
|
450
|
+
b("path", {
|
|
451
|
+
d: `M${fe.value / 2},${Math.max(q.value.height, 0)} ${ye.value.fullSet} L${q.value.width - fe.value / 2},${Math.max(q.value.height, 0)}Z`,
|
|
452
|
+
fill: `url(#${Jl.value})`,
|
|
453
|
+
stroke: "none",
|
|
454
|
+
style: { opacity: "1" }
|
|
455
|
+
}, null, 8, Ko),
|
|
456
|
+
b("rect", {
|
|
457
|
+
x: M.value.x,
|
|
458
|
+
width: M.value.width < 0 ? 0 : M.value.width,
|
|
459
|
+
height: Math.max(q.value.height, 0),
|
|
460
|
+
y: 0,
|
|
461
|
+
rx: C.minimapSelectionRadius,
|
|
462
|
+
fill: Ke.value
|
|
463
|
+
}, null, 8, Jo),
|
|
464
|
+
b("rect", {
|
|
465
|
+
x: M.value.x,
|
|
466
|
+
width: M.value.width < 0 ? 0 : M.value.width,
|
|
467
|
+
height: Math.max(q.value.height, 0),
|
|
468
|
+
y: 0,
|
|
469
|
+
fill: C.minimapSelectedColor,
|
|
470
|
+
rx: C.minimapSelectionRadius,
|
|
471
|
+
style: _({
|
|
472
|
+
opacity: C.minimapSelectedColorOpacity
|
|
473
|
+
})
|
|
474
|
+
}, null, 12, Qo),
|
|
475
|
+
b("path", {
|
|
476
|
+
d: `M${ye.value.sliced[0].x},${Math.max(q.value.height, 0)} ${ye.value.selectionSet} L${ye.value.sliced.at(-1).x},${Math.max(q.value.height, 0)}Z`,
|
|
477
|
+
fill: `url(#${Jl.value})`,
|
|
478
|
+
stroke: "none",
|
|
479
|
+
style: { opacity: "1" }
|
|
480
|
+
}, null, 8, jo),
|
|
481
|
+
b("path", {
|
|
482
|
+
d: `M ${ye.value.selectionSet}`,
|
|
483
|
+
stroke: `${C.minimapLineColor}`,
|
|
484
|
+
fill: "transparent",
|
|
485
|
+
"stroke-width": "2",
|
|
486
|
+
"stroke-linecap": "round",
|
|
487
|
+
"stroke-linejoin": "round"
|
|
488
|
+
}, null, 8, eu),
|
|
489
|
+
b("circle", {
|
|
490
|
+
cx: ye.value.firstPlot.x,
|
|
491
|
+
cy: ye.value.firstPlot.y,
|
|
492
|
+
"stroke-width": "0.5",
|
|
493
|
+
stroke: Ke.value,
|
|
494
|
+
r: "3",
|
|
495
|
+
fill: C.minimapLineColor
|
|
496
|
+
}, null, 8, lu),
|
|
497
|
+
b("circle", {
|
|
498
|
+
cx: ye.value.lastPlot.x,
|
|
499
|
+
cy: ye.value.lastPlot.y,
|
|
500
|
+
"stroke-width": "0.5",
|
|
501
|
+
stroke: Ke.value,
|
|
502
|
+
r: "3",
|
|
503
|
+
fill: C.minimapLineColor
|
|
504
|
+
}, null, 8, tu),
|
|
505
|
+
vl.value !== null ? (n(!0), i(x, { key: 0 }, L(Hl.value, (w, g) => (n(), i("g", null, [
|
|
506
|
+
vl.value === w && w >= C.valueStart && w < C.valueEnd ? (n(), i("line", {
|
|
507
|
+
key: 0,
|
|
508
|
+
x1: fe.value * g + fe.value / 2,
|
|
509
|
+
x2: fe.value * g + fe.value / 2,
|
|
510
|
+
y1: 0,
|
|
511
|
+
y2: Math.max(q.value.height, 0),
|
|
512
|
+
stroke: C.minimapIndicatorColor,
|
|
513
|
+
"stroke-linecap": "round",
|
|
514
|
+
"stroke-dasharray": "2",
|
|
515
|
+
"stroke-width": "1"
|
|
516
|
+
}, null, 8, au)) : f("", !0)
|
|
517
|
+
]))), 256)) : f("", !0),
|
|
518
|
+
(n(!0), i(x, null, L(Hl.value, (w, g) => (n(), i("rect", {
|
|
519
|
+
x: fe.value * g,
|
|
520
|
+
y: 0,
|
|
521
|
+
height: Math.max(q.value.height, 0),
|
|
522
|
+
width: fe.value < 0 ? 0 : fe.value,
|
|
523
|
+
fill: "transparent",
|
|
524
|
+
style: _([{ "pointer-events": "all !important" }, {
|
|
525
|
+
cursor: w >= C.valueStart && w < C.valueEnd && C.enableSelectionDrag ? gl.value ? "grabbing" : "grab" : "default"
|
|
526
|
+
}]),
|
|
527
|
+
onMousedown: h[0] || (h[0] = (ie) => gl.value = !0),
|
|
528
|
+
onMouseup: h[1] || (h[1] = (ie) => gl.value = !1),
|
|
529
|
+
onMouseenter: (ie) => xe(w),
|
|
530
|
+
onMouseleave: h[2] || (h[2] = (ie) => {
|
|
531
|
+
vl.value = null, Ye("trapMouse", null);
|
|
532
|
+
})
|
|
533
|
+
}, null, 44, ou))), 256))
|
|
534
|
+
], 8, Xo))
|
|
535
|
+
])) : f("", !0),
|
|
536
|
+
h[16] || (h[16] = b("div", { class: "slider-track" }, null, -1)),
|
|
537
|
+
b("div", {
|
|
538
|
+
class: Ne({
|
|
539
|
+
"range-highlight": !0,
|
|
540
|
+
move: C.enableSelectionDrag
|
|
541
|
+
}),
|
|
542
|
+
onMousedown: h[3] || (h[3] = (w) => gl.value = !0),
|
|
543
|
+
onMouseup: h[4] || (h[4] = (w) => gl.value = !1),
|
|
544
|
+
style: _({
|
|
545
|
+
...ue.value,
|
|
546
|
+
cursor: gl.value ? "grabbing" : "grab"
|
|
547
|
+
})
|
|
548
|
+
}, null, 38),
|
|
549
|
+
C.enableRangeHandles ? Yt((n(), i("input", {
|
|
550
|
+
ref_key: "rangeStart",
|
|
551
|
+
ref: dl,
|
|
552
|
+
key: `range-min${ne.value}`,
|
|
553
|
+
type: "range",
|
|
554
|
+
class: Ne({ "range-left": !0, "range-handle": !0, "range-minimap": $l.value && C.verticalHandles }),
|
|
555
|
+
min: C.min,
|
|
556
|
+
max: C.max,
|
|
557
|
+
"onUpdate:modelValue": h[5] || (h[5] = (w) => sl.value = w),
|
|
558
|
+
onInput: h[6] || (h[6] = (w) => fl(w)),
|
|
559
|
+
onChange: Re,
|
|
560
|
+
onKeyup: La(Re, ["enter"]),
|
|
561
|
+
onBlur: Re,
|
|
562
|
+
onMouseenter: h[7] || (h[7] = (w) => Dl("start")),
|
|
563
|
+
onPointermove: h[8] || (h[8] = (w) => sl.value = +w.target.value),
|
|
564
|
+
onPointerup: Re
|
|
565
|
+
}, null, 42, uu)), [
|
|
566
|
+
[
|
|
567
|
+
Ma,
|
|
568
|
+
sl.value,
|
|
569
|
+
void 0,
|
|
570
|
+
{ number: !0 }
|
|
571
|
+
]
|
|
572
|
+
]) : f("", !0),
|
|
573
|
+
C.enableRangeHandles ? Yt((n(), i("input", {
|
|
574
|
+
key: 2,
|
|
575
|
+
ref_key: "rangeEnd",
|
|
576
|
+
ref: Ql,
|
|
577
|
+
type: "range",
|
|
578
|
+
class: Ne({ "range-right": !0, "range-handle": !0, "range-minimap": $l.value && C.verticalHandles }),
|
|
579
|
+
min: C.min,
|
|
580
|
+
max: C.max,
|
|
581
|
+
"onUpdate:modelValue": h[9] || (h[9] = (w) => rl.value = w),
|
|
582
|
+
onInput: h[10] || (h[10] = (w) => ul(w)),
|
|
583
|
+
onChange: Re,
|
|
584
|
+
onKeyup: La(Re, ["enter"]),
|
|
585
|
+
onBlur: Re,
|
|
586
|
+
onMouseenter: h[11] || (h[11] = (w) => Dl("end")),
|
|
587
|
+
onPointermove: h[12] || (h[12] = (w) => rl.value = +w.target.value),
|
|
588
|
+
onPointerup: Re
|
|
589
|
+
}, null, 42, nu)), [
|
|
590
|
+
[
|
|
591
|
+
Ma,
|
|
592
|
+
rl.value,
|
|
593
|
+
void 0,
|
|
594
|
+
{ number: !0 }
|
|
595
|
+
]
|
|
596
|
+
]) : f("", !0),
|
|
597
|
+
B.value.left ? (n(), i("div", {
|
|
598
|
+
key: 3,
|
|
599
|
+
ref_key: "tooltipLeft",
|
|
600
|
+
ref: Ml,
|
|
601
|
+
class: Ne({
|
|
602
|
+
"range-tooltip": !0,
|
|
603
|
+
"range-tooltip-visible": y.value,
|
|
604
|
+
"range-tooltip-arrow": ue.value.arrowLeft && !C.verticalHandles,
|
|
605
|
+
"range-tooltip-arrow-left": !ue.value.arrowLeft && !C.verticalHandles
|
|
606
|
+
}),
|
|
607
|
+
style: _({
|
|
608
|
+
left: ue.value.tooltipLeft,
|
|
609
|
+
color: v(qe)(C.selectColor),
|
|
610
|
+
backgroundColor: C.selectColor,
|
|
611
|
+
border: `1px solid ${Ke.value}`,
|
|
612
|
+
zIndex: `${Le.value + 4}`,
|
|
613
|
+
visibility: Qe.value || B.value.left === B.value.right ? "hidden" : "visible"
|
|
614
|
+
})
|
|
615
|
+
}, te(B.value.left), 7)) : f("", !0),
|
|
616
|
+
(Qe.value || B.value.left === B.value.right) && (B.value.left || B.value.right) ? (n(), i("div", {
|
|
617
|
+
key: 4,
|
|
618
|
+
ref: "tooltipMerge",
|
|
619
|
+
class: Ne({
|
|
620
|
+
"range-tooltip": !0,
|
|
621
|
+
"range-tooltip-visible": y.value,
|
|
622
|
+
"range-tooltip-arrow": !0,
|
|
623
|
+
"range-tooltip-arrow-left": !ue.value.arrowLeft && !C.verticalHandles,
|
|
624
|
+
"range-tooltip-arrow-right": !ue.value.arrowRight && !C.verticalHandles
|
|
625
|
+
}),
|
|
626
|
+
style: _({
|
|
627
|
+
left: ue.value.tooltipCenter,
|
|
628
|
+
width: e.value.width + "px",
|
|
629
|
+
color: v(qe)(C.selectColor),
|
|
630
|
+
backgroundColor: C.selectColor,
|
|
631
|
+
border: `1px solid ${Ke.value}`,
|
|
632
|
+
zIndex: "4"
|
|
633
|
+
})
|
|
634
|
+
}, te(B.value.left === B.value.right ? B.value.left : `${B.value.left} - ${B.value.right}`), 7)) : f("", !0),
|
|
635
|
+
B.value.right ? (n(), i("div", {
|
|
636
|
+
key: 5,
|
|
637
|
+
ref_key: "tooltipRight",
|
|
638
|
+
ref: ml,
|
|
639
|
+
class: Ne({
|
|
640
|
+
"range-tooltip": !0,
|
|
641
|
+
"range-tooltip-visible": y.value,
|
|
642
|
+
"range-tooltip-arrow": ue.value.arrowRight && !C.verticalHandles,
|
|
643
|
+
"range-tooltip-arrow-right": !ue.value.arrowRight && !C.verticalHandles
|
|
644
|
+
}),
|
|
645
|
+
style: _({
|
|
646
|
+
left: ue.value.tooltipRight,
|
|
647
|
+
color: v(qe)(C.selectColor),
|
|
648
|
+
backgroundColor: C.selectColor,
|
|
649
|
+
border: `1px solid ${Ke.value}`,
|
|
650
|
+
zIndex: "4",
|
|
651
|
+
visibility: Qe.value || B.value.left === B.value.right ? "hidden" : "visible"
|
|
652
|
+
})
|
|
653
|
+
}, te(B.value.right), 7)) : f("", !0)
|
|
654
|
+
], 544)
|
|
655
|
+
], 544));
|
|
656
|
+
}
|
|
657
|
+
}, su = /* @__PURE__ */ Ra(iu, [["__scopeId", "data-v-619e736c"]]), ru = ["id"], cu = ["id"], vu = ["viewBox", "aria-label"], du = ["x", "y", "width", "height"], hu = { key: 1 }, fu = { class: "vue-ui-xy-grid" }, gu = ["stroke", "x1", "x2", "y1", "y2"], mu = ["stroke", "x1", "x2", "y1", "y2"], xu = { key: 1 }, bu = ["x1", "x2", "y1", "y2", "stroke"], pu = ["x1", "x2", "y1", "y2", "stroke"], yu = ["x1", "x2", "y1", "y2", "stroke"], ku = { key: 3 }, wu = ["d", "stroke"], Su = { key: 4 }, $u = ["d", "stroke"], _u = ["id"], Lu = ["stop-color"], Mu = ["stop-color"], Au = ["stop-color"], Cu = ["id"], zu = ["stop-color"], Iu = ["stop-color"], Tu = ["stop-color"], Nu = ["id"], Ou = ["stop-color"], Ru = ["stop-color"], Pu = ["id"], Hu = ["stop-color"], Vu = ["stop-color"], Eu = ["id"], Bu = ["stop-color"], Fu = ["stop-color"], Wu = ["x", "y", "height", "width", "fill"], Yu = ["x", "y", "width"], Du = { key: 0 }, Xu = ["x", "y", "height", "width", "fill"], Gu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Uu = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Zu = ["width", "x", "y"], qu = { key: 0 }, Ku = ["id"], Ju = ["fill"], Qu = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], ju = ["x", "y", "font-size", "fill"], en = ["stroke", "x1", "x2", "y1", "y2"], ln = { key: 3 }, tn = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], an = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], on = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], un = ["fill", "font-size", "transform"], nn = ["x1", "x2", "y1", "y2", "stroke"], sn = ["x", "y", "font-size", "fill"], rn = ["x1", "x2", "y1", "y2", "stroke"], cn = ["x", "y", "font-size", "fill"], vn = ["width", "x", "y"], dn = { style: { width: "100%" } }, hn = { key: 0 }, fn = ["id"], gn = ["fill"], mn = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], xn = ["x", "y", "font-size", "fill"], bn = ["d", "stroke", "stroke-width", "stroke-dasharray"], pn = ["d", "stroke", "stroke-width", "stroke-dasharray"], yn = { key: 6 }, kn = { key: 0 }, wn = ["d", "fill"], Sn = ["d", "fill"], $n = ["d", "fill"], _n = ["d", "fill"], Ln = ["d", "stroke", "stroke-width", "stroke-dasharray"], Mn = ["d", "stroke", "stroke-width", "stroke-dasharray"], An = ["width", "x", "y"], Cn = { style: { width: "100%" } }, zn = { key: 3 }, In = ["id"], Tn = ["fill"], Nn = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], On = ["x", "y", "font-size", "fill"], Rn = { key: 7 }, Pn = ["x", "y", "font-size", "fill"], Hn = ["x", "y", "font-size", "fill", "font-weight"], Vn = { key: 8 }, En = ["x", "y", "font-size", "fill"], Bn = { key: 9 }, Fn = ["x", "y"], Wn = ["innerHTML"], Yn = ["x", "y"], Dn = ["innerHTML"], Xn = ["x1", "x2", "y1", "y2", "stroke"], Gn = { key: 10 }, Un = ["x", "y", "font-size", "fill"], Zn = { key: 11 }, qn = ["x", "y"], Kn = ["innerHTML"], Jn = ["x", "y"], Qn = ["innerHTML"], jn = ["x1", "x2", "y1", "y2", "stroke"], ei = ["x", "y", "font-size", "fill", "innerHTML"], li = ["x", "y", "font-size", "fill", "innerHTML"], ti = ["x", "y", "font-size", "fill", "innerHTML"], ai = ["x", "y", "font-size", "fill", "innerHTML"], oi = ["id"], ui = ["stop-color"], ni = ["stop-color"], ii = ["x", "y", "width", "height", "fill", "onMouseenter"], si = ["font-size", "fill", "transform"], ri = ["x", "y", "font-size", "fill"], ci = ["text-anchor", "font-size", "fill", "transform", "onClick"], vi = ["text-anchor", "font-size", "fill", "transform", "innerHTML", "onClick"], di = { key: 14 }, hi = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], fi = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], gi = ["y", "x", "width", "height", "fill"], mi = ["id", "x", "y", "font-size", "fill", "text-anchor"], xi = {
|
|
658
|
+
key: 15,
|
|
659
|
+
style: { "pointer-events": "none" }
|
|
660
|
+
}, bi = ["x", "y"], pi = ["cx", "cy", "r", "fill"], yi = {
|
|
661
|
+
key: 4,
|
|
662
|
+
class: "vue-data-ui-watermark"
|
|
663
|
+
}, ki = {
|
|
664
|
+
class: "vue-ui-xy-tag-arrow",
|
|
665
|
+
height: "20",
|
|
666
|
+
viewBox: "0 0 10 20",
|
|
667
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
668
|
+
}, wi = ["fill"], Si = ["innerHTML"], $i = {
|
|
669
|
+
class: "vue-ui-xy-tag-arrow",
|
|
670
|
+
height: "100%",
|
|
671
|
+
viewBox: "0 0 10 20",
|
|
672
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
673
|
+
}, _i = ["fill"], Li = ["innerHTML"], Mi = {
|
|
674
|
+
class: "vue-ui-xy-tag-arrow",
|
|
675
|
+
height: "20",
|
|
676
|
+
viewBox: "0 0 10 20",
|
|
677
|
+
style: { position: "absolute", right: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
678
|
+
}, Ai = ["fill"], Ci = ["innerHTML"], zi = {
|
|
679
|
+
class: "vue-ui-xy-tag-arrow",
|
|
680
|
+
height: "100%",
|
|
681
|
+
viewBox: "0 0 10 20",
|
|
682
|
+
style: { position: "absolute", left: "100%", top: "50%", transform: "translateY(-50%)" }
|
|
683
|
+
}, Ii = ["fill"], Ti = ["innerHTML"], Ni = ["id"], Oi = ["onClick"], Ri = {
|
|
684
|
+
key: 0,
|
|
685
|
+
viewBox: "0 0 20 12",
|
|
686
|
+
height: "14",
|
|
687
|
+
width: "20"
|
|
688
|
+
}, Pi = ["stroke", "fill"], Hi = {
|
|
689
|
+
key: 1,
|
|
690
|
+
viewBox: "0 0 40 40",
|
|
691
|
+
height: "14",
|
|
692
|
+
width: "14"
|
|
693
|
+
}, Vi = ["fill"], Ei = ["fill"], Bi = {
|
|
694
|
+
key: 2,
|
|
695
|
+
viewBox: "0 0 12 12",
|
|
696
|
+
height: "14",
|
|
697
|
+
width: "14"
|
|
698
|
+
}, Fi = {
|
|
699
|
+
style: { display: "flex", "flex-direction": "row", gap: "6px", "align-items": "center", "padding-left": "6px" },
|
|
700
|
+
"data-dom-to-png-ignore": ""
|
|
701
|
+
}, Wi = ["innerHTML"], Yi = {
|
|
702
|
+
__name: "vue-ui-xy",
|
|
703
|
+
props: {
|
|
704
|
+
config: {
|
|
705
|
+
type: Object,
|
|
706
|
+
default() {
|
|
707
|
+
return {};
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
dataset: {
|
|
711
|
+
type: Array,
|
|
712
|
+
default() {
|
|
713
|
+
return [];
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
selectedXIndex: {
|
|
717
|
+
type: Number,
|
|
718
|
+
default: void 0
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
emits: ["selectTimeLabel", "selectX", "selectLegend"],
|
|
722
|
+
setup(C, { expose: Tt, emit: Nt }) {
|
|
723
|
+
const d = C, Oe = kl(() => import("./DataTable-CWzb1j8d.js")), de = kl(() => import("./Tooltip-hfdFRoLp.js")), he = kl(() => import("./UserOptions-r0epwyXR.js")), $l = kl(() => import("./BaseIcon-DLm6QTwr.js")), Jl = kl(() => import("./vue-ui-table-sparkline-Dbi7H7Xb.js")), Rl = kl(() => import("./vue-ui-accordion-s_m_NJzJ.js")), sl = kl(() => import("./PackageVersion-n4qokxnx.js")), rl = kl(() => import("./PenAndPaper-C_R9vJkU.js")), Pl = Nt, Re = so(), Ot = ro(), { vue_ui_xy: Ye } = bo(), ue = p(null), ol = p(null), Ae = p(null), cl = p(null), _l = p(null), Ll = p(null), Ke = p(null), Hl = p(null), Vl = p(null), Je = p(null), q = p(null), $e = p(null), fe = p(null), ye = p(0), M = p(null), vl = p(!0), xe = p(600), ne = p(1e3), dl = p("0 0 1000 600"), Ql = p({ x: 0, y: 0 }), hl = p({ line: "line", bar: "bar", plot: "plot" }), fl = p(!1), ul = p(!1), El = p(!1), Ce = p(null), ae = p([]), X = p(Ct()), vt = p(0), dt = p(0), jl = p(0), _e = p(!0), Pe = p(0), z = p(null), De = p(!1), Bl = p(!0), Fl = p(!0), ke = p(null), He = p({}), Wl = p(null), ht = p(!1), S = p(null), gl = k(() => ({
|
|
724
|
+
height: xe.value,
|
|
725
|
+
width: ne.value
|
|
726
|
+
})), Ml = d.config.downsample && d.config.downsample.threshold ? d.config.downsample.threshold : 500;
|
|
727
|
+
function ml(t) {
|
|
728
|
+
return Number.isFinite(t) ? Math.max(0, Math.floor(t)) : 0;
|
|
729
|
+
}
|
|
730
|
+
function Al(t, r, l = 0) {
|
|
731
|
+
return Number.isFinite(t) && Number.isFinite(r) && Math.abs(r) > 1e-9 ? t / r : l;
|
|
732
|
+
}
|
|
733
|
+
const Cl = p(!1), y = p({
|
|
734
|
+
dataLabels: { show: !0 },
|
|
735
|
+
showTooltip: !0,
|
|
736
|
+
showTable: !1,
|
|
737
|
+
isStacked: !1,
|
|
738
|
+
useIndividualScale: !1
|
|
739
|
+
});
|
|
740
|
+
function Yl() {
|
|
741
|
+
Cl.value ? (y.value.isStacked = e.value.chart.grid.labels.yAxis.stacked, y.value.useIndividualScale == null && (y.value.useIndividualScale = e.value.chart.grid.labels.yAxis.useIndividualScale)) : (y.value = {
|
|
742
|
+
dataLabels: { show: !0 },
|
|
743
|
+
showTooltip: e.value.chart.tooltip.show === !0,
|
|
744
|
+
showTable: e.value.showTable === !0,
|
|
745
|
+
isStacked: e.value.chart.grid.labels.yAxis.stacked,
|
|
746
|
+
useIndividualScale: e.value.chart.grid.labels.yAxis.useIndividualScale
|
|
747
|
+
}, Cl.value = !0);
|
|
748
|
+
}
|
|
749
|
+
const $ = p({
|
|
750
|
+
xAxis: 18,
|
|
751
|
+
yAxis: 12,
|
|
752
|
+
dataLabels: 20,
|
|
753
|
+
plotLabels: 10
|
|
754
|
+
}), Le = p({ plot: 3, line: 3 });
|
|
755
|
+
rt(() => {
|
|
756
|
+
ht.value = !0, d.dataset.length && d.dataset.forEach((t, r) => {
|
|
757
|
+
[null, void 0].includes(t.series) && Ft({
|
|
758
|
+
componentName: "VueUiXy",
|
|
759
|
+
type: "datasetSerieAttribute",
|
|
760
|
+
property: "series (number[])",
|
|
761
|
+
index: r,
|
|
762
|
+
debug: ut.value
|
|
763
|
+
});
|
|
764
|
+
});
|
|
765
|
+
});
|
|
766
|
+
function Dl() {
|
|
767
|
+
if (!Object.keys(d.config || {}).length)
|
|
768
|
+
return Ye;
|
|
769
|
+
const t = Wt({
|
|
770
|
+
userConfig: d.config,
|
|
771
|
+
defaultConfig: Ye
|
|
772
|
+
});
|
|
773
|
+
return d.config && We(d.config, "chart.highlightArea") && (Array.isArray(d.config.chart.highlightArea) ? t.chart.highlightArea = d.config.chart.highlightArea : t.chart.highlightArea = [d.config.chart.highlightArea]), d.config && We(d.config, "chart.grid.labels.yAxis.scaleMin") ? t.chart.grid.labels.yAxis.scaleMin = d.config.chart.grid.labels.yAxis.scaleMin : t.chart.grid.labels.yAxis.scaleMin = null, d.config && We(d.config, "chart.grid.labels.yAxis.scaleMax") ? t.chart.grid.labels.yAxis.scaleMax = d.config.chart.grid.labels.yAxis.scaleMax : t.chart.grid.labels.yAxis.scaleMax = null, d.config && We(d.config, "chart.zoom.startIndex") ? t.chart.zoom.startIndex = d.config.chart.zoom.startIndex : t.chart.zoom.startIndex = null, d.config && We(d.config, "chart.zoom.endIndex") ? t.chart.zoom.endIndex = d.config.chart.zoom.endIndex : t.chart.zoom.endIndex = null, d.config && We(d.config, "chart.grid.labels.yAxis.groupColor") ? t.chart.grid.labels.yAxis.groupColor = d.config.chart.grid.labels.yAxis.groupColor : t.chart.grid.labels.yAxis.groupColor = null, d.config && d.config.chart.annotations && Array.isArray(d.config.chart.annotations) && d.config.chart.annotations.length ? t.chart.annotations = d.config.chart.annotations.map((r) => Wt({
|
|
774
|
+
defaultConfig: Ye.chart.annotations[0],
|
|
775
|
+
userConfig: r
|
|
776
|
+
})) : t.chart.annotations = [], d.config && We(d.config, "chart.grid.position") && d.config.chart.grid.position === "start" && d.dataset.length && d.dataset.some((r) => r.type === "bar") && (t.chart.grid.position = "middle", We(d.config, "debug") && console.warn("Vue Data UI - VueUiXy - config.chart.grid.position was overriden to `middle` because your dataset contains a bar")), d.config && We(d.config, "chart.grid.labels.yAxis.serieNameFormatter") ? t.chart.grid.labels.yAxis.serieNameFormatter = d.config.chart.grid.labels.yAxis.serieNameFormatter : t.chart.grid.labels.yAxis.serieNameFormatter = null, d.config && We(d.config, "events.datapointEnter") ? t.events.datapointEnter = d.config.events.datapointEnter : t.events.datapointEnter = null, d.config && We(d.config, "events.datapointLeave") ? t.events.datapointLeave = d.config.events.datapointLeave : t.events.datapointLeave = null, d.config && We(d.config, "events.datapointClick") ? t.events.datapointClick = d.config.events.datapointClick : t.events.datapointClick = null, t.theme ? {
|
|
777
|
+
...Wt({
|
|
778
|
+
userConfig: zo.vue_ui_xy[t.theme] || d.config,
|
|
779
|
+
defaultConfig: t
|
|
780
|
+
}),
|
|
781
|
+
customPalette: Co[t.theme] || d.palette
|
|
782
|
+
} : t;
|
|
783
|
+
}
|
|
784
|
+
const Qe = k({
|
|
785
|
+
get() {
|
|
786
|
+
return !!d.dataset && d.dataset.length;
|
|
787
|
+
},
|
|
788
|
+
set(t) {
|
|
789
|
+
return t;
|
|
790
|
+
}
|
|
791
|
+
}), e = p(Dl()), { loading: B, FINAL_DATASET: m, manualLoading: h } = Ro({
|
|
792
|
+
...co(d),
|
|
793
|
+
FINAL_CONFIG: e,
|
|
794
|
+
prepareConfig: Dl,
|
|
795
|
+
callback: () => {
|
|
796
|
+
Promise.resolve().then(async () => {
|
|
797
|
+
await pt();
|
|
798
|
+
});
|
|
799
|
+
},
|
|
800
|
+
skeletonDataset: [
|
|
801
|
+
{
|
|
802
|
+
name: "",
|
|
803
|
+
series: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 134],
|
|
804
|
+
type: "line",
|
|
805
|
+
smooth: !0,
|
|
806
|
+
color: "#BABABA"
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
name: "",
|
|
810
|
+
series: [0, 0.5, 1, 1.5, 2.5, 4, 6.5, 10.5, 17, 27.5, 44.5, 67],
|
|
811
|
+
type: "bar",
|
|
812
|
+
color: "#CACACA"
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
skeletonConfig: po({
|
|
816
|
+
defaultConfig: e.value,
|
|
817
|
+
userConfig: {
|
|
818
|
+
useCssAnimation: !1,
|
|
819
|
+
showTable: !1,
|
|
820
|
+
chart: {
|
|
821
|
+
annotations: [],
|
|
822
|
+
highlightArea: [],
|
|
823
|
+
backgroundColor: "#99999930",
|
|
824
|
+
grid: {
|
|
825
|
+
stroke: "#6A6A6A",
|
|
826
|
+
labels: {
|
|
827
|
+
show: !1,
|
|
828
|
+
axis: {
|
|
829
|
+
yLabel: "",
|
|
830
|
+
xLabel: ""
|
|
831
|
+
},
|
|
832
|
+
xAxisLabels: { show: !1 },
|
|
833
|
+
yAxis: {
|
|
834
|
+
commonScaleSteps: 10,
|
|
835
|
+
useNiceScale: !0,
|
|
836
|
+
scaleMin: 0,
|
|
837
|
+
scaleMax: 134
|
|
838
|
+
},
|
|
839
|
+
zeroLine: { show: !0 }
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
padding: {
|
|
843
|
+
top: 12,
|
|
844
|
+
bottom: 24,
|
|
845
|
+
left: 24,
|
|
846
|
+
right: 24
|
|
847
|
+
},
|
|
848
|
+
userOptions: { show: !1 },
|
|
849
|
+
zoom: {
|
|
850
|
+
show: !1,
|
|
851
|
+
startIndex: null,
|
|
852
|
+
endIndex: null
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
bar: {
|
|
856
|
+
serieName: { show: !1 },
|
|
857
|
+
labels: { show: !1 },
|
|
858
|
+
border: {
|
|
859
|
+
useSerieColor: !1,
|
|
860
|
+
stroke: "#999999"
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
line: {
|
|
864
|
+
dot: {
|
|
865
|
+
useSerieColor: !1,
|
|
866
|
+
fill: "#8A8A8A"
|
|
867
|
+
},
|
|
868
|
+
labels: { show: !1 }
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
})
|
|
872
|
+
}), w = k({
|
|
873
|
+
get: () => Math.max(...m.value.map((t) => Ue({ data: t.series, threshold: Ml }).length)),
|
|
874
|
+
set: (t) => t
|
|
875
|
+
}), g = p({ start: 0, end: w.value }), ie = p({ start: 0, end: w.value }), xl = k(() => e.value.chart.zoom.preview.enable && (ie.value.start !== g.value.start || ie.value.end !== g.value.end));
|
|
876
|
+
function ft(t, r) {
|
|
877
|
+
ie.value[t] = r;
|
|
878
|
+
}
|
|
879
|
+
function Xl() {
|
|
880
|
+
const t = Math.max(
|
|
881
|
+
1,
|
|
882
|
+
...m.value.map((u) => Ue({
|
|
883
|
+
data: u.series,
|
|
884
|
+
threshold: e.value.downsample.threshold
|
|
885
|
+
}).length)
|
|
886
|
+
);
|
|
887
|
+
let r = Math.max(0, Math.min(g.value.start ?? 0, t - 1)), l = Math.max(r + 1, Math.min(g.value.end ?? t, t));
|
|
888
|
+
(!Number.isFinite(r) || !Number.isFinite(l) || l <= r) && (r = 0, l = t), g.value = { start: r, end: l }, ie.value.start = r, ie.value.end = l;
|
|
889
|
+
}
|
|
890
|
+
const Rt = k(() => {
|
|
891
|
+
const { left: t, top: r, width: l, height: u } = c.value, a = g.value.start, o = g.value.end - a, H = l / o, G = ie.value.start - a, U = ie.value.end - a, T = Math.max(0, Math.min(o, G)), R = Math.max(0, Math.min(o, U));
|
|
892
|
+
return {
|
|
893
|
+
x: t + T * H,
|
|
894
|
+
y: r,
|
|
895
|
+
width: (R - T) * H,
|
|
896
|
+
height: u,
|
|
897
|
+
fill: e.value.chart.zoom.preview.fill,
|
|
898
|
+
stroke: e.value.chart.zoom.preview.stroke,
|
|
899
|
+
"stroke-width": e.value.chart.zoom.preview.strokeWidth,
|
|
900
|
+
"stroke-dasharray": e.value.chart.zoom.preview.strokeDasharray,
|
|
901
|
+
"stroke-linecap": "round",
|
|
902
|
+
"stroke-linejoin": "round",
|
|
903
|
+
style: {
|
|
904
|
+
pointerEvents: "none",
|
|
905
|
+
transition: "all 0.1s ease-in-out",
|
|
906
|
+
animation: "none !important"
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
});
|
|
910
|
+
al(() => d.selectedXIndex, (t) => {
|
|
911
|
+
if ([null, void 0].includes(d.selectedXIndex)) {
|
|
912
|
+
S.value = null;
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
const r = t - g.value.start;
|
|
916
|
+
r < 0 || t >= g.value.end ? S.value = null : S.value = r ?? null;
|
|
917
|
+
}, { immediate: !0 });
|
|
918
|
+
const { isPrinting: et, isImaging: Xt, generatePdf: Gt, generateImage: Ut } = Oo({
|
|
919
|
+
elementId: `vue-ui-xy_${X.value}`,
|
|
920
|
+
fileName: e.value.chart.title.text || "vue-ui-xy",
|
|
921
|
+
options: e.value.chart.userOptions.print
|
|
922
|
+
}), Pa = p(!1), Zt = k(() => yo(e.value.customPalette)), gt = k(() => {
|
|
923
|
+
if (e.value.chart.grid.labels.yAxis.scaleMin !== null)
|
|
924
|
+
return e.value.chart.grid.labels.yAxis.scaleMin;
|
|
925
|
+
const t = Math.min(...nl.value.filter((r) => !ae.value.includes(r.id)).map((r) => Math.min(...r.series)));
|
|
926
|
+
return t > 0 ? 0 : t;
|
|
927
|
+
}), mt = k(() => {
|
|
928
|
+
if (e.value.chart.grid.labels.yAxis.scaleMax)
|
|
929
|
+
return e.value.chart.grid.labels.yAxis.scaleMax;
|
|
930
|
+
const t = Math.max(...nl.value.filter((r) => !ae.value.includes(r.id)).map((r) => Math.max(...r.series)));
|
|
931
|
+
return gt.value === t ? t + 1 : t;
|
|
932
|
+
}), Xe = k(() => e.value.chart.grid.labels.yAxis.useNiceScale ? st(gt.value, mt.value < 0 ? 0 : mt.value, e.value.chart.grid.labels.yAxis.commonScaleSteps) : Nl(gt.value, mt.value < 0 ? 0 : mt.value, e.value.chart.grid.labels.yAxis.commonScaleSteps)), lt = k(() => [null, void 0].includes(e.value.chart.grid.labels.yAxis.scaleMin) ? Xe.value.min >= 0 ? 0 : Math.abs(Xe.value.min) : -Xe.value.min), nl = k(() => vl.value ? m.value.map((t, r) => {
|
|
933
|
+
const l = Ue({
|
|
934
|
+
data: t.series,
|
|
935
|
+
threshold: e.value.downsample.threshold
|
|
936
|
+
}), u = `uniqueId_${r}`;
|
|
937
|
+
return {
|
|
938
|
+
...t,
|
|
939
|
+
slotAbsoluteIndex: r,
|
|
940
|
+
series: l.map((a) => Lt(a) ? a : null).slice(g.value.start, g.value.end),
|
|
941
|
+
color: ko(t.color ? t.color : Zt.value[r] ? Zt.value[r] : wo[r]),
|
|
942
|
+
id: u,
|
|
943
|
+
scaleLabel: t.scaleLabel || u
|
|
944
|
+
};
|
|
945
|
+
}) : m.value), je = k(() => nl.value.map((t, r) => ({
|
|
946
|
+
absoluteIndex: r,
|
|
947
|
+
...t,
|
|
948
|
+
series: t.series.map((l) => l + lt.value),
|
|
949
|
+
absoluteValues: t.series,
|
|
950
|
+
segregate: () => ca(t),
|
|
951
|
+
isSegregated: ae.value.includes(t.id)
|
|
952
|
+
}))), Ve = k(() => nl.value.map((t, r) => ({
|
|
953
|
+
...t,
|
|
954
|
+
series: t.series.map((l) => l + lt.value),
|
|
955
|
+
absoluteValues: t.series
|
|
956
|
+
})).filter((t) => !ae.value.includes(t.id)));
|
|
957
|
+
function Ha() {
|
|
958
|
+
let t = 0;
|
|
959
|
+
q.value && (t = Array.from(q.value.querySelectorAll("text")).reduce((a, s) => {
|
|
960
|
+
const o = s.getComputedTextLength();
|
|
961
|
+
return (o > a ? o : a) + e.value.chart.grid.labels.yAxis.scaleValueOffsetX;
|
|
962
|
+
}, 0));
|
|
963
|
+
const r = Vl.value ? Vl.value.getBoundingClientRect().width + e.value.chart.grid.labels.axis.yLabelOffsetX + $.value.yAxis : 0, l = e.value.chart.grid.labels.yAxis.crosshairSize;
|
|
964
|
+
return t + r + l;
|
|
965
|
+
}
|
|
966
|
+
const Pt = p(0), Va = Dt((t) => {
|
|
967
|
+
Pt.value = t;
|
|
968
|
+
}, 100);
|
|
969
|
+
vo((t) => {
|
|
970
|
+
const r = Je.value;
|
|
971
|
+
if (!r) return;
|
|
972
|
+
const l = new ResizeObserver((u) => {
|
|
973
|
+
Va(u[0].contentRect.height);
|
|
974
|
+
});
|
|
975
|
+
l.observe(r), t(() => l.disconnect());
|
|
976
|
+
}), ct(() => {
|
|
977
|
+
Pt.value = 0;
|
|
978
|
+
});
|
|
979
|
+
const qt = k(() => {
|
|
980
|
+
let t = 0;
|
|
981
|
+
Hl.value && (t = Hl.value.getBBox().height);
|
|
982
|
+
let r = 0;
|
|
983
|
+
return Je.value && (r = Pt.value), t + r + $.value.xAxis;
|
|
984
|
+
}), Ea = k(() => m.value.some((t) => t.useProgression)), c = k(() => {
|
|
985
|
+
let t = 0;
|
|
986
|
+
const r = 36;
|
|
987
|
+
e.value.chart.grid.labels.show && (y.value.useIndividualScale && !y.value.isStacked ? t = (m.value.length - ae.value.length) * (e.value.chart.grid.labels.yAxis.labelWidth + r) : y.value.useIndividualScale && y.value.isStacked ? t = e.value.chart.grid.labels.yAxis.labelWidth + r : t = Ha());
|
|
988
|
+
const l = e.value.chart.labels.fontSize * 1.1, u = Ea.value ? 24 : 6;
|
|
989
|
+
if (Je.value) {
|
|
990
|
+
const o = Je.value.getBBox().x;
|
|
991
|
+
o < 0 && (t += Math.abs(o));
|
|
992
|
+
}
|
|
993
|
+
const a = ne.value - t - e.value.chart.grid.labels.yAxis.crosshairSize - u - e.value.chart.padding.left - e.value.chart.padding.right, s = e.value.chart.grid.position === "middle" ? 0 : a / A.value / 2;
|
|
994
|
+
return {
|
|
995
|
+
top: e.value.chart.padding.top + l,
|
|
996
|
+
right: ne.value - u - e.value.chart.padding.right,
|
|
997
|
+
bottom: xe.value - qt.value - e.value.chart.padding.bottom - e.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
998
|
+
left: t + e.value.chart.grid.labels.yAxis.crosshairSize - s + e.value.chart.padding.left,
|
|
999
|
+
height: xe.value - qt.value - e.value.chart.padding.top - e.value.chart.padding.bottom - l - e.value.chart.grid.labels.axis.xLabelOffsetY,
|
|
1000
|
+
width: a,
|
|
1001
|
+
scaleLabelX: t,
|
|
1002
|
+
individualOffsetX: r
|
|
1003
|
+
};
|
|
1004
|
+
}), Ba = k(() => {
|
|
1005
|
+
const t = e.value.chart.grid.position === "middle" ? 1 : 0, r = A.value + t, l = D(c.value.top), u = D(c.value.bottom);
|
|
1006
|
+
return Array.from({ length: r }).map((a, s) => {
|
|
1007
|
+
const o = c.value.width / A.value * s + c.value.left + ee.value;
|
|
1008
|
+
return `M${o},${l} L${o},${u}`;
|
|
1009
|
+
}).join(" ");
|
|
1010
|
+
}), Fa = k(() => {
|
|
1011
|
+
if (!e.value.chart.grid.labels.xAxis.showCrosshairs)
|
|
1012
|
+
return "";
|
|
1013
|
+
const {
|
|
1014
|
+
showOnlyAtModulo: t,
|
|
1015
|
+
showOnlyFirstAndLast: r,
|
|
1016
|
+
modulo: l
|
|
1017
|
+
} = e.value.chart.grid.labels.xAxisLabels, u = K.value.length ? Math.min(l, [...new Set(K.value.map((s) => s.text))].length) : l, a = Math.floor((g.value.end - g.value.start) / u);
|
|
1018
|
+
return K.value.map((s, o) => {
|
|
1019
|
+
if (!s) return null;
|
|
1020
|
+
const H = t && A.value <= u, G = !r && !t, U = r && !t && (o === 0 || o === K.value.length - 1), T = r && !t && S.value === o, R = !r && t && o % a === 0;
|
|
1021
|
+
if (!(H || G || U || T || R))
|
|
1022
|
+
return null;
|
|
1023
|
+
const Z = c.value.width / A.value, N = c.value.left + Z * o + Z / 2, E = e.value.chart.grid.labels.xAxis.crosshairSize, O = e.value.chart.grid.labels.xAxis.crosshairsAlwaysAtZero, se = O ? we.value - (we.value === c.value.bottom ? 0 : E / 2) : c.value.bottom, ge = O ? we.value + E / (we.value === c.value.bottom ? 1 : 2) : c.value.bottom + E;
|
|
1024
|
+
return `M${N},${se} L${N},${ge}`;
|
|
1025
|
+
}).filter((s) => s !== null).join(" ");
|
|
1026
|
+
});
|
|
1027
|
+
function Kt() {
|
|
1028
|
+
return !!Ot?.vnode.props?.onSelectTimeLabel;
|
|
1029
|
+
}
|
|
1030
|
+
function Wa(t, r, l) {
|
|
1031
|
+
if (!Wl.value) {
|
|
1032
|
+
const u = document.createElement("canvas");
|
|
1033
|
+
Wl.value = u.getContext("2d");
|
|
1034
|
+
}
|
|
1035
|
+
return Wl.value.font = `normal ${t}px sans-serif`, Wl.value;
|
|
1036
|
+
}
|
|
1037
|
+
function Jt() {
|
|
1038
|
+
const t = ue.value.querySelectorAll(".vue-ui-xy-tag");
|
|
1039
|
+
t.length && Array.from(t).forEach((r) => r.style.opacity = "0");
|
|
1040
|
+
}
|
|
1041
|
+
function xt(t, r, l, u, a) {
|
|
1042
|
+
l && (He.value[`${t}_${r}_${u}_${a}`] = l);
|
|
1043
|
+
}
|
|
1044
|
+
const Qt = p(!1);
|
|
1045
|
+
async function jt(t = !1) {
|
|
1046
|
+
await Kl(), Qt.value = t, De.value && (Fl.value = t);
|
|
1047
|
+
}
|
|
1048
|
+
function Ht() {
|
|
1049
|
+
fl.value = !fl.value;
|
|
1050
|
+
}
|
|
1051
|
+
const K = k(() => {
|
|
1052
|
+
const t = Math.max(...m.value.map((r) => Ue({ data: r.series, threshold: e.value.downsample.threshold }).length));
|
|
1053
|
+
return Oa({
|
|
1054
|
+
values: e.value.chart.grid.labels.xAxisLabels.values,
|
|
1055
|
+
maxDatapoints: t,
|
|
1056
|
+
formatter: e.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
|
|
1057
|
+
start: g.value.start,
|
|
1058
|
+
end: g.value.end
|
|
1059
|
+
});
|
|
1060
|
+
}), Ya = k(() => {
|
|
1061
|
+
const t = Math.max(...m.value.map((r) => Ue({ data: r.series, threshold: e.value.downsample.threshold }).length));
|
|
1062
|
+
return Oa({
|
|
1063
|
+
values: e.value.chart.grid.labels.xAxisLabels.values,
|
|
1064
|
+
maxDatapoints: t,
|
|
1065
|
+
formatter: e.value.chart.grid.labels.xAxisLabels.datetimeFormatter,
|
|
1066
|
+
start: 0,
|
|
1067
|
+
end: w.value
|
|
1068
|
+
});
|
|
1069
|
+
}), bt = k(() => {
|
|
1070
|
+
const t = e.value.chart.grid.labels.xAxisLabels.modulo;
|
|
1071
|
+
return K.value.length ? Math.min(t, [...new Set(K.value.map((r) => r.text))].length) : t;
|
|
1072
|
+
});
|
|
1073
|
+
function ea(t, r) {
|
|
1074
|
+
const l = Ve.value.map((u) => ({
|
|
1075
|
+
shape: u.shape || null,
|
|
1076
|
+
name: u.name,
|
|
1077
|
+
color: u.color,
|
|
1078
|
+
type: u.type,
|
|
1079
|
+
value: u.absoluteValues.find((a, s) => s === r),
|
|
1080
|
+
comments: u.comments || [],
|
|
1081
|
+
prefix: u.prefix || e.value.chart.labels.prefix,
|
|
1082
|
+
suffix: u.suffix || e.value.chart.labels.suffix
|
|
1083
|
+
}));
|
|
1084
|
+
Pl("selectTimeLabel", {
|
|
1085
|
+
datapoint: l,
|
|
1086
|
+
absoluteIndex: t.absoluteIndex,
|
|
1087
|
+
label: t.text
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
const A = k(() => {
|
|
1091
|
+
const t = ml((g.value.end ?? 0) - (g.value.start ?? 0));
|
|
1092
|
+
return Math.max(1, t);
|
|
1093
|
+
});
|
|
1094
|
+
function la(t) {
|
|
1095
|
+
z.value = t;
|
|
1096
|
+
}
|
|
1097
|
+
function ta() {
|
|
1098
|
+
y.value.isStacked = !y.value.isStacked, y.value.isStacked ? y.value.useIndividualScale = !0 : y.value.useIndividualScale = e.value.chart.grid.labels.yAxis.useIndividualScale;
|
|
1099
|
+
}
|
|
1100
|
+
function Vt(t) {
|
|
1101
|
+
ut.value && t.autoScaling && (e.value.chart.grid.labels.yAxis.useIndividualScale || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.useIndividualScale is set to true`), e.value.chart.grid.labels.yAxis.stacked || console.warn(`VueUiXy (datapoint: ${t.name}) : autoScaling only works when config.chart.grid.labels.yAxis.stacked is set to true`));
|
|
1102
|
+
}
|
|
1103
|
+
function Da(t, r) {
|
|
1104
|
+
const l = ml(t), u = Array(l).fill(0);
|
|
1105
|
+
for (let a = 0; a < r.length && a < l; a += 1) u[a] = r[a] ?? 0;
|
|
1106
|
+
return u;
|
|
1107
|
+
}
|
|
1108
|
+
function Xa(t) {
|
|
1109
|
+
const r = Math.max(...m.value.map((l) => Ue({ data: l.series, threshold: e.value.downsample.threshold }).length));
|
|
1110
|
+
return t > r ? r : t < 0 || e.value.chart.zoom.startIndex !== null && t < e.value.chart.zoom.startIndex ? e.value.chart.zoom.startIndex !== null ? e.value.chart.zoom.startIndex + 1 : 1 : t;
|
|
1111
|
+
}
|
|
1112
|
+
async function pt() {
|
|
1113
|
+
await Kl(), await Kl();
|
|
1114
|
+
const { startIndex: t, endIndex: r } = e.value.chart.zoom, l = Ae.value, u = Math.max(
|
|
1115
|
+
...m.value.map(
|
|
1116
|
+
(a) => Ue({
|
|
1117
|
+
data: a.series,
|
|
1118
|
+
threshold: e.value.downsample.threshold
|
|
1119
|
+
}).length
|
|
1120
|
+
)
|
|
1121
|
+
);
|
|
1122
|
+
(t != null || r != null) && l ? (t != null && (g.value.start = t, l.setStartValue(t)), r != null && (g.value.end = r + 1, l.setEndValue(Xa(r + 1)))) : (g.value = { start: 0, end: u }, ye.value += 1), ie.value.start = g.value.start, ie.value.end = g.value.end, Xl();
|
|
1123
|
+
}
|
|
1124
|
+
async function aa() {
|
|
1125
|
+
await pt();
|
|
1126
|
+
}
|
|
1127
|
+
function ze(t) {
|
|
1128
|
+
return ![null, void 0, NaN, 1 / 0, -1 / 0].includes(t);
|
|
1129
|
+
}
|
|
1130
|
+
const oa = k(() => Xe.value.max + lt.value);
|
|
1131
|
+
function zl(t) {
|
|
1132
|
+
return t / (ze(oa.value) ? oa.value : 1);
|
|
1133
|
+
}
|
|
1134
|
+
const we = k(() => isNaN(zl(lt.value)) ? c.value.bottom : c.value.bottom - c.value.height * zl(lt.value));
|
|
1135
|
+
function ua(t) {
|
|
1136
|
+
const r = ![null, void 0].includes(e.value.chart.grid.labels.yAxis.scaleMin) && e.value.chart.grid.labels.yAxis.scaleMin > 0 && gt.value >= 0 ? c.value.bottom : we.value;
|
|
1137
|
+
return t.value >= 0 ? V(r - t.y <= 0 ? 1e-5 : r - t.y) : V(t.y - we.value <= 0 ? 1e-5 : t.y - we.value);
|
|
1138
|
+
}
|
|
1139
|
+
function na(t) {
|
|
1140
|
+
return t.value >= 0 ? V(t.zeroPosition - t.y <= 0 ? 1e-5 : t.zeroPosition - t.y) : V(t.y - t.zeroPosition <= 0 ? 1e-5 : t.zeroPosition - t.y);
|
|
1141
|
+
}
|
|
1142
|
+
const oe = k(() => {
|
|
1143
|
+
const t = Math.max(1, A.value), r = Math.max(1, c.value.width), l = Math.max(1, nl.value.filter((u) => u.type === "bar" && !ae.value.includes(u.id)).length);
|
|
1144
|
+
return {
|
|
1145
|
+
bar: Al(r, t * l, 1),
|
|
1146
|
+
plot: Al(r, t, 1),
|
|
1147
|
+
line: Al(r, t, 1)
|
|
1148
|
+
};
|
|
1149
|
+
});
|
|
1150
|
+
function Gl() {
|
|
1151
|
+
return y.value.useIndividualScale && y.value.isStacked ? oe.value.line - c.value.width / A.value * 0.1 : oe.value.bar;
|
|
1152
|
+
}
|
|
1153
|
+
function yt(t) {
|
|
1154
|
+
return y.value.useIndividualScale && y.value.isStacked ? t.x + c.value.width / A.value * 0.05 : t.x + oe.value.bar / 2;
|
|
1155
|
+
}
|
|
1156
|
+
function ia(t) {
|
|
1157
|
+
return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(we.value) ? c.bottom.value : we.value;
|
|
1158
|
+
}
|
|
1159
|
+
function sa(t) {
|
|
1160
|
+
return t.value >= 0 ? t.y : [null, void 0, NaN, 1 / 0, -1 / 0].includes(t.zeroPosition) ? 0 : t.zeroPosition;
|
|
1161
|
+
}
|
|
1162
|
+
const tt = p(null);
|
|
1163
|
+
function Ga(t) {
|
|
1164
|
+
if (fl.value) return;
|
|
1165
|
+
const r = ke.value.getBoundingClientRect(), u = ke.value.viewBox.baseVal.width / r.width, s = (t.clientX - r.left) * u - c.value.left, o = c.value.width / A.value, H = Math.floor(s / o);
|
|
1166
|
+
H >= 0 && H < A.value ? tt.value !== H && (tt.value = H, pa(!0, H)) : ra();
|
|
1167
|
+
}
|
|
1168
|
+
function ra() {
|
|
1169
|
+
tt.value = null, pa(!1, null);
|
|
1170
|
+
}
|
|
1171
|
+
function Ua() {
|
|
1172
|
+
tt.value != null && Za(tt.value);
|
|
1173
|
+
}
|
|
1174
|
+
function Za(t) {
|
|
1175
|
+
const r = Ve.value.map((l) => ({
|
|
1176
|
+
name: l.name,
|
|
1177
|
+
value: [null, void 0, NaN].includes(l.absoluteValues[t]) ? null : l.absoluteValues[t],
|
|
1178
|
+
color: l.color,
|
|
1179
|
+
type: l.type
|
|
1180
|
+
}));
|
|
1181
|
+
Pl(
|
|
1182
|
+
"selectX",
|
|
1183
|
+
{
|
|
1184
|
+
dataset: r,
|
|
1185
|
+
index: t,
|
|
1186
|
+
indexLabel: e.value.chart.grid.labels.xAxisLabels.values[t]
|
|
1187
|
+
}
|
|
1188
|
+
), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: r, seriesIndex: t + g.value.start });
|
|
1189
|
+
}
|
|
1190
|
+
function qa() {
|
|
1191
|
+
return je.value.map((t) => ({
|
|
1192
|
+
values: t.absoluteValues,
|
|
1193
|
+
color: t.color,
|
|
1194
|
+
name: t.name,
|
|
1195
|
+
type: t.type
|
|
1196
|
+
}));
|
|
1197
|
+
}
|
|
1198
|
+
async function Ka({ scale: t = 2 } = {}) {
|
|
1199
|
+
if (!ue.value) return;
|
|
1200
|
+
const { width: r, height: l } = ue.value.getBoundingClientRect(), u = r / l, { imageUri: a, base64: s } = await Vo({ domElement: ue.value, base64: !0, img: !0, scale: t });
|
|
1201
|
+
return {
|
|
1202
|
+
imageUri: a,
|
|
1203
|
+
base64: s,
|
|
1204
|
+
title: e.value.chart.title.text,
|
|
1205
|
+
width: r,
|
|
1206
|
+
height: l,
|
|
1207
|
+
aspectRatio: u
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function ca(t) {
|
|
1211
|
+
if (ae.value.includes(t.id))
|
|
1212
|
+
ae.value = ae.value.filter((r) => r !== t.id);
|
|
1213
|
+
else {
|
|
1214
|
+
if (ae.value.length + 1 === nl.value.length) return;
|
|
1215
|
+
ae.value.push(t.id);
|
|
1216
|
+
}
|
|
1217
|
+
Pl("selectLegend", Ve.value.map((r) => ({
|
|
1218
|
+
name: r.name,
|
|
1219
|
+
values: r.absoluteValues,
|
|
1220
|
+
color: r.color,
|
|
1221
|
+
type: r.type
|
|
1222
|
+
}))), Pe.value += 1;
|
|
1223
|
+
}
|
|
1224
|
+
const Ja = k(() => {
|
|
1225
|
+
const t = e.value.chart.title.text || "Chart visualization", r = e.value.chart.title.subtitle.text || "";
|
|
1226
|
+
return `${t}. ${r}`;
|
|
1227
|
+
}), va = k(() => ({
|
|
1228
|
+
linePlot: A.value > e.value.line.dot.hideAboveMaxSerieLength
|
|
1229
|
+
})), Qa = k(() => e.value.chart.userOptions.show && (!e.value.chart.title.show || !e.value.chart.title.text)), ja = k(() => {
|
|
1230
|
+
if (Array.isArray(e.value.chart.highlightArea))
|
|
1231
|
+
return e.value.chart.highlightArea.map((r) => {
|
|
1232
|
+
const l = Math.min(r.to, w.value - 1);
|
|
1233
|
+
return {
|
|
1234
|
+
...r,
|
|
1235
|
+
span: r.from === l ? 1 : l < r.from ? 0 : l - r.from + 1
|
|
1236
|
+
};
|
|
1237
|
+
});
|
|
1238
|
+
const t = {
|
|
1239
|
+
...e.value.chart.highlightArea,
|
|
1240
|
+
to: Math.min(e.value.chart.highlightArea.to, w.value - 1)
|
|
1241
|
+
};
|
|
1242
|
+
return [{ ...t, span: t.from === t.to ? 1 : t.to < t.from ? 0 : t.to - t.from + 1 }];
|
|
1243
|
+
}), eo = k(() => vl.value ? m.value.map((t, r) => ({
|
|
1244
|
+
...t,
|
|
1245
|
+
series: Ue({
|
|
1246
|
+
data: t.series,
|
|
1247
|
+
threshold: e.value.downsample.threshold
|
|
1248
|
+
}),
|
|
1249
|
+
id: `uniqueId_${r}`
|
|
1250
|
+
})) : m.value), lo = k(() => Ve.value.map((t) => {
|
|
1251
|
+
const r = t.absoluteValues.map((l) => [void 0, null].includes(l) ? 0 : l);
|
|
1252
|
+
return {
|
|
1253
|
+
id: t.id,
|
|
1254
|
+
name: t.name,
|
|
1255
|
+
color: t.color,
|
|
1256
|
+
values: Da(A.value, r)
|
|
1257
|
+
};
|
|
1258
|
+
})), to = k(() => ({
|
|
1259
|
+
responsiveBreakpoint: e.value.table.responsiveBreakpoint,
|
|
1260
|
+
roundingValues: e.value.table.rounding,
|
|
1261
|
+
showAverage: !1,
|
|
1262
|
+
showMedian: !1,
|
|
1263
|
+
showTotal: !1,
|
|
1264
|
+
fontFamily: e.value.chart.fontFamily,
|
|
1265
|
+
prefix: e.value.chart.labels.prefix,
|
|
1266
|
+
suffix: e.value.chart.labels.suffix,
|
|
1267
|
+
colNames: K.value.map((t) => t.text),
|
|
1268
|
+
thead: {
|
|
1269
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
1270
|
+
color: e.value.table.th.color,
|
|
1271
|
+
outline: e.value.table.th.outline
|
|
1272
|
+
},
|
|
1273
|
+
tbody: {
|
|
1274
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
1275
|
+
color: e.value.table.td.color,
|
|
1276
|
+
outline: e.value.table.td.outline
|
|
1277
|
+
},
|
|
1278
|
+
userOptions: {
|
|
1279
|
+
show: !1
|
|
1280
|
+
}
|
|
1281
|
+
})), ee = k(() => e.value.chart.grid.position === "middle" ? 0 : c.value.width / A.value / 2), Il = k(() => So(je.value.filter((t) => !ae.value.includes(t.id)))), I = k(() => {
|
|
1282
|
+
const t = Object.groupBy(Il.value, (l) => l.scaleLabel), r = {};
|
|
1283
|
+
for (const [l, u] of Object.entries(t)) {
|
|
1284
|
+
const a = u.flatMap((s) => s.absoluteValues);
|
|
1285
|
+
r[l] = {
|
|
1286
|
+
min: Math.min(...a) || 0,
|
|
1287
|
+
max: Math.max(...a) || 1,
|
|
1288
|
+
groupId: `scale_group_${Ct()}`
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
return r;
|
|
1292
|
+
}), ao = k(() => {
|
|
1293
|
+
const t = nl.value.filter((r) => r.type === "bar").filter((r) => !ae.value.includes(r.id)).length;
|
|
1294
|
+
return c.value.width / A.value / t - kt.value * t;
|
|
1295
|
+
}), kt = k(() => oe.value.line * e.value.bar.periodGap), wt = k(() => Math.max(1e-5, Gl() - (y.value.useIndividualScale && y.value.isStacked ? 0 : kt.value))), St = k(() => wt.value * Math.min(Math.abs(e.value.bar.innerGap), 0.95)), da = k(() => {
|
|
1296
|
+
if (!e.value.chart.zoom.minimap.show) return [];
|
|
1297
|
+
const t = eo.value.filter((a) => !ae.value.includes(a.id)), r = Math.max(...t.map((a) => a.series.length)), l = [];
|
|
1298
|
+
for (let a = 0; a < r; a += 1)
|
|
1299
|
+
l.push(t.map((s) => s.series[a] || 0).reduce((s, o) => (s || 0) + (o || 0), 0));
|
|
1300
|
+
const u = Math.min(...l);
|
|
1301
|
+
return l.map((a) => a + (u < 0 ? Math.abs(u) : 0));
|
|
1302
|
+
}), at = k(() => Ve.value.map((t) => ({
|
|
1303
|
+
slotAbsoluteIndex: t.slotAbsoluteIndex,
|
|
1304
|
+
shape: t.shape || null,
|
|
1305
|
+
name: t.name,
|
|
1306
|
+
color: t.color,
|
|
1307
|
+
type: t.type,
|
|
1308
|
+
value: t.absoluteValues.find((r, l) => l === S.value),
|
|
1309
|
+
comments: t.comments || [],
|
|
1310
|
+
prefix: t.prefix || e.value.chart.labels.prefix,
|
|
1311
|
+
suffix: t.suffix || e.value.chart.labels.suffix
|
|
1312
|
+
}))), ha = k(() => Xe.value.ticks.map((t) => ({
|
|
1313
|
+
y: t >= 0 ? we.value - c.value.height * zl(t) : we.value + c.value.height * zl(Math.abs(t)),
|
|
1314
|
+
value: t,
|
|
1315
|
+
prefix: e.value.chart.labels.prefix,
|
|
1316
|
+
suffix: e.value.chart.labels.suffix
|
|
1317
|
+
}))), fa = k(() => {
|
|
1318
|
+
const t = e.value.chart.annotations;
|
|
1319
|
+
if (!t || !Array.isArray(t) || t.every((T) => !T.show)) return [];
|
|
1320
|
+
const r = t.filter(
|
|
1321
|
+
(T) => T.show && (T.yAxis.yTop != null || T.yAxis.yBottom != null)
|
|
1322
|
+
);
|
|
1323
|
+
if (!r.length) return [];
|
|
1324
|
+
const { left: l, right: u } = c.value, a = we.value, s = c.value.height, o = Xe.value.min, G = Xe.value.max - o, U = (T) => {
|
|
1325
|
+
const R = (T - 0) / G;
|
|
1326
|
+
return a - R * s;
|
|
1327
|
+
};
|
|
1328
|
+
return r.map((T) => {
|
|
1329
|
+
const { yAxis: { yTop: R, yBottom: Z, label: N } } = T, E = R != null && Z != null && R !== Z, O = R == null ? null : U(R), se = Z == null ? null : U(Z), ge = Wa(N.fontSize);
|
|
1330
|
+
ge.font = `${N.fontSize}px sans-serif`;
|
|
1331
|
+
const le = ge.measureText(N.text).width, Ee = N.fontSize, ll = (N.position === "start" ? l + N.padding.left : u - N.padding.right) + N.offsetX, Ie = (O != null && se != null ? Math.min(O, se) : O ?? se) - N.fontSize / 3 + N.offsetY - N.padding.top;
|
|
1332
|
+
let W;
|
|
1333
|
+
N.textAnchor === "middle" ? W = ll - le / 2 - N.padding.left : N.textAnchor === "end" ? W = ll - le - N.padding.right : W = ll - N.padding.left;
|
|
1334
|
+
const Y = Ie - Ee * 0.75 - N.padding.top;
|
|
1335
|
+
return {
|
|
1336
|
+
show: ![O, se, Y].includes(NaN),
|
|
1337
|
+
id: `annotation_y_${Ct()}`,
|
|
1338
|
+
hasArea: E,
|
|
1339
|
+
areaHeight: E ? Math.abs(O - se) : 0,
|
|
1340
|
+
yTop: O,
|
|
1341
|
+
yBottom: se,
|
|
1342
|
+
config: T.yAxis,
|
|
1343
|
+
x1: l,
|
|
1344
|
+
x2: u,
|
|
1345
|
+
_text: { x: ll, y: Ie },
|
|
1346
|
+
_box: {
|
|
1347
|
+
x: W,
|
|
1348
|
+
y: Y,
|
|
1349
|
+
width: le + N.padding.left + N.padding.right,
|
|
1350
|
+
height: Ee + N.padding.top + N.padding.bottom,
|
|
1351
|
+
fill: N.backgroundColor,
|
|
1352
|
+
stroke: N.border.stroke,
|
|
1353
|
+
rx: N.border.rx,
|
|
1354
|
+
ry: N.border.ry,
|
|
1355
|
+
strokeWidth: N.border.strokeWidth
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
});
|
|
1359
|
+
});
|
|
1360
|
+
function ga(t, r) {
|
|
1361
|
+
const l = t[r - 1], u = t[r + 1];
|
|
1362
|
+
let a = !!l && !!u && l.value == null && u.value == null || !l && !!u && u.value == null || !!l && !u && l.value == null;
|
|
1363
|
+
return ze(t[r].value) && a && e.value.line.cutNullValues;
|
|
1364
|
+
}
|
|
1365
|
+
const bl = k(() => {
|
|
1366
|
+
const t = Il.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = t.length, l = e.value.chart.grid.labels.yAxis.gap, u = y.value.isStacked, a = u ? l * (r - 1) : 0, s = c.value.height - a;
|
|
1367
|
+
return t.filter((o) => o.type === "bar").map((o, H) => {
|
|
1368
|
+
Vt(o);
|
|
1369
|
+
const G = I.value[o.scaleLabel].min, U = I.value[o.scaleLabel].max;
|
|
1370
|
+
o.absoluteValues.filter((F) => ![null, void 0].includes(F)).map((F) => (F - G) / (U - G));
|
|
1371
|
+
const T = {
|
|
1372
|
+
valueMin: G,
|
|
1373
|
+
valueMax: U < 0 ? 0 : U
|
|
1374
|
+
}, R = {
|
|
1375
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1376
|
+
min: o.scaleMin || Math.min(...o.absoluteValues.filter((F) => ![void 0, null].includes(F))) > 0 ? 0 : Math.min(...o.absoluteValues.filter((F) => ![null, void 0].includes(F)))
|
|
1377
|
+
}, Z = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, N = 1.0000001, E = e.value.chart.grid.labels.yAxis.useNiceScale ? st(R.min, R.max === R.min ? R.max * N : R.max, Z) : Nl(R.min, R.max === R.min ? R.max * N : R.max, Z), O = e.value.chart.grid.labels.yAxis.useNiceScale ? st(T.valueMin, T.valueMax === T.valueMin ? T.valueMax * N : T.valueMax, Z) : Nl(T.valueMin, T.valueMax === T.valueMin ? T.valueMax * N : T.valueMax, Z), se = E.min >= 0 ? 0 : Math.abs(E.min), ge = 0, le = E.max + se, Ee = O.max + Math.abs(ge), ll = o.stackIndex, Ul = r - 1 - ll, Ie = u ? 1 - o.cumulatedStackRatio : 0, W = u ? s * Ie + l * Ul : 0, Y = u ? s * o.stackRatio : c.value.height, re = c.value.bottom - W - Y * se / le, Te = c.value.bottom - W - Y * ge / Ee, Se = je.value.filter((F) => F.type === "bar").filter((F) => !ae.value.includes(F.id)).length, nt = o.series.map((F, ve) => {
|
|
1378
|
+
const yl = y.value.useIndividualScale ? (o.absoluteValues[ve] + se) / le : zl(F), Tl = y.value.useIndividualScale && y.value.isStacked ? c.value.left + c.value.width / A.value * ve : c.value.left + oe.value.bar * H + oe.value.bar * ve * Se - ao.value / 2 - H * kt.value;
|
|
1379
|
+
return {
|
|
1380
|
+
yOffset: V(W),
|
|
1381
|
+
individualHeight: V(Y),
|
|
1382
|
+
x: V(Tl),
|
|
1383
|
+
y: c.value.bottom - W - Y * yl,
|
|
1384
|
+
value: o.absoluteValues[ve],
|
|
1385
|
+
zeroPosition: V(re),
|
|
1386
|
+
individualMax: V(le),
|
|
1387
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[ve] || ""
|
|
1388
|
+
};
|
|
1389
|
+
}), Me = o.absoluteValues.map((F) => O.min >= 0 ? (F - Math.abs(O.min)) / (O.max - Math.abs(O.min)) : (F + Math.abs(O.min)) / (O.max + Math.abs(O.min))), pl = o.series.map((F, ve) => {
|
|
1390
|
+
const yl = y.value.useIndividualScale && y.value.isStacked ? c.value.left + c.value.width / A.value * ve : c.value.left - oe.value.bar / 2 + oe.value.bar * H + oe.value.bar * ve * je.value.filter((Tl) => Tl.type === "bar").filter((Tl) => !ae.value.includes(Tl.id)).length;
|
|
1391
|
+
return {
|
|
1392
|
+
yOffset: V(W),
|
|
1393
|
+
individualHeight: V(Y),
|
|
1394
|
+
x: V(yl),
|
|
1395
|
+
y: V(c.value.bottom - V(W) - (V(Y) * Me[ve] || 0)),
|
|
1396
|
+
value: o.absoluteValues[ve],
|
|
1397
|
+
zeroPosition: V(re),
|
|
1398
|
+
individualMax: V(le),
|
|
1399
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[ve] || ""
|
|
1400
|
+
};
|
|
1401
|
+
}), J = E.ticks.map((F) => ({
|
|
1402
|
+
y: F >= 0 ? re - Y * (F / le) : re + Y * Math.abs(F) / le,
|
|
1403
|
+
value: F,
|
|
1404
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1405
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1406
|
+
datapoint: o
|
|
1407
|
+
})), ce = O.ticks.map((F) => {
|
|
1408
|
+
const ve = (F - O.min) / (O.max - O.min);
|
|
1409
|
+
return {
|
|
1410
|
+
y: F >= 0 ? Te - Y * ve : Te + Y * ve,
|
|
1411
|
+
value: F,
|
|
1412
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1413
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1414
|
+
datapoint: o
|
|
1415
|
+
};
|
|
1416
|
+
});
|
|
1417
|
+
return I.value[o.scaleLabel].name = o.name, I.value[o.scaleLabel].groupName = o.scaleLabel, I.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, I.value[o.scaleLabel].color = o.color, I.value[o.scaleLabel].scaleYLabels = o.autoScaling ? ce : J, I.value[o.scaleLabel].zeroPosition = o.autoScaling ? Te : re, I.value[o.scaleLabel].individualMax = o.autoScaling ? Ee : le, I.value[o.scaleLabel].scaleLabel = o.scaleLabel, I.value[o.scaleLabel].id = o.id, I.value[o.scaleLabel].yOffset = W, I.value[o.scaleLabel].individualHeight = Y, I.value[o.scaleLabel].autoScaleYLabels = ce, I.value[o.scaleLabel].unique = Il.value.filter((F) => F.scaleLabel === o.scaleLabel).length === 1, {
|
|
1418
|
+
...o,
|
|
1419
|
+
yOffset: W,
|
|
1420
|
+
autoScaleYLabels: ce,
|
|
1421
|
+
individualHeight: Y,
|
|
1422
|
+
scaleYLabels: o.autoScaling ? ce : J,
|
|
1423
|
+
individualScale: o.autoScaling ? O : E,
|
|
1424
|
+
individualMax: o.autoScaling ? Ee : le,
|
|
1425
|
+
zeroPosition: o.autoScaling ? Te : re,
|
|
1426
|
+
plots: o.autoScaling ? pl : nt,
|
|
1427
|
+
groupId: I.value[o.scaleLabel].groupId
|
|
1428
|
+
};
|
|
1429
|
+
});
|
|
1430
|
+
}), Ge = k(() => {
|
|
1431
|
+
const t = Il.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = t.length, l = e.value.chart.grid.labels.yAxis.gap, u = y.value.isStacked, a = u ? l * (r - 1) : 0, s = c.value.height - a;
|
|
1432
|
+
return t.filter((o) => o.type === "line").map((o, H) => {
|
|
1433
|
+
Vt(o);
|
|
1434
|
+
const G = I.value[o.scaleLabel].min, U = I.value[o.scaleLabel].max;
|
|
1435
|
+
o.absoluteValues.filter((P) => ![null, void 0].includes(P)).map((P) => (P - G) / (U - G));
|
|
1436
|
+
const T = {
|
|
1437
|
+
valueMin: G,
|
|
1438
|
+
valueMax: U
|
|
1439
|
+
}, R = {
|
|
1440
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1441
|
+
min: o.scaleMin || (Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues))
|
|
1442
|
+
}, Z = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, N = 1.0000001, E = e.value.chart.grid.labels.yAxis.useNiceScale ? st(R.min, R.max === R.min ? R.max * N : R.max, Z) : Nl(R.min, R.max === R.min ? R.max * N : R.max, Z), O = e.value.chart.grid.labels.yAxis.useNiceScale ? st(T.valueMin, T.valueMax === T.valueMin ? T.valueMax * N : T.valueMax, Z) : Nl(T.valueMin, T.valueMax === T.valueMin ? T.valueMax * N : T.valueMax, Z), se = E.min >= 0 ? 0 : Math.abs(E.min), ge = 0, le = E.max + Math.abs(se), Ee = O.max + Math.abs(ge), ll = o.stackIndex, Ul = r - 1 - ll, Ie = u ? 1 - o.cumulatedStackRatio : 0, W = u ? s * Ie + l * Ul : 0, Y = u ? s * o.stackRatio : c.value.height, re = c.value.bottom - W - Y * se / le, Te = c.value.bottom - W - Y * ge / Ee, Se = o.series.map((P, be) => {
|
|
1443
|
+
const uo = y.value.useIndividualScale ? (o.absoluteValues[be] + Math.abs(se)) / le : zl(P);
|
|
1444
|
+
return {
|
|
1445
|
+
x: V(c.value.left + oe.value.line / 2 + oe.value.line * be),
|
|
1446
|
+
y: V(c.value.bottom - W - Y * uo),
|
|
1447
|
+
value: o.absoluteValues[be],
|
|
1448
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[be] || ""
|
|
1449
|
+
};
|
|
1450
|
+
}), nt = o.absoluteValues.map((P) => O.min >= 0 ? (P - Math.abs(O.min)) / (O.max - Math.abs(O.min)) : (P + Math.abs(O.min)) / (O.max + Math.abs(O.min))), Me = o.series.map((P, be) => [void 0, null].includes(o.absoluteValues[be]) ? {
|
|
1451
|
+
x: V(c.value.left + oe.value.line / 2 + oe.value.line * be),
|
|
1452
|
+
y: re,
|
|
1453
|
+
value: o.absoluteValues[be],
|
|
1454
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[be] || ""
|
|
1455
|
+
} : {
|
|
1456
|
+
x: V(c.value.left + oe.value.line / 2 + oe.value.line * be),
|
|
1457
|
+
y: V(c.value.bottom - W - (Y * nt[be] || 0)),
|
|
1458
|
+
value: o.absoluteValues[be],
|
|
1459
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[be] || ""
|
|
1460
|
+
}), pl = e.value.line.cutNullValues ? Aa(Se) : zt(Se.filter((P) => P.value !== null)), J = e.value.line.cutNullValues ? Aa(Me) : zt(Me.filter((P) => P.value !== null)), ce = e.value.line.cutNullValues ? Ca(Se) : It(Se.filter((P) => P.value !== null)), F = e.value.line.cutNullValues ? Ca(Me) : It(Me.filter((P) => P.value !== null)), ve = E.ticks.map((P) => ({
|
|
1461
|
+
y: P >= 0 ? re - Y * (P / le) : re + Y * Math.abs(P) / le,
|
|
1462
|
+
value: P,
|
|
1463
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1464
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1465
|
+
datapoint: o
|
|
1466
|
+
})), yl = O.ticks.map((P) => {
|
|
1467
|
+
const be = (P - O.min) / (O.max - O.min);
|
|
1468
|
+
return {
|
|
1469
|
+
y: P >= 0 ? Te - Y * be : Te + Y * be,
|
|
1470
|
+
value: P,
|
|
1471
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1472
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1473
|
+
datapoint: o
|
|
1474
|
+
};
|
|
1475
|
+
});
|
|
1476
|
+
I.value[o.scaleLabel].name = o.name, I.value[o.scaleLabel].groupName = o.scaleLabel, I.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, I.value[o.scaleLabel].color = o.color, I.value[o.scaleLabel].scaleYLabels = o.autoScaling ? yl : ve, I.value[o.scaleLabel].zeroPosition = o.autoScaling ? Te : re, I.value[o.scaleLabel].individualMax = o.autoScaling ? Ee : le, I.value[o.scaleLabel].scaleLabel = o.scaleLabel, I.value[o.scaleLabel].id = o.id, I.value[o.scaleLabel].yOffset = W, I.value[o.scaleLabel].individualHeight = Y, I.value[o.scaleLabel].autoScaleYLabels = yl, I.value[o.scaleLabel].unique = Il.value.filter((P) => P.scaleLabel === o.scaleLabel).length === 1;
|
|
1477
|
+
const Tl = y.value.useIndividualScale ? o.autoScaling ? Te : re : we.value, it = Math.max(Math.max(o.autoScaling ? Te : ve.at(-1) ? ve.at(-1).y : 0, c.value.top), Tl);
|
|
1478
|
+
return {
|
|
1479
|
+
...o,
|
|
1480
|
+
yOffset: W,
|
|
1481
|
+
autoScaleYLabels: yl,
|
|
1482
|
+
individualHeight: Y,
|
|
1483
|
+
scaleYLabels: o.autoScaling ? yl : ve,
|
|
1484
|
+
individualScale: o.autoScaling ? O : E,
|
|
1485
|
+
individualMax: o.autoScaling ? Ee : le,
|
|
1486
|
+
zeroPosition: o.autoScaling ? Te : re,
|
|
1487
|
+
curve: o.autoScaling ? J : pl,
|
|
1488
|
+
plots: o.autoScaling ? Me : Se,
|
|
1489
|
+
area: o.useArea ? y.value.useIndividualScale ? e.value.line.cutNullValues ? za(
|
|
1490
|
+
o.autoScaling ? Me : Se,
|
|
1491
|
+
it
|
|
1492
|
+
) : Ia(
|
|
1493
|
+
o.autoScaling ? Me.filter((P) => P.value !== null) : Se.filter((P) => P.value !== null),
|
|
1494
|
+
it
|
|
1495
|
+
) : e.value.line.cutNullValues ? za(Se, it) : Ia(Se.filter((P) => P.value !== null), it) : "",
|
|
1496
|
+
curveAreas: o.useArea ? $o(
|
|
1497
|
+
o.autoScaling ? e.value.line.cutNullValues ? Me : Me.filter((P) => P.value !== null) : e.value.line.cutNullValues ? Se : Se.filter((P) => P.value !== null),
|
|
1498
|
+
it,
|
|
1499
|
+
e.value.line.cutNullValues
|
|
1500
|
+
) : [],
|
|
1501
|
+
straight: o.autoScaling ? F : ce,
|
|
1502
|
+
groupId: I.value[o.scaleLabel].groupId
|
|
1503
|
+
};
|
|
1504
|
+
});
|
|
1505
|
+
}), el = k(() => {
|
|
1506
|
+
const t = Il.value.filter((o) => ["bar", "line", "plot"].includes(o.type)), r = t.length, l = e.value.chart.grid.labels.yAxis.gap, u = y.value.isStacked, a = u ? l * (r - 1) : 0, s = c.value.height - a;
|
|
1507
|
+
return t.filter((o) => o.type === "plot").map((o) => {
|
|
1508
|
+
Vt(o);
|
|
1509
|
+
const H = I.value[o.scaleLabel].min, G = I.value[o.scaleLabel].max;
|
|
1510
|
+
o.absoluteValues.filter((J) => ![null, void 0].includes(J)).map((J) => (J - H) / (G - H));
|
|
1511
|
+
const U = {
|
|
1512
|
+
valueMin: H,
|
|
1513
|
+
valueMax: G
|
|
1514
|
+
}, T = {
|
|
1515
|
+
max: o.scaleMax || Math.max(...o.absoluteValues) || 1,
|
|
1516
|
+
min: o.scaleMin || Math.min(...o.absoluteValues) > 0 ? 0 : Math.min(...o.absoluteValues)
|
|
1517
|
+
}, R = o.scaleSteps || e.value.chart.grid.labels.yAxis.commonScaleSteps, Z = 1.0000001, N = Nl(T.min, T.max === T.min ? T.max * Z : T.max, R), E = Nl(U.valueMin, U.valueMax === U.valueMin ? U.valueMax * Z : U.valueMax, R), O = N.min >= 0 ? 0 : Math.abs(N.min), se = 0, ge = N.max + O, le = E.max + Math.abs(se), Ee = o.stackIndex, ll = r - 1 - Ee, Ul = u ? 1 - o.cumulatedStackRatio : 0, Ie = u ? s * Ul + l * ll : 0, W = u ? s * o.stackRatio : c.value.height, Y = c.value.bottom - Ie - W * O / ge, re = c.value.bottom - Ie - W * se / le, Te = o.series.map((J, ce) => {
|
|
1518
|
+
const F = y.value.useIndividualScale ? (o.absoluteValues[ce] + Math.abs(O)) / ge : zl(J);
|
|
1519
|
+
return {
|
|
1520
|
+
x: V(c.value.left + oe.value.plot / 2 + oe.value.plot * ce),
|
|
1521
|
+
y: V(c.value.bottom - Ie - W * F),
|
|
1522
|
+
value: o.absoluteValues[ce],
|
|
1523
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[ce] || ""
|
|
1524
|
+
};
|
|
1525
|
+
}), Se = o.absoluteValues.map((J) => E.min >= 0 ? (J - Math.abs(E.min)) / (E.max - Math.abs(E.min)) : (J + Math.abs(E.min)) / (E.max + Math.abs(E.min))), nt = o.series.map((J, ce) => ({
|
|
1526
|
+
x: V(c.value.left + oe.value.plot / 2 + oe.value.plot * ce),
|
|
1527
|
+
y: V(c.value.bottom - Ie - (W * Se[ce] || 0)),
|
|
1528
|
+
value: o.absoluteValues[ce],
|
|
1529
|
+
comment: o.comments && o.comments.slice(g.value.start, g.value.end)[ce] || ""
|
|
1530
|
+
})), Me = N.ticks.map((J) => ({
|
|
1531
|
+
y: J >= 0 ? Y - W * (J / ge) : Y + W * Math.abs(J) / ge,
|
|
1532
|
+
value: J,
|
|
1533
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1534
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1535
|
+
datapoint: o
|
|
1536
|
+
})), pl = E.ticks.map((J) => {
|
|
1537
|
+
const ce = (J - E.min) / (E.max - E.min);
|
|
1538
|
+
return {
|
|
1539
|
+
y: J >= 0 ? re - W * ce : re + W * ce,
|
|
1540
|
+
value: J,
|
|
1541
|
+
prefix: o.prefix || e.value.chart.labels.prefix,
|
|
1542
|
+
suffix: o.suffix || e.value.chart.labels.suffix,
|
|
1543
|
+
datapoint: o
|
|
1544
|
+
};
|
|
1545
|
+
});
|
|
1546
|
+
return I.value[o.scaleLabel].name = o.name, I.value[o.scaleLabel].groupName = o.scaleLabel, I.value[o.scaleLabel].groupColor = e.value.chart.grid.labels.yAxis.groupColor || o.color, I.value[o.scaleLabel].color = o.color, I.value[o.scaleLabel].scaleYLabels = o.autoScaling ? pl : Me, I.value[o.scaleLabel].zeroPosition = o.autoScaling ? re : Y, I.value[o.scaleLabel].individualMax = o.autoScaling ? le : ge, I.value[o.scaleLabel].scaleLabel = o.scaleLabel, I.value[o.scaleLabel].id = o.id, I.value[o.scaleLabel].yOffset = Ie, I.value[o.scaleLabel].individualHeight = W, I.value[o.scaleLabel].autoScaleYLabels = pl, I.value[o.scaleLabel].unique = Il.value.filter((J) => J.scaleLabel === o.scaleLabel).length === 1, {
|
|
1547
|
+
...o,
|
|
1548
|
+
yOffset: Ie,
|
|
1549
|
+
autoScaleYLabels: pl,
|
|
1550
|
+
individualHeight: W,
|
|
1551
|
+
scaleYLabels: o.autoScaling ? pl : Me,
|
|
1552
|
+
individualScale: o.autoScaling ? E : N,
|
|
1553
|
+
individualMax: o.autoScaling ? le : ge,
|
|
1554
|
+
zeroPosition: o.autoScaling ? re : Y,
|
|
1555
|
+
plots: o.autoScaling ? nt : Te,
|
|
1556
|
+
groupId: I.value[o.scaleLabel].groupId
|
|
1557
|
+
};
|
|
1558
|
+
});
|
|
1559
|
+
}), ot = k(() => {
|
|
1560
|
+
const t = Ge.value.map((s) => ({
|
|
1561
|
+
name: s.name,
|
|
1562
|
+
color: s.color,
|
|
1563
|
+
scale: s.individualScale,
|
|
1564
|
+
scaleYLabels: s.scaleYLabels,
|
|
1565
|
+
zero: s.zeroPosition,
|
|
1566
|
+
max: s.individualMax,
|
|
1567
|
+
scaleLabel: s.scaleLabel || "",
|
|
1568
|
+
id: s.id,
|
|
1569
|
+
yOffset: s.yOffset || 0,
|
|
1570
|
+
individualHeight: s.individualHeight || c.value.height,
|
|
1571
|
+
autoScaleYLabels: s.autoScaleYLabels
|
|
1572
|
+
})), r = bl.value.map((s) => ({
|
|
1573
|
+
name: s.name,
|
|
1574
|
+
color: s.color,
|
|
1575
|
+
scale: s.individualScale,
|
|
1576
|
+
scaleYLabels: s.scaleYLabels,
|
|
1577
|
+
zero: s.zeroPosition,
|
|
1578
|
+
max: s.individualMax,
|
|
1579
|
+
scaleLabel: s.scaleLabel || "",
|
|
1580
|
+
id: s.id,
|
|
1581
|
+
yOffset: s.yOffset || 0,
|
|
1582
|
+
individualHeight: s.individualHeight || c.value.height
|
|
1583
|
+
})), l = el.value.map((s) => ({
|
|
1584
|
+
name: s.name,
|
|
1585
|
+
color: s.color,
|
|
1586
|
+
scale: s.individualScale,
|
|
1587
|
+
scaleYLabels: s.scaleYLabels,
|
|
1588
|
+
// FIX
|
|
1589
|
+
zero: s.zeroPosition,
|
|
1590
|
+
max: s.individualMax,
|
|
1591
|
+
scaleLabel: s.scaleLabel || "",
|
|
1592
|
+
id: s.id,
|
|
1593
|
+
yOffset: s.yOffset || 0,
|
|
1594
|
+
individualHeight: s.individualHeight || c.value.height
|
|
1595
|
+
})), u = y.value.useIndividualScale && !y.value.isStacked ? Object.values(I.value) : [...t, ...r, ...l], a = u.flatMap((s) => s).length;
|
|
1596
|
+
return u.flatMap((s, o) => {
|
|
1597
|
+
let H = 0;
|
|
1598
|
+
H = y.value.isStacked ? c.value.left : c.value.left / a * (o + 1);
|
|
1599
|
+
const G = y.value.useIndividualScale && !y.value.isStacked ? s.unique ? s.name : s.groupName : s.name;
|
|
1600
|
+
return {
|
|
1601
|
+
unique: s.unique,
|
|
1602
|
+
id: s.id,
|
|
1603
|
+
groupId: s.groupId,
|
|
1604
|
+
scaleLabel: s.scaleLabel,
|
|
1605
|
+
name: pe(
|
|
1606
|
+
e.value.chart.grid.labels.yAxis.serieNameFormatter,
|
|
1607
|
+
G,
|
|
1608
|
+
G,
|
|
1609
|
+
s
|
|
1610
|
+
),
|
|
1611
|
+
color: y.value.useIndividualScale && !y.value.isStacked ? s.unique ? s.color : s.groupColor : s.color,
|
|
1612
|
+
scale: s.scale,
|
|
1613
|
+
yOffset: s.yOffset,
|
|
1614
|
+
individualHeight: s.individualHeight,
|
|
1615
|
+
x: H,
|
|
1616
|
+
yLabels: s.scaleYLabels || s.scale.ticks.map((U) => ({
|
|
1617
|
+
y: U >= 0 ? s.zero - s.individualHeight * (U / s.max) : s.zero + s.individualHeight * Math.abs(U) / s.max,
|
|
1618
|
+
value: U
|
|
1619
|
+
}))
|
|
1620
|
+
};
|
|
1621
|
+
});
|
|
1622
|
+
}), ma = k(() => ({
|
|
1623
|
+
datapoint: at.value,
|
|
1624
|
+
seriesIndex: S.value,
|
|
1625
|
+
series: je.value,
|
|
1626
|
+
bars: bl.value,
|
|
1627
|
+
lines: Ge.value,
|
|
1628
|
+
plots: el.value,
|
|
1629
|
+
config: e.value
|
|
1630
|
+
})), oo = k(() => {
|
|
1631
|
+
let t = "", r = at.value.map((a) => a.value).filter((a) => Lt(a) && a !== null).reduce((a, s) => Math.abs(a) + Math.abs(s), 0);
|
|
1632
|
+
const l = K.value[S.value], u = e.value.chart.tooltip.customFormat;
|
|
1633
|
+
return _o(u) && Lo(() => u({
|
|
1634
|
+
absoluteIndex: S.value + g.value.start,
|
|
1635
|
+
seriesIndex: S.value,
|
|
1636
|
+
datapoint: at.value,
|
|
1637
|
+
series: je.value,
|
|
1638
|
+
bars: bl.value,
|
|
1639
|
+
lines: Ge.value,
|
|
1640
|
+
plots: el.value,
|
|
1641
|
+
config: e.value
|
|
1642
|
+
})) ? u({
|
|
1643
|
+
absoluteIndex: S.value + g.value.start,
|
|
1644
|
+
seriesIndex: S.value,
|
|
1645
|
+
datapoint: at.value,
|
|
1646
|
+
series: je.value,
|
|
1647
|
+
bars: bl.value,
|
|
1648
|
+
lines: Ge.value,
|
|
1649
|
+
plots: el.value,
|
|
1650
|
+
config: e.value
|
|
1651
|
+
}) : (l && l.text && e.value.chart.tooltip.showTimeLabel && (t += `<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${e.value.chart.tooltip.borderColor}; width:100%">${l.text}</div>`), at.value.forEach((a) => {
|
|
1652
|
+
if (Lt(a.value)) {
|
|
1653
|
+
let s = "", o = "";
|
|
1654
|
+
switch (hl.value[a.type]) {
|
|
1655
|
+
case "bar":
|
|
1656
|
+
s = `<svg viewBox="0 0 40 40" height="14" width="14">${Re.pattern ? `<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${a.color}" />` : ""}<rect x="0" y="0" rx="1" stroke="none" height="40" width="40" fill="${Re.pattern ? `url(#pattern_${X.value}_${a.slotAbsoluteIndex}` : a.color}" /></svg>`;
|
|
1657
|
+
break;
|
|
1658
|
+
case "line":
|
|
1659
|
+
!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape) ? o = `<circle cx="10" cy="8" r="4" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" />` : a.shape === "triangle" ? o = `<path d="${tl({ plot: { x: 10, y: 8 }, radius: 4, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "square" ? o = `<path d="${tl({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "diamond" ? o = `<path d="${tl({ plot: { x: 10, y: 8 }, radius: 4, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "pentagon" ? o = `<path d="${tl({ plot: { x: 10, y: 8 }, radius: 4, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "hexagon" ? o = `<path d="${tl({ plot: { x: 10, y: 8 }, radius: 4, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" />` : a.shape === "star" && (o = `<polygon stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" fill="${a.color}" points="${Ta({ plot: { x: 10, y: 8 }, radius: 4 })}" />`), s = `<svg viewBox="0 0 20 12" height="14" width="20"><rect rx="1.5" x="0" y="6.5" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="0.5" height="3" width="20" fill="${a.color}" />${o}</svg>`;
|
|
1660
|
+
break;
|
|
1661
|
+
case "plot":
|
|
1662
|
+
if (!a.shape || !["star", "triangle", "square", "diamond", "pentagon", "hexagon"].includes(a.shape)) {
|
|
1663
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" /></svg>`;
|
|
1664
|
+
break;
|
|
1665
|
+
}
|
|
1666
|
+
if (a.shape === "star") {
|
|
1667
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><polygon stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" fill="${a.color}" points="${Ta({ plot: { x: 6, y: 6 }, radius: 5 })}" /></svg>`;
|
|
1668
|
+
break;
|
|
1669
|
+
}
|
|
1670
|
+
if (a.shape === "triangle") {
|
|
1671
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${tl({ plot: { x: 6, y: 6 }, radius: 6, sides: 3, rotation: 0.52 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
if (a.shape === "square") {
|
|
1675
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${tl({ plot: { x: 6, y: 6 }, radius: 6, sides: 4, rotation: 0.8 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1676
|
+
break;
|
|
1677
|
+
}
|
|
1678
|
+
if (a.shape === "diamond") {
|
|
1679
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${tl({ plot: { x: 6, y: 6 }, radius: 5, sides: 4, rotation: 0 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1680
|
+
break;
|
|
1681
|
+
}
|
|
1682
|
+
if (a.shape === "pentagon") {
|
|
1683
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${tl({ plot: { x: 6, y: 6 }, radius: 5, sides: 5, rotation: 0.95 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1684
|
+
break;
|
|
1685
|
+
}
|
|
1686
|
+
if (a.shape === "hexagon") {
|
|
1687
|
+
s = `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${tl({ plot: { x: 6, y: 6 }, radius: 5, sides: 6, rotation: 0 }).path}" fill="${a.color}" stroke="${e.value.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`;
|
|
1688
|
+
break;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
t += `<div style="display:flex;flex-direction:row; align-items:center;gap:3px;"><div style="width:20px">${s}</div> ${a.name}: <b>${e.value.chart.tooltip.showValue ? pe(
|
|
1692
|
+
a.type === "line" ? e.value.line.labels.formatter : a.type === "bar" ? e.value.bar.labels.formatter : e.value.plot.labels.formatter,
|
|
1693
|
+
a.value,
|
|
1694
|
+
Fe({
|
|
1695
|
+
p: a.prefix,
|
|
1696
|
+
v: a.value,
|
|
1697
|
+
s: a.suffix,
|
|
1698
|
+
r: e.value.chart.tooltip.roundingValue
|
|
1699
|
+
}),
|
|
1700
|
+
{ datapoint: a }
|
|
1701
|
+
) : ""}</b> ${e.value.chart.tooltip.showPercentage ? `(${Fe({
|
|
1702
|
+
v: V(Math.abs(a.value) / r * 100),
|
|
1703
|
+
s: "%",
|
|
1704
|
+
r: e.value.chart.tooltip.roundingPercentage
|
|
1705
|
+
})})` : ""}</div>`, e.value.chart.comments.showInTooltip && a.comments.length && a.comments.slice(g.value.start, g.value.end)[S.value] && (t += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.comments.slice(g.value.start, g.value.end)[S.value]}</div>`);
|
|
1706
|
+
}
|
|
1707
|
+
}), `<div style="border-radius:4px;padding:12px;font-variant-numeric: tabular-nums;color:${e.value.chart.tooltip.color}">${t}</div>`);
|
|
1708
|
+
}), xa = k(() => {
|
|
1709
|
+
if (nl.value.length === 0) return { head: [], body: [], config: {}, columnNames: [] };
|
|
1710
|
+
const t = Ve.value.map((l) => ({
|
|
1711
|
+
label: l.name,
|
|
1712
|
+
color: l.color,
|
|
1713
|
+
type: l.type
|
|
1714
|
+
})), r = [];
|
|
1715
|
+
return K.value.forEach((l, u) => {
|
|
1716
|
+
const a = [l.text];
|
|
1717
|
+
Ve.value.forEach((s) => {
|
|
1718
|
+
a.push(ze(s.absoluteValues[u]) ? Number(s.absoluteValues[u].toFixed(e.value.table.rounding)) : "");
|
|
1719
|
+
}), r.push(a);
|
|
1720
|
+
}), { head: t, body: r };
|
|
1721
|
+
}), $t = k(() => {
|
|
1722
|
+
const t = e.value.table.showSum;
|
|
1723
|
+
let r = [""].concat(Ve.value.map((s) => s.name));
|
|
1724
|
+
t && (r = r.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>'));
|
|
1725
|
+
let l = [];
|
|
1726
|
+
for (let s = 0; s < A.value; s += 1) {
|
|
1727
|
+
const o = Ve.value.map((H) => H.absoluteValues[s] ?? 0).reduce((H, G) => H + G, 0);
|
|
1728
|
+
l.push(
|
|
1729
|
+
[
|
|
1730
|
+
K.value[s].text ?? "-"
|
|
1731
|
+
].concat(Ve.value.map(
|
|
1732
|
+
(H) => pe(
|
|
1733
|
+
H.type === "line" ? e.value.line.labels.formatter : H.type === "bar" ? e.value.bar.labels.formatter : e.value.plot.labels.formatter,
|
|
1734
|
+
H.absoluteValues[s] ?? 0,
|
|
1735
|
+
Fe({
|
|
1736
|
+
p: H.prefix || e.value.chart.labels.prefix,
|
|
1737
|
+
v: H.absoluteValues[s] ?? 0,
|
|
1738
|
+
s: H.suffix || e.value.chart.labels.suffix,
|
|
1739
|
+
r: e.value.table.rounding
|
|
1740
|
+
})
|
|
1741
|
+
)
|
|
1742
|
+
)).concat(t ? (o ?? 0).toFixed(e.value.table.rounding) : [])
|
|
1743
|
+
);
|
|
1744
|
+
}
|
|
1745
|
+
const u = {
|
|
1746
|
+
th: {
|
|
1747
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
1748
|
+
color: e.value.table.th.color,
|
|
1749
|
+
outline: e.value.table.th.outline
|
|
1750
|
+
},
|
|
1751
|
+
td: {
|
|
1752
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
1753
|
+
color: e.value.table.td.color,
|
|
1754
|
+
outline: e.value.table.td.outline
|
|
1755
|
+
},
|
|
1756
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
1757
|
+
}, a = [e.value.table.columnNames.period].concat(Ve.value.map((s) => s.name)).concat(e.value.table.columnNames.total);
|
|
1758
|
+
return { head: r, body: l, config: u, colNames: a };
|
|
1759
|
+
});
|
|
1760
|
+
function ba(t = null) {
|
|
1761
|
+
const r = [[e.value.chart.title.text], [e.value.chart.title.subtitle.text], [""]], l = ["", ...xa.value.head.map((o) => o.label)], u = xa.value.body, a = r.concat([l]).concat(u), s = Io(a);
|
|
1762
|
+
t ? t(s) : To({ csvContent: s, title: e.value.chart.title.text || "vue-ui-xy" });
|
|
1763
|
+
}
|
|
1764
|
+
function pa(t, r = null) {
|
|
1765
|
+
El.value = t;
|
|
1766
|
+
const l = Ve.value.map((u) => ({
|
|
1767
|
+
name: u.name,
|
|
1768
|
+
value: [null, void 0, NaN].includes(u.absoluteValues[r]) ? null : u.absoluteValues[r],
|
|
1769
|
+
color: u.color,
|
|
1770
|
+
type: u.type
|
|
1771
|
+
}));
|
|
1772
|
+
t ? (S.value = r, e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: r + g.value.start })) : (S.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: r + g.value.start }));
|
|
1773
|
+
}
|
|
1774
|
+
function ya() {
|
|
1775
|
+
y.value.showTable = !y.value.showTable;
|
|
1776
|
+
}
|
|
1777
|
+
function ka() {
|
|
1778
|
+
y.value.dataLabels.show = !y.value.dataLabels.show;
|
|
1779
|
+
}
|
|
1780
|
+
function wa() {
|
|
1781
|
+
y.value.showTooltip = !y.value.showTooltip;
|
|
1782
|
+
}
|
|
1783
|
+
function Sa(t) {
|
|
1784
|
+
ul.value = t, vt.value += 1;
|
|
1785
|
+
}
|
|
1786
|
+
function $a() {
|
|
1787
|
+
if (!e.value.responsiveProportionalSizing) {
|
|
1788
|
+
$.value.dataLabels = e.value.chart.grid.labels.fontSize, $.value.yAxis = e.value.chart.grid.labels.axis.fontSize, $.value.xAxis = e.value.chart.grid.labels.xAxisLabels.fontSize, $.value.plotLabels = e.value.chart.labels.fontSize, Le.value.plot = e.value.plot.radius, Le.value.line = e.value.line.radius;
|
|
1789
|
+
return;
|
|
1790
|
+
}
|
|
1791
|
+
$.value.dataLabels = Zl({
|
|
1792
|
+
relator: xe.value,
|
|
1793
|
+
adjuster: 400,
|
|
1794
|
+
source: e.value.chart.grid.labels.fontSize,
|
|
1795
|
+
threshold: 10,
|
|
1796
|
+
fallback: 10
|
|
1797
|
+
}), $.value.yAxis = Zl({
|
|
1798
|
+
relator: ne.value,
|
|
1799
|
+
adjuster: 1e3,
|
|
1800
|
+
source: e.value.chart.grid.labels.axis.fontSize,
|
|
1801
|
+
threshold: 10,
|
|
1802
|
+
fallback: 10
|
|
1803
|
+
}), $.value.xAxis = Zl({
|
|
1804
|
+
relator: ne.value,
|
|
1805
|
+
adjuster: 1e3,
|
|
1806
|
+
source: e.value.chart.grid.labels.xAxisLabels.fontSize,
|
|
1807
|
+
threshold: 10,
|
|
1808
|
+
fallback: 10
|
|
1809
|
+
}), $.value.plotLabels = Zl({
|
|
1810
|
+
relator: ne.value,
|
|
1811
|
+
adjuster: 800,
|
|
1812
|
+
source: e.value.chart.labels.fontSize,
|
|
1813
|
+
threshold: 10,
|
|
1814
|
+
fallback: 10
|
|
1815
|
+
}), Le.value.plot = Zl({
|
|
1816
|
+
relator: ne.value,
|
|
1817
|
+
adjuster: 800,
|
|
1818
|
+
source: e.value.plot.radius,
|
|
1819
|
+
threshold: 1,
|
|
1820
|
+
fallback: 1
|
|
1821
|
+
}), Le.value.line = Zl({
|
|
1822
|
+
relator: ne.value,
|
|
1823
|
+
adjuster: 800,
|
|
1824
|
+
source: e.value.line.radius,
|
|
1825
|
+
threshold: 1,
|
|
1826
|
+
fallback: 1
|
|
1827
|
+
});
|
|
1828
|
+
}
|
|
1829
|
+
const ut = k(() => !!e.value.debug);
|
|
1830
|
+
function Et() {
|
|
1831
|
+
Na(d.dataset) ? (Ft({
|
|
1832
|
+
componentName: "VueUiXy",
|
|
1833
|
+
type: "dataset",
|
|
1834
|
+
debug: ut.value
|
|
1835
|
+
}), h.value = !0) : d.dataset.forEach((r, l) => {
|
|
1836
|
+
[null, void 0].includes(r.name) && (Ft({
|
|
1837
|
+
componentName: "VueUiXy",
|
|
1838
|
+
type: "datasetSerieAttribute",
|
|
1839
|
+
property: "name (string)",
|
|
1840
|
+
index: l,
|
|
1841
|
+
debug: ut.value
|
|
1842
|
+
}), h.value = !0);
|
|
1843
|
+
}), ut.value && d.dataset.forEach((r) => {
|
|
1844
|
+
r.series.forEach((l, u) => {
|
|
1845
|
+
Lt(l) || console.warn(`VueUiXy has detected an unsafe value in your dataset:
|
|
1846
|
+
-----> The serie '${r.name}' contains the value '${l}' at index ${u}.
|
|
1847
|
+
'${l}' was converted to null to allow the chart to display.`);
|
|
1848
|
+
});
|
|
1849
|
+
}), Na(d.dataset) || (h.value = e.value.loading), De.value = e.value.chart.userOptions.showOnChartHover, Bl.value = e.value.chart.userOptions.keepStateOnChartLeave, Fl.value = !e.value.chart.userOptions.showOnChartHover, Yl();
|
|
1850
|
+
const t = 12;
|
|
1851
|
+
if (e.value.responsive) {
|
|
1852
|
+
const l = ue.value.parentNode;
|
|
1853
|
+
$e.value && ($e.value.unobserve(fe.value), $e.value.disconnect());
|
|
1854
|
+
const { height: u, width: a } = l.getBoundingClientRect();
|
|
1855
|
+
let s = null, o = 0;
|
|
1856
|
+
e.value.chart.title.show && ol.value && (s = ol.value, o = s.getBoundingClientRect().height);
|
|
1857
|
+
let H = null, G = 0;
|
|
1858
|
+
e.value.chart.zoom.show && w.value > 6 && Qe.value && Ae.value && Ae.value.$el && (H = Ae.value.$el, G = H.getBoundingClientRect().height);
|
|
1859
|
+
let U = null, T = 0;
|
|
1860
|
+
e.value.chart.legend.show && cl.value && (U = cl.value, T = U.getBoundingClientRect().height);
|
|
1861
|
+
let R = 0;
|
|
1862
|
+
_l.value && (R = _l.value.getBoundingClientRect().height);
|
|
1863
|
+
let Z = 0;
|
|
1864
|
+
Ll.value && (Z = Ll.value.getBoundingClientRect().height), xe.value = u - o - T - G - R - Z - t, ne.value = a, dl.value = `0 0 ${ne.value < 0 ? 10 : ne.value} ${xe.value < 0 ? 10 : xe.value}`, $a();
|
|
1865
|
+
const N = new ResizeObserver((E) => {
|
|
1866
|
+
for (const O of E)
|
|
1867
|
+
e.value.chart.title.show && ol.value ? o = ol.value.getBoundingClientRect().height : o = 0, Ae.value && Ae.value.$el ? G = Ae.value.$el.getBoundingClientRect().height : G = 0, cl.value ? T = cl.value.getBoundingClientRect().height : T = 0, _l.value ? R = _l.value.getBoundingClientRect().height : R = 0, Ll.value ? Z = Ll.value.getBoundingClientRect().height : Z = 0, requestAnimationFrame(() => {
|
|
1868
|
+
xe.value = O.contentRect.height - o - T - G - R - Z - t, ne.value = O.contentBoxSize[0].inlineSize, dl.value = `0 0 ${ne.value < 0 ? 10 : ne.value} ${xe.value < 0 ? 10 : xe.value}`, $a();
|
|
1869
|
+
});
|
|
1870
|
+
});
|
|
1871
|
+
$e.value = N, fe.value = l, N.observe(l);
|
|
1872
|
+
} else
|
|
1873
|
+
xe.value = e.value.chart.height, ne.value = e.value.chart.width, $.value.dataLabels = e.value.chart.grid.labels.fontSize, $.value.yAxis = e.value.chart.grid.labels.axis.fontSize, $.value.xAxis = e.value.chart.grid.labels.xAxisLabels.fontSize, $.value.plotLabels = e.value.chart.labels.fontSize, Le.value.plot = e.value.plot.radius, Le.value.line = e.value.line.radius, dl.value = `0 0 ${ne.value} ${xe.value}`;
|
|
1874
|
+
}
|
|
1875
|
+
rt(() => {
|
|
1876
|
+
Et(), pt(), document.addEventListener("mousemove", (t) => {
|
|
1877
|
+
Ql.value = {
|
|
1878
|
+
x: t.clientX,
|
|
1879
|
+
y: t.clientY
|
|
1880
|
+
};
|
|
1881
|
+
}), document.addEventListener("scroll", Jt);
|
|
1882
|
+
}), ct(() => {
|
|
1883
|
+
document.removeEventListener("scroll", Jt), $e.value && ($e.value.unobserve(fe.value), $e.value.disconnect());
|
|
1884
|
+
}), Ho({
|
|
1885
|
+
timeLabelsEls: Je,
|
|
1886
|
+
timeLabels: K,
|
|
1887
|
+
slicer: g,
|
|
1888
|
+
configRef: e,
|
|
1889
|
+
rotationPath: ["chart", "grid", "labels", "xAxisLabels", "rotation"],
|
|
1890
|
+
autoRotatePath: ["chart", "grid", "labels", "xAxisLabels", "autoRotate", "enable"],
|
|
1891
|
+
isAutoSize: Pa,
|
|
1892
|
+
height: xe,
|
|
1893
|
+
width: ne,
|
|
1894
|
+
rotation: e.value.chart.grid.labels.xAxisLabels.autoRotate.angle
|
|
1895
|
+
}), al(() => d.dataset, (t) => {
|
|
1896
|
+
Array.isArray(t) && t.length > 0 && (h.value = !1), w.value = Math.max(...m.value.map((r) => Ue({
|
|
1897
|
+
data: r.series,
|
|
1898
|
+
threshold: e.value.downsample.threshold
|
|
1899
|
+
}).length)), g.value = {
|
|
1900
|
+
start: 0,
|
|
1901
|
+
end: w.value
|
|
1902
|
+
}, ye.value += 1, Pe.value += 1, Xl();
|
|
1903
|
+
}, { deep: !0 }), al(() => d.config, (t) => {
|
|
1904
|
+
B.value || (e.value = Dl()), Et(), jl.value += 1, dt.value += 1, Yl(), Xl();
|
|
1905
|
+
}, { deep: !0 });
|
|
1906
|
+
const Bt = p(!1);
|
|
1907
|
+
function _a() {
|
|
1908
|
+
const t = ue.value?.parentNode;
|
|
1909
|
+
if (!t) {
|
|
1910
|
+
Bt.value = !1;
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
const r = t.getBoundingClientRect();
|
|
1914
|
+
Bt.value = r.width > 2 && r.height > 2;
|
|
1915
|
+
}
|
|
1916
|
+
return rt(() => {
|
|
1917
|
+
_a();
|
|
1918
|
+
const t = new ResizeObserver(() => {
|
|
1919
|
+
_a(), Bt.value && (Et(), Xl(), pt());
|
|
1920
|
+
});
|
|
1921
|
+
ue.value?.parentNode && t.observe(ue.value.parentNode);
|
|
1922
|
+
}), al(e, () => {
|
|
1923
|
+
Yl();
|
|
1924
|
+
}, { immediate: !0 }), Tt({
|
|
1925
|
+
getData: qa,
|
|
1926
|
+
getImage: Ka,
|
|
1927
|
+
generatePdf: Gt,
|
|
1928
|
+
generateImage: Ut,
|
|
1929
|
+
generateCsv: ba,
|
|
1930
|
+
toggleStack: ta,
|
|
1931
|
+
toggleTable: ya,
|
|
1932
|
+
toggleLabels: ka,
|
|
1933
|
+
toggleTooltip: wa,
|
|
1934
|
+
toggleAnnotator: Ht,
|
|
1935
|
+
toggleFullscreen: Sa
|
|
1936
|
+
}), (t, r) => (n(), i("div", {
|
|
1937
|
+
id: `vue-ui-xy_${X.value}`,
|
|
1938
|
+
class: Ne(`vue-ui-xy ${ul.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1939
|
+
ref_key: "chart",
|
|
1940
|
+
ref: ue,
|
|
1941
|
+
style: _(`background:${e.value.chart.backgroundColor}; color:${e.value.chart.color};width:100%;font-family:${e.value.chart.fontFamily};${e.value.responsive ? "height: 100%" : ""}`),
|
|
1942
|
+
onMouseenter: r[10] || (r[10] = () => jt(!0)),
|
|
1943
|
+
onMouseleave: r[11] || (r[11] = () => jt(!1))
|
|
1944
|
+
}, [
|
|
1945
|
+
e.value.chart.userOptions.buttons.annotator && ke.value ? (n(), Be(v(rl), {
|
|
1946
|
+
key: 0,
|
|
1947
|
+
svgRef: ke.value,
|
|
1948
|
+
backgroundColor: e.value.chart.backgroundColor,
|
|
1949
|
+
color: e.value.chart.color,
|
|
1950
|
+
active: fl.value,
|
|
1951
|
+
onClose: Ht
|
|
1952
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
|
|
1953
|
+
Qa.value ? (n(), i("div", {
|
|
1954
|
+
key: 1,
|
|
1955
|
+
ref_key: "noTitle",
|
|
1956
|
+
ref: Ll,
|
|
1957
|
+
class: "vue-data-ui-no-title-space",
|
|
1958
|
+
style: "height:36px; width: 100%; background:transparent"
|
|
1959
|
+
}, null, 512)) : f("", !0),
|
|
1960
|
+
e.value.chart.title.show ? (n(), i("div", {
|
|
1961
|
+
key: 2,
|
|
1962
|
+
ref_key: "chartTitle",
|
|
1963
|
+
ref: ol,
|
|
1964
|
+
class: "vue-ui-xy-title",
|
|
1965
|
+
style: _(`font-family:${e.value.chart.fontFamily}`)
|
|
1966
|
+
}, [
|
|
1967
|
+
(n(), Be(Eo, {
|
|
1968
|
+
key: `title_${jl.value}`,
|
|
1969
|
+
config: {
|
|
1970
|
+
title: {
|
|
1971
|
+
cy: "xy-div-title",
|
|
1972
|
+
...e.value.chart.title
|
|
1973
|
+
},
|
|
1974
|
+
subtitle: {
|
|
1975
|
+
cy: "xy-div-subtitle",
|
|
1976
|
+
...e.value.chart.title.subtitle
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
}, null, 8, ["config"]))
|
|
1980
|
+
], 4)) : f("", !0),
|
|
1981
|
+
b("div", {
|
|
1982
|
+
id: `legend-top-${X.value}`
|
|
1983
|
+
}, null, 8, cu),
|
|
1984
|
+
e.value.chart.userOptions.show && (Bl.value || Fl.value) ? (n(), Be(v(he), {
|
|
1985
|
+
ref: "defails",
|
|
1986
|
+
key: `user_options_${vt.value}`,
|
|
1987
|
+
backgroundColor: e.value.chart.backgroundColor,
|
|
1988
|
+
color: e.value.chart.color,
|
|
1989
|
+
isPrinting: v(et),
|
|
1990
|
+
isImaging: v(Xt),
|
|
1991
|
+
uid: X.value,
|
|
1992
|
+
hasTooltip: e.value.chart.userOptions.buttons.tooltip && e.value.chart.tooltip.show,
|
|
1993
|
+
hasPdf: e.value.chart.userOptions.buttons.pdf,
|
|
1994
|
+
hasXls: e.value.chart.userOptions.buttons.csv,
|
|
1995
|
+
hasImg: e.value.chart.userOptions.buttons.img,
|
|
1996
|
+
hasLabel: e.value.chart.userOptions.buttons.labels,
|
|
1997
|
+
hasTable: e.value.chart.userOptions.buttons.table,
|
|
1998
|
+
hasStack: C.dataset.length > 1 && e.value.chart.userOptions.buttons.stack,
|
|
1999
|
+
hasFullscreen: e.value.chart.userOptions.buttons.fullscreen,
|
|
2000
|
+
isStacked: y.value.isStacked,
|
|
2001
|
+
isFullscreen: ul.value,
|
|
2002
|
+
chartElement: t.$refs.chart,
|
|
2003
|
+
position: e.value.chart.userOptions.position,
|
|
2004
|
+
isTooltip: y.value.showTooltip,
|
|
2005
|
+
titles: { ...e.value.chart.userOptions.buttonTitles },
|
|
2006
|
+
hasAnnotator: e.value.chart.userOptions.buttons.annotator,
|
|
2007
|
+
isAnnotation: fl.value,
|
|
2008
|
+
callbacks: e.value.chart.userOptions.callbacks,
|
|
2009
|
+
printScale: e.value.chart.userOptions.print.scale,
|
|
2010
|
+
onToggleFullscreen: Sa,
|
|
2011
|
+
onGeneratePdf: v(Gt),
|
|
2012
|
+
onGenerateCsv: ba,
|
|
2013
|
+
onGenerateImage: v(Ut),
|
|
2014
|
+
onToggleTable: ya,
|
|
2015
|
+
onToggleLabels: ka,
|
|
2016
|
+
onToggleStack: ta,
|
|
2017
|
+
onToggleTooltip: wa,
|
|
2018
|
+
onToggleAnnotator: Ht,
|
|
2019
|
+
style: _({
|
|
2020
|
+
visibility: Bl.value ? Fl.value ? "visible" : "hidden" : "visible"
|
|
2021
|
+
})
|
|
2022
|
+
}, ho({ _: 2 }, [
|
|
2023
|
+
t.$slots.menuIcon ? {
|
|
2024
|
+
name: "menuIcon",
|
|
2025
|
+
fn: me(({ isOpen: l, color: u }) => [
|
|
2026
|
+
Q(t.$slots, "menuIcon", il(wl({ isOpen: l, color: u })), void 0, !0)
|
|
2027
|
+
]),
|
|
2028
|
+
key: "0"
|
|
2029
|
+
} : void 0,
|
|
2030
|
+
t.$slots.optionTooltip ? {
|
|
2031
|
+
name: "optionTooltip",
|
|
2032
|
+
fn: me(() => [
|
|
2033
|
+
Q(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
2034
|
+
]),
|
|
2035
|
+
key: "1"
|
|
2036
|
+
} : void 0,
|
|
2037
|
+
t.$slots.optionPdf ? {
|
|
2038
|
+
name: "optionPdf",
|
|
2039
|
+
fn: me(() => [
|
|
2040
|
+
Q(t.$slots, "optionPdf", {}, void 0, !0)
|
|
2041
|
+
]),
|
|
2042
|
+
key: "2"
|
|
2043
|
+
} : void 0,
|
|
2044
|
+
t.$slots.optionCsv ? {
|
|
2045
|
+
name: "optionCsv",
|
|
2046
|
+
fn: me(() => [
|
|
2047
|
+
Q(t.$slots, "optionCsv", {}, void 0, !0)
|
|
2048
|
+
]),
|
|
2049
|
+
key: "3"
|
|
2050
|
+
} : void 0,
|
|
2051
|
+
t.$slots.optionImg ? {
|
|
2052
|
+
name: "optionImg",
|
|
2053
|
+
fn: me(() => [
|
|
2054
|
+
Q(t.$slots, "optionImg", {}, void 0, !0)
|
|
2055
|
+
]),
|
|
2056
|
+
key: "4"
|
|
2057
|
+
} : void 0,
|
|
2058
|
+
t.$slots.optionTable ? {
|
|
2059
|
+
name: "optionTable",
|
|
2060
|
+
fn: me(() => [
|
|
2061
|
+
Q(t.$slots, "optionTable", {}, void 0, !0)
|
|
2062
|
+
]),
|
|
2063
|
+
key: "5"
|
|
2064
|
+
} : void 0,
|
|
2065
|
+
t.$slots.optionLabels ? {
|
|
2066
|
+
name: "optionLabels",
|
|
2067
|
+
fn: me(() => [
|
|
2068
|
+
Q(t.$slots, "optionLabels", {}, void 0, !0)
|
|
2069
|
+
]),
|
|
2070
|
+
key: "6"
|
|
2071
|
+
} : void 0,
|
|
2072
|
+
t.$slots.optionStack ? {
|
|
2073
|
+
name: "optionStack",
|
|
2074
|
+
fn: me(() => [
|
|
2075
|
+
Q(t.$slots, "optionStack", {}, void 0, !0)
|
|
2076
|
+
]),
|
|
2077
|
+
key: "7"
|
|
2078
|
+
} : void 0,
|
|
2079
|
+
t.$slots.optionFullscreen ? {
|
|
2080
|
+
name: "optionFullscreen",
|
|
2081
|
+
fn: me(({ toggleFullscreen: l, isFullscreen: u }) => [
|
|
2082
|
+
Q(t.$slots, "optionFullscreen", il(wl({ toggleFullscreen: l, isFullscreen: u })), void 0, !0)
|
|
2083
|
+
]),
|
|
2084
|
+
key: "8"
|
|
2085
|
+
} : void 0,
|
|
2086
|
+
t.$slots.optionAnnotator ? {
|
|
2087
|
+
name: "optionAnnotator",
|
|
2088
|
+
fn: me(({ toggleAnnotator: l, isAnnotator: u }) => [
|
|
2089
|
+
Q(t.$slots, "optionAnnotator", il(wl({ toggleAnnotator: l, isAnnotator: u })), void 0, !0)
|
|
2090
|
+
]),
|
|
2091
|
+
key: "9"
|
|
2092
|
+
} : void 0
|
|
2093
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasLabel", "hasTable", "hasStack", "hasFullscreen", "isStacked", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
|
|
2094
|
+
(n(), i("svg", {
|
|
2095
|
+
ref_key: "svgRef",
|
|
2096
|
+
ref: ke,
|
|
2097
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2098
|
+
class: Ne([{ "vue-data-ui-fullscreen--on": ul.value, "vue-data-ui-fulscreen--off": !ul.value }, "vue-ui-xy-svg vue-data-ui-svg"]),
|
|
2099
|
+
width: "100%",
|
|
2100
|
+
viewBox: dl.value,
|
|
2101
|
+
style: _({
|
|
2102
|
+
background: "transparent",
|
|
2103
|
+
color: e.value.chart.color,
|
|
2104
|
+
fontFamily: e.value.chart.fontFamily
|
|
2105
|
+
}),
|
|
2106
|
+
"aria-label": Ja.value,
|
|
2107
|
+
role: "img",
|
|
2108
|
+
"aria-live": "polite",
|
|
2109
|
+
preserveAspectRatio: "xMidYMid",
|
|
2110
|
+
onMousemove: Ga,
|
|
2111
|
+
onMouseleave: ra,
|
|
2112
|
+
onClick: Ua
|
|
2113
|
+
}, [
|
|
2114
|
+
b("g", {
|
|
2115
|
+
ref_key: "G",
|
|
2116
|
+
ref: Ke,
|
|
2117
|
+
class: "vue-data-ui-g"
|
|
2118
|
+
}, [
|
|
2119
|
+
ql(v(sl)),
|
|
2120
|
+
t.$slots["chart-background"] ? (n(), i("foreignObject", {
|
|
2121
|
+
key: 0,
|
|
2122
|
+
x: c.value.left + ee.value < 0 ? 0 : c.value.left + ee.value,
|
|
2123
|
+
y: c.value.top,
|
|
2124
|
+
width: c.value.width - (e.value.chart.grid.position === "middle" ? 0 : c.value.width / A.value) < 0 ? 0 : c.value.width - (e.value.chart.grid.position === "middle" ? 0 : c.value.width / A.value),
|
|
2125
|
+
height: c.value.height < 0 ? 0 : c.value.height,
|
|
2126
|
+
style: {
|
|
2127
|
+
pointerEvents: "none"
|
|
2128
|
+
}
|
|
2129
|
+
}, [
|
|
2130
|
+
Q(t.$slots, "chart-background", {}, void 0, !0)
|
|
2131
|
+
], 8, du)) : f("", !0),
|
|
2132
|
+
A.value > 0 ? (n(), i("g", hu, [
|
|
2133
|
+
b("g", fu, [
|
|
2134
|
+
e.value.chart.grid.labels.xAxis.showBaseline ? (n(), i("line", {
|
|
2135
|
+
key: 0,
|
|
2136
|
+
stroke: e.value.chart.grid.stroke,
|
|
2137
|
+
"stroke-width": "1",
|
|
2138
|
+
x1: c.value.left + ee.value,
|
|
2139
|
+
x2: c.value.right - ee.value,
|
|
2140
|
+
y1: v(D)(c.value.bottom),
|
|
2141
|
+
y2: v(D)(c.value.bottom),
|
|
2142
|
+
"stroke-linecap": "round",
|
|
2143
|
+
style: { animation: "none !important" }
|
|
2144
|
+
}, null, 8, gu)) : f("", !0),
|
|
2145
|
+
y.value.useIndividualScale ? e.value.chart.grid.showHorizontalLines ? (n(!0), i(x, { key: 2 }, L(ot.value, (l) => (n(), i("g", null, [
|
|
2146
|
+
l.id === M.value && l.yLabels.length ? (n(!0), i(x, { key: 0 }, L(l.yLabels, (u) => (n(), i("line", {
|
|
2147
|
+
x1: c.value.left + ee.value,
|
|
2148
|
+
x2: c.value.right - ee.value,
|
|
2149
|
+
y1: v(D)(u.y),
|
|
2150
|
+
y2: v(D)(u.y),
|
|
2151
|
+
stroke: l.color,
|
|
2152
|
+
"stroke-width": 0.5,
|
|
2153
|
+
"stroke-linecap": "round",
|
|
2154
|
+
style: { animation: "none !important" }
|
|
2155
|
+
}, null, 8, pu))), 256)) : l.yLabels.length ? (n(!0), i(x, { key: 1 }, L(l.yLabels, (u) => (n(), i("line", {
|
|
2156
|
+
x1: c.value.left + ee.value,
|
|
2157
|
+
x2: c.value.right - ee.value,
|
|
2158
|
+
y1: v(D)(u.y),
|
|
2159
|
+
y2: v(D)(u.y),
|
|
2160
|
+
stroke: e.value.chart.grid.stroke,
|
|
2161
|
+
"stroke-width": 0.5,
|
|
2162
|
+
"stroke-linecap": "round",
|
|
2163
|
+
style: { animation: "none !important" }
|
|
2164
|
+
}, null, 8, yu))), 256)) : f("", !0)
|
|
2165
|
+
]))), 256)) : f("", !0) : (n(), i(x, { key: 1 }, [
|
|
2166
|
+
e.value.chart.grid.labels.yAxis.showBaseline ? (n(), i("line", {
|
|
2167
|
+
key: 0,
|
|
2168
|
+
stroke: e.value.chart.grid.stroke,
|
|
2169
|
+
"stroke-width": "1",
|
|
2170
|
+
x1: c.value.left + ee.value,
|
|
2171
|
+
x2: c.value.left + ee.value,
|
|
2172
|
+
y1: v(D)(c.value.top),
|
|
2173
|
+
y2: v(D)(c.value.bottom),
|
|
2174
|
+
"stroke-linecap": "round",
|
|
2175
|
+
style: { animation: "none !important" }
|
|
2176
|
+
}, null, 8, mu)) : f("", !0),
|
|
2177
|
+
e.value.chart.grid.showHorizontalLines ? (n(), i("g", xu, [
|
|
2178
|
+
(n(!0), i(x, null, L(ha.value, (l) => (n(), i("line", {
|
|
2179
|
+
x1: c.value.left + ee.value,
|
|
2180
|
+
x2: c.value.right,
|
|
2181
|
+
y1: v(D)(l.y),
|
|
2182
|
+
y2: v(D)(l.y),
|
|
2183
|
+
stroke: e.value.chart.grid.stroke,
|
|
2184
|
+
"stroke-width": 0.5,
|
|
2185
|
+
"stroke-linecap": "round",
|
|
2186
|
+
style: { animation: "none !important" }
|
|
2187
|
+
}, null, 8, bu))), 256))
|
|
2188
|
+
])) : f("", !0)
|
|
2189
|
+
], 64)),
|
|
2190
|
+
e.value.chart.grid.showVerticalLines ? (n(), i("g", ku, [
|
|
2191
|
+
b("path", {
|
|
2192
|
+
d: Ba.value,
|
|
2193
|
+
"stroke-width": 0.5,
|
|
2194
|
+
stroke: e.value.chart.grid.stroke,
|
|
2195
|
+
"stroke-linecap": "round",
|
|
2196
|
+
style: { animation: "none !important" }
|
|
2197
|
+
}, null, 8, wu)
|
|
2198
|
+
])) : f("", !0),
|
|
2199
|
+
e.value.chart.grid.labels.xAxisLabels.show ? (n(), i("g", Su, [
|
|
2200
|
+
b("path", {
|
|
2201
|
+
d: Fa.value,
|
|
2202
|
+
stroke: e.value.chart.grid.stroke,
|
|
2203
|
+
"stroke-width": 1,
|
|
2204
|
+
"stroke-linecap": "round",
|
|
2205
|
+
style: { animation: "none !important" }
|
|
2206
|
+
}, null, 8, $u)
|
|
2207
|
+
])) : f("", !0)
|
|
2208
|
+
]),
|
|
2209
|
+
(n(!0), i(x, null, L(bl.value, (l, u) => (n(), i("defs", {
|
|
2210
|
+
key: `def_rect_${u}`
|
|
2211
|
+
}, [
|
|
2212
|
+
b("linearGradient", {
|
|
2213
|
+
id: `rectGradient_pos_${u}_${X.value}`,
|
|
2214
|
+
x2: "0%",
|
|
2215
|
+
y2: "100%"
|
|
2216
|
+
}, [
|
|
2217
|
+
b("stop", {
|
|
2218
|
+
offset: "0%",
|
|
2219
|
+
"stop-color": l.color
|
|
2220
|
+
}, null, 8, Lu),
|
|
2221
|
+
b("stop", {
|
|
2222
|
+
offset: "62%",
|
|
2223
|
+
"stop-color": `${v(Ol)(l.color, 0.02)}`
|
|
2224
|
+
}, null, 8, Mu),
|
|
2225
|
+
b("stop", {
|
|
2226
|
+
offset: "100%",
|
|
2227
|
+
"stop-color": `${v(Ol)(l.color, 0.05)}`
|
|
2228
|
+
}, null, 8, Au)
|
|
2229
|
+
], 8, _u),
|
|
2230
|
+
b("linearGradient", {
|
|
2231
|
+
id: `rectGradient_neg_${u}_${X.value}`,
|
|
2232
|
+
x2: "0%",
|
|
2233
|
+
y2: "100%"
|
|
2234
|
+
}, [
|
|
2235
|
+
b("stop", {
|
|
2236
|
+
offset: "0%",
|
|
2237
|
+
"stop-color": `${v(Ol)(l.color, 0.05)}`
|
|
2238
|
+
}, null, 8, zu),
|
|
2239
|
+
b("stop", {
|
|
2240
|
+
offset: "38%",
|
|
2241
|
+
"stop-color": `${v(Ol)(l.color, 0.02)}`
|
|
2242
|
+
}, null, 8, Iu),
|
|
2243
|
+
b("stop", {
|
|
2244
|
+
offset: "100%",
|
|
2245
|
+
"stop-color": l.color
|
|
2246
|
+
}, null, 8, Tu)
|
|
2247
|
+
], 8, Cu)
|
|
2248
|
+
]))), 128)),
|
|
2249
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i("defs", {
|
|
2250
|
+
key: `def_plot_${u}`
|
|
2251
|
+
}, [
|
|
2252
|
+
b("radialGradient", {
|
|
2253
|
+
id: `plotGradient_${u}_${X.value}`,
|
|
2254
|
+
cx: "50%",
|
|
2255
|
+
cy: "50%",
|
|
2256
|
+
r: "50%",
|
|
2257
|
+
fx: "50%",
|
|
2258
|
+
fy: "50%"
|
|
2259
|
+
}, [
|
|
2260
|
+
b("stop", {
|
|
2261
|
+
offset: "0%",
|
|
2262
|
+
"stop-color": `${v(Ol)(l.color, 0.05)}`
|
|
2263
|
+
}, null, 8, Ou),
|
|
2264
|
+
b("stop", {
|
|
2265
|
+
offset: "100%",
|
|
2266
|
+
"stop-color": l.color
|
|
2267
|
+
}, null, 8, Ru)
|
|
2268
|
+
], 8, Nu)
|
|
2269
|
+
]))), 128)),
|
|
2270
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i("defs", {
|
|
2271
|
+
key: `def_line_${u}`
|
|
2272
|
+
}, [
|
|
2273
|
+
b("radialGradient", {
|
|
2274
|
+
id: `lineGradient_${u}_${X.value}`,
|
|
2275
|
+
cx: "50%",
|
|
2276
|
+
cy: "50%",
|
|
2277
|
+
r: "50%",
|
|
2278
|
+
fx: "50%",
|
|
2279
|
+
fy: "50%"
|
|
2280
|
+
}, [
|
|
2281
|
+
b("stop", {
|
|
2282
|
+
offset: "0%",
|
|
2283
|
+
"stop-color": `${v(Ol)(l.color, 0.05)}`
|
|
2284
|
+
}, null, 8, Hu),
|
|
2285
|
+
b("stop", {
|
|
2286
|
+
offset: "100%",
|
|
2287
|
+
"stop-color": l.color
|
|
2288
|
+
}, null, 8, Vu)
|
|
2289
|
+
], 8, Pu),
|
|
2290
|
+
b("linearGradient", {
|
|
2291
|
+
id: `areaGradient_${u}_${X.value}`,
|
|
2292
|
+
x1: "0%",
|
|
2293
|
+
x2: "100%",
|
|
2294
|
+
y1: "0%",
|
|
2295
|
+
y2: "0%"
|
|
2296
|
+
}, [
|
|
2297
|
+
b("stop", {
|
|
2298
|
+
offset: "0%",
|
|
2299
|
+
"stop-color": `${v(Ze)(v(Ol)(l.color, 0.03), e.value.line.area.opacity)}`
|
|
2300
|
+
}, null, 8, Bu),
|
|
2301
|
+
b("stop", {
|
|
2302
|
+
offset: "100%",
|
|
2303
|
+
"stop-color": `${v(Ze)(l.color, e.value.line.area.opacity)}`
|
|
2304
|
+
}, null, 8, Fu)
|
|
2305
|
+
], 8, Eu)
|
|
2306
|
+
]))), 128)),
|
|
2307
|
+
(n(!0), i(x, null, L(ja.value, (l) => (n(), i("g", null, [
|
|
2308
|
+
l.show ? (n(), i(x, { key: 0 }, [
|
|
2309
|
+
(n(!0), i(x, null, L(l.span, (u, a) => (n(), i("g", null, [
|
|
2310
|
+
b("rect", {
|
|
2311
|
+
style: _({
|
|
2312
|
+
transition: "none",
|
|
2313
|
+
opacity: l.from + a >= g.value.start && l.from + a <= g.value.end - 1 ? 1 : 0
|
|
2314
|
+
}),
|
|
2315
|
+
x: c.value.left + c.value.width / A.value * (l.from + a - g.value.start),
|
|
2316
|
+
y: c.value.top,
|
|
2317
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
2318
|
+
width: c.value.width / A.value < 0 ? 1e-5 : c.value.width / A.value,
|
|
2319
|
+
fill: v(Ze)(l.color, l.opacity)
|
|
2320
|
+
}, null, 12, Wu)
|
|
2321
|
+
]))), 256)),
|
|
2322
|
+
(n(!0), i(x, null, L(l.span, (u, a) => (n(), i("g", null, [
|
|
2323
|
+
l.caption.text && a === 0 ? (n(), i("foreignObject", {
|
|
2324
|
+
key: 0,
|
|
2325
|
+
x: c.value.left + c.value.width / A.value * (l.from + a - g.value.start) - (l.caption.width === "auto" ? 0 : l.caption.width / 2 - c.value.width / A.value * l.span / 2),
|
|
2326
|
+
y: c.value.top + l.caption.offsetY,
|
|
2327
|
+
style: _({
|
|
2328
|
+
overflow: "visible",
|
|
2329
|
+
opacity: l.to >= g.value.start && l.from < g.value.end ? 1 : 0
|
|
2330
|
+
}),
|
|
2331
|
+
height: "1",
|
|
2332
|
+
width: l.caption.width === "auto" ? c.value.width / A.value * l.span : l.caption.width
|
|
2333
|
+
}, [
|
|
2334
|
+
b("div", {
|
|
2335
|
+
style: _(`padding:${l.caption.padding}px;text-align:${l.caption.textAlign};font-size:${l.caption.fontSize}px;color:${l.caption.color};font-weight:${l.caption.bold ? "bold" : "normal"}`)
|
|
2336
|
+
}, te(l.caption.text), 5)
|
|
2337
|
+
], 12, Yu)) : f("", !0)
|
|
2338
|
+
]))), 256))
|
|
2339
|
+
], 64)) : f("", !0)
|
|
2340
|
+
]))), 256)),
|
|
2341
|
+
Qt.value ? (n(), i("g", Du, [
|
|
2342
|
+
(n(!0), i(x, null, L(A.value, (l, u) => (n(), i("g", {
|
|
2343
|
+
key: `tooltip_trap_highlighter_${u}`
|
|
2344
|
+
}, [
|
|
2345
|
+
b("rect", {
|
|
2346
|
+
x: c.value.left + c.value.width / A.value * u,
|
|
2347
|
+
y: c.value.top,
|
|
2348
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
2349
|
+
width: c.value.width / A.value < 0 ? 1e-5 : c.value.width / A.value,
|
|
2350
|
+
fill: [z.value, S.value, Ce.value].includes(u) ? v(Ze)(e.value.chart.highlighter.color, e.value.chart.highlighter.opacity) : "transparent",
|
|
2351
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
2352
|
+
}, null, 8, Xu)
|
|
2353
|
+
]))), 128))
|
|
2354
|
+
])) : f("", !0),
|
|
2355
|
+
bl.value.length ? (n(!0), i(x, { key: 1 }, L(bl.value, (l, u) => (n(), i("g", {
|
|
2356
|
+
key: `serie_bar_${u}`,
|
|
2357
|
+
class: Ne(`serie_bar_${u}`),
|
|
2358
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2359
|
+
}, [
|
|
2360
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i("g", {
|
|
2361
|
+
key: `bar_plot_${u}_${s}`
|
|
2362
|
+
}, [
|
|
2363
|
+
ze(a.value) ? (n(), i("rect", {
|
|
2364
|
+
key: 0,
|
|
2365
|
+
x: yt(a) + St.value / 2,
|
|
2366
|
+
y: y.value.useIndividualScale ? sa(a) : ia(a),
|
|
2367
|
+
height: y.value.useIndividualScale ? Math.abs(na(a)) : Math.abs(ua(a)),
|
|
2368
|
+
width: wt.value - St.value,
|
|
2369
|
+
rx: e.value.bar.borderRadius,
|
|
2370
|
+
fill: e.value.bar.useGradient ? a.value >= 0 ? `url(#rectGradient_pos_${u}_${X.value})` : `url(#rectGradient_neg_${u}_${X.value})` : l.color,
|
|
2371
|
+
stroke: e.value.bar.border.useSerieColor ? l.color : e.value.bar.border.stroke,
|
|
2372
|
+
"stroke-width": e.value.bar.border.strokeWidth,
|
|
2373
|
+
style: _({ transition: v(B) || !e.value.bar.showTransition ? void 0 : `all ${e.value.bar.transitionDurationMs}ms ease-in-out` })
|
|
2374
|
+
}, null, 12, Gu)) : f("", !0),
|
|
2375
|
+
ze(a.value) && t.$slots.pattern ? (n(), i("rect", {
|
|
2376
|
+
key: 1,
|
|
2377
|
+
x: yt(a) - St.value / 2,
|
|
2378
|
+
y: y.value.useIndividualScale ? sa(a) : ia(a),
|
|
2379
|
+
height: y.value.useIndividualScale ? Math.abs(na(a)) : Math.abs(ua(a)),
|
|
2380
|
+
width: wt.value - St.value,
|
|
2381
|
+
rx: e.value.bar.borderRadius,
|
|
2382
|
+
fill: `url(#pattern_${X.value}_${l.slotAbsoluteIndex})`,
|
|
2383
|
+
stroke: e.value.bar.border.useSerieColor ? l.color : e.value.bar.border.stroke,
|
|
2384
|
+
"stroke-width": e.value.bar.border.strokeWidth,
|
|
2385
|
+
style: _({ transition: v(B) || !e.value.bar.showTransition ? void 0 : `all ${e.value.bar.transitionDurationMs}ms ease-in-out` })
|
|
2386
|
+
}, null, 12, Uu)) : f("", !0),
|
|
2387
|
+
a.comment && e.value.chart.comments.show ? (n(), i("foreignObject", {
|
|
2388
|
+
key: 2,
|
|
2389
|
+
style: { overflow: "visible" },
|
|
2390
|
+
height: "12",
|
|
2391
|
+
width: wt.value / 2 + e.value.chart.comments.width,
|
|
2392
|
+
x: yt(a) - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
|
|
2393
|
+
y: v(V)(a.y) + e.value.chart.comments.offsetY + 6
|
|
2394
|
+
}, [
|
|
2395
|
+
Q(t.$slots, "plot-comment", {
|
|
2396
|
+
plot: { ...a, color: l.color, seriesIndex: u, datapointIndex: s }
|
|
2397
|
+
}, void 0, !0)
|
|
2398
|
+
], 8, Zu)) : f("", !0)
|
|
2399
|
+
]))), 128)),
|
|
2400
|
+
Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(v(j)(l.plots).trend) ? (n(), i("g", qu, [
|
|
2401
|
+
b("defs", null, [
|
|
2402
|
+
b("marker", {
|
|
2403
|
+
id: `bar_arrow_${u}`,
|
|
2404
|
+
markerWidth: 7,
|
|
2405
|
+
markerHeight: 7,
|
|
2406
|
+
refX: "0",
|
|
2407
|
+
refY: 7 / 2,
|
|
2408
|
+
orient: "auto"
|
|
2409
|
+
}, [
|
|
2410
|
+
b("polygon", {
|
|
2411
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2412
|
+
fill: l.color
|
|
2413
|
+
}, null, 8, Ju)
|
|
2414
|
+
], 8, Ku)
|
|
2415
|
+
]),
|
|
2416
|
+
l.plots.length > 1 ? (n(), i("line", {
|
|
2417
|
+
key: 0,
|
|
2418
|
+
x1: v(j)(l.plots).x1 + Gl(),
|
|
2419
|
+
x2: v(j)(l.plots).x2 + Gl(),
|
|
2420
|
+
y1: v(D)(v(j)(l.plots).y1),
|
|
2421
|
+
y2: v(D)(v(j)(l.plots).y2),
|
|
2422
|
+
"stroke-width": 1,
|
|
2423
|
+
stroke: l.color,
|
|
2424
|
+
"stroke-dasharray": 2,
|
|
2425
|
+
"marker-end": `url(#bar_arrow_${u})`
|
|
2426
|
+
}, null, 8, Qu)) : f("", !0),
|
|
2427
|
+
l.plots.length > 1 ? (n(), i("text", {
|
|
2428
|
+
key: 1,
|
|
2429
|
+
"text-anchor": "middle",
|
|
2430
|
+
x: v(j)(l.plots).x2 + Gl(),
|
|
2431
|
+
y: v(j)(l.plots).y2 - 6,
|
|
2432
|
+
"font-size": $.value.plotLabels,
|
|
2433
|
+
fill: l.color
|
|
2434
|
+
}, te(v(Fe)({
|
|
2435
|
+
v: v(j)(l.plots).trend * 100,
|
|
2436
|
+
s: "%",
|
|
2437
|
+
r: 2
|
|
2438
|
+
})), 9, ju)) : f("", !0)
|
|
2439
|
+
])) : f("", !0)
|
|
2440
|
+
], 6))), 128)) : f("", !0),
|
|
2441
|
+
!y.value.useIndividualScale && e.value.chart.grid.labels.zeroLine.show ? (n(), i("line", {
|
|
2442
|
+
key: 2,
|
|
2443
|
+
stroke: e.value.chart.grid.stroke,
|
|
2444
|
+
"stroke-width": "1",
|
|
2445
|
+
x1: c.value.left + ee.value,
|
|
2446
|
+
x2: c.value.right - ee.value,
|
|
2447
|
+
y1: v(D)(we.value),
|
|
2448
|
+
y2: v(D)(we.value),
|
|
2449
|
+
"stroke-linecap": "round",
|
|
2450
|
+
style: { animation: "none !important" }
|
|
2451
|
+
}, null, 8, en)) : f("", !0),
|
|
2452
|
+
e.value.chart.highlighter.useLine && (![null, void 0].includes(S.value) || ![null, void 0].includes(z.value)) ? (n(), i("g", ln, [
|
|
2453
|
+
b("line", {
|
|
2454
|
+
x1: c.value.left + c.value.width / A.value * ((S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)) + c.value.width / A.value / 2,
|
|
2455
|
+
x2: c.value.left + c.value.width / A.value * ((S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)) + c.value.width / A.value / 2,
|
|
2456
|
+
y1: v(D)(c.value.top),
|
|
2457
|
+
y2: v(D)(c.value.bottom),
|
|
2458
|
+
stroke: e.value.chart.highlighter.color,
|
|
2459
|
+
"stroke-width": e.value.chart.highlighter.lineWidth,
|
|
2460
|
+
"stroke-dasharray": e.value.chart.highlighter.lineDasharray,
|
|
2461
|
+
"stroke-linecap": "round",
|
|
2462
|
+
style: { transition: "none !important", animation: "none !important", "pointer-events": "none" }
|
|
2463
|
+
}, null, 8, tn)
|
|
2464
|
+
])) : f("", !0),
|
|
2465
|
+
e.value.chart.grid.frame.show ? (n(), i("rect", {
|
|
2466
|
+
key: 4,
|
|
2467
|
+
style: { pointerEvents: "none", transition: "none", animation: "none !important" },
|
|
2468
|
+
x: c.value.left + ee.value < 0 ? 0 : c.value.left + ee.value,
|
|
2469
|
+
y: c.value.top,
|
|
2470
|
+
width: c.value.width - (e.value.chart.grid.position === "middle" ? 0 : c.value.width / A.value) < 0 ? 0 : c.value.width - (e.value.chart.grid.position === "middle" ? 0 : c.value.width / A.value),
|
|
2471
|
+
height: c.value.height < 0 ? 0 : c.value.height,
|
|
2472
|
+
fill: "transparent",
|
|
2473
|
+
stroke: e.value.chart.grid.frame.stroke,
|
|
2474
|
+
"stroke-width": e.value.chart.grid.frame.strokeWidth,
|
|
2475
|
+
"stroke-linecap": e.value.chart.grid.frame.strokeLinecap,
|
|
2476
|
+
"stroke-linejoin": e.value.chart.grid.frame.strokeLinejoin,
|
|
2477
|
+
"stroke-dasharray": e.value.chart.grid.frame.strokeDasharray
|
|
2478
|
+
}, null, 8, an)) : f("", !0),
|
|
2479
|
+
e.value.chart.grid.labels.show ? (n(), i("g", {
|
|
2480
|
+
key: 5,
|
|
2481
|
+
ref_key: "scaleLabels",
|
|
2482
|
+
ref: q
|
|
2483
|
+
}, [
|
|
2484
|
+
y.value.useIndividualScale ? (n(), i(x, { key: 0 }, [
|
|
2485
|
+
(n(!0), i(x, null, L(ot.value, (l) => (n(), i("g", null, [
|
|
2486
|
+
b("line", {
|
|
2487
|
+
x1: l.x + ee.value - c.value.individualOffsetX,
|
|
2488
|
+
x2: l.x + ee.value - c.value.individualOffsetX,
|
|
2489
|
+
y1: y.value.isStacked ? v(D)(c.value.bottom - l.yOffset - l.individualHeight) : v(D)(c.value.top),
|
|
2490
|
+
y2: y.value.isStacked ? v(D)(c.value.bottom - l.yOffset) : v(D)(c.value.bottom),
|
|
2491
|
+
stroke: l.color,
|
|
2492
|
+
"stroke-width": e.value.chart.grid.stroke,
|
|
2493
|
+
"stroke-linecap": "round",
|
|
2494
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out; animation: none !important`)
|
|
2495
|
+
}, null, 12, on)
|
|
2496
|
+
]))), 256)),
|
|
2497
|
+
(n(!0), i(x, null, L(ot.value, (l) => (n(), i("g", {
|
|
2498
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.3 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2499
|
+
}, [
|
|
2500
|
+
b("text", {
|
|
2501
|
+
fill: l.color,
|
|
2502
|
+
"font-size": $.value.dataLabels * 0.8,
|
|
2503
|
+
"text-anchor": "middle",
|
|
2504
|
+
transform: `translate(${l.x - $.value.dataLabels * 0.8 / 2 + ee.value}, ${y.value.isStacked ? c.value.bottom - l.yOffset - l.individualHeight / 2 : c.value.top + c.value.height / 2}) rotate(-90)`
|
|
2505
|
+
}, te(l.name) + " " + te(l.scaleLabel && l.unique && l.scaleLabel !== l.id ? `-
|
|
2506
|
+
${l.scaleLabel}` : ""), 9, un),
|
|
2507
|
+
(n(!0), i(x, null, L(l.yLabels, (u, a) => (n(), i(x, null, [
|
|
2508
|
+
e.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), i("line", {
|
|
2509
|
+
key: 0,
|
|
2510
|
+
x1: l.x + 3 + ee.value - e.value.chart.grid.labels.yAxis.crosshairSize - c.value.individualOffsetX,
|
|
2511
|
+
x2: l.x + ee.value - c.value.individualOffsetX,
|
|
2512
|
+
y1: v(D)(u.y),
|
|
2513
|
+
y2: v(D)(u.y),
|
|
2514
|
+
stroke: l.color,
|
|
2515
|
+
"stroke-width": 1,
|
|
2516
|
+
"stroke-linecap": "round",
|
|
2517
|
+
style: { animation: "none !important" }
|
|
2518
|
+
}, null, 8, nn)) : f("", !0)
|
|
2519
|
+
], 64))), 256)),
|
|
2520
|
+
(n(!0), i(x, null, L(l.yLabels, (u, a) => (n(), i("text", {
|
|
2521
|
+
x: l.x - 5 + ee.value - c.value.individualOffsetX,
|
|
2522
|
+
y: v(D)(u.y) + $.value.dataLabels / 3,
|
|
2523
|
+
"font-size": $.value.dataLabels,
|
|
2524
|
+
"text-anchor": "end",
|
|
2525
|
+
fill: l.color
|
|
2526
|
+
}, te(v(pe)(
|
|
2527
|
+
e.value.chart.grid.labels.yAxis.formatter,
|
|
2528
|
+
u.value,
|
|
2529
|
+
v(Fe)({
|
|
2530
|
+
p: u.prefix,
|
|
2531
|
+
v: u.value,
|
|
2532
|
+
s: u.suffix,
|
|
2533
|
+
r: e.value.chart.grid.labels.yAxis.rounding
|
|
2534
|
+
}),
|
|
2535
|
+
{ datapoint: u.datapoint, seriesIndex: a }
|
|
2536
|
+
)), 9, sn))), 256))
|
|
2537
|
+
], 4))), 256))
|
|
2538
|
+
], 64)) : (n(!0), i(x, { key: 1 }, L(ha.value, (l, u) => (n(), i("g", {
|
|
2539
|
+
key: `yLabel_${u}`
|
|
2540
|
+
}, [
|
|
2541
|
+
ze(l) && l.value >= Xe.value.min && l.value <= Xe.value.max && e.value.chart.grid.labels.yAxis.showCrosshairs ? (n(), i("line", {
|
|
2542
|
+
key: 0,
|
|
2543
|
+
x1: c.value.left,
|
|
2544
|
+
x2: c.value.left - e.value.chart.grid.labels.yAxis.crosshairSize,
|
|
2545
|
+
y1: v(D)(l.y),
|
|
2546
|
+
y2: v(D)(l.y),
|
|
2547
|
+
stroke: e.value.chart.grid.stroke,
|
|
2548
|
+
"stroke-width": "1",
|
|
2549
|
+
"stroke-linecap": "round",
|
|
2550
|
+
style: { animation: "none !important" }
|
|
2551
|
+
}, null, 8, rn)) : f("", !0),
|
|
2552
|
+
l.value >= Xe.value.min && l.value <= Xe.value.max ? (n(), i("text", {
|
|
2553
|
+
key: 1,
|
|
2554
|
+
x: c.value.scaleLabelX - e.value.chart.grid.labels.yAxis.crosshairSize,
|
|
2555
|
+
y: v(V)(l.y + $.value.dataLabels / 3),
|
|
2556
|
+
"font-size": $.value.dataLabels,
|
|
2557
|
+
"text-anchor": "end",
|
|
2558
|
+
fill: e.value.chart.grid.labels.color
|
|
2559
|
+
}, te(ze(l.value) ? v(pe)(
|
|
2560
|
+
e.value.chart.grid.labels.yAxis.formatter,
|
|
2561
|
+
l.value,
|
|
2562
|
+
v(Fe)({
|
|
2563
|
+
p: l.prefix,
|
|
2564
|
+
v: l.value,
|
|
2565
|
+
s: l.suffix,
|
|
2566
|
+
r: e.value.chart.grid.labels.yAxis.rounding
|
|
2567
|
+
})
|
|
2568
|
+
) : ""), 9, cn)) : f("", !0)
|
|
2569
|
+
]))), 128))
|
|
2570
|
+
], 512)) : f("", !0),
|
|
2571
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i("g", {
|
|
2572
|
+
key: `serie_plot_${u}`,
|
|
2573
|
+
class: Ne(`serie_plot_${u}`),
|
|
2574
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2575
|
+
}, [
|
|
2576
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i("g", {
|
|
2577
|
+
key: `circle_plot_${u}_${s}`
|
|
2578
|
+
}, [
|
|
2579
|
+
a && ze(a.value) ? (n(), Be(At, {
|
|
2580
|
+
key: 0,
|
|
2581
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
|
|
2582
|
+
color: e.value.plot.useGradient ? `url(#plotGradient_${u}_${X.value})` : e.value.plot.dot.useSerieColor ? l.color : e.value.plot.dot.fill,
|
|
2583
|
+
plot: { x: v(V)(a.x), y: v(V)(a.y) },
|
|
2584
|
+
radius: S.value !== null && S.value === s || z.value !== null && z.value === s ? (Le.value.plot || 6) * 1.5 : Le.value.plot || 6,
|
|
2585
|
+
stroke: e.value.plot.dot.useSerieColor ? e.value.chart.backgroundColor : l.color,
|
|
2586
|
+
strokeWidth: e.value.plot.dot.strokeWidth,
|
|
2587
|
+
transition: v(B) || !e.value.plot.showTransition || S.value !== null && S.value === s || z.value !== null && z.value === s ? void 0 : `all ${e.value.plot.transitionDurationMs}ms ease-in-out`
|
|
2588
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : f("", !0),
|
|
2589
|
+
a.comment && e.value.chart.comments.show ? (n(), i("foreignObject", {
|
|
2590
|
+
key: 1,
|
|
2591
|
+
style: { overflow: "visible" },
|
|
2592
|
+
height: "12",
|
|
2593
|
+
width: e.value.chart.comments.width,
|
|
2594
|
+
x: a.x - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
|
|
2595
|
+
y: a.y + e.value.chart.comments.offsetY + 6
|
|
2596
|
+
}, [
|
|
2597
|
+
b("div", dn, [
|
|
2598
|
+
Q(t.$slots, "plot-comment", {
|
|
2599
|
+
plot: { ...a, color: l.color, seriesIndex: u, datapointIndex: s }
|
|
2600
|
+
}, void 0, !0)
|
|
2601
|
+
])
|
|
2602
|
+
], 8, vn)) : f("", !0)
|
|
2603
|
+
]))), 128)),
|
|
2604
|
+
Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(v(j)(l.plots).trend) ? (n(), i("g", hn, [
|
|
2605
|
+
b("defs", null, [
|
|
2606
|
+
b("marker", {
|
|
2607
|
+
id: `plot_arrow_${u}`,
|
|
2608
|
+
markerWidth: 7,
|
|
2609
|
+
markerHeight: 7,
|
|
2610
|
+
refX: "0",
|
|
2611
|
+
refY: 7 / 2,
|
|
2612
|
+
orient: "auto"
|
|
2613
|
+
}, [
|
|
2614
|
+
b("polygon", {
|
|
2615
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2616
|
+
fill: l.color
|
|
2617
|
+
}, null, 8, gn)
|
|
2618
|
+
], 8, fn)
|
|
2619
|
+
]),
|
|
2620
|
+
l.plots.length > 1 ? (n(), i("line", {
|
|
2621
|
+
key: 0,
|
|
2622
|
+
x1: v(j)(l.plots).x1,
|
|
2623
|
+
x2: v(j)(l.plots).x2,
|
|
2624
|
+
y1: v(D)(v(j)(l.plots).y1),
|
|
2625
|
+
y2: v(D)(v(j)(l.plots).y2),
|
|
2626
|
+
"stroke-width": 1,
|
|
2627
|
+
stroke: l.color,
|
|
2628
|
+
"stroke-dasharray": 2,
|
|
2629
|
+
"marker-end": `url(#plot_arrow_${u})`
|
|
2630
|
+
}, null, 8, mn)) : f("", !0),
|
|
2631
|
+
l.plots.length > 1 ? (n(), i("text", {
|
|
2632
|
+
key: 1,
|
|
2633
|
+
"text-anchor": "middle",
|
|
2634
|
+
x: v(j)(l.plots).x2,
|
|
2635
|
+
y: v(j)(l.plots).y2 - 6,
|
|
2636
|
+
"font-size": $.value.plotLabels,
|
|
2637
|
+
fill: l.color
|
|
2638
|
+
}, te(v(Fe)({
|
|
2639
|
+
v: v(j)(l.plots).trend * 100,
|
|
2640
|
+
s: "%",
|
|
2641
|
+
r: 2
|
|
2642
|
+
})), 9, xn)) : f("", !0)
|
|
2643
|
+
])) : f("", !0)
|
|
2644
|
+
], 6))), 128)),
|
|
2645
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i("g", {
|
|
2646
|
+
key: `serie_line_${u}`,
|
|
2647
|
+
class: Ne(`serie_line_${u}`),
|
|
2648
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2649
|
+
}, [
|
|
2650
|
+
l.smooth && l.plots.length > 1 && l.curve ? (n(), i("path", {
|
|
2651
|
+
key: 0,
|
|
2652
|
+
d: `M${l.curve}`,
|
|
2653
|
+
stroke: e.value.chart.backgroundColor,
|
|
2654
|
+
"stroke-width": e.value.line.strokeWidth + 1,
|
|
2655
|
+
"stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
|
|
2656
|
+
fill: "none",
|
|
2657
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2658
|
+
}, null, 12, bn)) : l.plots.length > 1 && l.straight ? (n(), i("path", {
|
|
2659
|
+
key: 1,
|
|
2660
|
+
d: `M${l.straight}`,
|
|
2661
|
+
stroke: e.value.chart.backgroundColor,
|
|
2662
|
+
"stroke-width": e.value.line.strokeWidth + 1,
|
|
2663
|
+
"stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
|
|
2664
|
+
fill: "none",
|
|
2665
|
+
"stroke-linecap": "round",
|
|
2666
|
+
"stroke-linejoin": "round",
|
|
2667
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2668
|
+
}, null, 12, pn)) : f("", !0)
|
|
2669
|
+
], 6))), 128)),
|
|
2670
|
+
t.$slots.pattern ? (n(), i("defs", yn, [
|
|
2671
|
+
(n(!0), i(x, null, L(nl.value, (l, u) => Q(t.$slots, "pattern", _t({
|
|
2672
|
+
key: `serie_pattern_slot_${u}`
|
|
2673
|
+
}, { ref_for: !0 }, { ...l, seriesIndex: l.slotAbsoluteIndex, patternId: `pattern_${X.value}_${u}` }), void 0, !0)), 128))
|
|
2674
|
+
])) : f("", !0),
|
|
2675
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i("g", {
|
|
2676
|
+
key: `serie_line_${u}`,
|
|
2677
|
+
class: Ne(`serie_line_${u}`),
|
|
2678
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2679
|
+
}, [
|
|
2680
|
+
l.useArea && l.plots.length > 1 ? (n(), i("g", kn, [
|
|
2681
|
+
l.smooth ? (n(!0), i(x, { key: 0 }, L(l.curveAreas, (a, s) => (n(), i(x, { key: s }, [
|
|
2682
|
+
a ? (n(), i("path", {
|
|
2683
|
+
key: 0,
|
|
2684
|
+
d: a,
|
|
2685
|
+
fill: e.value.line.area.useGradient ? `url(#areaGradient_${u}_${X.value})` : v(Ze)(l.color, e.value.line.area.opacity),
|
|
2686
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2687
|
+
}, null, 12, wn)) : f("", !0),
|
|
2688
|
+
t.$slots.pattern && a ? (n(), i("path", {
|
|
2689
|
+
key: 1,
|
|
2690
|
+
d: a,
|
|
2691
|
+
fill: `url(#pattern_${X.value}_${l.slotAbsoluteIndex})`,
|
|
2692
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2693
|
+
}, null, 12, Sn)) : f("", !0)
|
|
2694
|
+
], 64))), 128)) : (n(!0), i(x, { key: 1 }, L(l.area.split(";"), (a, s) => (n(), i(x, { key: s }, [
|
|
2695
|
+
a ? (n(), i("path", {
|
|
2696
|
+
key: 0,
|
|
2697
|
+
d: `M${a}Z`,
|
|
2698
|
+
fill: e.value.line.area.useGradient ? `url(#areaGradient_${u}_${X.value})` : v(Ze)(l.color, e.value.line.area.opacity),
|
|
2699
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2700
|
+
}, null, 12, $n)) : f("", !0),
|
|
2701
|
+
t.$slots.pattern && a ? (n(), i("path", {
|
|
2702
|
+
key: 1,
|
|
2703
|
+
d: `M${a}Z`,
|
|
2704
|
+
fill: `url(#pattern_${X.value}_${l.slotAbsoluteIndex})`,
|
|
2705
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2706
|
+
}, null, 12, _n)) : f("", !0)
|
|
2707
|
+
], 64))), 128))
|
|
2708
|
+
])) : f("", !0),
|
|
2709
|
+
l.smooth && l.plots.length > 1 && l.curve ? (n(), i("path", {
|
|
2710
|
+
key: 1,
|
|
2711
|
+
d: `M${l.curve}`,
|
|
2712
|
+
stroke: l.color,
|
|
2713
|
+
"stroke-width": e.value.line.strokeWidth,
|
|
2714
|
+
"stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
|
|
2715
|
+
fill: "none",
|
|
2716
|
+
"stroke-linecap": "round",
|
|
2717
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2718
|
+
}, null, 12, Ln)) : l.plots.length > 1 && l.straight ? (n(), i("path", {
|
|
2719
|
+
key: 2,
|
|
2720
|
+
d: `M${l.straight}`,
|
|
2721
|
+
stroke: l.color,
|
|
2722
|
+
"stroke-width": e.value.line.strokeWidth,
|
|
2723
|
+
"stroke-dasharray": l.dashed ? e.value.line.strokeWidth * 2 : 0,
|
|
2724
|
+
fill: "none",
|
|
2725
|
+
"stroke-linecap": "round",
|
|
2726
|
+
"stroke-linejoin": "round",
|
|
2727
|
+
style: _({ transition: v(B) || !e.value.line.showTransition ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out` })
|
|
2728
|
+
}, null, 12, Mn)) : f("", !0),
|
|
2729
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2730
|
+
key: `circle_line_${u}_${s}`
|
|
2731
|
+
}, [
|
|
2732
|
+
!va.value.linePlot && a && ze(a.value) || va.value.linePlot && a && ze(a.value) && (S.value !== null && S.value === s || z.value !== null && z.value === s) || ga(l.plots, s) ? (n(), Be(At, {
|
|
2733
|
+
key: 0,
|
|
2734
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
|
|
2735
|
+
color: e.value.line.useGradient ? `url(#lineGradient_${u}_${X.value})` : e.value.line.dot.useSerieColor ? l.color : e.value.line.dot.fill,
|
|
2736
|
+
plot: { x: v(V)(a.x), y: v(V)(a.y) },
|
|
2737
|
+
radius: S.value !== null && S.value === s || z.value !== null && z.value === s ? (Le.value.line || 6) * 1.5 : (ga(l.plots, s), Le.value.line || 6),
|
|
2738
|
+
stroke: e.value.line.dot.useSerieColor ? e.value.chart.backgroundColor : l.color,
|
|
2739
|
+
strokeWidth: e.value.line.dot.strokeWidth,
|
|
2740
|
+
transition: v(B) || !e.value.line.showTransition || S.value !== null && S.value === s || z.value !== null && z.value === s ? void 0 : `all ${e.value.line.transitionDurationMs}ms ease-in-out`
|
|
2741
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth", "transition"])) : f("", !0),
|
|
2742
|
+
a.comment && e.value.chart.comments.show ? (n(), i("foreignObject", {
|
|
2743
|
+
key: 1,
|
|
2744
|
+
style: { overflow: "visible" },
|
|
2745
|
+
height: "12",
|
|
2746
|
+
width: e.value.chart.comments.width,
|
|
2747
|
+
x: a.x - e.value.chart.comments.width / 2 + e.value.chart.comments.offsetX,
|
|
2748
|
+
y: a.y + e.value.chart.comments.offsetY + 6
|
|
2749
|
+
}, [
|
|
2750
|
+
b("div", Cn, [
|
|
2751
|
+
Q(t.$slots, "plot-comment", {
|
|
2752
|
+
plot: { ...a, color: l.color, seriesIndex: u, datapointIndex: s }
|
|
2753
|
+
}, void 0, !0)
|
|
2754
|
+
])
|
|
2755
|
+
], 8, An)) : f("", !0)
|
|
2756
|
+
], 64))), 128)),
|
|
2757
|
+
Object.hasOwn(l, "useProgression") && l.useProgression === !0 && !isNaN(v(j)(l.plots).trend) ? (n(), i("g", zn, [
|
|
2758
|
+
b("defs", null, [
|
|
2759
|
+
b("marker", {
|
|
2760
|
+
id: `line_arrow_${u}`,
|
|
2761
|
+
markerWidth: 7,
|
|
2762
|
+
markerHeight: 7,
|
|
2763
|
+
refX: "0",
|
|
2764
|
+
refY: 7 / 2,
|
|
2765
|
+
orient: "auto"
|
|
2766
|
+
}, [
|
|
2767
|
+
b("polygon", {
|
|
2768
|
+
points: `0 0, 7 ${7 / 2}, 0 7`,
|
|
2769
|
+
fill: l.color
|
|
2770
|
+
}, null, 8, Tn)
|
|
2771
|
+
], 8, In)
|
|
2772
|
+
]),
|
|
2773
|
+
l.plots.length > 1 ? (n(), i("line", {
|
|
2774
|
+
key: 0,
|
|
2775
|
+
x1: v(j)(l.plots).x1,
|
|
2776
|
+
x2: v(j)(l.plots).x2,
|
|
2777
|
+
y1: v(D)(v(j)(l.plots).y1),
|
|
2778
|
+
y2: v(D)(v(j)(l.plots).y2),
|
|
2779
|
+
"stroke-width": 1,
|
|
2780
|
+
stroke: l.color,
|
|
2781
|
+
"stroke-dasharray": 2,
|
|
2782
|
+
"marker-end": `url(#line_arrow_${u})`
|
|
2783
|
+
}, null, 8, Nn)) : f("", !0),
|
|
2784
|
+
l.plots.length > 1 ? (n(), i("text", {
|
|
2785
|
+
key: 1,
|
|
2786
|
+
"text-anchor": "middle",
|
|
2787
|
+
x: v(j)(l.plots).x2,
|
|
2788
|
+
y: v(j)(l.plots).y2 - 6,
|
|
2789
|
+
"font-size": $.value.plotLabels,
|
|
2790
|
+
fill: l.color
|
|
2791
|
+
}, te(v(Fe)({
|
|
2792
|
+
v: v(j)(l.plots).trend * 100,
|
|
2793
|
+
s: "%",
|
|
2794
|
+
r: 2
|
|
2795
|
+
})), 9, On)) : f("", !0)
|
|
2796
|
+
])) : f("", !0)
|
|
2797
|
+
], 6))), 128)),
|
|
2798
|
+
(e.value.bar.labels.show || e.value.bar.serieName.show) && y.value.dataLabels.show ? (n(), i("g", Rn, [
|
|
2799
|
+
(n(!0), i(x, null, L(bl.value, (l, u) => (n(), i(x, {
|
|
2800
|
+
key: `xLabel_bar_${u}`
|
|
2801
|
+
}, [
|
|
2802
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2803
|
+
key: `xLabel_bar_${u}_${s}`
|
|
2804
|
+
}, [
|
|
2805
|
+
a && (!Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || S.value !== null && S.value === s || z.value !== null && z.value === s) && e.value.bar.labels.show ? (n(), i("text", {
|
|
2806
|
+
key: 0,
|
|
2807
|
+
x: y.value.useIndividualScale && y.value.isStacked ? a.x + oe.value.line / 2 : yt(a) + Gl() / 2 - kt.value / 2,
|
|
2808
|
+
y: v(V)(a.y) + (a.value >= 0 ? e.value.bar.labels.offsetY : -e.value.bar.labels.offsetY * 3),
|
|
2809
|
+
"text-anchor": "middle",
|
|
2810
|
+
"font-size": $.value.plotLabels,
|
|
2811
|
+
fill: e.value.bar.labels.color,
|
|
2812
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2813
|
+
}, te(ze(a.value) ? v(pe)(
|
|
2814
|
+
e.value.bar.labels.formatter,
|
|
2815
|
+
a.value,
|
|
2816
|
+
v(Fe)({
|
|
2817
|
+
p: l.prefix || e.value.chart.labels.prefix,
|
|
2818
|
+
v: a.value,
|
|
2819
|
+
s: l.suffix || e.value.chart.labels.suffix,
|
|
2820
|
+
r: e.value.bar.labels.rounding
|
|
2821
|
+
}),
|
|
2822
|
+
{
|
|
2823
|
+
datapoint: a,
|
|
2824
|
+
serie: l
|
|
2825
|
+
}
|
|
2826
|
+
) : ""), 13, Pn)) : f("", !0),
|
|
2827
|
+
a && e.value.bar.serieName.show ? (n(), i("text", {
|
|
2828
|
+
key: 1,
|
|
2829
|
+
x: y.value.useIndividualScale && y.value.isStacked ? a.x + oe.value.line / 2 : a.x + Gl() * 1.1,
|
|
2830
|
+
y: a.y + (a.value > 0 ? e.value.bar.serieName.offsetY : -e.value.bar.serieName.offsetY * 3),
|
|
2831
|
+
"text-anchor": "middle",
|
|
2832
|
+
"font-size": $.value.plotLabels,
|
|
2833
|
+
fill: e.value.bar.serieName.useSerieColor ? l.color : e.value.bar.serieName.color,
|
|
2834
|
+
"font-weight": e.value.bar.serieName.bold ? "bold" : "normal",
|
|
2835
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2836
|
+
}, te(e.value.bar.serieName.useAbbreviation ? v(Mo)({
|
|
2837
|
+
source: l.name,
|
|
2838
|
+
length: e.value.bar.serieName.abbreviationSize
|
|
2839
|
+
}) : l.name), 13, Hn)) : f("", !0)
|
|
2840
|
+
], 64))), 128))
|
|
2841
|
+
], 64))), 128))
|
|
2842
|
+
])) : f("", !0),
|
|
2843
|
+
e.value.plot.labels.show && y.value.dataLabels.show ? (n(), i("g", Vn, [
|
|
2844
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i(x, {
|
|
2845
|
+
key: `xLabel_plot_${u}`
|
|
2846
|
+
}, [
|
|
2847
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2848
|
+
key: `xLabel_plot_${u}_${s}`
|
|
2849
|
+
}, [
|
|
2850
|
+
a && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || S.value !== null && S.value === s || z.value !== null && z.value === s ? (n(), i("text", {
|
|
2851
|
+
key: 0,
|
|
2852
|
+
x: a.x,
|
|
2853
|
+
y: a.y + e.value.plot.labels.offsetY,
|
|
2854
|
+
"text-anchor": "middle",
|
|
2855
|
+
"font-size": $.value.plotLabels,
|
|
2856
|
+
fill: e.value.plot.labels.color,
|
|
2857
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2858
|
+
}, te(ze(a.value) ? v(pe)(
|
|
2859
|
+
e.value.plot.labels.formatter,
|
|
2860
|
+
a.value,
|
|
2861
|
+
v(Fe)({
|
|
2862
|
+
p: l.prefix || e.value.chart.labels.prefix,
|
|
2863
|
+
v: a.value,
|
|
2864
|
+
s: l.suffix || e.value.chart.labels.suffix,
|
|
2865
|
+
r: e.value.plot.labels.rounding
|
|
2866
|
+
}),
|
|
2867
|
+
{
|
|
2868
|
+
datapoint: a,
|
|
2869
|
+
serie: l
|
|
2870
|
+
}
|
|
2871
|
+
) : ""), 13, En)) : f("", !0)
|
|
2872
|
+
], 64))), 128))
|
|
2873
|
+
], 64))), 128))
|
|
2874
|
+
])) : (n(), i("g", Bn, [
|
|
2875
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i(x, {
|
|
2876
|
+
key: `xLabel_plot_${u}`
|
|
2877
|
+
}, [
|
|
2878
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2879
|
+
key: `xLabel_plot_${u}_${s}`
|
|
2880
|
+
}, [
|
|
2881
|
+
e.value.plot.tag.followValue ? (n(), i(x, { key: 1 }, [
|
|
2882
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag ? (n(), i("line", {
|
|
2883
|
+
key: 0,
|
|
2884
|
+
class: "vue-ui-xy-tag-plot",
|
|
2885
|
+
x1: c.value.left,
|
|
2886
|
+
x2: c.value.right,
|
|
2887
|
+
y1: a.y,
|
|
2888
|
+
y2: a.y,
|
|
2889
|
+
"stroke-width": 1,
|
|
2890
|
+
"stroke-linecap": "round",
|
|
2891
|
+
"stroke-dasharray": "2",
|
|
2892
|
+
stroke: l.color
|
|
2893
|
+
}, null, 8, Xn)) : f("", !0)
|
|
2894
|
+
], 64)) : (n(), i(x, { key: 0 }, [
|
|
2895
|
+
a && s === 0 && l.useTag && l.useTag === "start" ? (n(), i("foreignObject", {
|
|
2896
|
+
key: 0,
|
|
2897
|
+
x: a.x,
|
|
2898
|
+
y: a.y - 20,
|
|
2899
|
+
height: 24,
|
|
2900
|
+
width: "150",
|
|
2901
|
+
style: _(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2902
|
+
}, [
|
|
2903
|
+
b("div", {
|
|
2904
|
+
style: _(`padding: 3px; background:${v(Ze)(l.color, 80)};color:${v(qe)(l.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
2905
|
+
innerHTML: v(pe)(
|
|
2906
|
+
e.value.plot.tag.formatter,
|
|
2907
|
+
a.value,
|
|
2908
|
+
l.name,
|
|
2909
|
+
{
|
|
2910
|
+
datapoint: a,
|
|
2911
|
+
seriesIndex: s,
|
|
2912
|
+
serieName: l.name
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
}, null, 12, Wn)
|
|
2916
|
+
], 12, Fn)) : f("", !0),
|
|
2917
|
+
a && s === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (n(), i("foreignObject", {
|
|
2918
|
+
key: 1,
|
|
2919
|
+
x: a.x - l.name.length * ($.value.plotLabels / 2),
|
|
2920
|
+
y: a.y - 20,
|
|
2921
|
+
height: 24,
|
|
2922
|
+
width: "150",
|
|
2923
|
+
style: _(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2924
|
+
}, [
|
|
2925
|
+
b("div", {
|
|
2926
|
+
style: _(`padding: 3px; background:${v(Ze)(l.color, 80)};color:${v(qe)(l.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
2927
|
+
innerHTML: v(pe)(
|
|
2928
|
+
e.value.plot.tag.formatter,
|
|
2929
|
+
a.value,
|
|
2930
|
+
l.name,
|
|
2931
|
+
{
|
|
2932
|
+
datapoint: a,
|
|
2933
|
+
seriesIndex: s,
|
|
2934
|
+
serieName: l.name
|
|
2935
|
+
}
|
|
2936
|
+
)
|
|
2937
|
+
}, null, 12, Dn)
|
|
2938
|
+
], 12, Yn)) : f("", !0)
|
|
2939
|
+
], 64))
|
|
2940
|
+
], 64))), 128))
|
|
2941
|
+
], 64))), 128))
|
|
2942
|
+
])),
|
|
2943
|
+
e.value.line.labels.show && y.value.dataLabels.show ? (n(), i("g", Gn, [
|
|
2944
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i(x, {
|
|
2945
|
+
key: `xLabel_line_${u}`
|
|
2946
|
+
}, [
|
|
2947
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2948
|
+
key: `xLabel_line_${u}_${s}`
|
|
2949
|
+
}, [
|
|
2950
|
+
a && !Object.hasOwn(l, "dataLabels") || l.dataLabels === !0 || S.value !== null && S.value === s || z.value !== null && z.value === s ? (n(), i("text", {
|
|
2951
|
+
key: 0,
|
|
2952
|
+
x: a.x,
|
|
2953
|
+
y: a.y + (a.value >= 0 ? e.value.line.labels.offsetY : -e.value.line.labels.offsetY * 3),
|
|
2954
|
+
"text-anchor": "middle",
|
|
2955
|
+
"font-size": $.value.plotLabels,
|
|
2956
|
+
fill: e.value.line.labels.color,
|
|
2957
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
2958
|
+
}, te(ze(a.value) ? v(pe)(
|
|
2959
|
+
e.value.line.labels.formatter,
|
|
2960
|
+
a.value,
|
|
2961
|
+
v(Fe)({
|
|
2962
|
+
p: l.prefix || e.value.chart.labels.prefix,
|
|
2963
|
+
v: a.value,
|
|
2964
|
+
s: l.suffix || e.value.chart.labels.suffix,
|
|
2965
|
+
r: e.value.line.labels.rounding
|
|
2966
|
+
}),
|
|
2967
|
+
{
|
|
2968
|
+
datapoint: a,
|
|
2969
|
+
serie: l
|
|
2970
|
+
}
|
|
2971
|
+
) : ""), 13, Un)) : f("", !0)
|
|
2972
|
+
], 64))), 128))
|
|
2973
|
+
], 64))), 128))
|
|
2974
|
+
])) : (n(), i("g", Zn, [
|
|
2975
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i(x, {
|
|
2976
|
+
key: `xLabel_line_${u}`
|
|
2977
|
+
}, [
|
|
2978
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
2979
|
+
key: `xLabel_line_${u}_${s}`
|
|
2980
|
+
}, [
|
|
2981
|
+
e.value.line.tag.followValue ? (n(), i(x, { key: 1 }, [
|
|
2982
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag ? (n(), i("line", {
|
|
2983
|
+
key: 0,
|
|
2984
|
+
class: "vue-ui-xy-tag-line",
|
|
2985
|
+
x1: c.value.left,
|
|
2986
|
+
x2: c.value.right,
|
|
2987
|
+
y1: a.y,
|
|
2988
|
+
y2: a.y,
|
|
2989
|
+
"stroke-width": 1,
|
|
2990
|
+
"stroke-linecap": "round",
|
|
2991
|
+
"stroke-dasharray": "2",
|
|
2992
|
+
stroke: l.color
|
|
2993
|
+
}, null, 8, jn)) : f("", !0)
|
|
2994
|
+
], 64)) : (n(), i(x, { key: 0 }, [
|
|
2995
|
+
a && s === 0 && l.useTag && l.useTag === "start" ? (n(), i("foreignObject", {
|
|
2996
|
+
key: 0,
|
|
2997
|
+
x: a.x,
|
|
2998
|
+
y: a.y - 20,
|
|
2999
|
+
height: 24,
|
|
3000
|
+
width: "150",
|
|
3001
|
+
style: _(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3002
|
+
}, [
|
|
3003
|
+
b("div", {
|
|
3004
|
+
style: _(`padding: 3px; background:${v(Ze)(l.color, 80)};color:${v(qe)(l.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
3005
|
+
innerHTML: v(pe)(
|
|
3006
|
+
e.value.line.tag.formatter,
|
|
3007
|
+
a.value,
|
|
3008
|
+
l.name,
|
|
3009
|
+
{
|
|
3010
|
+
datapoint: a,
|
|
3011
|
+
seriesIndex: s,
|
|
3012
|
+
serieName: l.name
|
|
3013
|
+
}
|
|
3014
|
+
)
|
|
3015
|
+
}, null, 12, Kn)
|
|
3016
|
+
], 12, qn)) : f("", !0),
|
|
3017
|
+
a && s === l.plots.length - 1 && l.useTag && l.useTag === "end" ? (n(), i("foreignObject", {
|
|
3018
|
+
key: 1,
|
|
3019
|
+
x: a.x,
|
|
3020
|
+
y: a.y - 20,
|
|
3021
|
+
height: 24,
|
|
3022
|
+
width: "150",
|
|
3023
|
+
style: _(`overflow: visible; opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3024
|
+
}, [
|
|
3025
|
+
b("div", {
|
|
3026
|
+
style: _(`padding: 3px; background:${v(Ze)(l.color, 80)};color:${v(qe)(l.color)};width:fit-content;font-size:${$.value.plotLabels}px;border-radius: 2px;`),
|
|
3027
|
+
innerHTML: v(pe)(
|
|
3028
|
+
e.value.line.tag.formatter,
|
|
3029
|
+
a.value,
|
|
3030
|
+
l.name,
|
|
3031
|
+
{
|
|
3032
|
+
datapoint: a,
|
|
3033
|
+
seriesIndex: s,
|
|
3034
|
+
serieName: l.name
|
|
3035
|
+
}
|
|
3036
|
+
)
|
|
3037
|
+
}, null, 12, Qn)
|
|
3038
|
+
], 12, Jn)) : f("", !0)
|
|
3039
|
+
], 64))
|
|
3040
|
+
], 64))), 128))
|
|
3041
|
+
], 64))), 128))
|
|
3042
|
+
])),
|
|
3043
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i(x, {
|
|
3044
|
+
key: `xLabel_line_${u}`
|
|
3045
|
+
}, [
|
|
3046
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
3047
|
+
key: `xLabel_line_${u}_${s}`
|
|
3048
|
+
}, [
|
|
3049
|
+
a && s === 0 && l.showSerieName && l.showSerieName === "start" ? (n(), i("text", {
|
|
3050
|
+
key: 0,
|
|
3051
|
+
x: a.x - $.value.plotLabels,
|
|
3052
|
+
y: a.y,
|
|
3053
|
+
"font-size": $.value.plotLabels,
|
|
3054
|
+
"text-anchor": "end",
|
|
3055
|
+
fill: l.color,
|
|
3056
|
+
innerHTML: v(Mt)({
|
|
3057
|
+
content: l.name,
|
|
3058
|
+
fontSize: $.value.plotLabels,
|
|
3059
|
+
fill: l.color,
|
|
3060
|
+
x: a.x - $.value.plotLabels,
|
|
3061
|
+
y: a.y,
|
|
3062
|
+
maxWords: 2
|
|
3063
|
+
}),
|
|
3064
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3065
|
+
}, null, 12, ei)) : f("", !0),
|
|
3066
|
+
a && s === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (n(), i("text", {
|
|
3067
|
+
key: 1,
|
|
3068
|
+
x: a.x + $.value.plotLabels,
|
|
3069
|
+
y: a.y,
|
|
3070
|
+
"font-size": $.value.plotLabels,
|
|
3071
|
+
"text-anchor": "start",
|
|
3072
|
+
fill: l.color,
|
|
3073
|
+
innerHTML: v(Mt)({
|
|
3074
|
+
content: l.name,
|
|
3075
|
+
fontSize: $.value.plotLabels,
|
|
3076
|
+
fill: l.color,
|
|
3077
|
+
x: a.x + $.value.plotLabels,
|
|
3078
|
+
y: a.y,
|
|
3079
|
+
maxWords: 2
|
|
3080
|
+
}),
|
|
3081
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3082
|
+
}, null, 12, li)) : f("", !0)
|
|
3083
|
+
], 64))), 128))
|
|
3084
|
+
], 64))), 128)),
|
|
3085
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i(x, {
|
|
3086
|
+
key: `xLabel_plot_${u}`
|
|
3087
|
+
}, [
|
|
3088
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
3089
|
+
key: `xLabel_plot_${u}_${s}`
|
|
3090
|
+
}, [
|
|
3091
|
+
a && s === 0 && l.showSerieName && l.showSerieName === "start" ? (n(), i("text", {
|
|
3092
|
+
key: 0,
|
|
3093
|
+
x: a.x - $.value.plotLabels,
|
|
3094
|
+
y: a.y,
|
|
3095
|
+
"font-size": $.value.plotLabels,
|
|
3096
|
+
"text-anchor": "end",
|
|
3097
|
+
fill: l.color,
|
|
3098
|
+
innerHTML: v(Mt)({
|
|
3099
|
+
content: l.name,
|
|
3100
|
+
fontSize: $.value.plotLabels,
|
|
3101
|
+
fill: l.color,
|
|
3102
|
+
x: a.x - $.value.plotLabels,
|
|
3103
|
+
y: a.y,
|
|
3104
|
+
maxWords: 2
|
|
3105
|
+
}),
|
|
3106
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3107
|
+
}, null, 12, ti)) : f("", !0),
|
|
3108
|
+
a && s === l.plots.length - 1 && l.showSerieName && l.showSerieName === "end" ? (n(), i("text", {
|
|
3109
|
+
key: 1,
|
|
3110
|
+
x: a.x + $.value.plotLabels,
|
|
3111
|
+
y: a.y,
|
|
3112
|
+
"font-size": $.value.plotLabels,
|
|
3113
|
+
"text-anchor": "start",
|
|
3114
|
+
fill: l.color,
|
|
3115
|
+
innerHTML: v(Mt)({
|
|
3116
|
+
content: l.name,
|
|
3117
|
+
fontSize: $.value.plotLabels,
|
|
3118
|
+
fill: l.color,
|
|
3119
|
+
x: a.x + $.value.plotLabels,
|
|
3120
|
+
y: a.y,
|
|
3121
|
+
maxWords: 2
|
|
3122
|
+
}),
|
|
3123
|
+
style: _(`opacity:${M.value ? M.value === l.groupId ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`)
|
|
3124
|
+
}, null, 12, ai)) : f("", !0)
|
|
3125
|
+
], 64))), 128))
|
|
3126
|
+
], 64))), 128)),
|
|
3127
|
+
y.value.useIndividualScale && !y.value.isStacked ? (n(), i(x, { key: 12 }, [
|
|
3128
|
+
b("defs", null, [
|
|
3129
|
+
(n(!0), i(x, null, L(ot.value, (l, u) => (n(), i("linearGradient", {
|
|
3130
|
+
id: `individual_scale_gradient_${X.value}_${u}`,
|
|
3131
|
+
x1: "0%",
|
|
3132
|
+
x2: "100%",
|
|
3133
|
+
y1: "0%",
|
|
3134
|
+
y2: "0%"
|
|
3135
|
+
}, [
|
|
3136
|
+
b("stop", {
|
|
3137
|
+
offset: "0%",
|
|
3138
|
+
"stop-color": e.value.chart.backgroundColor,
|
|
3139
|
+
"stop-opacity": "0"
|
|
3140
|
+
}, null, 8, ui),
|
|
3141
|
+
b("stop", {
|
|
3142
|
+
offset: "100%",
|
|
3143
|
+
"stop-color": l.color,
|
|
3144
|
+
"stop-opacity": "0.2"
|
|
3145
|
+
}, null, 8, ni)
|
|
3146
|
+
], 8, oi))), 256))
|
|
3147
|
+
]),
|
|
3148
|
+
(n(!0), i(x, null, L(ot.value, (l, u) => (n(), i("rect", {
|
|
3149
|
+
x: l.x - e.value.chart.grid.labels.yAxis.labelWidth + ee.value - c.value.individualOffsetX,
|
|
3150
|
+
y: c.value.top,
|
|
3151
|
+
width: e.value.chart.grid.labels.yAxis.labelWidth + c.value.individualOffsetX,
|
|
3152
|
+
height: c.value.height < 0 ? 10 : c.value.height,
|
|
3153
|
+
fill: M.value === l.groupId ? `url(#individual_scale_gradient_${X.value}_${u})` : "transparent",
|
|
3154
|
+
onMouseenter: (a) => M.value = l.groupId,
|
|
3155
|
+
onMouseleave: r[0] || (r[0] = (a) => M.value = null)
|
|
3156
|
+
}, null, 40, ii))), 256))
|
|
3157
|
+
], 64)) : f("", !0),
|
|
3158
|
+
b("g", null, [
|
|
3159
|
+
e.value.chart.grid.labels.axis.yLabel && !y.value.useIndividualScale ? (n(), i("text", {
|
|
3160
|
+
key: 0,
|
|
3161
|
+
ref_key: "yAxisLabel",
|
|
3162
|
+
ref: Vl,
|
|
3163
|
+
"font-size": $.value.yAxis,
|
|
3164
|
+
fill: e.value.chart.grid.labels.color,
|
|
3165
|
+
transform: `translate(${e.value.chart.grid.labels.axis.fontSize}, ${c.value.top + c.value.height / 2}) rotate(-90)`,
|
|
3166
|
+
"text-anchor": "middle",
|
|
3167
|
+
style: { transition: "none" }
|
|
3168
|
+
}, te(e.value.chart.grid.labels.axis.yLabel), 9, si)) : f("", !0),
|
|
3169
|
+
e.value.chart.grid.labels.axis.xLabel ? (n(), i("text", {
|
|
3170
|
+
key: 1,
|
|
3171
|
+
ref_key: "xAxisLabel",
|
|
3172
|
+
ref: Hl,
|
|
3173
|
+
"text-anchor": "middle",
|
|
3174
|
+
x: ne.value / 2,
|
|
3175
|
+
y: xe.value - 3,
|
|
3176
|
+
"font-size": $.value.yAxis,
|
|
3177
|
+
fill: e.value.chart.grid.labels.color
|
|
3178
|
+
}, te(e.value.chart.grid.labels.axis.xLabel), 9, ri)) : f("", !0)
|
|
3179
|
+
]),
|
|
3180
|
+
e.value.chart.grid.labels.xAxisLabels.show ? (n(), i("g", {
|
|
3181
|
+
key: 13,
|
|
3182
|
+
ref_key: "timeLabelsEls",
|
|
3183
|
+
ref: Je
|
|
3184
|
+
}, [
|
|
3185
|
+
t.$slots["time-label"] ? (n(!0), i(x, { key: 0 }, L(K.value, (l, u) => Q(t.$slots, "time-label", _t({
|
|
3186
|
+
key: `time_label_${u}`,
|
|
3187
|
+
ref_for: !0
|
|
3188
|
+
}, {
|
|
3189
|
+
x: c.value.left + c.value.width / A.value * u + c.value.width / A.value / 2,
|
|
3190
|
+
y: c.value.bottom,
|
|
3191
|
+
fontSize: $.value.xAxis,
|
|
3192
|
+
fill: e.value.chart.grid.labels.xAxisLabels.color,
|
|
3193
|
+
transform: `translate(${c.value.left + c.value.width / A.value * u + c.value.width / A.value / 2}, ${c.value.bottom + $.value.xAxis * 1.3 + e.value.chart.grid.labels.xAxisLabels.yOffset}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3194
|
+
absoluteIndex: l.absoluteIndex,
|
|
3195
|
+
content: l.text,
|
|
3196
|
+
textAnchor: e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3197
|
+
show: l && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && A.value <= bt.value || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (u === 0 || u === K.value.length - 1) && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && S.value === u && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && u % Math.floor((g.value.end - g.value.start) / bt.value) === 0
|
|
3198
|
+
}), void 0, !0)), 128)) : (n(!0), i(x, { key: 1 }, L(K.value, (l, u) => (n(), i("g", {
|
|
3199
|
+
key: `time_label_${u}`
|
|
3200
|
+
}, [
|
|
3201
|
+
l && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && A.value <= bt.value || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && (u === 0 || u === K.value.length - 1) && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && S.value === u && !e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo || l && !e.value.chart.grid.labels.xAxisLabels.showOnlyFirstAndLast && e.value.chart.grid.labels.xAxisLabels.showOnlyAtModulo && u % Math.floor((g.value.end - g.value.start) / bt.value) === 0 ? (n(), i(x, { key: 0 }, [
|
|
3202
|
+
String(l.text).includes(`
|
|
3203
|
+
`) ? (n(), i("text", {
|
|
3204
|
+
key: 1,
|
|
3205
|
+
class: "vue-data-ui-time-label",
|
|
3206
|
+
"text-anchor": e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3207
|
+
"font-size": $.value.xAxis,
|
|
3208
|
+
fill: e.value.chart.grid.labels.xAxisLabels.color,
|
|
3209
|
+
transform: `translate(${c.value.left + c.value.width / A.value * u + c.value.width / A.value / 2}, ${c.value.bottom + $.value.xAxis * 1.5}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3210
|
+
style: _({
|
|
3211
|
+
cursor: Kt() ? "pointer" : "default"
|
|
3212
|
+
}),
|
|
3213
|
+
innerHTML: v(Ao)({
|
|
3214
|
+
content: String(l.text),
|
|
3215
|
+
fontSize: $.value.xAxis,
|
|
3216
|
+
fill: e.value.chart.grid.labels.xAxisLabels.color,
|
|
3217
|
+
x: 0,
|
|
3218
|
+
y: 0
|
|
3219
|
+
}),
|
|
3220
|
+
onClick: () => ea(l, u)
|
|
3221
|
+
}, null, 12, vi)) : (n(), i("text", {
|
|
3222
|
+
key: 0,
|
|
3223
|
+
class: "vue-data-ui-time-label",
|
|
3224
|
+
"text-anchor": e.value.chart.grid.labels.xAxisLabels.rotation > 0 ? "start" : e.value.chart.grid.labels.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
3225
|
+
"font-size": $.value.xAxis,
|
|
3226
|
+
fill: e.value.chart.grid.labels.xAxisLabels.color,
|
|
3227
|
+
transform: `translate(${c.value.left + c.value.width / A.value * u + c.value.width / A.value / 2}, ${c.value.bottom + $.value.xAxis * 1.5}), rotate(${e.value.chart.grid.labels.xAxisLabels.rotation})`,
|
|
3228
|
+
style: _({
|
|
3229
|
+
cursor: Kt() ? "pointer" : "default"
|
|
3230
|
+
}),
|
|
3231
|
+
onClick: () => ea(l, u)
|
|
3232
|
+
}, te(l.text || ""), 13, ci))
|
|
3233
|
+
], 64)) : f("", !0)
|
|
3234
|
+
]))), 128))
|
|
3235
|
+
], 512)) : f("", !0),
|
|
3236
|
+
fa.value.length && !y.value.isStacked ? (n(), i("g", di, [
|
|
3237
|
+
(n(!0), i(x, null, L(fa.value, (l) => (n(), i("g", {
|
|
3238
|
+
key: l.uid
|
|
3239
|
+
}, [
|
|
3240
|
+
l.yTop && l.show && isFinite(l.yTop) ? (n(), i("line", {
|
|
3241
|
+
key: 0,
|
|
3242
|
+
x1: l.x1,
|
|
3243
|
+
y1: l.yTop,
|
|
3244
|
+
x2: l.x2,
|
|
3245
|
+
y2: l.yTop,
|
|
3246
|
+
stroke: l.config.line.stroke,
|
|
3247
|
+
"stroke-width": l.config.line.strokeWidth,
|
|
3248
|
+
"stroke-dasharray": l.config.line.strokeDasharray,
|
|
3249
|
+
"stroke-linecap": "round",
|
|
3250
|
+
style: { animation: "none !important" }
|
|
3251
|
+
}, null, 8, hi)) : f("", !0),
|
|
3252
|
+
l.yBottom && l.show && isFinite(l.yBottom) ? (n(), i("line", {
|
|
3253
|
+
key: 1,
|
|
3254
|
+
x1: l.x1,
|
|
3255
|
+
y1: l.yBottom,
|
|
3256
|
+
x2: l.x2,
|
|
3257
|
+
y2: l.yBottom,
|
|
3258
|
+
stroke: l.config.line.stroke,
|
|
3259
|
+
"stroke-width": l.config.line.strokeWidth,
|
|
3260
|
+
"stroke-dasharray": l.config.line.strokeDasharray,
|
|
3261
|
+
"stroke-linecap": "round",
|
|
3262
|
+
style: { animation: "none !important" }
|
|
3263
|
+
}, null, 8, fi)) : f("", !0),
|
|
3264
|
+
l.hasArea && l.show && isFinite(l.yTop) && isFinite(l.yBottom) ? (n(), i("rect", {
|
|
3265
|
+
key: 2,
|
|
3266
|
+
y: Math.min(l.yTop, l.yBottom),
|
|
3267
|
+
x: l.x1,
|
|
3268
|
+
width: c.value.width,
|
|
3269
|
+
height: v(V)(l.areaHeight, 0),
|
|
3270
|
+
fill: v(Ze)(l.config.area.fill, l.config.area.opacity),
|
|
3271
|
+
style: { animation: "none !important" }
|
|
3272
|
+
}, null, 8, gi)) : f("", !0),
|
|
3273
|
+
l.config.label.text && l.show && isFinite(l._box.y) ? (n(), i("rect", _t({
|
|
3274
|
+
key: 3,
|
|
3275
|
+
class: "vue-ui-xy-annotation-label-box"
|
|
3276
|
+
}, { ref_for: !0 }, l._box, { style: { animation: "none !important", transition: "none !important" } }), null, 16)) : f("", !0),
|
|
3277
|
+
l.config.label.text && l.show && isFinite(l._text.y) ? (n(), i("text", {
|
|
3278
|
+
key: 4,
|
|
3279
|
+
id: l.id,
|
|
3280
|
+
class: "vue-ui-xy-annotation-label",
|
|
3281
|
+
x: l._text.x,
|
|
3282
|
+
y: l._text.y,
|
|
3283
|
+
"font-size": l.config.label.fontSize,
|
|
3284
|
+
fill: l.config.label.color,
|
|
3285
|
+
"text-anchor": l.config.label.textAnchor
|
|
3286
|
+
}, te(l.config.label.text), 9, mi)) : f("", !0)
|
|
3287
|
+
]))), 128))
|
|
3288
|
+
])) : f("", !0),
|
|
3289
|
+
e.value.chart.timeTag.show && (![null, void 0].includes(S.value) || ![null, void 0].includes(z.value)) ? (n(), i("g", xi, [
|
|
3290
|
+
(n(), i("foreignObject", {
|
|
3291
|
+
x: c.value.left + c.value.width / A.value * ((S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)) - 100 + c.value.width / A.value / 2,
|
|
3292
|
+
y: c.value.bottom,
|
|
3293
|
+
width: "200",
|
|
3294
|
+
height: "40",
|
|
3295
|
+
style: { overflow: "visible !important" }
|
|
3296
|
+
}, [
|
|
3297
|
+
b("div", {
|
|
3298
|
+
class: "vue-ui-xy-time-tag",
|
|
3299
|
+
style: _(`width: fit-content;margin: 0 auto;text-align:center;padding:3px 12px;background:${e.value.chart.timeTag.backgroundColor};color:${e.value.chart.timeTag.color};font-size:${e.value.chart.timeTag.fontSize}px`)
|
|
3300
|
+
}, te((K.value[(S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)] ? K.value[(S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)].text : "") || (S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)), 5)
|
|
3301
|
+
], 8, bi)),
|
|
3302
|
+
b("circle", {
|
|
3303
|
+
cx: c.value.left + c.value.width / A.value * ((S.value !== null ? S.value : 0) || (z.value !== null ? z.value : 0)) + c.value.width / A.value / 2,
|
|
3304
|
+
cy: c.value.bottom,
|
|
3305
|
+
r: e.value.chart.timeTag.circleMarker.radius,
|
|
3306
|
+
fill: e.value.chart.timeTag.circleMarker.color
|
|
3307
|
+
}, null, 8, pi)
|
|
3308
|
+
])) : f("", !0)
|
|
3309
|
+
])) : f("", !0),
|
|
3310
|
+
xl.value ? (n(), i("rect", il(_t({ key: 2 }, Rt.value)), null, 16)) : f("", !0),
|
|
3311
|
+
Q(t.$slots, "svg", { svg: gl.value }, void 0, !0)
|
|
3312
|
+
], 512)
|
|
3313
|
+
], 46, vu)),
|
|
3314
|
+
t.$slots.watermark ? (n(), i("div", yi, [
|
|
3315
|
+
Q(t.$slots, "watermark", il(wl({ isPrinting: v(et) || v(Xt) })), void 0, !0)
|
|
3316
|
+
])) : f("", !0),
|
|
3317
|
+
(n(!0), i(x, null, L(Ge.value, (l, u) => (n(), i(x, {
|
|
3318
|
+
key: `tag_line_${u}`
|
|
3319
|
+
}, [
|
|
3320
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
3321
|
+
key: `tag_line_${u}_${s}`
|
|
3322
|
+
}, [
|
|
3323
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag && l.useTag === "end" && e.value.line.tag.followValue ? (n(), i("div", {
|
|
3324
|
+
key: 0,
|
|
3325
|
+
ref_for: !0,
|
|
3326
|
+
ref: (o) => xt(u, s, o, "right", "line"),
|
|
3327
|
+
class: "vue-ui-xy-tag",
|
|
3328
|
+
"data-tag": "right",
|
|
3329
|
+
style: _({
|
|
3330
|
+
position: "fixed",
|
|
3331
|
+
top: v(Sl)({
|
|
3332
|
+
svgElement: ke.value,
|
|
3333
|
+
x: c.value.right + e.value.line.tag.fontSize / 1.5,
|
|
3334
|
+
y: a.y,
|
|
3335
|
+
element: He.value[`${u}_${s}_right_line`],
|
|
3336
|
+
position: "right"
|
|
3337
|
+
}).top + "px",
|
|
3338
|
+
left: v(Sl)({
|
|
3339
|
+
svgElement: ke.value,
|
|
3340
|
+
x: c.value.right + e.value.line.tag.fontSize / 1.5,
|
|
3341
|
+
y: a.y,
|
|
3342
|
+
element: He.value[`${u}_${s}_right_line`],
|
|
3343
|
+
position: "right"
|
|
3344
|
+
}).left + "px",
|
|
3345
|
+
height: "fit-content",
|
|
3346
|
+
width: "fit-content",
|
|
3347
|
+
background: l.color,
|
|
3348
|
+
color: v(qe)(l.color),
|
|
3349
|
+
padding: "0 6px",
|
|
3350
|
+
fontSize: e.value.line.tag.fontSize + "px",
|
|
3351
|
+
opacity: 1
|
|
3352
|
+
})
|
|
3353
|
+
}, [
|
|
3354
|
+
(n(), i("svg", ki, [
|
|
3355
|
+
b("path", {
|
|
3356
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
3357
|
+
fill: l.color,
|
|
3358
|
+
stroke: "none"
|
|
3359
|
+
}, null, 8, wi)
|
|
3360
|
+
])),
|
|
3361
|
+
b("div", {
|
|
3362
|
+
class: "vue-ui-xy-tag-content",
|
|
3363
|
+
innerHTML: v(pe)(
|
|
3364
|
+
e.value.line.tag.formatter,
|
|
3365
|
+
a.value,
|
|
3366
|
+
l.name,
|
|
3367
|
+
{
|
|
3368
|
+
datapoint: a,
|
|
3369
|
+
seriesIndex: s,
|
|
3370
|
+
serieName: l.name
|
|
3371
|
+
}
|
|
3372
|
+
)
|
|
3373
|
+
}, null, 8, Si)
|
|
3374
|
+
], 4)) : f("", !0),
|
|
3375
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag && l.useTag === "start" && e.value.line.tag.followValue ? (n(), i("div", {
|
|
3376
|
+
key: 1,
|
|
3377
|
+
ref_for: !0,
|
|
3378
|
+
ref: (o) => xt(u, s, o, "left", "line"),
|
|
3379
|
+
class: "vue-ui-xy-tag",
|
|
3380
|
+
"data-tag": "left",
|
|
3381
|
+
style: _({
|
|
3382
|
+
position: "fixed",
|
|
3383
|
+
top: v(Sl)({
|
|
3384
|
+
svgElement: ke.value,
|
|
3385
|
+
x: c.value.left - e.value.line.tag.fontSize / 1.5,
|
|
3386
|
+
y: a.y,
|
|
3387
|
+
element: He.value[`${u}_${s}_left_line`],
|
|
3388
|
+
position: "left"
|
|
3389
|
+
}).top + "px",
|
|
3390
|
+
left: v(Sl)({
|
|
3391
|
+
svgElement: ke.value,
|
|
3392
|
+
x: c.value.left - e.value.line.tag.fontSize / 1.5,
|
|
3393
|
+
y: a.y,
|
|
3394
|
+
element: He.value[`${u}_${s}_left_line`],
|
|
3395
|
+
position: "left"
|
|
3396
|
+
}).left + "px",
|
|
3397
|
+
height: "fit-content",
|
|
3398
|
+
width: "fit-content",
|
|
3399
|
+
background: l.color,
|
|
3400
|
+
color: v(qe)(l.color),
|
|
3401
|
+
padding: "0 6px",
|
|
3402
|
+
fontSize: e.value.line.tag.fontSize + "px",
|
|
3403
|
+
opacity: 1
|
|
3404
|
+
})
|
|
3405
|
+
}, [
|
|
3406
|
+
(n(), i("svg", $i, [
|
|
3407
|
+
b("path", {
|
|
3408
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
3409
|
+
fill: l.color,
|
|
3410
|
+
stroke: "none"
|
|
3411
|
+
}, null, 8, _i)
|
|
3412
|
+
])),
|
|
3413
|
+
b("div", {
|
|
3414
|
+
class: "vue-ui-xy-tag-content",
|
|
3415
|
+
innerHTML: v(pe)(
|
|
3416
|
+
e.value.line.tag.formatter,
|
|
3417
|
+
a.value,
|
|
3418
|
+
l.name,
|
|
3419
|
+
{
|
|
3420
|
+
datapoint: a,
|
|
3421
|
+
seriesIndex: s,
|
|
3422
|
+
serieName: l.name
|
|
3423
|
+
}
|
|
3424
|
+
)
|
|
3425
|
+
}, null, 8, Li)
|
|
3426
|
+
], 4)) : f("", !0)
|
|
3427
|
+
], 64))), 128))
|
|
3428
|
+
], 64))), 128)),
|
|
3429
|
+
(n(!0), i(x, null, L(el.value, (l, u) => (n(), i(x, {
|
|
3430
|
+
key: `tag_plot_${u}`
|
|
3431
|
+
}, [
|
|
3432
|
+
(n(!0), i(x, null, L(l.plots, (a, s) => (n(), i(x, {
|
|
3433
|
+
key: `tag_plot_${u}_${s}`
|
|
3434
|
+
}, [
|
|
3435
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag && l.useTag === "end" && e.value.plot.tag.followValue ? (n(), i("div", {
|
|
3436
|
+
key: 0,
|
|
3437
|
+
ref_for: !0,
|
|
3438
|
+
ref: (o) => xt(u, s, o, "right", "plot"),
|
|
3439
|
+
class: "vue-ui-xy-tag",
|
|
3440
|
+
"data-tag": "right",
|
|
3441
|
+
style: _({
|
|
3442
|
+
position: "fixed",
|
|
3443
|
+
top: v(Sl)({
|
|
3444
|
+
svgElement: ke.value,
|
|
3445
|
+
x: c.value.right + e.value.plot.tag.fontSize / 1.5,
|
|
3446
|
+
y: a.y,
|
|
3447
|
+
element: He.value[`${u}_${s}_right_plot`],
|
|
3448
|
+
position: "right"
|
|
3449
|
+
}).top + "px",
|
|
3450
|
+
left: v(Sl)({
|
|
3451
|
+
svgElement: ke.value,
|
|
3452
|
+
x: c.value.right + e.value.plot.tag.fontSize / 1.5,
|
|
3453
|
+
y: a.y,
|
|
3454
|
+
element: He.value[`${u}_${s}_right_plot`],
|
|
3455
|
+
position: "right"
|
|
3456
|
+
}).left + "px",
|
|
3457
|
+
height: "fit-content",
|
|
3458
|
+
width: "fit-content",
|
|
3459
|
+
background: l.color,
|
|
3460
|
+
color: v(qe)(l.color),
|
|
3461
|
+
padding: "0 6px",
|
|
3462
|
+
fontSize: e.value.plot.tag.fontSize + "px",
|
|
3463
|
+
opacity: 1
|
|
3464
|
+
})
|
|
3465
|
+
}, [
|
|
3466
|
+
(n(), i("svg", Mi, [
|
|
3467
|
+
b("path", {
|
|
3468
|
+
d: "M 0,10 10,0 10,20 Z",
|
|
3469
|
+
fill: l.color,
|
|
3470
|
+
stroke: "none"
|
|
3471
|
+
}, null, 8, Ai)
|
|
3472
|
+
])),
|
|
3473
|
+
b("div", {
|
|
3474
|
+
class: "vue-ui-xy-tag-content",
|
|
3475
|
+
innerHTML: v(pe)(
|
|
3476
|
+
e.value.plot.tag.formatter,
|
|
3477
|
+
a.value,
|
|
3478
|
+
l.name,
|
|
3479
|
+
{
|
|
3480
|
+
datapoint: a,
|
|
3481
|
+
seriesIndex: s,
|
|
3482
|
+
serieName: l.name
|
|
3483
|
+
}
|
|
3484
|
+
)
|
|
3485
|
+
}, null, 8, Ci)
|
|
3486
|
+
], 4)) : f("", !0),
|
|
3487
|
+
[z.value, S.value, Ce.value].includes(s) && l.useTag && l.useTag === "start" && e.value.plot.tag.followValue ? (n(), i("div", {
|
|
3488
|
+
key: 1,
|
|
3489
|
+
ref_for: !0,
|
|
3490
|
+
ref: (o) => xt(u, s, o, "left", "plot"),
|
|
3491
|
+
class: "vue-ui-xy-tag",
|
|
3492
|
+
"data-tag": "left",
|
|
3493
|
+
style: _({
|
|
3494
|
+
position: "fixed",
|
|
3495
|
+
top: v(Sl)({
|
|
3496
|
+
svgElement: ke.value,
|
|
3497
|
+
x: c.value.left - e.value.plot.tag.fontSize / 1.5,
|
|
3498
|
+
y: a.y,
|
|
3499
|
+
element: He.value[`${u}_${s}_left_plot`],
|
|
3500
|
+
position: "left"
|
|
3501
|
+
}).top + "px",
|
|
3502
|
+
left: v(Sl)({
|
|
3503
|
+
svgElement: ke.value,
|
|
3504
|
+
x: c.value.left - e.value.plot.tag.fontSize / 1.5,
|
|
3505
|
+
y: a.y,
|
|
3506
|
+
element: He.value[`${u}_${s}_left_plot`],
|
|
3507
|
+
position: "left"
|
|
3508
|
+
}).left + "px",
|
|
3509
|
+
height: "fit-content",
|
|
3510
|
+
width: "fit-content",
|
|
3511
|
+
background: l.color,
|
|
3512
|
+
color: v(qe)(l.color),
|
|
3513
|
+
padding: "0 6px",
|
|
3514
|
+
fontSize: e.value.plot.tag.fontSize + "px",
|
|
3515
|
+
opacity: 1
|
|
3516
|
+
})
|
|
3517
|
+
}, [
|
|
3518
|
+
(n(), i("svg", zi, [
|
|
3519
|
+
b("path", {
|
|
3520
|
+
d: "M 0,0 10,10 0,20 Z",
|
|
3521
|
+
fill: l.color,
|
|
3522
|
+
stroke: "none"
|
|
3523
|
+
}, null, 8, Ii)
|
|
3524
|
+
])),
|
|
3525
|
+
b("div", {
|
|
3526
|
+
class: "vue-ui-xy-tag-content",
|
|
3527
|
+
innerHTML: v(pe)(
|
|
3528
|
+
e.value.plot.tag.formatter,
|
|
3529
|
+
a.value,
|
|
3530
|
+
l.name,
|
|
3531
|
+
{
|
|
3532
|
+
datapoint: a,
|
|
3533
|
+
seriesIndex: s,
|
|
3534
|
+
serieName: l.name
|
|
3535
|
+
}
|
|
3536
|
+
)
|
|
3537
|
+
}, null, 8, Ti)
|
|
3538
|
+
], 4)) : f("", !0)
|
|
3539
|
+
], 64))), 128))
|
|
3540
|
+
], 64))), 128)),
|
|
3541
|
+
e.value.chart.zoom.preview.enable ? (n(), i(x, { key: 5 }, [
|
|
3542
|
+
e.value.chart.zoom.show && w.value > 6 && Qe.value ? (n(), Be(su, {
|
|
3543
|
+
ref_key: "chartSlicer",
|
|
3544
|
+
ref: Ae,
|
|
3545
|
+
key: `slicer_${ye.value}`,
|
|
3546
|
+
background: e.value.chart.zoom.color,
|
|
3547
|
+
fontSize: e.value.chart.zoom.fontSize,
|
|
3548
|
+
useResetSlot: e.value.chart.zoom.useResetSlot,
|
|
3549
|
+
labelLeft: K.value[0] ? K.value[0].text : "",
|
|
3550
|
+
labelRight: K.value.at(-1) ? K.value.at(-1).text : "",
|
|
3551
|
+
textColor: e.value.chart.color,
|
|
3552
|
+
inputColor: e.value.chart.zoom.color,
|
|
3553
|
+
selectColor: e.value.chart.zoom.highlightColor,
|
|
3554
|
+
borderColor: e.value.chart.backgroundColor,
|
|
3555
|
+
minimap: da.value,
|
|
3556
|
+
smoothMinimap: e.value.chart.zoom.minimap.smooth,
|
|
3557
|
+
minimapSelectedColor: e.value.chart.zoom.minimap.selectedColor,
|
|
3558
|
+
minimapSelectionRadius: e.value.chart.zoom.minimap.selectionRadius,
|
|
3559
|
+
minimapLineColor: e.value.chart.zoom.minimap.lineColor,
|
|
3560
|
+
minimapSelectedColorOpacity: e.value.chart.zoom.minimap.selectedColorOpacity,
|
|
3561
|
+
minimapSelectedIndex: S.value,
|
|
3562
|
+
minimapIndicatorColor: e.value.chart.zoom.minimap.indicatorColor,
|
|
3563
|
+
verticalHandles: e.value.chart.zoom.minimap.verticalHandles,
|
|
3564
|
+
max: w.value,
|
|
3565
|
+
min: 0,
|
|
3566
|
+
valueStart: g.value.start,
|
|
3567
|
+
valueEnd: g.value.end,
|
|
3568
|
+
start: g.value.start,
|
|
3569
|
+
"onUpdate:start": r[1] || (r[1] = (l) => g.value.start = l),
|
|
3570
|
+
end: g.value.end,
|
|
3571
|
+
"onUpdate:end": r[2] || (r[2] = (l) => g.value.end = l),
|
|
3572
|
+
refreshStartPoint: e.value.chart.zoom.startIndex !== null ? e.value.chart.zoom.startIndex : 0,
|
|
3573
|
+
refreshEndPoint: e.value.chart.zoom.endIndex !== null ? e.value.chart.zoom.endIndex + 1 : Math.max(...C.dataset.map((l) => v(Ue)({ data: l.series, threshold: e.value.downsample.threshold }).length)),
|
|
3574
|
+
enableRangeHandles: e.value.chart.zoom.enableRangeHandles,
|
|
3575
|
+
enableSelectionDrag: e.value.chart.zoom.enableSelectionDrag,
|
|
3576
|
+
onReset: aa,
|
|
3577
|
+
onTrapMouse: la,
|
|
3578
|
+
onFutureStart: r[3] || (r[3] = (l) => ft("start", l)),
|
|
3579
|
+
onFutureEnd: r[4] || (r[4] = (l) => ft("end", l)),
|
|
3580
|
+
timeLabels: Ya.value,
|
|
3581
|
+
isPreview: xl.value
|
|
3582
|
+
}, {
|
|
3583
|
+
"reset-action": me(({ reset: l }) => [
|
|
3584
|
+
Q(t.$slots, "reset-action", il(wl({ reset: l })), void 0, !0)
|
|
3585
|
+
]),
|
|
3586
|
+
_: 3
|
|
3587
|
+
}, 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", "timeLabels", "isPreview"])) : f("", !0)
|
|
3588
|
+
], 64)) : (n(), i(x, { key: 6 }, [
|
|
3589
|
+
e.value.chart.zoom.show && w.value > 6 && Qe.value ? (n(), Be(Bo, {
|
|
3590
|
+
ref_key: "chartSlicer",
|
|
3591
|
+
ref: Ae,
|
|
3592
|
+
key: `slicer_${ye.value}`,
|
|
3593
|
+
background: e.value.chart.zoom.color,
|
|
3594
|
+
fontSize: e.value.chart.zoom.fontSize,
|
|
3595
|
+
useResetSlot: e.value.chart.zoom.useResetSlot,
|
|
3596
|
+
labelLeft: K.value[0] ? K.value[0].text : "",
|
|
3597
|
+
labelRight: K.value.at(-1) ? K.value.at(-1).text : "",
|
|
3598
|
+
textColor: e.value.chart.color,
|
|
3599
|
+
inputColor: e.value.chart.zoom.color,
|
|
3600
|
+
selectColor: e.value.chart.zoom.highlightColor,
|
|
3601
|
+
borderColor: e.value.chart.backgroundColor,
|
|
3602
|
+
minimap: da.value,
|
|
3603
|
+
smoothMinimap: e.value.chart.zoom.minimap.smooth,
|
|
3604
|
+
minimapSelectedColor: e.value.chart.zoom.minimap.selectedColor,
|
|
3605
|
+
minimapSelectionRadius: e.value.chart.zoom.minimap.selectionRadius,
|
|
3606
|
+
minimapLineColor: e.value.chart.zoom.minimap.lineColor,
|
|
3607
|
+
minimapSelectedColorOpacity: e.value.chart.zoom.minimap.selectedColorOpacity,
|
|
3608
|
+
minimapSelectedIndex: S.value,
|
|
3609
|
+
minimapIndicatorColor: e.value.chart.zoom.minimap.indicatorColor,
|
|
3610
|
+
verticalHandles: e.value.chart.zoom.minimap.verticalHandles,
|
|
3611
|
+
max: w.value,
|
|
3612
|
+
min: 0,
|
|
3613
|
+
valueStart: g.value.start,
|
|
3614
|
+
valueEnd: g.value.end,
|
|
3615
|
+
start: g.value.start,
|
|
3616
|
+
"onUpdate:start": r[5] || (r[5] = (l) => g.value.start = l),
|
|
3617
|
+
end: g.value.end,
|
|
3618
|
+
"onUpdate:end": r[6] || (r[6] = (l) => g.value.end = l),
|
|
3619
|
+
refreshStartPoint: e.value.chart.zoom.startIndex !== null ? e.value.chart.zoom.startIndex : 0,
|
|
3620
|
+
refreshEndPoint: e.value.chart.zoom.endIndex !== null ? e.value.chart.zoom.endIndex + 1 : Math.max(...C.dataset.map((l) => v(Ue)({ data: l.series, threshold: e.value.downsample.threshold }).length)),
|
|
3621
|
+
enableRangeHandles: e.value.chart.zoom.enableRangeHandles,
|
|
3622
|
+
enableSelectionDrag: e.value.chart.zoom.enableSelectionDrag,
|
|
3623
|
+
onReset: aa,
|
|
3624
|
+
onTrapMouse: la
|
|
3625
|
+
}, {
|
|
3626
|
+
"reset-action": me(({ reset: l }) => [
|
|
3627
|
+
Q(t.$slots, "reset-action", il(wl({ reset: l })), void 0, !0)
|
|
3628
|
+
]),
|
|
3629
|
+
_: 3
|
|
3630
|
+
}, 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"])) : f("", !0)
|
|
3631
|
+
], 64)),
|
|
3632
|
+
b("div", {
|
|
3633
|
+
id: `legend-bottom-${X.value}`
|
|
3634
|
+
}, null, 8, Ni),
|
|
3635
|
+
ht.value ? (n(), Be(fo, {
|
|
3636
|
+
key: 7,
|
|
3637
|
+
to: e.value.chart.legend.position === "top" ? `#legend-top-${X.value}` : `#legend-bottom-${X.value}`
|
|
3638
|
+
}, [
|
|
3639
|
+
e.value.chart.legend.show ? (n(), i("div", {
|
|
3640
|
+
key: 0,
|
|
3641
|
+
ref_key: "chartLegend",
|
|
3642
|
+
ref: cl,
|
|
3643
|
+
class: "vue-ui-xy-legend",
|
|
3644
|
+
style: _(`font-size:${e.value.chart.legend.fontSize}px`)
|
|
3645
|
+
}, [
|
|
3646
|
+
(n(!0), i(x, null, L(je.value, (l, u) => (n(), i("div", {
|
|
3647
|
+
key: `div_legend_item_${u}`,
|
|
3648
|
+
onClick: (a) => ca(l),
|
|
3649
|
+
class: Ne({ "vue-ui-xy-legend-item-alone": je.value.length === 1, "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": ae.value.includes(l.id) })
|
|
3650
|
+
}, [
|
|
3651
|
+
hl.value[l.type] === "line" ? (n(), i("svg", Ri, [
|
|
3652
|
+
b("rect", {
|
|
3653
|
+
x: "0",
|
|
3654
|
+
y: "7.5",
|
|
3655
|
+
rx: "1.5",
|
|
3656
|
+
stroke: e.value.chart.backgroundColor,
|
|
3657
|
+
"stroke-width": 0.5,
|
|
3658
|
+
height: "3",
|
|
3659
|
+
width: "20",
|
|
3660
|
+
fill: l.color
|
|
3661
|
+
}, null, 8, Pi),
|
|
3662
|
+
ql(At, {
|
|
3663
|
+
plot: { x: 10, y: 9 },
|
|
3664
|
+
radius: 4,
|
|
3665
|
+
color: l.color,
|
|
3666
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle",
|
|
3667
|
+
stroke: e.value.chart.backgroundColor,
|
|
3668
|
+
strokeWidth: 0.5
|
|
3669
|
+
}, null, 8, ["color", "shape", "stroke"])
|
|
3670
|
+
])) : hl.value[l.type] === "bar" ? (n(), i("svg", Hi, [
|
|
3671
|
+
hl.value[l.type] === "bar" && t.$slots.pattern ? (n(), i("rect", {
|
|
3672
|
+
key: 0,
|
|
3673
|
+
x: "0",
|
|
3674
|
+
y: "0",
|
|
3675
|
+
rx: "1",
|
|
3676
|
+
height: "40",
|
|
3677
|
+
width: "40",
|
|
3678
|
+
stroke: "none",
|
|
3679
|
+
fill: l.color
|
|
3680
|
+
}, null, 8, Vi)) : f("", !0),
|
|
3681
|
+
hl.value[l.type] === "bar" ? (n(), i("rect", {
|
|
3682
|
+
key: 1,
|
|
3683
|
+
x: "0",
|
|
3684
|
+
y: "0",
|
|
3685
|
+
rx: "1",
|
|
3686
|
+
height: "40",
|
|
3687
|
+
width: "40",
|
|
3688
|
+
stroke: "none",
|
|
3689
|
+
fill: t.$slots.pattern ? `url(#pattern_${X.value}_${l.slotAbsoluteIndex})` : l.color
|
|
3690
|
+
}, null, 8, Ei)) : f("", !0)
|
|
3691
|
+
])) : (n(), i("svg", Bi, [
|
|
3692
|
+
ql(At, {
|
|
3693
|
+
plot: { x: 6, y: 6 },
|
|
3694
|
+
radius: 5,
|
|
3695
|
+
color: l.color,
|
|
3696
|
+
shape: ["triangle", "square", "diamond", "pentagon", "hexagon", "star"].includes(l.shape) ? l.shape : "circle"
|
|
3697
|
+
}, null, 8, ["color", "shape"])
|
|
3698
|
+
])),
|
|
3699
|
+
b("span", {
|
|
3700
|
+
style: _(`color:${e.value.chart.legend.color}`)
|
|
3701
|
+
}, te(l.name), 5)
|
|
3702
|
+
], 10, Oi))), 128))
|
|
3703
|
+
], 4)) : (n(), i("div", {
|
|
3704
|
+
key: 1,
|
|
3705
|
+
ref_key: "chartLegend",
|
|
3706
|
+
ref: cl
|
|
3707
|
+
}, [
|
|
3708
|
+
Q(t.$slots, "legend", { legend: je.value }, void 0, !0)
|
|
3709
|
+
], 512))
|
|
3710
|
+
], 8, ["to"])) : f("", !0),
|
|
3711
|
+
t.$slots.source ? (n(), i("div", {
|
|
3712
|
+
key: 8,
|
|
3713
|
+
ref_key: "source",
|
|
3714
|
+
ref: _l,
|
|
3715
|
+
dir: "auto"
|
|
3716
|
+
}, [
|
|
3717
|
+
Q(t.$slots, "source", {}, void 0, !0)
|
|
3718
|
+
], 512)) : f("", !0),
|
|
3719
|
+
ql(v(de), {
|
|
3720
|
+
show: y.value.showTooltip && El.value,
|
|
3721
|
+
backgroundColor: e.value.chart.tooltip.backgroundColor,
|
|
3722
|
+
color: e.value.chart.tooltip.color,
|
|
3723
|
+
fontSize: e.value.chart.tooltip.fontSize,
|
|
3724
|
+
borderRadius: e.value.chart.tooltip.borderRadius,
|
|
3725
|
+
borderColor: e.value.chart.tooltip.borderColor,
|
|
3726
|
+
borderWidth: e.value.chart.tooltip.borderWidth,
|
|
3727
|
+
backgroundOpacity: e.value.chart.tooltip.backgroundOpacity,
|
|
3728
|
+
position: e.value.chart.tooltip.position,
|
|
3729
|
+
offsetY: e.value.chart.tooltip.offsetY,
|
|
3730
|
+
parent: t.$refs.chart,
|
|
3731
|
+
content: oo.value,
|
|
3732
|
+
isFullscreen: ul.value,
|
|
3733
|
+
isCustom: e.value.chart.tooltip.customFormat && typeof e.value.chart.tooltip.customFormat == "function",
|
|
3734
|
+
smooth: e.value.chart.tooltip.smooth,
|
|
3735
|
+
backdropFilter: e.value.chart.tooltip.backdropFilter
|
|
3736
|
+
}, {
|
|
3737
|
+
"tooltip-before": me(() => [
|
|
3738
|
+
Q(t.$slots, "tooltip-before", il(wl({ ...ma.value })), void 0, !0)
|
|
3739
|
+
]),
|
|
3740
|
+
"tooltip-after": me(() => [
|
|
3741
|
+
Q(t.$slots, "tooltip-after", il(wl({ ...ma.value })), void 0, !0)
|
|
3742
|
+
]),
|
|
3743
|
+
_: 3
|
|
3744
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
3745
|
+
Qe.value ? (n(), Be(v(Rl), {
|
|
3746
|
+
key: 9,
|
|
3747
|
+
hideDetails: "",
|
|
3748
|
+
config: {
|
|
3749
|
+
open: y.value.showTable,
|
|
3750
|
+
maxHeight: 1e4,
|
|
3751
|
+
body: {
|
|
3752
|
+
backgroundColor: e.value.chart.backgroundColor,
|
|
3753
|
+
color: e.value.chart.color
|
|
3754
|
+
},
|
|
3755
|
+
head: {
|
|
3756
|
+
backgroundColor: e.value.chart.backgroundColor,
|
|
3757
|
+
color: e.value.chart.color
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
}, {
|
|
3761
|
+
content: me(() => [
|
|
3762
|
+
b("div", {
|
|
3763
|
+
style: _(`${v(et) ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
|
|
3764
|
+
}, [
|
|
3765
|
+
b("div", Fi, [
|
|
3766
|
+
Yt(b("input", {
|
|
3767
|
+
type: "checkbox",
|
|
3768
|
+
"onUpdate:modelValue": r[7] || (r[7] = (l) => _e.value = l)
|
|
3769
|
+
}, null, 512), [
|
|
3770
|
+
[go, _e.value]
|
|
3771
|
+
]),
|
|
3772
|
+
b("div", {
|
|
3773
|
+
onClick: r[8] || (r[8] = (l) => _e.value = !_e.value),
|
|
3774
|
+
style: { cursor: "pointer" }
|
|
3775
|
+
}, [
|
|
3776
|
+
ql(v($l), {
|
|
3777
|
+
name: "chartLine",
|
|
3778
|
+
size: 20,
|
|
3779
|
+
stroke: e.value.chart.color
|
|
3780
|
+
}, null, 8, ["stroke"])
|
|
3781
|
+
])
|
|
3782
|
+
]),
|
|
3783
|
+
_e.value ? (n(), Be(v(Jl), {
|
|
3784
|
+
key: `sparkline_${Pe.value}`,
|
|
3785
|
+
dataset: lo.value,
|
|
3786
|
+
config: to.value
|
|
3787
|
+
}, null, 8, ["dataset", "config"])) : (n(), Be(v(Oe), {
|
|
3788
|
+
key: `table_${dt.value}`,
|
|
3789
|
+
colNames: $t.value.colNames,
|
|
3790
|
+
head: $t.value.head,
|
|
3791
|
+
body: $t.value.body,
|
|
3792
|
+
config: $t.value.config,
|
|
3793
|
+
title: `${e.value.chart.title.text}${e.value.chart.title.subtitle.text ? ` : ${e.value.chart.title.subtitle.text}` : ""}`,
|
|
3794
|
+
onClose: r[9] || (r[9] = (l) => y.value.showTable = !1)
|
|
3795
|
+
}, {
|
|
3796
|
+
th: me(({ th: l }) => [
|
|
3797
|
+
b("div", { innerHTML: l }, null, 8, Wi)
|
|
3798
|
+
]),
|
|
3799
|
+
td: me(({ td: l }) => [
|
|
3800
|
+
mo(te(isNaN(Number(l)) ? l : v(Fe)({
|
|
3801
|
+
p: e.value.chart.labels.prefix,
|
|
3802
|
+
v: l,
|
|
3803
|
+
s: e.value.chart.labels.suffix,
|
|
3804
|
+
r: e.value.table.rounding
|
|
3805
|
+
})), 1)
|
|
3806
|
+
]),
|
|
3807
|
+
_: 1
|
|
3808
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
3809
|
+
], 4)
|
|
3810
|
+
]),
|
|
3811
|
+
_: 1
|
|
3812
|
+
}, 8, ["config"])) : f("", !0),
|
|
3813
|
+
v(B) ? (n(), Be(Po, { key: 10 })) : f("", !0)
|
|
3814
|
+
], 46, ru));
|
|
3815
|
+
}
|
|
3816
|
+
}, os = /* @__PURE__ */ Ra(Yi, [["__scopeId", "data-v-7b7b831a"]]);
|
|
3817
|
+
export {
|
|
3818
|
+
os as default
|
|
3819
|
+
};
|