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