@mobileaction/action-kit 1.59.0-beta.20260824072801 → 1.59.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-kit.mjs +1 -1
- package/dist/annotations-BotVbqYk.js +1275 -0
- package/dist/components/badge/stories/basic.stories.d.ts +2 -2
- package/dist/components/badge/stories/blue.stories.d.ts +2 -2
- package/dist/components/badge/stories/dark.stories.d.ts +2 -2
- package/dist/components/badge/stories/green.stories.d.ts +2 -2
- package/dist/components/badge/stories/orange.stories.d.ts +2 -2
- package/dist/components/badge/stories/pink.stories.d.ts +2 -2
- package/dist/components/badge/stories/purple.stories.d.ts +2 -2
- package/dist/components/badge/stories/red.stories.d.ts +2 -2
- package/dist/components/badge/stories/teal.stories.d.ts +2 -2
- package/dist/components/badge/stories/yellow.stories.d.ts +2 -2
- package/dist/components/cascader/stories/default.stories.d.ts +16 -16
- package/dist/export-data-BR_-2Q3f.js +332 -0
- package/dist/exporting-DR0s0ify.js +601 -0
- package/dist/funnel-DL7kiG31.js +134 -0
- package/dist/{index-6Py-WZ9e.js → index-CBkR2AwI.js} +2355 -2349
- package/dist/map-CMb83okh.js +1731 -0
- package/dist/offline-exporting-YDP5IlMX.js +192 -0
- package/dist/stock-CBVAQBFc.js +2054 -0
- package/dist/venn-D6eKe_-O.js +453 -0
- package/dist/wordcloud-t7GdM2hM.js +227 -0
- package/package.json +30 -15
- package/dist/annotations-DSkf_ftr.js +0 -1496
- package/dist/export-data-DCTe5P_S.js +0 -404
- package/dist/exporting-DQGEobM-.js +0 -739
- package/dist/funnel-CqFEWYxB.js +0 -201
- package/dist/map-DAB70ark.js +0 -1928
- package/dist/offline-exporting-aCzMDQAJ.js +0 -203
- package/dist/stock-CYJWuEFp.js +0 -2216
- package/dist/venn-Dec0FzLN.js +0 -498
- package/dist/wordcloud-CjsQdxnL.js +0 -268
package/dist/stock-CYJWuEFp.js
DELETED
|
@@ -1,2216 +0,0 @@
|
|
|
1
|
-
import { g as Us } from "./index-6Py-WZ9e.js";
|
|
2
|
-
function Vs(vt, Pt) {
|
|
3
|
-
for (var j = 0; j < Pt.length; j++) {
|
|
4
|
-
const st = Pt[j];
|
|
5
|
-
if (typeof st != "string" && !Array.isArray(st)) {
|
|
6
|
-
for (const lt in st)
|
|
7
|
-
if (lt !== "default" && !(lt in vt)) {
|
|
8
|
-
const yt = Object.getOwnPropertyDescriptor(st, lt);
|
|
9
|
-
yt && Object.defineProperty(vt, lt, yt.get ? yt : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => st[lt]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(vt, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var Ct = { exports: {} }, _s = Ct.exports, Ze;
|
|
19
|
-
function js() {
|
|
20
|
-
return Ze || (Ze = 1, (function(vt, Pt) {
|
|
21
|
-
/**
|
|
22
|
-
* Highstock JS v12.6.0 (2026-04-13)
|
|
23
|
-
* @module highcharts/modules/stock
|
|
24
|
-
* @requires highcharts
|
|
25
|
-
*
|
|
26
|
-
* Highcharts Stock as a plugin for Highcharts
|
|
27
|
-
*
|
|
28
|
-
* (c) 2010-2026 Highsoft AS
|
|
29
|
-
* Author: Torstein Hønsi
|
|
30
|
-
*
|
|
31
|
-
* A commercial license may be required depending on use.
|
|
32
|
-
* See www.highcharts.com/license
|
|
33
|
-
*/
|
|
34
|
-
(function(j, st) {
|
|
35
|
-
vt.exports = st(j._Highcharts, j._Highcharts.Point, j._Highcharts.Series, j._Highcharts.Axis, j._Highcharts.Color, j._Highcharts.SeriesRegistry, j._Highcharts.RendererRegistry, j._Highcharts.SVGElement, j._Highcharts.Templating, j._Highcharts.Chart, j._Highcharts.Series.types.column, j._Highcharts.StackItem);
|
|
36
|
-
})("u" < typeof window ? _s : window, (j, st, lt, yt, qe, $e, Je, Qe, ti, ei, ii, si) => (() => {
|
|
37
|
-
let Dt, Rt, re, Gt;
|
|
38
|
-
var It, zt, Lt, Wt, Xt, Ht, Yt, oi = { 28: (s) => {
|
|
39
|
-
s.exports = Qe;
|
|
40
|
-
}, 184: (s) => {
|
|
41
|
-
s.exports = si;
|
|
42
|
-
}, 260: (s) => {
|
|
43
|
-
s.exports = st;
|
|
44
|
-
}, 448: (s) => {
|
|
45
|
-
s.exports = ii;
|
|
46
|
-
}, 512: (s) => {
|
|
47
|
-
s.exports = $e;
|
|
48
|
-
}, 532: (s) => {
|
|
49
|
-
s.exports = yt;
|
|
50
|
-
}, 608: (s) => {
|
|
51
|
-
s.exports = Je;
|
|
52
|
-
}, 620: (s) => {
|
|
53
|
-
s.exports = qe;
|
|
54
|
-
}, 820: (s) => {
|
|
55
|
-
s.exports = lt;
|
|
56
|
-
}, 944: (s) => {
|
|
57
|
-
s.exports = j;
|
|
58
|
-
}, 960: (s) => {
|
|
59
|
-
s.exports = ei;
|
|
60
|
-
}, 984: (s) => {
|
|
61
|
-
s.exports = ti;
|
|
62
|
-
} }, ne = {};
|
|
63
|
-
function H(s) {
|
|
64
|
-
var t = ne[s];
|
|
65
|
-
if (t !== void 0) return t.exports;
|
|
66
|
-
var e = ne[s] = { exports: {} };
|
|
67
|
-
return oi[s](e, e.exports, H), e.exports;
|
|
68
|
-
}
|
|
69
|
-
H.n = (s) => {
|
|
70
|
-
var t = s && s.__esModule ? () => s.default : () => s;
|
|
71
|
-
return H.d(t, { a: t }), t;
|
|
72
|
-
}, H.d = (s, t) => {
|
|
73
|
-
for (var e in t) H.o(t, e) && !H.o(s, e) && Object.defineProperty(s, e, { enumerable: !0, get: t[e] });
|
|
74
|
-
}, H.o = (s, t) => Object.prototype.hasOwnProperty.call(s, t);
|
|
75
|
-
var ae = {};
|
|
76
|
-
H.d(ae, { default: () => Ns });
|
|
77
|
-
var q = H(944), W = H.n(q), ri = H(260), ni = H.n(ri), ai = H(820), le = H.n(ai);
|
|
78
|
-
let { doc: Ft, win: Ks } = W();
|
|
79
|
-
function B(s, t, e, i = {}) {
|
|
80
|
-
let o = typeof s == "function" && s.prototype || s;
|
|
81
|
-
Object.hasOwnProperty.call(o, "hcEvents") || (o.hcEvents = {});
|
|
82
|
-
let r = o.hcEvents;
|
|
83
|
-
W().Point && s instanceof W().Point && s.series && s.series.chart && (s.series.chart.runTrackerClick = !0);
|
|
84
|
-
let d = s.addEventListener;
|
|
85
|
-
d && d.call(s, t, e, !!W().supportsPassiveEvents && { passive: i.passive === void 0 ? t.indexOf("touch") !== -1 : i.passive, capture: !1 }), r[t] || (r[t] = []);
|
|
86
|
-
let h = { fn: e, order: typeof i.order == "number" ? i.order : 1 / 0 };
|
|
87
|
-
return r[t].push(h), r[t].sort((u, c) => u.order - c.order), function() {
|
|
88
|
-
gt(s, t, e);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function he(s) {
|
|
92
|
-
let t = s.length, e = s[0];
|
|
93
|
-
for (; t--; ) s[t] < e && (e = s[t]);
|
|
94
|
-
return e;
|
|
95
|
-
}
|
|
96
|
-
function de(s) {
|
|
97
|
-
let t = s.length, e = s[0];
|
|
98
|
-
for (; t--; ) s[t] > e && (e = s[t]);
|
|
99
|
-
return e;
|
|
100
|
-
}
|
|
101
|
-
function Nt(s, t, e) {
|
|
102
|
-
return s > t ? s < e ? s : e : t;
|
|
103
|
-
}
|
|
104
|
-
function U(s, t) {
|
|
105
|
-
return s > 1e14 ? s : parseFloat(s.toPrecision(t || 14));
|
|
106
|
-
}
|
|
107
|
-
function Mt(s, t, e, i, o) {
|
|
108
|
-
let r = Ft.createElement(s);
|
|
109
|
-
return t && F(r, t), e && et(r, e), i && i.appendChild(r), r;
|
|
110
|
-
}
|
|
111
|
-
function Q(s, t = 0, e) {
|
|
112
|
-
let i = t % 2 / 2, o = 1;
|
|
113
|
-
return (Math.round(s * o - i) + i) * o;
|
|
114
|
-
}
|
|
115
|
-
function et(s, t) {
|
|
116
|
-
F(s.style, t);
|
|
117
|
-
}
|
|
118
|
-
function G(s) {
|
|
119
|
-
return s != null;
|
|
120
|
-
}
|
|
121
|
-
function Ut(s, t, e) {
|
|
122
|
-
it(s, function(i, o) {
|
|
123
|
-
i !== t && i?.destroy && i.destroy(), (i?.destroy || !0) && delete s[o];
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function pt(s, t) {
|
|
127
|
-
let e = s.length;
|
|
128
|
-
for (; e--; ) if (s[e] === t) {
|
|
129
|
-
s.splice(e, 1);
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function F(s, t) {
|
|
134
|
-
let e;
|
|
135
|
-
for (e in s || (s = {}), t) s[e] = t[e];
|
|
136
|
-
return s;
|
|
137
|
-
}
|
|
138
|
-
function _(s, t, e, i) {
|
|
139
|
-
if (e = e || {}, Ft?.createEvent && (s.dispatchEvent || s.fireEvent && s !== W())) {
|
|
140
|
-
let o = Ft.createEvent("Events");
|
|
141
|
-
o.initEvent(t, !0, !0), e = F(o, e), s.dispatchEvent ? s.dispatchEvent(e) : s.fireEvent(t, e);
|
|
142
|
-
} else if (s.hcEvents) {
|
|
143
|
-
e.target || F(e, { preventDefault: function() {
|
|
144
|
-
e.defaultPrevented = !0;
|
|
145
|
-
}, target: s, type: t });
|
|
146
|
-
let o = [], r = s, d = !1;
|
|
147
|
-
for (; r.hcEvents; ) Object.hasOwnProperty.call(r, "hcEvents") && r.hcEvents[t] && (o.length && (d = !0), o.unshift.apply(o, r.hcEvents[t])), r = Object.getPrototypeOf(r);
|
|
148
|
-
d && o.sort((h, u) => h.order - u.order), o.forEach((h) => {
|
|
149
|
-
h.fn.call(s, e, s) === !1 && e.preventDefault();
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function pe(s) {
|
|
154
|
-
return Math.pow(10, Math.floor(Math.log(s) / Math.LN10));
|
|
155
|
-
}
|
|
156
|
-
let Vt = Array.prototype.find ? function(s, t) {
|
|
157
|
-
return s.find(t);
|
|
158
|
-
} : function(s, t) {
|
|
159
|
-
let e, i = s.length;
|
|
160
|
-
for (e = 0; e < i; e++) if (t(s[e], e)) return s[e];
|
|
161
|
-
};
|
|
162
|
-
function ue(s) {
|
|
163
|
-
return wt(s) && typeof s.nodeType == "number";
|
|
164
|
-
}
|
|
165
|
-
function O(s) {
|
|
166
|
-
return typeof s == "number" && !isNaN(s) && s < 1 / 0 && s > -1 / 0;
|
|
167
|
-
}
|
|
168
|
-
function ut(s) {
|
|
169
|
-
return typeof s == "string";
|
|
170
|
-
}
|
|
171
|
-
function ct(s) {
|
|
172
|
-
let t = Object.prototype.toString.call(s);
|
|
173
|
-
return t === "[object Array]" || t === "[object Array Iterator]";
|
|
174
|
-
}
|
|
175
|
-
function wt(s, t) {
|
|
176
|
-
return !!s && typeof s == "object" && (!t || !ct(s));
|
|
177
|
-
}
|
|
178
|
-
function X(s, ...t) {
|
|
179
|
-
let e, i = [s, ...t], o = {}, r = function(h, u) {
|
|
180
|
-
return typeof h != "object" && (h = {}), it(u, function(c, g) {
|
|
181
|
-
if (g !== "__proto__" && g !== "constructor") {
|
|
182
|
-
let p;
|
|
183
|
-
!wt(c, !0) || (p = c?.constructor, wt(c, !0) && !ue(c) && p?.name && p.name !== "Object") || ue(c) ? h[g] = u[g] : h[g] = r(h[g] || {}, c);
|
|
184
|
-
}
|
|
185
|
-
}), h;
|
|
186
|
-
};
|
|
187
|
-
s === !0 && (o = i[1], i = Array.prototype.slice.call(i, 2));
|
|
188
|
-
let d = i.length;
|
|
189
|
-
for (e = 0; e < d; e++) o = r(o, i[e]);
|
|
190
|
-
return o;
|
|
191
|
-
}
|
|
192
|
-
function it(s, t, e) {
|
|
193
|
-
for (let i in s) Object.hasOwnProperty.call(s, i) && t.call(e || s[i], s[i], i, s);
|
|
194
|
-
}
|
|
195
|
-
function D() {
|
|
196
|
-
let s = arguments, t = s.length;
|
|
197
|
-
for (let e = 0; e < t; e++) {
|
|
198
|
-
let i = s[e];
|
|
199
|
-
if (i != null) return i;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function rt(s, t) {
|
|
203
|
-
return 0 > s.indexOf(t) && !!s.push(t);
|
|
204
|
-
}
|
|
205
|
-
function gt(s, t, e) {
|
|
206
|
-
function i(d, h) {
|
|
207
|
-
let u = s.removeEventListener;
|
|
208
|
-
u && u.call(s, d, h, !1);
|
|
209
|
-
}
|
|
210
|
-
function o(d) {
|
|
211
|
-
let h, u;
|
|
212
|
-
s.nodeName && (t ? (h = {})[t] = !0 : h = d, it(h, function(c, g) {
|
|
213
|
-
if (d[g]) for (u = d[g].length; u--; ) i(g, d[g][u].fn);
|
|
214
|
-
}));
|
|
215
|
-
}
|
|
216
|
-
let r = typeof s == "function" && s.prototype || s;
|
|
217
|
-
if (Object.hasOwnProperty.call(r, "hcEvents")) {
|
|
218
|
-
let d = r.hcEvents;
|
|
219
|
-
if (t) {
|
|
220
|
-
let h = d[t] || [];
|
|
221
|
-
e ? (d[t] = h.filter(function(u) {
|
|
222
|
-
return e !== u.fn;
|
|
223
|
-
}), i(t, e)) : (o(d), d[t] = []);
|
|
224
|
-
} else o(d), delete r.hcEvents;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function ft(s) {
|
|
228
|
-
return ct(s) ? s : [s];
|
|
229
|
-
}
|
|
230
|
-
let { tooltipFormatter: li } = ni().prototype;
|
|
231
|
-
(function(s) {
|
|
232
|
-
function t(p, n, a) {
|
|
233
|
-
!this.isXAxis && (this.series.forEach(function(l) {
|
|
234
|
-
p === "compare" && typeof n != "boolean" ? l.setCompare(n, !1) : p !== "cumulative" || ut(n) || l.setCumulative(n, !1);
|
|
235
|
-
}), D(a, !0) && this.chart.redraw());
|
|
236
|
-
}
|
|
237
|
-
function e(p) {
|
|
238
|
-
let n = this, { numberFormatter: a } = n.series.chart, l = function(f) {
|
|
239
|
-
p = p.replace("{point." + f + "}", (n[f] > 0 && f === "change" ? "+" : "") + a(n[f], D(n.series.tooltipOptions.changeDecimals, 2)));
|
|
240
|
-
};
|
|
241
|
-
return G(n.change) && l("change"), G(n.cumulativeSum) && l("cumulativeSum"), li.apply(this, [p]);
|
|
242
|
-
}
|
|
243
|
-
function i() {
|
|
244
|
-
let p, n = this.options.linkedTo, a = this.chart;
|
|
245
|
-
if (n) {
|
|
246
|
-
let f = n === ":previous" ? a.series[this.index - 1] : a.get(n);
|
|
247
|
-
f instanceof le() && (this.options.compare = D(this.userOptions.compare, f.options.compare));
|
|
248
|
-
}
|
|
249
|
-
let l = this.options.compare;
|
|
250
|
-
(l === "percent" || l === "value" || this.options.cumulative) && (p = new g(this), l === "percent" || l === "value" ? p.initCompare(l) : p.initCumulative()), this.dataModify = p;
|
|
251
|
-
}
|
|
252
|
-
function o(p) {
|
|
253
|
-
let n = p.dataExtremes, a = n.activeYData;
|
|
254
|
-
if (this.dataModify && n) {
|
|
255
|
-
let l;
|
|
256
|
-
this.options.compare ? l = [this.dataModify.modifyValue(n.dataMin), this.dataModify.modifyValue(n.dataMax)] : this.options.cumulative && ct(a) && a.length >= 2 && (l = g.getCumulativeExtremes(a)), l && (n.dataMin = he(l), n.dataMax = de(l));
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
function r(p, n) {
|
|
260
|
-
this.options.compare = this.userOptions.compare = p, this.update({}, D(n, !0)), this.dataModify && (p === "value" || p === "percent") ? this.dataModify.initCompare(p) : this.points.forEach((a) => {
|
|
261
|
-
delete a.change;
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
function d() {
|
|
265
|
-
let p = this.getColumn(this.pointArrayMap && (this.options.pointValKey || this.pointValKey) || "y", !0);
|
|
266
|
-
if (this.xAxis && p.length && this.dataModify) {
|
|
267
|
-
let n = this.getColumn("x", !0), a = this.dataTable.rowCount, l = +(this.options.compareStart !== !0);
|
|
268
|
-
for (let f = 0; f < a - l; f++) {
|
|
269
|
-
let m = p[f];
|
|
270
|
-
if (O(m) && m !== 0 && n[f + l] >= (this.xAxis.min || 0)) {
|
|
271
|
-
this.dataModify.compareValue = m;
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
function h(p, n) {
|
|
278
|
-
this.setModifier("compare", p, n);
|
|
279
|
-
}
|
|
280
|
-
function u(p, n) {
|
|
281
|
-
p = D(p, !1), this.options.cumulative = this.userOptions.cumulative = p, this.update({}, D(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach((a) => {
|
|
282
|
-
delete a.cumulativeSum;
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
function c(p, n) {
|
|
286
|
-
this.setModifier("cumulative", p, n);
|
|
287
|
-
}
|
|
288
|
-
s.compose = function(p, n, a) {
|
|
289
|
-
let l = n.prototype, f = a.prototype, m = p.prototype;
|
|
290
|
-
return m.setCompare || (m.setCompare = r, m.setCumulative = u, B(p, "afterInit", i), B(p, "afterGetExtremes", o), B(p, "afterProcessData", d)), l.setCompare || (l.setCompare = h, l.setModifier = t, l.setCumulative = c, f.tooltipFormatter = e), p;
|
|
291
|
-
};
|
|
292
|
-
class g {
|
|
293
|
-
constructor(n) {
|
|
294
|
-
this.series = n;
|
|
295
|
-
}
|
|
296
|
-
modifyValue() {
|
|
297
|
-
return 0;
|
|
298
|
-
}
|
|
299
|
-
static getCumulativeExtremes(n) {
|
|
300
|
-
let a = 1 / 0, l = -1 / 0;
|
|
301
|
-
return n.reduce((f, m) => {
|
|
302
|
-
let b = f + m;
|
|
303
|
-
return a = Math.min(a, b, f), l = Math.max(l, b, f), b;
|
|
304
|
-
}), [a, l];
|
|
305
|
-
}
|
|
306
|
-
initCompare(n) {
|
|
307
|
-
this.modifyValue = function(a, l) {
|
|
308
|
-
a === null && (a = 0);
|
|
309
|
-
let f = this.compareValue;
|
|
310
|
-
if (a !== void 0 && f !== void 0) {
|
|
311
|
-
if (n === "value" ? a -= f : a = a / Math.abs(f) * 100 - 100 * (this.series.options.compareBase !== 100), l !== void 0) {
|
|
312
|
-
let m = this.series.points[l];
|
|
313
|
-
m && (m.change = a);
|
|
314
|
-
}
|
|
315
|
-
return a;
|
|
316
|
-
}
|
|
317
|
-
return 0;
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
initCumulative() {
|
|
321
|
-
this.modifyValue = function(n, a) {
|
|
322
|
-
if (n === null && (n = 0), n !== void 0 && a !== void 0) {
|
|
323
|
-
let l = a > 0 ? this.series.points[a - 1] : null;
|
|
324
|
-
l && l.cumulativeSum && (n = U(l.cumulativeSum + n));
|
|
325
|
-
let f = this.series.points[a], m = f.series.options.cumulativeStart, b = f.x <= this.series.xAxis.max && f.x >= this.series.xAxis.min;
|
|
326
|
-
return f && (!m || b ? f.cumulativeSum = n : f.cumulativeSum = void 0), n;
|
|
327
|
-
}
|
|
328
|
-
return 0;
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
s.Additions = g;
|
|
333
|
-
})(It || (It = {}));
|
|
334
|
-
let hi = It;
|
|
335
|
-
var di = H(532), _t = H.n(di);
|
|
336
|
-
let { isTouchDevice: ce } = W(), pi = [];
|
|
337
|
-
function ui() {
|
|
338
|
-
this.navigator && this.navigator.setBaseSeries(null, !1);
|
|
339
|
-
}
|
|
340
|
-
function ci() {
|
|
341
|
-
let s, t, e, i = this.legend, o = this.navigator;
|
|
342
|
-
if (o) {
|
|
343
|
-
s = i && i.options, t = o.xAxis, e = o.yAxis;
|
|
344
|
-
let { scrollbarHeight: r, scrollButtonSize: d } = o;
|
|
345
|
-
this.inverted ? (o.left = o.opposite ? this.chartWidth - r - o.height : this.spacing[3] + r, o.top = this.plotTop + d) : (o.left = D(t.left, this.plotLeft + d), o.top = o.navigatorOptions.top || this.chartHeight - o.height - r - (this.scrollbar?.options.margin || 0) - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (s && s.verticalAlign === "bottom" && s.layout !== "proximate" && s.enabled && !s.floating ? i.legendHeight + D(s.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), t && e && (this.inverted ? t.options.left = e.options.left = o.left : t.options.top = e.options.top = o.top, t.setAxisSize(), e.setAxisSize());
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
function gi(s) {
|
|
349
|
-
!this.navigator && !this.scroller && (this.options.navigator.enabled || this.options.scrollbar.enabled) && (this.scroller = this.navigator = new Dt(this), D(s.redraw, !0) && this.redraw(s.animation));
|
|
350
|
-
}
|
|
351
|
-
function fi() {
|
|
352
|
-
let s = this.options;
|
|
353
|
-
(s.navigator.enabled || s.scrollbar.enabled) && (this.scroller = this.navigator = new Dt(this));
|
|
354
|
-
}
|
|
355
|
-
function mi() {
|
|
356
|
-
let s = this.options, t = s.navigator, e = s.rangeSelector;
|
|
357
|
-
if ((t && t.enabled || e && e.enabled) && (!ce && this.zooming.type === "x" || ce && this.zooming.pinchType === "x")) return !1;
|
|
358
|
-
}
|
|
359
|
-
function xi(s) {
|
|
360
|
-
let t = s.navigator;
|
|
361
|
-
if (t && s.xAxis[0]) {
|
|
362
|
-
let e = s.xAxis[0].getExtremes();
|
|
363
|
-
t.render(e.min, e.max);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
function bi(s) {
|
|
367
|
-
let t = s.options.navigator || {}, e = s.options.scrollbar || {};
|
|
368
|
-
!this.navigator && !this.scroller && (t.enabled || e.enabled) && (X(!0, this.options.navigator, t), X(!0, this.options.scrollbar, e), delete s.options.navigator, delete s.options.scrollbar);
|
|
369
|
-
}
|
|
370
|
-
let vi = function(s, t) {
|
|
371
|
-
if (rt(pi, s)) {
|
|
372
|
-
let e = s.prototype;
|
|
373
|
-
Dt = t, e.callbacks.push(xi), B(s, "afterAddSeries", ui), B(s, "afterSetChartSize", ci), B(s, "afterUpdate", gi), B(s, "beforeRender", fi), B(s, "beforeShowResetZoom", mi), B(s, "update", bi);
|
|
374
|
-
}
|
|
375
|
-
}, { isTouchDevice: yi } = W();
|
|
376
|
-
function Mi() {
|
|
377
|
-
this.navigatorAxis || (this.navigatorAxis = new jt(this));
|
|
378
|
-
}
|
|
379
|
-
function Ai(s) {
|
|
380
|
-
let t, e = this.chart, i = e.options, o = i.navigator, r = this.navigatorAxis, d = e.zooming.pinchType, h = i.rangeSelector, u = e.zooming.type;
|
|
381
|
-
if (this.isXAxis && (o?.enabled || h?.enabled)) {
|
|
382
|
-
if (u === "y" && s.trigger === "zoom") t = !1;
|
|
383
|
-
else if ((s.trigger === "zoom" && u === "xy" || yi && d === "xy") && this.options.range) {
|
|
384
|
-
let c = r.previousZoom;
|
|
385
|
-
G(s.min) ? r.previousZoom = [this.min, this.max] : c && (s.min = c[0], s.max = c[1], r.previousZoom = void 0);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
t !== void 0 && s.preventDefault();
|
|
389
|
-
}
|
|
390
|
-
class jt {
|
|
391
|
-
static compose(t) {
|
|
392
|
-
t.keepProps.includes("navigatorAxis") || (t.keepProps.push("navigatorAxis"), B(t, "init", Mi), B(t, "setExtremes", Ai));
|
|
393
|
-
}
|
|
394
|
-
constructor(t) {
|
|
395
|
-
this.axis = t;
|
|
396
|
-
}
|
|
397
|
-
destroy() {
|
|
398
|
-
this.axis = void 0;
|
|
399
|
-
}
|
|
400
|
-
toFixedRange(t, e, i, o) {
|
|
401
|
-
let r = this.axis, d = (r.pointRange || 0) / 2, h = D(i, r.translate(t, !0, !r.horiz)), u = D(o, r.translate(e, !0, !r.horiz));
|
|
402
|
-
return G(i) || (h = U(h + d)), G(o) || (u = U(u - d)), O(h) && O(u) || (h = u = void 0), { min: h, max: u };
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
var ki = H(620), wi = H.n(ki), Si = H(512), tt = H.n(Si);
|
|
406
|
-
let { parse: Oi } = wi(), { seriesTypes: Ti } = tt(), Zt = { height: 40, margin: 22, maskInside: !0, handles: { width: 7, borderRadius: 0, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: Oi("#667aff").setOpacity(0.3).get(), outlineColor: "#999999", outlineWidth: 1, series: { type: Ti.areaspline === void 0 ? "line" : "areaspline", fillOpacity: 0.05, lineWidth: 1, compare: null, sonification: { enabled: !1 }, dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] }, dataLabels: { enabled: !1, zIndex: 2 }, id: "highcharts-navigator-series", className: "highcharts-navigator-series", lineColor: null, marker: { enabled: !1 }, threshold: null }, xAxis: { className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", id: "navigator-x-axis", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#000000", fontSize: "0.7em", opacity: 0.6, textOutline: "2px contrast" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, id: "navigator-y-axis", maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: void 0 }, tickLength: 0, tickWidth: 0 } }, Ei = { "navigator-handle": function(s, t, e, i, o = {}) {
|
|
407
|
-
var r, d, h, u, c, g;
|
|
408
|
-
let p = o.width ? o.width / 2 : e, n = (r = o.borderRadius || 0, d = Math.min(2 * p, i), /%$/.test(r) ? d * parseFloat(r) / 100 + 0 : parseFloat(r));
|
|
409
|
-
return [["M", -1.5, (i = o.height || i) / 2 - 3.5], ["L", -1.5, i / 2 + 4.5], ["M", 0.5, i / 2 - 3.5], ["L", 0.5, i / 2 + 4.5], ...(h = -p - 1, u = 2 * p + 1, c = i, g = { r: n }, g?.r ? (function(a, l, f, m, b) {
|
|
410
|
-
let x = b?.r || 0;
|
|
411
|
-
return [["M", a + x, l], ["L", a + f - x, l], ["A", x, x, 0, 0, 1, a + f, l + x], ["L", a + f, l + m - x], ["A", x, x, 0, 0, 1, a + f - x, l + m], ["L", a + x, l + m], ["A", x, x, 0, 0, 1, a, l + m - x], ["L", a, l + x], ["A", x, x, 0, 0, 1, a + x, l], ["Z"]];
|
|
412
|
-
})(h, 0.5, u, c, g) : [["M", h, 0.5], ["L", h + u, 0.5], ["L", h + u, 0.5 + c], ["L", h, 0.5 + c], ["Z"]])];
|
|
413
|
-
} };
|
|
414
|
-
var Bi = H(608), ge = H.n(Bi);
|
|
415
|
-
let fe = { setFixedRange: function(s) {
|
|
416
|
-
let t = this.xAxis[0];
|
|
417
|
-
G(t.dataMax) && G(t.dataMin) && s ? this.fixedRange = Math.min(s, t.dataMax - t.dataMin) : this.fixedRange = s;
|
|
418
|
-
} }, { defaultOptions: Ci } = W(), { composed: Pi } = W(), { getRendererType: Di } = ge(), { setFixedRange: Ri } = fe;
|
|
419
|
-
function Gi() {
|
|
420
|
-
this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(null, !1);
|
|
421
|
-
}
|
|
422
|
-
let Ii = function(s, t, e) {
|
|
423
|
-
jt.compose(t), rt(Pi, "Navigator") && (s.prototype.setFixedRange = Ri, F(Di().prototype.symbols, Ei), F(Ci, { navigator: Zt }), B(e, "afterUpdate", Gi));
|
|
424
|
-
}, { composed: zi } = W();
|
|
425
|
-
(function(s) {
|
|
426
|
-
let t;
|
|
427
|
-
function e(d) {
|
|
428
|
-
let h = D(d.options?.min, d.min), u = D(d.options?.max, d.max);
|
|
429
|
-
return { axisMin: h, axisMax: u, scrollMin: G(d.dataMin) ? Math.min(h, d.min ?? 1 / 0, d.dataMin, d.threshold ?? 1 / 0) : h, scrollMax: d.treeGrid?.adjustedMax ?? (G(d.dataMax) ? Math.max(u, d.max ?? -1 / 0, d.dataMax, d.threshold ?? -1 / 0) : u) };
|
|
430
|
-
}
|
|
431
|
-
function i() {
|
|
432
|
-
let d = this.scrollbar, h = d && !d.options.opposite, u = this.horiz ? 2 : h ? 3 : 1;
|
|
433
|
-
d && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[u] += d.size + (d.options.margin || 0));
|
|
434
|
-
}
|
|
435
|
-
function o() {
|
|
436
|
-
let d = this;
|
|
437
|
-
d.options?.scrollbar?.enabled && (d.options.scrollbar.vertical = !d.horiz, d.options.startOnTick = d.options.endOnTick = !1, d.scrollbar = new t(d.chart.renderer, d.options.scrollbar, d.chart), B(d.scrollbar, "changed", function(h) {
|
|
438
|
-
let u, c, { axisMin: g, axisMax: p, scrollMin: n, scrollMax: a } = e(d), l = d.toPixels(n), f = d.toPixels(a) - l;
|
|
439
|
-
if (G(g) && G(p)) if (d.horiz && !d.reversed || !d.horiz && d.reversed ? (u = Math.min(a, d.toValue(l + f * this.to)), c = Math.max(n, d.toValue(l + f * this.from))) : (u = Math.min(a, d.toValue(l + f * (1 - this.from))), c = Math.max(n, d.toValue(l + f * (1 - this.to)))), this.shouldUpdateExtremes(h.DOMType)) {
|
|
440
|
-
let m = h.DOMType !== "mousemove" && h.DOMType !== "touchmove" && void 0;
|
|
441
|
-
d.setExtremes(U(c), U(u), !0, m, h);
|
|
442
|
-
} else this.setRange(this.from, this.to);
|
|
443
|
-
}));
|
|
444
|
-
}
|
|
445
|
-
function r() {
|
|
446
|
-
let d, h, u, { scrollMin: c, scrollMax: g } = e(this), p = this.scrollbar, n = (this.axisTitleMargin || 0) + (this.titleOffset || 0), a = this.chart.scrollbarsOffsets, l = this.options.margin || 0;
|
|
447
|
-
if (p && a) {
|
|
448
|
-
if (this.horiz) this.opposite || (a[1] += n), p.position(this.left, this.top + this.height + 2 + a[1] - (this.opposite ? l : 0), this.width, this.height), this.opposite || (a[1] += l), d = 1;
|
|
449
|
-
else {
|
|
450
|
-
let f;
|
|
451
|
-
this.opposite && (a[0] += n), f = p.options.opposite ? this.left + this.width + 2 + a[0] - (this.opposite ? 0 : l) : this.opposite ? 0 : l, p.position(f, this.top, this.width, this.height), this.opposite && (a[0] += l), d = 0;
|
|
452
|
-
}
|
|
453
|
-
if (a[d] += p.size + (p.options.margin || 0), isNaN(c) || isNaN(g) || !G(this.min) || !G(this.max) || G(this.dataMin) && this.dataMin === this.dataMax) p.setRange(0, 1);
|
|
454
|
-
else if (this.min === this.max) {
|
|
455
|
-
let f = this.pointRange / (this.dataMax + 1);
|
|
456
|
-
h = f * this.min, u = f * (this.max + 1), p.setRange(h, u);
|
|
457
|
-
} else h = (this.toPixels(this.min) - this.toPixels(c)) / (this.toPixels(g) - this.toPixels(c)), u = (this.toPixels(this.max) - this.toPixels(c)) / (this.toPixels(g) - this.toPixels(c)), this.horiz && !this.reversed || !this.horiz && this.reversed ? p.setRange(h, u) : p.setRange(1 - u, 1 - h);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
s.compose = function(d, h) {
|
|
461
|
-
rt(zi, "Axis.Scrollbar") && (t = h, B(d, "afterGetOffset", i), B(d, "afterInit", o), B(d, "afterRender", r));
|
|
462
|
-
};
|
|
463
|
-
})(zt || (zt = {}));
|
|
464
|
-
let Li = zt, St = { height: 10, barBorderRadius: 5, buttonBorderRadius: 0, buttonsEnabled: !1, liveRedraw: void 0, margin: void 0, minWidth: 6, opposite: !0, step: 0.2, zIndex: 3, barBackgroundColor: "#cccccc", barBorderWidth: 0, barBorderColor: "#cccccc", buttonArrowColor: "#333333", buttonBackgroundColor: "#e6e6e6", buttonBorderColor: "#cccccc", buttonBorderWidth: 1, rifleColor: "none", trackBackgroundColor: "rgba(255, 255, 255, 0.001)", trackBorderColor: "#cccccc", trackBorderRadius: 5, trackBorderWidth: 1 }, { defaultOptions: me } = W(), { composed: Wi } = W();
|
|
465
|
-
class ht {
|
|
466
|
-
static compose(t) {
|
|
467
|
-
Li.compose(t, ht), rt(Wi, "Scrollbar") && F(me, { scrollbar: St });
|
|
468
|
-
}
|
|
469
|
-
static swapXY(t, e) {
|
|
470
|
-
return e && t.forEach((i) => {
|
|
471
|
-
let o, r = i.length;
|
|
472
|
-
for (let d = 0; d < r; d += 2) typeof (o = i[d + 1]) == "number" && (i[d + 1] = i[d + 2], i[d + 2] = o);
|
|
473
|
-
}), t;
|
|
474
|
-
}
|
|
475
|
-
constructor(t, e, i) {
|
|
476
|
-
this._events = [], this.chartX = 0, this.chartY = 0, this.from = 0, this.scrollbarButtons = [], this.scrollbarLeft = 0, this.scrollbarStrokeWidth = 1, this.scrollbarTop = 0, this.size = 0, this.to = 0, this.trackBorderWidth = 1, this.x = 0, this.y = 0, this.init(t, e, i);
|
|
477
|
-
}
|
|
478
|
-
addEvents() {
|
|
479
|
-
let t = this.options.inverted ? [1, 0] : [0, 1], e = this.scrollbarButtons, i = this.scrollbarGroup.element, o = this.track.element, r = this.mouseDownHandler.bind(this), d = this.mouseMoveHandler.bind(this), h = this.mouseUpHandler.bind(this), u = [[e[t[0]].element, "click", this.buttonToMinClick.bind(this)], [e[t[1]].element, "click", this.buttonToMaxClick.bind(this)], [o, "click", this.trackClick.bind(this)], [i, "mousedown", r], [i.ownerDocument, "mousemove", d], [i.ownerDocument, "mouseup", h], [i, "touchstart", r], [i.ownerDocument, "touchmove", d], [i.ownerDocument, "touchend", h]];
|
|
480
|
-
u.forEach(function(c) {
|
|
481
|
-
B.apply(null, c);
|
|
482
|
-
}), this._events = u;
|
|
483
|
-
}
|
|
484
|
-
buttonToMaxClick(t) {
|
|
485
|
-
let e = (this.to - this.from) * D(this.options.step, 0.2);
|
|
486
|
-
this.updatePosition(this.from + e, this.to + e), _(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
|
|
487
|
-
}
|
|
488
|
-
buttonToMinClick(t) {
|
|
489
|
-
let e = U(this.to - this.from) * D(this.options.step, 0.2);
|
|
490
|
-
this.updatePosition(U(this.from - e), U(this.to - e)), _(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
|
|
491
|
-
}
|
|
492
|
-
cursorToScrollbarPosition(t) {
|
|
493
|
-
let e = this.options, i = e.minWidth > this.calculatedWidth ? e.minWidth : 0;
|
|
494
|
-
return { chartX: (t.chartX - this.x - this.xOffset) / (this.barWidth - i), chartY: (t.chartY - this.y - this.yOffset) / (this.barWidth - i) };
|
|
495
|
-
}
|
|
496
|
-
destroy() {
|
|
497
|
-
let t = this, e = t.chart.scroller;
|
|
498
|
-
t.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(i) {
|
|
499
|
-
t[i] && t[i].destroy && (t[i] = t[i].destroy());
|
|
500
|
-
}), e && t === e.scrollbar && (e.scrollbar = null, Ut(e.scrollbarButtons));
|
|
501
|
-
}
|
|
502
|
-
drawScrollbarButton(t) {
|
|
503
|
-
let e = this.renderer, i = this.scrollbarButtons, o = this.options, r = this.size, d = e.g().add(this.group);
|
|
504
|
-
if (i.push(d), o.buttonsEnabled) {
|
|
505
|
-
let h = e.rect().addClass("highcharts-scrollbar-button").add(d);
|
|
506
|
-
this.chart.styledMode || h.attr({ stroke: o.buttonBorderColor, "stroke-width": o.buttonBorderWidth, fill: o.buttonBackgroundColor }), h.attr(h.crisp({ x: -0.5, y: -0.5, width: r, height: r, r: o.buttonBorderRadius }, h.strokeWidth()));
|
|
507
|
-
let u = e.path(ht.swapXY([["M", r / 2 + (t ? -1 : 1), r / 2 - 3], ["L", r / 2 + (t ? -1 : 1), r / 2 + 3], ["L", r / 2 + (t ? 2 : -2), r / 2]], o.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]);
|
|
508
|
-
this.chart.styledMode || u.attr({ fill: o.buttonArrowColor });
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
init(t, e, i) {
|
|
512
|
-
this.scrollbarButtons = [], this.renderer = t, this.userOptions = e, this.options = X(St, me.scrollbar, e), this.options.margin = D(this.options.margin, 10), this.chart = i, this.size = D(this.options.size, this.options.height), e.enabled && (this.render(), this.addEvents());
|
|
513
|
-
}
|
|
514
|
-
mouseDownHandler(t) {
|
|
515
|
-
let e = this.chart.pointer?.normalize(t) || t, i = this.cursorToScrollbarPosition(e);
|
|
516
|
-
this.chartX = i.chartX, this.chartY = i.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
|
|
517
|
-
}
|
|
518
|
-
mouseMoveHandler(t) {
|
|
519
|
-
let e, i = this.chart.pointer?.normalize(t) || t, o = this.options.vertical ? "chartY" : "chartX", r = this.initPositions || [];
|
|
520
|
-
this.grabbedCenter && (!t.touches || t.touches[0][o] !== 0) && (e = this.cursorToScrollbarPosition(i)[o] - this[o], this.hasDragged = !0, this.updatePosition(r[0] + e, r[1] + e), this.hasDragged && _(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: t.type, DOMEvent: t }));
|
|
521
|
-
}
|
|
522
|
-
mouseUpHandler(t) {
|
|
523
|
-
this.hasDragged && _(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: t.type, DOMEvent: t }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
|
|
524
|
-
}
|
|
525
|
-
position(t, e, i, o) {
|
|
526
|
-
let { buttonsEnabled: r, margin: d = 0, vertical: h } = this.options, u = this.rendered ? "animate" : "attr", c = o, g = 0;
|
|
527
|
-
this.group.show(), this.x = t, this.y = e + this.trackBorderWidth, this.width = i, this.height = o, this.xOffset = c, this.yOffset = g, h ? (this.width = this.yOffset = i = g = this.size, this.xOffset = c = 0, this.yOffset = g = r ? this.size : 0, this.barWidth = o - (r ? 2 * i : 0), this.x = t += d) : (this.height = o = this.size, this.xOffset = c = r ? this.size : 0, this.barWidth = i - (r ? 2 * o : 0), this.y = this.y + d), this.group[u]({ translateX: t, translateY: this.y }), this.track[u]({ width: i, height: o }), this.scrollbarButtons[1][u]({ translateX: h ? 0 : i - c, translateY: h ? o - g : 0 });
|
|
528
|
-
}
|
|
529
|
-
removeEvents() {
|
|
530
|
-
this._events.forEach(function(t) {
|
|
531
|
-
gt.apply(null, t);
|
|
532
|
-
}), this._events.length = 0;
|
|
533
|
-
}
|
|
534
|
-
render() {
|
|
535
|
-
let t = this.renderer, e = this.options, i = this.size, o = this.chart.styledMode, r = t.g("scrollbar").attr({ zIndex: e.zIndex }).hide().add();
|
|
536
|
-
this.group = r, this.track = t.rect().addClass("highcharts-scrollbar-track").attr({ r: e.trackBorderRadius || 0, height: i, width: i }).add(r), o || this.track.attr({ fill: e.trackBackgroundColor, stroke: e.trackBorderColor, "stroke-width": e.trackBorderWidth });
|
|
537
|
-
let d = this.trackBorderWidth = this.track.strokeWidth();
|
|
538
|
-
this.track.attr({ x: -Q(0, d), y: -Q(0, d) }), this.scrollbarGroup = t.g().add(r), this.scrollbar = t.rect().addClass("highcharts-scrollbar-thumb").attr({ height: i - d, width: i - d, r: e.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = t.path(ht.swapXY([["M", -3, i / 4], ["L", -3, 2 * i / 3], ["M", 0, i / 4], ["L", 0, 2 * i / 3], ["M", 3, i / 4], ["L", 3, 2 * i / 3]], e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), o || (this.scrollbar.attr({ fill: e.barBackgroundColor, stroke: e.barBorderColor, "stroke-width": e.barBorderWidth }), this.scrollbarRifles.attr({ stroke: e.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-Q(0, this.scrollbarStrokeWidth), -Q(0, this.scrollbarStrokeWidth)), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
|
|
539
|
-
}
|
|
540
|
-
setRange(t, e) {
|
|
541
|
-
let i, o, r = this.options, d = r.vertical, h = r.minWidth, u = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
|
|
542
|
-
if (!G(u)) return;
|
|
543
|
-
let g = u * Math.min(e, 1);
|
|
544
|
-
i = Math.ceil(u * (t = Math.max(t, 0))), this.calculatedWidth = o = U(g - i), o < h && (i = (u - h + o) * t, o = h);
|
|
545
|
-
let p = Math.floor(i + this.xOffset + this.yOffset), n = o / 2 - 0.5;
|
|
546
|
-
this.from = t, this.to = e, d ? (this.scrollbarGroup[c]({ translateY: p }), this.scrollbar[c]({ height: o }), this.scrollbarRifles[c]({ translateY: n }), this.scrollbarTop = p, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: p }), this.scrollbar[c]({ width: o }), this.scrollbarRifles[c]({ translateX: n }), this.scrollbarLeft = p, this.scrollbarTop = 0), o <= 12 ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(), r.showFull === !1 && (t <= 0 && e >= 1 ? this.group.hide() : this.group.show()), this.rendered = !0;
|
|
547
|
-
}
|
|
548
|
-
shouldUpdateExtremes(t) {
|
|
549
|
-
return D(this.options.liveRedraw, W().svg && !W().isTouchDevice && !this.chart.boosted) || t === "mouseup" || t === "touchend" || !G(t);
|
|
550
|
-
}
|
|
551
|
-
trackClick(t) {
|
|
552
|
-
let e = this.chart.pointer?.normalize(t) || t, i = this.to - this.from, o = this.y + this.scrollbarTop, r = this.x + this.scrollbarLeft;
|
|
553
|
-
this.options.vertical && e.chartY > o || !this.options.vertical && e.chartX > r ? this.updatePosition(this.from + i, this.to + i) : this.updatePosition(this.from - i, this.to - i), _(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
|
|
554
|
-
}
|
|
555
|
-
update(t) {
|
|
556
|
-
this.destroy(), this.init(this.chart.renderer, X(!0, this.options, t), this.chart);
|
|
557
|
-
}
|
|
558
|
-
updatePosition(t, e) {
|
|
559
|
-
e > 1 && (t = U(1 - U(e - t)), e = 1), t < 0 && (e = U(e - t), t = 0), this.from = t, this.to = e;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
ht.defaultOptions = St;
|
|
563
|
-
let { defaultOptions: Kt } = W(), { isTouchDevice: Xi } = W();
|
|
564
|
-
function Ot(s, ...t) {
|
|
565
|
-
let e = [].filter.call(t, O);
|
|
566
|
-
if (e.length) return Math[s].apply(0, e);
|
|
567
|
-
}
|
|
568
|
-
class qt {
|
|
569
|
-
static compose(t, e, i) {
|
|
570
|
-
vi(t, qt), Ii(t, e, i);
|
|
571
|
-
}
|
|
572
|
-
constructor(t) {
|
|
573
|
-
this.isDirty = !1, this.scrollbarHeight = 0, this.init(t);
|
|
574
|
-
}
|
|
575
|
-
drawHandle(t, e, i, o) {
|
|
576
|
-
let r = this.navigatorOptions.handles.height;
|
|
577
|
-
this.handles[e][o](i ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(t, 10) + 0.5 - r) } : { translateX: Math.round(this.left + parseInt(t, 10)), translateY: Math.round(this.top + this.height / 2 - r / 2 - 1) });
|
|
578
|
-
}
|
|
579
|
-
drawOutline(t, e, i, o) {
|
|
580
|
-
let r = this.navigatorOptions.maskInside, d = this.outline.strokeWidth(), h = d / 2, u = d % 2 / 2, c = this.scrollButtonSize, g = this.size, p = this.top, n = this.height, a = p - h, l = p + n, f = this.left, m, b;
|
|
581
|
-
i ? (m = p + e + u, e = p + t + u, b = [["M", f + n, p - c - u], ["L", f + n, m], ["L", f, m], ["M", f, e], ["L", f + n, e], ["L", f + n, p + g + c]], r && b.push(["M", f + n, m - h], ["L", f + n, e + h])) : (f -= c, t += f + c - u, e += f + c - u, b = [["M", f, a], ["L", t, a], ["L", t, l], ["M", e, l], ["L", e, a], ["L", f + g + 2 * c, a]], r && b.push(["M", t - h, a], ["L", e + h, a])), this.outline[o]({ d: b });
|
|
582
|
-
}
|
|
583
|
-
drawMasks(t, e, i, o) {
|
|
584
|
-
let r, d, h, u, c = this.left, g = this.top, p = this.height;
|
|
585
|
-
i ? (h = [c, c, c], u = [g, g + t, g + e], d = [p, p, p], r = [t, e - t, this.size - e]) : (h = [c, c + t, c + e], u = [g, g, g], d = [t, e - t, this.size - e], r = [p, p, p]), this.shades.forEach((n, a) => {
|
|
586
|
-
n[o]({ x: h[a], y: u[a], width: d[a], height: r[a] });
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
renderElements() {
|
|
590
|
-
let t = this, e = t.navigatorOptions, i = e.maskInside, o = t.chart, r = o.inverted, d = o.renderer, h = { cursor: r ? "ns-resize" : "ew-resize" }, u = t.navigatorGroup ?? (t.navigatorGroup = d.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add());
|
|
591
|
-
if ([!i, i, !i].forEach((c, g) => {
|
|
592
|
-
let p = t.shades[g] ?? (t.shades[g] = d.rect().addClass("highcharts-navigator-mask" + (g === 1 ? "-inside" : "-outside")).add(u));
|
|
593
|
-
o.styledMode || (p.attr({ fill: c ? e.maskFill : "rgba(0,0,0,0)" }), g === 1 && p.css(h));
|
|
594
|
-
}), t.outline || (t.outline = d.path().addClass("highcharts-navigator-outline").add(u)), o.styledMode || t.outline.attr({ "stroke-width": e.outlineWidth, stroke: e.outlineColor }), e.handles?.enabled) {
|
|
595
|
-
let c = !1, g = e.handles, { height: p, width: n } = g;
|
|
596
|
-
[0, 1].forEach((a) => {
|
|
597
|
-
let l = g.symbols[a];
|
|
598
|
-
(c = c || t.handles[a]?.symbolName !== l) && (t.handles[a]?.destroy(), t.handles[a] = d.symbol(l, -n / 2 - 1, 0, n, p, g), t.handles[a].attr({ zIndex: 7 - a }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][a]).add(u)), o.inverted && t.handles[a].attr({ rotation: 90, rotationOriginX: Math.floor(-n / 2), rotationOriginY: (p + n) / 2 }), o.styledMode || t.handles[a].attr({ fill: g.backgroundColor, stroke: g.borderColor, "stroke-width": g.lineWidth, width: g.width, height: g.height, x: -n / 2 - 1, y: 0 }).css(h);
|
|
599
|
-
}), c && (t.partsEventsToUnbind?.forEach((a) => {
|
|
600
|
-
a();
|
|
601
|
-
}), t.partsEventsToUnbind = [...t.getPartsEvents("mousedown"), ...t.getPartsEvents("touchstart")]);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
update(t, e = !1) {
|
|
605
|
-
let i = this.chart, o = i.options.chart.inverted !== i.scrollbar?.options.vertical;
|
|
606
|
-
if (X(!0, i.options.navigator, t), this.navigatorOptions = i.options.navigator || {}, this.setOpposite(), G(t.enabled) || o) return this.destroy(), this.navigatorEnabled = t.enabled || this.navigatorEnabled, this.init(i);
|
|
607
|
-
if (this.navigatorEnabled && (this.isDirty = !0, t.adaptToUpdatedData === !1 && this.baseSeries.forEach((r) => {
|
|
608
|
-
gt(r, "updatedData", this.updatedDataHandler);
|
|
609
|
-
}, this), t.adaptToUpdatedData && this.baseSeries.forEach((r) => {
|
|
610
|
-
r.eventsToUnbind.push(B(r, "updatedData", this.updatedDataHandler));
|
|
611
|
-
}, this), (t.series || t.baseSeries) && this.setBaseSeries(void 0, !1), t.height || t.xAxis || t.yAxis)) {
|
|
612
|
-
this.height = t.height ?? this.height;
|
|
613
|
-
let r = this.getXAxisOffsets();
|
|
614
|
-
this.xAxis.update({ ...t.xAxis, offsets: r, [i.inverted ? "width" : "height"]: this.height, [i.inverted ? "height" : "width"]: void 0 }, !1), this.yAxis.update({ ...t.yAxis, [i.inverted ? "width" : "height"]: this.height }, !1);
|
|
615
|
-
}
|
|
616
|
-
e && i.redraw();
|
|
617
|
-
}
|
|
618
|
-
render(t, e, i, o) {
|
|
619
|
-
let r = this.chart, d = this.xAxis, h = d.pointRange || 0, u = d.navigatorAxis.fake ? r.xAxis[0] : d, c = this.navigatorEnabled, g = this.rendered, p = r.inverted, n = r.xAxis[0].minRange, a = r.xAxis[0].options.maxRange, l = this.scrollButtonSize, f, m, b, x = this.scrollbarHeight, v, M;
|
|
620
|
-
if (this.hasDragged && !G(i)) return;
|
|
621
|
-
if (this.isDirty && this.renderElements(), t = U(t - h / 2), e = U(e + h / 2), !O(t) || !O(e)) if (g) i = 0, o = D(d.width, u.width);
|
|
622
|
-
else return;
|
|
623
|
-
this.left = D(d.left, r.plotLeft + l + (p ? r.plotWidth : 0));
|
|
624
|
-
let w = this.size = v = D(d.len, (p ? r.plotHeight : r.plotWidth) - 2 * l);
|
|
625
|
-
f = p ? x : v + 2 * l, i = D(i, d.toPixels(t, !0)), o = D(o, d.toPixels(e, !0)), O(i) && Math.abs(i) !== 1 / 0 || (i = 0, o = f);
|
|
626
|
-
let A = d.toValue(i, !0), y = d.toValue(o, !0), E = Math.abs(U(y - A));
|
|
627
|
-
G(n) && E < n ? this.grabbedLeft ? i = d.toPixels(y - n - h, !0) : this.grabbedRight && (o = d.toPixels(A + n + h, !0)) : G(a) && U(E - h) > a && (this.grabbedLeft ? i = d.toPixels(y - a - h, !0) : this.grabbedRight && (o = d.toPixels(A + a + h, !0))), this.zoomedMax = Nt(Math.max(i, o), 0, w), this.zoomedMin = Nt(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(i, o), 0, w), this.range = this.zoomedMax - this.zoomedMin, w = Math.round(this.zoomedMax);
|
|
628
|
-
let S = Math.round(this.zoomedMin);
|
|
629
|
-
c && (this.navigatorGroup.attr({ visibility: "inherit" }), M = g && !this.hasDragged ? "animate" : "attr", this.drawMasks(S, w, p, M), this.drawOutline(S, w, p, M), this.navigatorOptions.handles?.enabled && (this.drawHandle(S, 0, p, M), this.drawHandle(w, 1, p, M))), this.scrollbar && (p ? (b = this.top - l, m = this.left - x + (c || !u.opposite ? 0 : (u.titleOffset || 0) + u.axisTitleMargin), x = v + 2 * l) : (b = this.top + (c ? this.height : -x), m = this.left - l), this.scrollbar.position(m, b, f, x), this.scrollbar.setRange(this.zoomedMin / (v || 1), this.zoomedMax / (v || 1))), this.rendered = !0, this.isDirty = !1, _(this, "afterRender");
|
|
630
|
-
}
|
|
631
|
-
addMouseEvents() {
|
|
632
|
-
let t, e, i = this, o = i.chart, r = o.container, d = [];
|
|
633
|
-
i.mouseMoveHandler = t = function(h) {
|
|
634
|
-
i.onMouseMove(h);
|
|
635
|
-
}, i.mouseUpHandler = e = function(h) {
|
|
636
|
-
i.onMouseUp(h);
|
|
637
|
-
}, d.push(B(o.renderTo, "mousemove", t), B(r.ownerDocument, "mouseup", e), B(o.renderTo, "touchmove", t), B(r.ownerDocument, "touchend", e)), i.eventsToUnbind = d, i.series && i.series[0] && d.push(B(i.series[0].xAxis, "foundExtremes", function() {
|
|
638
|
-
o.navigator?.modifyNavigatorAxisExtremes();
|
|
639
|
-
}));
|
|
640
|
-
}
|
|
641
|
-
getPartsEvents(t) {
|
|
642
|
-
let e = this, i = [];
|
|
643
|
-
return ["shades", "handles"].forEach((o) => {
|
|
644
|
-
e[o].forEach(function(r, d) {
|
|
645
|
-
i.push(B(r.element, t, function(h) {
|
|
646
|
-
e[`${o}Mousedown`](h, d);
|
|
647
|
-
}));
|
|
648
|
-
});
|
|
649
|
-
}), i;
|
|
650
|
-
}
|
|
651
|
-
shadesMousedown(t, e) {
|
|
652
|
-
t = this.chart.pointer?.normalize(t) || t;
|
|
653
|
-
let i = this.chart, o = this.xAxis, r = this.zoomedMin, d = this.size, h = this.range, u = this.left, c = t.chartX, g, p, n, a;
|
|
654
|
-
i.inverted && (c = t.chartY, u = this.top), e === 1 ? (this.grabbedCenter = c, this.fixedWidth = h, this.dragOffset = c - r) : (a = c - u - h / 2, e === 0 ? a = Math.max(0, a) : e === 2 && a + h >= d && (a = d - h, this.reversedExtremes ? (a -= h, p = this.getUnionExtremes()?.dataMin) : g = this.getUnionExtremes()?.dataMax), a !== r && (this.fixedWidth = h, G((n = o.navigatorAxis.toFixedRange(a, a + h, p, g)).min) && _(this, "setRange", { min: Math.min(n.min, n.max), max: Math.max(n.min, n.max), redraw: !0, eventArguments: { trigger: "navigator" } })));
|
|
655
|
-
}
|
|
656
|
-
handlesMousedown(t, e) {
|
|
657
|
-
t = this.chart.pointer?.normalize(t) || t;
|
|
658
|
-
let i = this.chart, o = i.xAxis[0], r = this.reversedExtremes;
|
|
659
|
-
e === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = r ? o.min : o.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = r ? o.max : o.min), i.setFixedRange(void 0);
|
|
660
|
-
}
|
|
661
|
-
onMouseMove(t) {
|
|
662
|
-
let e = this, i = e.chart, o = e.navigatorSize, r = e.range, d = e.dragOffset, h = i.inverted, u = e.left, c;
|
|
663
|
-
(!t.touches || t.touches[0].pageX !== 0) && (c = (t = i.pointer?.normalize(t) || t).chartX, h && (u = e.top, c = t.chartY), e.grabbedLeft ? (e.hasDragged = !0, e.render(0, 0, c - u, e.otherHandlePos)) : e.grabbedRight ? (e.hasDragged = !0, e.render(0, 0, e.otherHandlePos, c - u)) : e.grabbedCenter && d && (e.hasDragged = !0, c < d ? c = d : c > o + d - r && (c = o + d - r), e.render(0, 0, c - d, c - d + r)), e.hasDragged && D(e.scrollbarOptions?.liveRedraw, !Xi && !this.chart.boosted) && (t.DOMType = t.type, setTimeout(function() {
|
|
664
|
-
e.onMouseUp(t);
|
|
665
|
-
}, 0)));
|
|
666
|
-
}
|
|
667
|
-
onMouseUp(t) {
|
|
668
|
-
let e, i, o, r, d, h, u = this.chart, c = this.xAxis, g = this.scrollbar, p = t.DOMEvent || t, n = u.inverted, a = this.rendered && !this.hasDragged ? "animate" : "attr";
|
|
669
|
-
(this.hasDragged && (!g || !g.hasDragged) || t.trigger === "scrollbar") && (o = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos ? r = this.fixedExtreme : this.zoomedMax === this.otherHandlePos && (d = this.fixedExtreme), this.zoomedMax === this.size && (d = this.reversedExtremes ? o.dataMin : o.dataMax), this.zoomedMin === 0 && (r = this.reversedExtremes ? o.dataMax : o.dataMin), G((h = c.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, r, d)).min) && _(this, "setRange", { min: Math.min(h.min, h.max), max: Math.max(h.min, h.max), redraw: !0, animation: !this.hasDragged && null, eventArguments: { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: p } })), t.DOMType !== "mousemove" && t.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && O(this.zoomedMin) && O(this.zoomedMax) && (i = Math.round(this.zoomedMin), e = Math.round(this.zoomedMax), this.shades && this.drawMasks(i, e, n, a), this.outline && this.drawOutline(i, e, n, a), this.navigatorOptions.handles?.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(i, 0, n, a), this.drawHandle(e, 1, n, a)));
|
|
670
|
-
}
|
|
671
|
-
removeEvents() {
|
|
672
|
-
this.eventsToUnbind?.forEach((t) => {
|
|
673
|
-
t();
|
|
674
|
-
}), this.eventsToUnbind = void 0, this.removeBaseSeriesEvents();
|
|
675
|
-
}
|
|
676
|
-
removeBaseSeriesEvents() {
|
|
677
|
-
let t = this.baseSeries || [];
|
|
678
|
-
this.navigatorEnabled && t[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && t.forEach(function(e) {
|
|
679
|
-
gt(e, "updatedData", this.updatedDataHandler);
|
|
680
|
-
}, this), t[0].xAxis && gt(t[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
|
|
681
|
-
}
|
|
682
|
-
getXAxisOffsets() {
|
|
683
|
-
return this.chart.inverted ? [this.scrollButtonSize, 0, -this.scrollButtonSize, 0] : [0, -this.scrollButtonSize, 0, this.scrollButtonSize];
|
|
684
|
-
}
|
|
685
|
-
init(t) {
|
|
686
|
-
let e = t.options, i = e.navigator || {}, o = i.enabled, r = e.scrollbar || {}, d = r.enabled, h = o && i.height || 0, u = d && r.height || 0, c = r.buttonsEnabled && u || 0;
|
|
687
|
-
this.handles = [], this.shades = [], this.chart = t, this.setBaseSeries(), this.height = h, this.scrollbarHeight = u, this.scrollButtonSize = c, this.scrollbarEnabled = d, this.navigatorEnabled = !!o, this.navigatorOptions = i, this.scrollbarOptions = r, this.setOpposite();
|
|
688
|
-
let g = this, p = g.baseSeries, n = t.xAxis.length, a = t.yAxis.length, l = p && p[0] && p[0].xAxis || t.xAxis[0] || { options: {} };
|
|
689
|
-
if (t.isDirtyBox = !0, g.navigatorEnabled) {
|
|
690
|
-
let f = this.getXAxisOffsets();
|
|
691
|
-
g.xAxis = new (_t())(t, X({ breaks: l.options.breaks, ordinal: l.options.ordinal, overscroll: l.options.overscroll }, i.xAxis, { type: "datetime", yAxis: i.yAxis?.id, index: n, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: l.options.ordinal ? 0 : l.options.minPadding, maxPadding: l.options.ordinal ? 0 : l.options.maxPadding, zoomEnabled: !1 }, t.inverted ? { offsets: f, width: h } : { offsets: f, height: h }), "xAxis"), g.yAxis = new (_t())(t, X(i.yAxis, { alignTicks: !1, offset: 0, index: a, isInternal: !0, reversed: D(i.yAxis && i.yAxis.reversed, t.yAxis[0] && t.yAxis[0].reversed, !1), zoomEnabled: !1 }, t.inverted ? { width: h } : { height: h }), "yAxis"), p || i.series?.data ? g.updateNavigatorSeries(!1) : t.series.length === 0 && (g.unbindRedraw = B(t, "beforeRedraw", function() {
|
|
692
|
-
t.series.length > 0 && !g.series && (g.setBaseSeries(), g.unbindRedraw?.());
|
|
693
|
-
})), g.reversedExtremes = t.inverted && !g.xAxis.reversed || !t.inverted && g.xAxis.reversed, g.renderElements(), g.addMouseEvents();
|
|
694
|
-
} else g.xAxis = { chart: t, navigatorAxis: { fake: !0 }, translate: function(f, m) {
|
|
695
|
-
let b = t.xAxis[0], x = b.getExtremes(), v = b.len - 2 * c, M = Ot("min", b.options.min, x.dataMin), w = Ot("max", b.options.max, x.dataMax) - M;
|
|
696
|
-
return m ? f * w / v + M : v * (f - M) / w;
|
|
697
|
-
}, toPixels: function(f) {
|
|
698
|
-
return this.translate(f);
|
|
699
|
-
}, toValue: function(f) {
|
|
700
|
-
return this.translate(f, !0);
|
|
701
|
-
} }, g.xAxis.navigatorAxis.axis = g.xAxis, g.xAxis.navigatorAxis.toFixedRange = jt.prototype.toFixedRange.bind(g.xAxis.navigatorAxis);
|
|
702
|
-
if (t.options.scrollbar?.enabled) {
|
|
703
|
-
let f = X(t.options.scrollbar, { vertical: t.inverted });
|
|
704
|
-
O(f.margin) || (f.margin = t.inverted ? -3 : 3), t.scrollbar = g.scrollbar = new ht(t.renderer, f, t), B(g.scrollbar, "changed", function(m) {
|
|
705
|
-
let b = g.size, x = b * this.to, v = b * this.from;
|
|
706
|
-
g.hasDragged = g.scrollbar?.hasDragged, g.render(0, 0, v, x), this.shouldUpdateExtremes(m.DOMType) && setTimeout(function() {
|
|
707
|
-
g.onMouseUp(m);
|
|
708
|
-
});
|
|
709
|
-
});
|
|
710
|
-
}
|
|
711
|
-
g.addBaseSeriesEvents(), g.addChartEvents();
|
|
712
|
-
}
|
|
713
|
-
setOpposite() {
|
|
714
|
-
let t = this.navigatorOptions, e = this.navigatorEnabled, i = this.chart;
|
|
715
|
-
this.opposite = D(t.opposite, !!(!e && i.inverted));
|
|
716
|
-
}
|
|
717
|
-
getUnionExtremes(t) {
|
|
718
|
-
let e, i = this.chart.xAxis[0], o = this.chart.time, r = this.xAxis, d = r.options, h = i.options;
|
|
719
|
-
return t && i.dataMin === null || (e = { dataMin: D(o.parse(d?.min), Ot("min", o.parse(h.min), i.dataMin, r.dataMin, r.min)), dataMax: D(o.parse(d?.max), Ot("max", o.parse(h.max), i.dataMax, r.dataMax, r.max)) }), e;
|
|
720
|
-
}
|
|
721
|
-
setBaseSeries(t, e) {
|
|
722
|
-
let i = this.chart, o = this.baseSeries = [];
|
|
723
|
-
t = t || i.options.navigator?.baseSeries || (i.series.length ? Vt(i.series, (r) => !r.options.isInternal).index : 0), (i.series || []).forEach((r, d) => {
|
|
724
|
-
!r.options.isInternal && (r.options.showInNavigator || (d === t || r.options.id === t) && r.options.showInNavigator !== !1) && o.push(r);
|
|
725
|
-
}), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, e);
|
|
726
|
-
}
|
|
727
|
-
updateNavigatorSeries(t, e) {
|
|
728
|
-
let i = this, o = i.chart, r = i.baseSeries, d = { enableMouseTracking: !1, index: null, linkedTo: null, group: "nav", padXAxis: !1, xAxis: this.navigatorOptions.xAxis?.id, yAxis: this.navigatorOptions.yAxis?.id, showInLegend: !1, stacking: void 0, isInternal: !0, states: { inactive: { opacity: 1 } } }, h = i.series = (i.series || []).filter((n) => {
|
|
729
|
-
let a = n.baseSeries;
|
|
730
|
-
return !(a && 0 > r.indexOf(a)) || (a && (gt(a, "updatedData", i.updatedDataHandler), delete a.navigatorSeries), n.chart && n.destroy(), !1);
|
|
731
|
-
}), u, c, g = i.navigatorOptions.series, p;
|
|
732
|
-
r && r.length && r.forEach((n) => {
|
|
733
|
-
let a = n.navigatorSeries, l = F({ color: n.color, visible: n.visible }, ct(g) ? Kt.navigator.series : g);
|
|
734
|
-
if (a && i.navigatorOptions.adaptToUpdatedData === !1) return;
|
|
735
|
-
d.name = "Navigator " + r.length, p = (u = n.options || {}).navigatorOptions || {}, l.dataLabels = ft(l.dataLabels), (c = X(u, d, l, p)).pointRange = D(l.pointRange, p.pointRange, Kt.plotOptions[c.type || "line"]?.pointRange);
|
|
736
|
-
let f = p.data || l.data;
|
|
737
|
-
i.hasNavigatorData = i.hasNavigatorData || !!f, c.data = f || u.data?.slice(0), a && a.options ? a.update(c, e) : (n.navigatorSeries = o.initSeries(c), o.setSortedData(), n.navigatorSeries.baseSeries = n, h.push(n.navigatorSeries));
|
|
738
|
-
}), (g?.data && !(r && r.length) || ct(g)) && (i.hasNavigatorData = !1, (g = ft(g)).forEach((n, a) => {
|
|
739
|
-
d.name = "Navigator " + (h.length + 1), (c = X(Kt.navigator?.series, { color: o.series[a] && !o.series[a].options.isInternal && o.series[a].color || o.options.colors?.[a] || o.options.colors?.[0] }, d, n)).data = n.data, c.data && (i.hasNavigatorData = !0, h.push(o.initSeries(c)));
|
|
740
|
-
})), t && this.addBaseSeriesEvents();
|
|
741
|
-
}
|
|
742
|
-
addBaseSeriesEvents() {
|
|
743
|
-
let t = this, e = t.baseSeries || [];
|
|
744
|
-
e[0] && e[0].xAxis && e[0].eventsToUnbind.push(B(e[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), e.forEach((i) => {
|
|
745
|
-
i.eventsToUnbind.push(B(i, "show", function() {
|
|
746
|
-
this.navigatorSeries && this.navigatorSeries.setVisible(!0, !1);
|
|
747
|
-
})), i.eventsToUnbind.push(B(i, "hide", function() {
|
|
748
|
-
this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
|
|
749
|
-
})), this.navigatorOptions.adaptToUpdatedData !== !1 && i.xAxis && i.eventsToUnbind.push(B(i, "updatedData", this.updatedDataHandler)), i.eventsToUnbind.push(B(i, "remove", function() {
|
|
750
|
-
e && pt(e, i), this.navigatorSeries && t.series && (pt(t.series, this.navigatorSeries), G(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
|
|
751
|
-
}));
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
getBaseSeriesMin(t) {
|
|
755
|
-
return this.baseSeries.reduce(function(e, i) {
|
|
756
|
-
return Math.min(e, i.getColumn("x")[0] ?? e);
|
|
757
|
-
}, t);
|
|
758
|
-
}
|
|
759
|
-
modifyNavigatorAxisExtremes() {
|
|
760
|
-
let t = this.xAxis;
|
|
761
|
-
if (t.getExtremes !== void 0) {
|
|
762
|
-
let e = this.getUnionExtremes(!0);
|
|
763
|
-
e && (e.dataMin !== t.min || e.dataMax !== t.max) && (t.min = e.dataMin, t.max = e.dataMax);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
modifyBaseAxisExtremes() {
|
|
767
|
-
let t, e, i = this.chart.navigator, o = this.getExtremes(), r = o.min, d = o.max, h = o.dataMin, u = o.dataMax, c = d - r, g = i?.stickToMin, p = i?.stickToMax, n = D(this.ordinal?.convertOverscroll(this.options.overscroll), 0), a = i.series && i.series[0], l = !!this.setExtremes;
|
|
768
|
-
!(this.eventArgs && this.eventArgs.trigger === "rangeSelectorButton") && (g && (t = (e = h) + c), p && (t = u + n, g || (e = Math.max(h, t - c, i.getBaseSeriesMin(a && a.xData ? a.xData[0] : -Number.MAX_VALUE)))), l && (g || p) && O(e) && (this.min = this.userMin = e, this.max = this.userMax = t)), i.stickToMin = i.stickToMax = null;
|
|
769
|
-
}
|
|
770
|
-
updatedDataHandler() {
|
|
771
|
-
let t = this.chart.navigator, e = this.navigatorSeries, i = t.reversedExtremes ? Math.round(t.zoomedMin) === 0 : Math.round(t.zoomedMax) >= Math.round(t.size);
|
|
772
|
-
t.stickToMax = D(this.chart.options.navigator && this.chart.options.navigator.stickToMax, i), t.stickToMin = t.shouldStickToMin(this, t), e && !t.hasNavigatorData && (e.options.pointStart = this.getColumn("x")[0], e.setData(this.options.data, !1, void 0, !1));
|
|
773
|
-
}
|
|
774
|
-
shouldStickToMin(t, e) {
|
|
775
|
-
let i = e.getBaseSeriesMin(t.getColumn("x")[0]), o = t.xAxis, r = o.max, d = o.min, h = o.options.range;
|
|
776
|
-
return !!(O(r) && O(d)) && (h && r - i > 0 ? r - i < h : d <= i);
|
|
777
|
-
}
|
|
778
|
-
addChartEvents() {
|
|
779
|
-
this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(B(this.chart, "redraw", function() {
|
|
780
|
-
let t = this.navigator, e = t && (t.baseSeries && t.baseSeries[0] && t.baseSeries[0].xAxis || this.xAxis[0]);
|
|
781
|
-
e && t.render(e.min, e.max);
|
|
782
|
-
}), B(this.chart, "getMargins", function() {
|
|
783
|
-
let t = this.navigator, e = t.opposite ? "plotTop" : "marginBottom";
|
|
784
|
-
this.inverted && (e = t.opposite ? "marginRight" : "plotLeft"), this[e] = (this[e] || 0) + (t.navigatorEnabled || !this.inverted ? t.height + (this.scrollbar?.options.margin || 0) + t.scrollbarHeight : 0) + (t.navigatorOptions.margin || 0);
|
|
785
|
-
}), B(this, "setRange", function(t) {
|
|
786
|
-
this.chart.xAxis[0].setExtremes(t.min, t.max, t.redraw, t.animation, t.eventArguments);
|
|
787
|
-
}));
|
|
788
|
-
}
|
|
789
|
-
destroy() {
|
|
790
|
-
this.removeEvents(), this.xAxis && (pt(this.chart.xAxis, this.xAxis), pt(this.chart.axes, this.xAxis)), this.yAxis && (pt(this.chart.yAxis, this.yAxis), pt(this.chart.axes, this.yAxis)), (this.series || []).forEach((t) => {
|
|
791
|
-
t.destroy && t.destroy();
|
|
792
|
-
}), ["series", "xAxis", "yAxis", "shades", "outline", "scrollbarTrack", "scrollbarRifles", "scrollbarGroup", "scrollbar", "navigatorGroup", "rendered"].forEach((t) => {
|
|
793
|
-
this[t] && this[t].destroy && this[t].destroy(), this[t] = null;
|
|
794
|
-
}), [this.handles].forEach((t) => {
|
|
795
|
-
Ut(t);
|
|
796
|
-
}), this.baseSeries.forEach((t) => {
|
|
797
|
-
t.navigatorSeries = void 0;
|
|
798
|
-
}), this.navigatorEnabled = !1;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
let { setLength: Hi, splice: xe } = { setLength: function(s, t, e) {
|
|
802
|
-
return Array.isArray(s) ? (s.length = t, s) : s[e ? "subarray" : "slice"](0, t);
|
|
803
|
-
}, splice: function(s, t, e, i, o = []) {
|
|
804
|
-
if (Array.isArray(s)) return Array.isArray(o) || (o = Array.from(o)), { removed: s.splice(t, e, ...o), array: s };
|
|
805
|
-
let r = Object.getPrototypeOf(s).constructor, d = s[i ? "subarray" : "slice"](t, t + e), h = new r(s.length - e + o.length);
|
|
806
|
-
return h.set(s.subarray(0, t), 0), h.set(o, t), h.set(s.subarray(t + e), t + o.length), { removed: d, array: h };
|
|
807
|
-
} }, be = class {
|
|
808
|
-
constructor(s = {}) {
|
|
809
|
-
this.autoId = !s.id, this.columns = {}, this.id = s.id || (0, q.uniqueKey)(), this.rowCount = 0, this.versionTag = (0, q.uniqueKey)();
|
|
810
|
-
let t = 0;
|
|
811
|
-
it(s.columns || {}, (e, i) => {
|
|
812
|
-
this.columns[i] = e.slice(), t = Math.max(t, e.length);
|
|
813
|
-
}), this.applyRowCount(t);
|
|
814
|
-
}
|
|
815
|
-
applyRowCount(s) {
|
|
816
|
-
this.rowCount = s, it(this.columns, (t, e) => {
|
|
817
|
-
t.length !== s && (this.columns[e] = Hi(t, s));
|
|
818
|
-
});
|
|
819
|
-
}
|
|
820
|
-
deleteRows(s, t = 1) {
|
|
821
|
-
if (t > 0 && s < this.rowCount) {
|
|
822
|
-
let e = 0;
|
|
823
|
-
it(this.columns, (i, o) => {
|
|
824
|
-
this.columns[o] = xe(i, s, t).array, e = i.length;
|
|
825
|
-
}), this.rowCount = e;
|
|
826
|
-
}
|
|
827
|
-
_(this, "afterDeleteRows", { rowIndex: s, rowCount: t }), this.versionTag = (0, q.uniqueKey)();
|
|
828
|
-
}
|
|
829
|
-
getColumn(s, t) {
|
|
830
|
-
return this.columns[s];
|
|
831
|
-
}
|
|
832
|
-
getColumns(s, t) {
|
|
833
|
-
return (s || Object.keys(this.columns)).reduce((e, i) => (e[i] = this.columns[i], e), {});
|
|
834
|
-
}
|
|
835
|
-
getRow(s, t) {
|
|
836
|
-
return (t || Object.keys(this.columns)).map((e) => this.columns[e]?.[s]);
|
|
837
|
-
}
|
|
838
|
-
setColumn(s, t = [], e = 0, i) {
|
|
839
|
-
this.setColumns({ [s]: t }, e, i);
|
|
840
|
-
}
|
|
841
|
-
setColumns(s, t, e) {
|
|
842
|
-
let i = this.rowCount;
|
|
843
|
-
it(s, (o, r) => {
|
|
844
|
-
this.columns[r] = o.slice(), i = o.length;
|
|
845
|
-
}), this.applyRowCount(i), e?.silent || (_(this, "afterSetColumns"), this.versionTag = (0, q.uniqueKey)());
|
|
846
|
-
}
|
|
847
|
-
setRow(s, t = this.rowCount, e, i) {
|
|
848
|
-
let { columns: o } = this, r = e ? this.rowCount + 1 : t + 1, d = Object.keys(s);
|
|
849
|
-
if (i?.addColumns !== !1) for (let h = 0, u = d.length; h < u; h++) {
|
|
850
|
-
let c = d[h];
|
|
851
|
-
o[c] || (o[c] = []);
|
|
852
|
-
}
|
|
853
|
-
it(o, (h, u) => {
|
|
854
|
-
h || i?.addColumns === !1 || (h = Array(r)), h && (e ? h = xe(h, t, 0, !0, [s[u] ?? null]).array : h[t] = s[u] ?? null, o[u] = h);
|
|
855
|
-
}), r > this.rowCount && this.applyRowCount(r), i?.silent || (_(this, "afterSetRows"), this.versionTag = (0, q.uniqueKey)());
|
|
856
|
-
}
|
|
857
|
-
getModified() {
|
|
858
|
-
return this.modified || this;
|
|
859
|
-
}
|
|
860
|
-
};
|
|
861
|
-
(function(s) {
|
|
862
|
-
function t(n, a, l, f, m = [], b = 0, x) {
|
|
863
|
-
let v = {}, M = this.options.tickPixelInterval, w = this.chart.time, A = [], y, E, S, C, k, T = 0, R = [], P = -Number.MAX_VALUE;
|
|
864
|
-
if (!this.options.ordinal && !this.options.breaks || !m || m.length < 3 || a === void 0) return w.getTimeTicks.apply(w, arguments);
|
|
865
|
-
let I = m.length;
|
|
866
|
-
for (y = 0; y < I; y++) {
|
|
867
|
-
if (k = y && m[y - 1] > l, m[y] < a && (T = y), y === I - 1 || m[y + 1] - m[y] > 5 * b || k) {
|
|
868
|
-
if (m[y] > P) {
|
|
869
|
-
for (E = w.getTimeTicks(n, m[T], m[y], f); E.length && E[0] <= P; ) E.shift();
|
|
870
|
-
E.length && (P = E[E.length - 1]), A.push(R.length), R = R.concat(E);
|
|
871
|
-
}
|
|
872
|
-
T = y + 1;
|
|
873
|
-
}
|
|
874
|
-
if (k) break;
|
|
875
|
-
}
|
|
876
|
-
if (E) {
|
|
877
|
-
if (C = E.info, x && C.unitRange <= q.timeUnits.hour) {
|
|
878
|
-
for (T = 1, y = R.length - 1; T < y; T++) w.dateFormat("%d", R[T]) !== w.dateFormat("%d", R[T - 1]) && (v[R[T]] = "day", S = !0);
|
|
879
|
-
S && (v[R[0]] = "day"), C.higherRanks = v;
|
|
880
|
-
}
|
|
881
|
-
C.segmentStarts = A, R.info = C;
|
|
882
|
-
} else (0, q.error)(12, !1, this.chart);
|
|
883
|
-
if (x && G(M)) {
|
|
884
|
-
let z = R.length, Z = [], N = [], Y, V, K, nt, xt, J = z;
|
|
885
|
-
for (; J--; ) V = this.translate(R[J]), K && (N[J] = K - V), Z[J] = K = V;
|
|
886
|
-
for (N.sort((bt, Bt) => bt - Bt), (nt = N[Math.floor(N.length / 2)]) < 0.6 * M && (nt = null), J = R[z - 1] > l ? z - 1 : z, K = void 0; J--; ) xt = Math.abs(K - (V = Z[J])), K && xt < 0.8 * M && (nt === null || xt < 0.8 * nt) ? (v[R[J]] && !v[R[J + 1]] ? (Y = J + 1, K = V) : Y = J, R.splice(Y, 1)) : K = V;
|
|
887
|
-
}
|
|
888
|
-
return R;
|
|
889
|
-
}
|
|
890
|
-
function e(n) {
|
|
891
|
-
let a = this.ordinal.positions;
|
|
892
|
-
if (!a) return n;
|
|
893
|
-
let l = a.length - 1, f;
|
|
894
|
-
return n < 0 ? n = a[0] : n > l ? n = a[l] : (l = Math.floor(n), f = n - l), f !== void 0 && a[l] !== void 0 ? a[l] + (f ? f * (a[l + 1] - a[l]) : 0) : n;
|
|
895
|
-
}
|
|
896
|
-
function i(n) {
|
|
897
|
-
let a = this.ordinal, l = this.old ? this.old.min : this.min, f = this.old ? this.old.transA : this.transA, m = a.getExtendedPositions();
|
|
898
|
-
if (m?.length) {
|
|
899
|
-
let b = U((n - l) * f + this.minPixelPadding), x = U(a.getIndexOfPoint(b, m)), v = U(x % 1);
|
|
900
|
-
if (x >= 0 && x <= m.length - 1) {
|
|
901
|
-
let M = m[Math.floor(x)], w = m[Math.ceil(x)];
|
|
902
|
-
return m[Math.floor(x)] + v * (w - M);
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
return n;
|
|
906
|
-
}
|
|
907
|
-
function o(n, a) {
|
|
908
|
-
let l = s.Additions.findIndexOf(n, a, !0);
|
|
909
|
-
if (n[l] === a) return l;
|
|
910
|
-
let f = (a - n[l]) / (n[l + 1] - n[l]);
|
|
911
|
-
return l + f;
|
|
912
|
-
}
|
|
913
|
-
function r() {
|
|
914
|
-
this.ordinal || (this.ordinal = new s.Additions(this));
|
|
915
|
-
}
|
|
916
|
-
function d() {
|
|
917
|
-
let { eventArgs: n, options: a } = this;
|
|
918
|
-
if (this.isXAxis && G(a.overscroll) && a.overscroll !== 0 && O(this.max) && O(this.min) && (this.options.ordinal && !this.ordinal.originalOrdinalRange && this.ordinal.getExtendedPositions(!1), this.isFullRange = G(this.dataMin) && G(this.dataMax) && this.max - this.min == this.dataMax - this.dataMin, this.max === this.dataMax && (n?.trigger !== "pan" || this.isInternal) && n?.trigger !== "navigator")) {
|
|
919
|
-
let l = this.ordinal.convertOverscroll(a.overscroll);
|
|
920
|
-
this.max += l, !this.isInternal && G(this.userMin) && n?.trigger !== "mousewheel" && (this.min += l);
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
function h() {
|
|
924
|
-
this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
|
|
925
|
-
}
|
|
926
|
-
function u() {
|
|
927
|
-
this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
|
|
928
|
-
}
|
|
929
|
-
function c(n) {
|
|
930
|
-
let a = this.xAxis[0], l = a.ordinal.convertOverscroll(a.options.overscroll), f = n.originalEvent.chartX, m = this.options.chart.panning, b = !1;
|
|
931
|
-
if (m?.type !== "y" && a.options.ordinal && a.series.length && (!n.touches || n.touches.length <= 1)) {
|
|
932
|
-
let x, v, M = this.mouseDownX, w = a.getExtremes(), A = w.dataMin, y = w.dataMax, E = w.min, S = w.max, C = this.hoverPoints, k = a.closestPointRange || a.ordinal?.overscrollPointsRange, T = Math.round((M - f) / (a.translationSlope * (a.ordinal.slope || k))), R = a.ordinal.getExtendedPositions(), P = { ordinal: { positions: R, extendedOrdinalPositions: R } }, I = a.index2val, z = a.val2lin;
|
|
933
|
-
if (E <= A && T <= 0 || S >= y + l && T >= 0) return void n.preventDefault();
|
|
934
|
-
P.ordinal.positions ? Math.abs(T) > 1 && (C && C.forEach(function(Z) {
|
|
935
|
-
Z.setState();
|
|
936
|
-
}), v = P.ordinal.positions, l && (v = P.ordinal.positions = v.concat(a.ordinal.getOverscrollPositions())), y > v[v.length - 1] && v.push(y), this.setFixedRange(S - E), (x = a.navigatorAxis.toFixedRange(void 0, void 0, I.apply(P, [z.apply(P, [E, !0]) + T]), I.apply(P, [z.apply(P, [S, !0]) + T]))).min >= Math.min(v[0], E) && x.max <= Math.max(v[v.length - 1], S) + l && a.setExtremes(x.min, x.max, !0, !1, { trigger: "pan" }), this.mouseDownX = f, et(this.container, { cursor: "move" })) : b = !0;
|
|
937
|
-
} else b = !0;
|
|
938
|
-
b || m && /y/.test(m.type) ? l && O(a.dataMax) && (a.max = a.dataMax + l) : n.preventDefault();
|
|
939
|
-
}
|
|
940
|
-
function g() {
|
|
941
|
-
let n = this.xAxis;
|
|
942
|
-
n?.options.ordinal && (delete n.ordinal.index, delete n.ordinal.originalOrdinalRange);
|
|
943
|
-
}
|
|
944
|
-
function p(n, a) {
|
|
945
|
-
let l, f = this.ordinal, m = f.positions, b = f.slope, x;
|
|
946
|
-
if (!m) return n;
|
|
947
|
-
let v = m.length;
|
|
948
|
-
if (m[0] <= n && m[v - 1] >= n) l = o(m, n);
|
|
949
|
-
else {
|
|
950
|
-
if (x = f.getExtendedPositions?.(), !x?.length) return n;
|
|
951
|
-
let M = x.length;
|
|
952
|
-
b || (b = (x[M - 1] - x[0]) / M);
|
|
953
|
-
let w = o(x, m[0]);
|
|
954
|
-
if (n >= x[0] && n <= x[M - 1]) l = o(x, n) - w;
|
|
955
|
-
else {
|
|
956
|
-
if (!a) return n;
|
|
957
|
-
l = n < x[0] ? -w - (x[0] - n) / b : (n - x[M - 1]) / b + M - w;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
return a ? l : b * (l || 0) + f.offset;
|
|
961
|
-
}
|
|
962
|
-
s.compose = function(n, a, l) {
|
|
963
|
-
let f = n.prototype;
|
|
964
|
-
return f.ordinal2lin || (f.getTimeTicks = t, f.index2val = e, f.lin2val = i, f.val2lin = p, f.ordinal2lin = f.val2lin, B(n, "afterInit", r), B(n, "foundExtremes", d), B(n, "afterSetScale", h), B(n, "initialAxisTranslation", u), B(l, "pan", c), B(l, "touchpan", c), B(a, "updatedData", g)), n;
|
|
965
|
-
}, s.Additions = class {
|
|
966
|
-
constructor(n) {
|
|
967
|
-
this.index = {}, this.axis = n;
|
|
968
|
-
}
|
|
969
|
-
beforeSetTickPositions() {
|
|
970
|
-
let n = this.axis, a = n.ordinal, l = n.getExtremes(), f = l.min, m = l.max, b = n.brokenAxis?.hasBreaks, x = n.options.ordinal, v = n.options.overscroll && n.ordinal.convertOverscroll(n.options.overscroll) || 0, M, w, A, y, E, S, C, k = [], T = Number.MAX_VALUE, R = !1, P = !1, I = !1;
|
|
971
|
-
if (x || b) {
|
|
972
|
-
let z = 0;
|
|
973
|
-
if (n.series.forEach(function(Z, N) {
|
|
974
|
-
let Y = Z.getColumn("x", !0);
|
|
975
|
-
if (w = [], N > 0 && Z.options.id !== "highcharts-navigator-series" && Y.length > 1 && (P = z !== Y[1] - Y[0]), z = Y[1] - Y[0], Z.boosted && (I = Z.boosted), Z.reserveSpace() && (Z.takeOrdinalPosition !== !1 || b) && (M = (k = k.concat(Y)).length, k.sort(function(V, K) {
|
|
976
|
-
return V - K;
|
|
977
|
-
}), T = Math.min(T, D(Z.closestPointRange, T)), M)) {
|
|
978
|
-
for (N = 0; N < M - 1; ) k[N] !== k[N + 1] && w.push(k[N + 1]), N++;
|
|
979
|
-
w[0] !== k[0] && w.unshift(k[0]), k = w;
|
|
980
|
-
}
|
|
981
|
-
}), n.ordinal.originalOrdinalRange || (n.ordinal.originalOrdinalRange = (k.length - 1) * T), P && I && (k.pop(), k.shift()), (M = k.length) > 2) {
|
|
982
|
-
for (A = k[1] - k[0], C = M - 1; C-- && !R; ) k[C + 1] - k[C] !== A && (R = !0);
|
|
983
|
-
!n.options.keepOrdinalPadding && (k[0] - f > A || m - v - k[M - 1] > A) && (R = !0);
|
|
984
|
-
} else n.options.overscroll && (M === 2 ? T = k[1] - k[0] : M === 1 ? (T = v, k = [k[0], k[0] + T]) : T = a.overscrollPointsRange);
|
|
985
|
-
R || n.forceOrdinal ? (n.options.overscroll && (a.overscrollPointsRange = T, k = k.concat(a.getOverscrollPositions())), a.positions = k, y = n.ordinal2lin(Math.max(f, k[0]), !0), E = Math.max(n.ordinal2lin(Math.min(m, k[k.length - 1]), !0), 1), a.slope = S = (m - f) / (E - y), a.offset = f - y * S) : (a.overscrollPointsRange = D(n.closestPointRange, a.overscrollPointsRange), a.positions = n.ordinal.slope = a.offset = void 0);
|
|
986
|
-
}
|
|
987
|
-
n.isOrdinal = x && R, a.groupIntervalFactor = null;
|
|
988
|
-
}
|
|
989
|
-
static findIndexOf(n, a, l) {
|
|
990
|
-
let f = 0, m = n.length - 1, b;
|
|
991
|
-
for (; f < m; ) n[b = Math.ceil((f + m) / 2)] <= a ? f = b : m = b - 1;
|
|
992
|
-
return n[f] === a || l ? f : -1;
|
|
993
|
-
}
|
|
994
|
-
getExtendedPositions(n = !0) {
|
|
995
|
-
let a = this, l = a.axis, f = l.constructor.prototype, m = l.chart, b = l.series.reduce((y, E) => {
|
|
996
|
-
let S = E.currentDataGrouping;
|
|
997
|
-
return y + (S ? S.count + S.unitName : "raw");
|
|
998
|
-
}, ""), x = n ? l.ordinal.convertOverscroll(l.options.overscroll) : 0, v = l.getExtremes(), M, w, A = a.index;
|
|
999
|
-
return A || (A = a.index = {}), !A[b] && ((M = { series: [], chart: m, forceOrdinal: !1, getExtremes: function() {
|
|
1000
|
-
return { min: v.dataMin, max: v.dataMax + x };
|
|
1001
|
-
}, applyGrouping: f.applyGrouping, getGroupPixelWidth: f.getGroupPixelWidth, getTimeTicks: f.getTimeTicks, options: { ordinal: !0 }, ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor }, ordinal2lin: f.ordinal2lin, getIndexOfPoint: f.getIndexOfPoint, val2lin: f.val2lin }).ordinal.axis = M, l.series.forEach((y) => {
|
|
1002
|
-
if (y.takeOrdinalPosition === !1) return;
|
|
1003
|
-
w = { xAxis: M, chart: m, groupPixelWidth: y.groupPixelWidth, destroyGroupedData: W().noop, getColumn: y.getColumn, applyGrouping: y.applyGrouping, getProcessedData: y.getProcessedData, reserveSpace: y.reserveSpace, visible: y.visible };
|
|
1004
|
-
let E = y.getColumn("x").concat(n ? a.getOverscrollPositions() : []);
|
|
1005
|
-
w.dataTable = new be({ columns: { x: E } }), w.options = { ...y.options, dataGrouping: y.currentDataGrouping ? { firstAnchor: y.options.dataGrouping?.firstAnchor, anchor: y.options.dataGrouping?.anchor, lastAnchor: y.options.dataGrouping?.firstAnchor, enabled: !0, forced: !0, approximation: "open", units: [[y.currentDataGrouping.unitName, [y.currentDataGrouping.count]]] } : { enabled: !1 } }, M.series.push(w), y.processData.apply(w);
|
|
1006
|
-
}), M.applyGrouping({ hasExtremesChanged: !0 }), w?.closestPointRange !== w?.basePointRange && w.currentDataGrouping && (M.forceOrdinal = !0), l.ordinal.beforeSetTickPositions.apply({ axis: M }), !l.ordinal.originalOrdinalRange && M.ordinal.originalOrdinalRange && (l.ordinal.originalOrdinalRange = M.ordinal.originalOrdinalRange), M.ordinal.positions && (A[b] = M.ordinal.positions)), A[b];
|
|
1007
|
-
}
|
|
1008
|
-
getGroupIntervalFactor(n, a, l) {
|
|
1009
|
-
let f = l.getColumn("x", !0), m = f.length, b = [], x, v, M = this.groupIntervalFactor;
|
|
1010
|
-
if (!M) {
|
|
1011
|
-
for (v = 0; v < m - 1; v++) b[v] = f[v + 1] - f[v];
|
|
1012
|
-
b.sort(function(w, A) {
|
|
1013
|
-
return w - A;
|
|
1014
|
-
}), x = b[Math.floor(m / 2)], n = Math.max(n, f[0]), a = Math.min(a, f[m - 1]), this.groupIntervalFactor = M = m * x / (a - n);
|
|
1015
|
-
}
|
|
1016
|
-
return M;
|
|
1017
|
-
}
|
|
1018
|
-
getIndexOfPoint(n, a) {
|
|
1019
|
-
let l = this.axis, f = l.min, m = l.minPixelPadding;
|
|
1020
|
-
return o(a, f) + U((n - m) / (l.translationSlope * (this.slope || l.closestPointRange || this.overscrollPointsRange)));
|
|
1021
|
-
}
|
|
1022
|
-
getOverscrollPositions() {
|
|
1023
|
-
let n = this.axis, a = this.convertOverscroll(n.options.overscroll), l = this.overscrollPointsRange, f = [], m = n.dataMax;
|
|
1024
|
-
if (G(l)) for (; m < n.dataMax + a; ) f.push(m += l);
|
|
1025
|
-
return f;
|
|
1026
|
-
}
|
|
1027
|
-
postProcessTickInterval(n) {
|
|
1028
|
-
let a = this.axis, l = this.slope, f = a.closestPointRange;
|
|
1029
|
-
return l && f ? a.options.breaks ? f || n : n / (l / f) : n;
|
|
1030
|
-
}
|
|
1031
|
-
convertOverscroll(n = 0) {
|
|
1032
|
-
let a = this, l = a.axis, f = function(m) {
|
|
1033
|
-
return D(a.originalOrdinalRange, G(l.dataMax) && G(l.dataMin) ? l.dataMax - l.dataMin : 0) * m;
|
|
1034
|
-
};
|
|
1035
|
-
if (ut(n)) {
|
|
1036
|
-
let m = parseInt(n, 10);
|
|
1037
|
-
if (l.isFullRange === !1 && O(l.min) && O(l.max) && (this.originalOrdinalRange = l.max - l.min), /%$/.test(n)) return f(m / 100);
|
|
1038
|
-
if (/px/.test(n)) {
|
|
1039
|
-
let b = Math.min(m, 0.9 * l.len) / l.len;
|
|
1040
|
-
return f(b / (l.isFullRange ? 1 - b : 1));
|
|
1041
|
-
}
|
|
1042
|
-
return 0;
|
|
1043
|
-
}
|
|
1044
|
-
return n;
|
|
1045
|
-
}
|
|
1046
|
-
};
|
|
1047
|
-
})(Lt || (Lt = {}));
|
|
1048
|
-
let Yi = Lt, Fi = { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→", rangeSelector: { allText: "All", allTitle: "View all", monthText: "{count}m", monthTitle: "View {count} {#eq count 1}month{else}months{/eq}", yearText: "{count}y", yearTitle: "View {count} {#eq count 1}year{else}years{/eq}", ytdText: "YTD", ytdTitle: "View year to date" } }, ve = { allButtonsEnabled: !1, buttons: [{ type: "month", count: 1 }, { type: "month", count: 3 }, { type: "month", count: 6 }, { type: "ytd" }, { type: "year", count: 1 }, { type: "all" }], buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: { width: 28, height: 18, padding: 2, zIndex: 7 }, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%[ebY]", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#334eff", cursor: "pointer", fontSize: "0.8em" }, labelStyle: { color: "#666666", fontSize: "0.8em" } }, { defaultOptions: ye } = W(), { composed: Ni } = W(), $t = [];
|
|
1049
|
-
function Ui() {
|
|
1050
|
-
let s, t, e = this.range, i = e.type, o = this.max, r = this.chart.time, d = function(u, c) {
|
|
1051
|
-
let g = r.toParts(u), p = g.slice();
|
|
1052
|
-
i === "year" ? p[0] += c : p[1] += c;
|
|
1053
|
-
let n = r.makeTime.apply(r, p), a = r.toParts(n);
|
|
1054
|
-
return i === "month" && g[1] === a[1] && Math.abs(c) === 1 && (p[0] = g[0], p[1] = g[1], p[2] = 0), (n = r.makeTime.apply(r, p)) - u;
|
|
1055
|
-
};
|
|
1056
|
-
O(e) ? (s = o - e, t = e) : e && (s = o + d(o, -(e.count || 1)), this.chart && this.chart.setFixedRange(o - s));
|
|
1057
|
-
let h = D(this.dataMin, 5e-324);
|
|
1058
|
-
return O(s) || (s = h), s <= h && (s = h, t === void 0 && (t = d(s, e.count)), this.newMax = Math.min(s + t, D(this.dataMax, Number.MAX_VALUE))), O(o) ? !O(e) && e && e._offsetMin && (s += e._offsetMin) : s = void 0, s;
|
|
1059
|
-
}
|
|
1060
|
-
function Vi() {
|
|
1061
|
-
this.rangeSelector?.redrawElements();
|
|
1062
|
-
}
|
|
1063
|
-
function _i() {
|
|
1064
|
-
this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new Rt(this));
|
|
1065
|
-
}
|
|
1066
|
-
function ji() {
|
|
1067
|
-
let s = this.rangeSelector;
|
|
1068
|
-
if (s) {
|
|
1069
|
-
O(s.deferredYTDClick) && (s.clickButton(s.deferredYTDClick), delete s.deferredYTDClick);
|
|
1070
|
-
let t = s.options.verticalAlign;
|
|
1071
|
-
s.options.floating || (t === "bottom" ? this.extraBottomMargin = !0 : t === "top" && (this.extraTopMargin = !0));
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
function Me() {
|
|
1075
|
-
let s, t = this.rangeSelector;
|
|
1076
|
-
if (!t) return;
|
|
1077
|
-
let e = this.xAxis[0].getExtremes(), i = this.legend, o = t && t.options.verticalAlign;
|
|
1078
|
-
O(e.min) && t.render(e.min, e.max), i?.display && o === "top" && o === i.options.verticalAlign && (s = X(this.spacingBox), i.options.layout === "vertical" ? s.y = this.plotTop : s.y += t.getHeight(), i.group.placed = !1, i.align(s));
|
|
1079
|
-
}
|
|
1080
|
-
function Zi() {
|
|
1081
|
-
for (let s = 0, t = $t.length; s < t; ++s) {
|
|
1082
|
-
let e = $t[s];
|
|
1083
|
-
if (e[0] === this) {
|
|
1084
|
-
e[1].forEach((i) => i()), $t.splice(s, 1);
|
|
1085
|
-
return;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
function Ki() {
|
|
1090
|
-
let s = this.rangeSelector;
|
|
1091
|
-
if (s?.options?.enabled) {
|
|
1092
|
-
let { min: t, max: e } = this.xAxis[0].getExtremes();
|
|
1093
|
-
O(t) && s.inputGroup && s.inputGroup.getBBox().width < 20 && s.render(t, e);
|
|
1094
|
-
let i = s.getHeight(), o = s.options.verticalAlign;
|
|
1095
|
-
s.options.floating || (o === "bottom" ? this.marginBottom += i : o !== "middle" && (this.plotTop += i));
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
function qi(s) {
|
|
1099
|
-
let t = s.options.rangeSelector, e = this.extraBottomMargin, i = this.extraTopMargin, o = this.rangeSelector;
|
|
1100
|
-
if (t && t.enabled && !G(o) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = o = new Rt(this)), this.extraBottomMargin = !1, this.extraTopMargin = !1, o) {
|
|
1101
|
-
let r = t && t.verticalAlign || o.options && o.options.verticalAlign;
|
|
1102
|
-
o.options.floating || (r === "bottom" ? this.extraBottomMargin = !0 : r !== "middle" && (this.extraTopMargin = !0)), (this.extraBottomMargin !== e || this.extraTopMargin !== i) && (this.isDirtyBox = !0);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
let $i = function(s, t, e) {
|
|
1106
|
-
if (Rt = e, rt(Ni, "RangeSelector")) {
|
|
1107
|
-
let i = t.prototype;
|
|
1108
|
-
s.prototype.minFromRange = Ui, B(t, "afterGetContainer", _i), B(t, "beforeRender", ji), B(t, "destroy", Zi), B(t, "getMargins", Ki), B(t, "redraw", Me), B(t, "update", qi), B(t, "beforeRedraw", Vi), i.callbacks.push(Me), F(ye, { rangeSelector: ve }), F(ye.lang, Fi);
|
|
1109
|
-
}
|
|
1110
|
-
};
|
|
1111
|
-
var Ji = H(28), Ae = H.n(Ji), Qi = H(984), Jt = H.n(Qi);
|
|
1112
|
-
let { defaultOptions: Qt } = W(), { format: ke } = Jt();
|
|
1113
|
-
function we(s) {
|
|
1114
|
-
let t = (o) => RegExp(`%[[a-zA-Z]*${o}`).test(s);
|
|
1115
|
-
if (ut(s) ? s.indexOf("%L") !== -1 : s.fractionalSecondDigits) return "text";
|
|
1116
|
-
let e = ut(s) ? ["a", "A", "d", "e", "w", "b", "B", "m", "o", "y", "Y"].some(t) : s.dateStyle || s.day || s.month || s.year, i = ut(s) ? ["H", "k", "I", "l", "M", "S"].some(t) : s.timeStyle || s.hour || s.minute || s.second;
|
|
1117
|
-
return e && i ? "datetime-local" : e ? "date" : i ? "time" : "text";
|
|
1118
|
-
}
|
|
1119
|
-
class At {
|
|
1120
|
-
static compose(t, e) {
|
|
1121
|
-
$i(t, e, At);
|
|
1122
|
-
}
|
|
1123
|
-
constructor(t) {
|
|
1124
|
-
this.isDirty = !1, this.buttonOptions = [], this.initialButtonGroupWidth = 0, this.maxButtonWidth = () => {
|
|
1125
|
-
let e = 0;
|
|
1126
|
-
return this.buttons.forEach((i) => {
|
|
1127
|
-
let o = i.getBBox();
|
|
1128
|
-
o.width > e && (e = o.width);
|
|
1129
|
-
}), e;
|
|
1130
|
-
}, this.init(t);
|
|
1131
|
-
}
|
|
1132
|
-
clickButton(t, e) {
|
|
1133
|
-
let i = this.chart, o = this.buttonOptions[t], r = i.xAxis[0], d = i.scroller && i.scroller.getUnionExtremes() || r || {}, h = o.type, u = o.dataGrouping, c = d.dataMin, g = d.dataMax, p, n = O(r?.max) ? Math.round(Math.min(r.max, g ?? r.max)) : void 0, a, l = o._range, f, m, b, x = !0;
|
|
1134
|
-
if (c !== null && g !== null) {
|
|
1135
|
-
if (this.setSelected(t), u && (this.forcedDataGrouping = !0, _t().prototype.setDataGrouping.call(r || { chart: this.chart }, u, !1), this.frozenStates = o.preserveDataGrouping), h === "month" || h === "year") r ? (m = { range: o, max: n, chart: i, dataMin: c, dataMax: g }, p = r.minFromRange.call(m), O(m.newMax) && (n = m.newMax), x = !1) : l = o;
|
|
1136
|
-
else if (l) O(n) && (n = Math.min((p = Math.max(n - l, c)) + l, g), x = !1);
|
|
1137
|
-
else if (h === "ytd") if (r) !r.hasData() || O(g) && O(c) || (c = Number.MAX_VALUE, g = -Number.MAX_VALUE, i.series.forEach((v) => {
|
|
1138
|
-
let M = v.getColumn("x");
|
|
1139
|
-
M.length && (c = Math.min(M[0], c), g = Math.max(M[M.length - 1], g));
|
|
1140
|
-
}), e = !1), O(g) && O(c) && (p = f = (b = this.getYTDExtremes(g, c)).min, n = b.max);
|
|
1141
|
-
else {
|
|
1142
|
-
this.deferredYTDClick = t;
|
|
1143
|
-
return;
|
|
1144
|
-
}
|
|
1145
|
-
else h === "all" && r && (i.navigator && i.navigator.baseSeries[0] && (i.navigator.baseSeries[0].xAxis.options.range = void 0), p = c, n = g);
|
|
1146
|
-
if (x && o._offsetMin && G(p) && (p += o._offsetMin), o._offsetMax && G(n) && (n += o._offsetMax), this.dropdown && (this.dropdown.selectedIndex = t + 1), r) (O(p) || O(n)) && (r.setExtremes(p, n, D(e, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: o }), i.setFixedRange(o._range));
|
|
1147
|
-
else {
|
|
1148
|
-
a = ft(i.options.xAxis || {})[0];
|
|
1149
|
-
let v = B(i, "afterCreateAxes", function() {
|
|
1150
|
-
let M = i.xAxis[0];
|
|
1151
|
-
M.range = M.options.range = l, M.min = M.options.min = f;
|
|
1152
|
-
});
|
|
1153
|
-
B(i, "load", function() {
|
|
1154
|
-
let M = i.xAxis[0];
|
|
1155
|
-
i.setFixedRange(o._range), M.options.range = a.range, M.options.min = a.min, v();
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
_(this, "afterBtnClick");
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
setSelected(t) {
|
|
1162
|
-
this.selected = this.options.selected = t;
|
|
1163
|
-
}
|
|
1164
|
-
init(t) {
|
|
1165
|
-
let e = this, i = t.options.rangeSelector, o = t.options.lang, r = i.buttons, d = i.selected, h = function() {
|
|
1166
|
-
let u = e.minInput, c = e.maxInput;
|
|
1167
|
-
u && u.blur && _(u, "blur"), c && c.blur && _(c, "blur");
|
|
1168
|
-
};
|
|
1169
|
-
e.chart = t, e.options = i, e.buttons = [], e.buttonOptions = r.map((u) => (u.type && o.rangeSelector && (u.text ?? (u.text = o.rangeSelector[`${u.type}Text`]), u.title ?? (u.title = o.rangeSelector[`${u.type}Title`])), u.text = ke(u.text, { count: u.count || 1 }), u.title = ke(u.title, { count: u.count || 1 }), u)), this.eventsToUnbind = [], this.eventsToUnbind.push(B(t.container, "mousedown", h)), this.eventsToUnbind.push(B(t, "resize", h)), r.forEach(e.computeButtonRange), d !== void 0 && r[d] && this.clickButton(d, !1), this.eventsToUnbind.push(B(t, "load", function() {
|
|
1170
|
-
t.xAxis && t.xAxis[0] && B(t.xAxis[0], "setExtremes", function(u) {
|
|
1171
|
-
O(this.max) && O(this.min) && this.max - this.min !== t.fixedRange && u.trigger !== "rangeSelectorButton" && u.trigger !== "updatedData" && e.forcedDataGrouping && !e.frozenStates && this.setDataGrouping(!1, !1);
|
|
1172
|
-
});
|
|
1173
|
-
})), this.createElements();
|
|
1174
|
-
}
|
|
1175
|
-
updateButtonStates() {
|
|
1176
|
-
let t = this, e = this.chart, i = this.dropdown, o = this.dropdownLabel, r = e.xAxis[0], d = Math.round(r.max - r.min), h = !r.hasVisibleSeries, u = 24 * 36e5, c = e.scroller && e.scroller.getUnionExtremes() || r, g = c.dataMin, p = c.dataMax, n = t.getYTDExtremes(p, g), a = n.min, l = n.max, f = t.selected, m = t.options.allButtonsEnabled, b = Array(t.buttonOptions.length).fill(0), x = O(f), v = t.buttons, M = !1, w = null;
|
|
1177
|
-
t.buttonOptions.forEach((A, y) => {
|
|
1178
|
-
let E = A._range, S = A.type, C = A.count || 1, k = A._offsetMax - A._offsetMin, T = y === f, R = E > p - g, P = E < r.minRange, I = !1, z = E === d;
|
|
1179
|
-
if (T && R && (M = !0), r.isOrdinal && r.ordinal?.positions && E && d < E) {
|
|
1180
|
-
let Y = r.ordinal.positions;
|
|
1181
|
-
Y[Y.length - 1] - Y[0] > E && (z = !0);
|
|
1182
|
-
} else (S === "month" || S === "year") && d + 36e5 >= { month: 28, year: 365 }[S] * u * C - k && d - 36e5 <= { month: 31, year: 366 }[S] * u * C + k ? z = !0 : S === "ytd" ? (z = l - a + k === d, I = !T) : S === "all" && (z = r.max - r.min >= p - g);
|
|
1183
|
-
let Z = !m && !(M && S === "all") && (R || P || h), N = M && S === "all" || !I && z || T && t.frozenStates;
|
|
1184
|
-
Z ? b[y] = 3 : N && (!x || y === f) && (w = y);
|
|
1185
|
-
}), w !== null ? (b[w] = 2, t.setSelected(w), this.dropdown && (this.dropdown.selectedIndex = w + 1)) : (t.setSelected(), this.dropdown && (this.dropdown.selectedIndex = -1), o && (o.setState(0), o.attr({ text: (Qt.lang.rangeSelectorZoom || "") + " ▾" })));
|
|
1186
|
-
for (let A = 0; A < b.length; A++) {
|
|
1187
|
-
let y = b[A], E = v[A];
|
|
1188
|
-
if (E.state !== y && (E.setState(y), i)) {
|
|
1189
|
-
i.options[A + 1].disabled = y === 3, y === 2 && (o && (o.setState(2), o.attr({ text: t.buttonOptions[A].text + " ▾" })), i.selectedIndex = A + 1);
|
|
1190
|
-
let S = o.getBBox();
|
|
1191
|
-
et(i, { width: `${S.width}px`, height: `${S.height}px` });
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
computeButtonRange(t) {
|
|
1196
|
-
let e = t.type, i = t.count || 1, o = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
|
|
1197
|
-
o[e] ? t._range = o[e] * i : (e === "month" || e === "year") && (t._range = 24 * { month: 30, year: 365 }[e] * 36e5 * i), t._offsetMin = D(t.offsetMin, 0), t._offsetMax = D(t.offsetMax, 0), t._range += t._offsetMax - t._offsetMin;
|
|
1198
|
-
}
|
|
1199
|
-
getInputValue(t) {
|
|
1200
|
-
let e = t === "min" ? this.minInput : this.maxInput, i = this.chart.options.rangeSelector, o = this.chart.time;
|
|
1201
|
-
return e ? (e.type === "text" && i.inputDateParser || this.defaultInputDateParser)(e.value, o.timezone === "UTC", o) : 0;
|
|
1202
|
-
}
|
|
1203
|
-
setInputValue(t, e) {
|
|
1204
|
-
let i = this.options, o = this.chart.time, r = t === "min" ? this.minInput : this.maxInput, d = t === "min" ? this.minDateBox : this.maxDateBox;
|
|
1205
|
-
if (r) {
|
|
1206
|
-
r.setAttribute("type", we(i.inputDateFormat || "%e %b %Y"));
|
|
1207
|
-
let h = r.getAttribute("data-hc-time"), u = G(h) ? Number(h) : void 0;
|
|
1208
|
-
if (G(e)) {
|
|
1209
|
-
let c = u;
|
|
1210
|
-
G(c) && r.setAttribute("data-hc-time-previous", c), r.setAttribute("data-hc-time", e), u = e;
|
|
1211
|
-
}
|
|
1212
|
-
r.value = o.dateFormat(this.inputTypeFormats[r.type] || i.inputEditDateFormat, u), d && d.attr({ text: o.dateFormat(i.inputDateFormat, u) });
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
setInputExtremes(t, e, i) {
|
|
1216
|
-
let o = t === "min" ? this.minInput : this.maxInput;
|
|
1217
|
-
if (o) {
|
|
1218
|
-
let r = this.inputTypeFormats[o.type], d = this.chart.time;
|
|
1219
|
-
if (r) {
|
|
1220
|
-
let h = d.dateFormat(r, e);
|
|
1221
|
-
o.min !== h && (o.min = h);
|
|
1222
|
-
let u = d.dateFormat(r, i);
|
|
1223
|
-
o.max !== u && (o.max = u);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
showInput(t) {
|
|
1228
|
-
let e = t === "min" ? this.minDateBox : this.maxDateBox, i = t === "min" ? this.minInput : this.maxInput;
|
|
1229
|
-
if (i && e && this.inputGroup) {
|
|
1230
|
-
let o = i.type === "text", { translateX: r = 0, translateY: d = 0 } = this.inputGroup, { x: h = 0, width: u = 0, height: c = 0 } = e, { inputBoxWidth: g } = this.options;
|
|
1231
|
-
et(i, { width: o ? u + (g ? -2 : 20) + "px" : "auto", height: c - 2 + "px", border: "2px solid silver" }), o && g ? et(i, { left: r + h + "px", top: d + "px" }) : et(i, { left: Math.min(Math.round(h + r - (i.offsetWidth - u) / 2), this.chart.chartWidth - i.offsetWidth) + "px", top: d - (i.offsetHeight - c) / 2 + "px" });
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
hideInput(t) {
|
|
1235
|
-
let e = t === "min" ? this.minInput : this.maxInput;
|
|
1236
|
-
e && et(e, { top: "-9999em", border: 0, width: "1px", height: "1px" });
|
|
1237
|
-
}
|
|
1238
|
-
defaultInputDateParser(t, e, i) {
|
|
1239
|
-
return i?.parse(t) || 0;
|
|
1240
|
-
}
|
|
1241
|
-
drawInput(t) {
|
|
1242
|
-
let { chart: e, div: i, inputGroup: o } = this, r = this, d = e.renderer.style || {}, h = e.renderer, u = e.options.rangeSelector, c = Qt.lang, g = t === "min";
|
|
1243
|
-
function p(b) {
|
|
1244
|
-
let { maxInput: x, minInput: v } = r, M = e.xAxis[0], w = e.scroller?.getUnionExtremes() || M, A = w.dataMin, y = w.dataMax, E = e.xAxis[0].getExtremes()[b], S = r.getInputValue(b);
|
|
1245
|
-
O(S) && S !== E && (g && x && O(A) ? S > Number(x.getAttribute("data-hc-time")) ? S = void 0 : S < A && (S = A) : v && O(y) && (S < Number(v.getAttribute("data-hc-time")) ? S = void 0 : S > y && (S = y)), S !== void 0 && M.setExtremes(g ? S : M.min, g ? M.max : S, void 0, void 0, { trigger: "rangeSelectorInput" }));
|
|
1246
|
-
}
|
|
1247
|
-
let n = c[g ? "rangeSelectorFrom" : "rangeSelectorTo"] || "", a = h.label(n, 0).addClass("highcharts-range-label").attr({ padding: 2 * !!n, height: n ? u.inputBoxHeight : 0 }).add(o), l = h.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: u.inputBoxWidth, height: u.inputBoxHeight, "text-align": "center" }).on("click", function() {
|
|
1248
|
-
r.showInput(t), r[t + "Input"].focus();
|
|
1249
|
-
});
|
|
1250
|
-
e.styledMode || l.attr({ stroke: u.inputBoxBorderColor, "stroke-width": 1 }), l.add(o);
|
|
1251
|
-
let f = Mt("input", { name: t, className: "highcharts-range-selector" }, void 0, i);
|
|
1252
|
-
f.setAttribute("type", we(u.inputDateFormat || "%e %b %Y")), e.styledMode || (a.css(X(d, u.labelStyle)), l.css(X({ color: "#333333" }, d, u.inputStyle)), et(f, F({ position: "absolute", border: 0, boxShadow: "0 0 15px rgba(0,0,0,0.3)", width: "1px", height: "1px", padding: 0, textAlign: "center", fontSize: d.fontSize, fontFamily: d.fontFamily, top: "-9999em" }, u.inputStyle))), f.onfocus = () => {
|
|
1253
|
-
r.showInput(t);
|
|
1254
|
-
}, f.onblur = () => {
|
|
1255
|
-
f === W().doc.activeElement && p(t), r.hideInput(t), r.setInputValue(t), f.blur();
|
|
1256
|
-
};
|
|
1257
|
-
let m = !1;
|
|
1258
|
-
return f.onchange = () => {
|
|
1259
|
-
m || (p(t), r.hideInput(t), f.blur());
|
|
1260
|
-
}, f.onkeypress = (b) => {
|
|
1261
|
-
b.keyCode === 13 && p(t);
|
|
1262
|
-
}, f.onkeydown = (b) => {
|
|
1263
|
-
m = !0, (b.key === "ArrowUp" || b.key === "ArrowDown" || b.key === "Tab") && p(t);
|
|
1264
|
-
}, f.onkeyup = () => {
|
|
1265
|
-
m = !1;
|
|
1266
|
-
}, { dateBox: l, input: f, label: a };
|
|
1267
|
-
}
|
|
1268
|
-
getPosition() {
|
|
1269
|
-
let t = this.chart, e = t.options.rangeSelector, i = e.verticalAlign === "top" ? t.plotTop - t.axisOffset[0] : 0;
|
|
1270
|
-
return { buttonTop: i + e.buttonPosition.y, inputTop: i + e.inputPosition.y - 10 };
|
|
1271
|
-
}
|
|
1272
|
-
getYTDExtremes(t, e) {
|
|
1273
|
-
let i = this.chart.time, o = i.toParts(t)[0];
|
|
1274
|
-
return { max: t, min: Math.max(e, i.makeTime(o, 0)) };
|
|
1275
|
-
}
|
|
1276
|
-
createElements() {
|
|
1277
|
-
let t = this.chart, e = t.renderer, i = t.container, o = t.options, r = o.rangeSelector, d = r.inputEnabled, h = D(o.chart.style?.zIndex, 0) + 1;
|
|
1278
|
-
r.enabled !== !1 && (this.group = e.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = Mt("div", void 0, { position: "relative", height: 0, zIndex: h }), this.buttonOptions.length && this.renderButtons(), i.parentNode && i.parentNode.insertBefore(this.div, i), d && this.createInputs());
|
|
1279
|
-
}
|
|
1280
|
-
createInputs() {
|
|
1281
|
-
this.inputGroup = this.chart.renderer.g("input-group").add(this.group);
|
|
1282
|
-
let t = this.drawInput("min");
|
|
1283
|
-
this.minDateBox = t.dateBox, this.minLabel = t.label, this.minInput = t.input;
|
|
1284
|
-
let e = this.drawInput("max");
|
|
1285
|
-
this.maxDateBox = e.dateBox, this.maxLabel = e.label, this.maxInput = e.input;
|
|
1286
|
-
}
|
|
1287
|
-
render(t, e) {
|
|
1288
|
-
if (this.options.enabled === !1) return;
|
|
1289
|
-
let i = this.chart, o = i.options.rangeSelector;
|
|
1290
|
-
if (o.inputEnabled) {
|
|
1291
|
-
this.inputGroup || this.createInputs(), this.setInputValue("min", t), this.setInputValue("max", e), this.chart.styledMode || (this.maxLabel?.css(o.labelStyle), this.minLabel?.css(o.labelStyle));
|
|
1292
|
-
let r = i.scroller && i.scroller.getUnionExtremes() || i.xAxis[0] || {};
|
|
1293
|
-
if (G(r.dataMin) && G(r.dataMax)) {
|
|
1294
|
-
let d = i.xAxis[0].minRange || 0;
|
|
1295
|
-
this.setInputExtremes("min", r.dataMin, Math.min(r.dataMax, this.getInputValue("max")) - d), this.setInputExtremes("max", Math.max(r.dataMin, this.getInputValue("min")) + d, r.dataMax);
|
|
1296
|
-
}
|
|
1297
|
-
if (this.inputGroup) {
|
|
1298
|
-
let d = 0;
|
|
1299
|
-
[this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach((h) => {
|
|
1300
|
-
if (h) {
|
|
1301
|
-
let { width: u } = h.getBBox();
|
|
1302
|
-
u && (h.attr({ x: d }), d += u + o.inputSpacing);
|
|
1303
|
-
}
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
} else this.inputGroup && (this.inputGroup.destroy(), delete this.inputGroup);
|
|
1307
|
-
!this.chart.styledMode && this.zoomText && this.zoomText.css(o.labelStyle), this.alignElements(), this.updateButtonStates();
|
|
1308
|
-
}
|
|
1309
|
-
renderButtons() {
|
|
1310
|
-
var t;
|
|
1311
|
-
let { chart: e, options: i } = this, o = Qt.lang, r = e.renderer, d = X(i.buttonTheme), h = d && d.states;
|
|
1312
|
-
delete d.width, delete d.states, this.buttonGroup = r.g("range-selector-buttons").add(this.group);
|
|
1313
|
-
let u = this.dropdown = Mt("select", void 0, { position: "absolute", padding: 0, border: 0, cursor: "pointer", opacity: 1e-4 }, this.div), c = e.userOptions.rangeSelector?.buttonTheme;
|
|
1314
|
-
this.dropdownLabel = r.button("", 0, 0, () => {
|
|
1315
|
-
}, X(d, { "stroke-width": D(d["stroke-width"], 0), width: "auto", paddingLeft: D(i.buttonTheme.paddingLeft, c?.padding, 8), paddingRight: D(i.buttonTheme.paddingRight, c?.padding, 8) }), h && h.hover, h && h.select, h && h.disabled).hide().add(this.group), B(u, "touchstart", () => {
|
|
1316
|
-
u.style.fontSize = "16px";
|
|
1317
|
-
});
|
|
1318
|
-
let g = W().isMS ? "mouseover" : "mouseenter", p = W().isMS ? "mouseout" : "mouseleave";
|
|
1319
|
-
B(u, g, () => {
|
|
1320
|
-
_(this.dropdownLabel.element, g);
|
|
1321
|
-
}), B(u, p, () => {
|
|
1322
|
-
_(this.dropdownLabel.element, p);
|
|
1323
|
-
}), B(u, "change", () => {
|
|
1324
|
-
_(this.buttons[u.selectedIndex - 1].element, "click");
|
|
1325
|
-
}), this.zoomText = r.label(o.rangeSelectorZoom || "", 0).attr({ padding: i.buttonTheme.padding, height: i.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(i.labelStyle), (t = i.buttonTheme)["stroke-width"] ?? (t["stroke-width"] = 0)), Mt("option", { textContent: this.zoomText.textStr, disabled: !0 }, void 0, u), this.createButtons();
|
|
1326
|
-
}
|
|
1327
|
-
createButtons() {
|
|
1328
|
-
let { options: t } = this, e = X(t.buttonTheme), i = e && e.states, o = e.width || 28;
|
|
1329
|
-
delete e.width, delete e.states, this.buttonOptions.forEach((r, d) => {
|
|
1330
|
-
this.createButton(r, d, o, i);
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
createButton(t, e, i, o) {
|
|
1334
|
-
let { dropdown: r, buttons: d, chart: h, options: u } = this, c = h.renderer, g = X(u.buttonTheme);
|
|
1335
|
-
r?.add(Mt("option", { textContent: t.title || t.text }), e + 2), d[e] = c.button(t.text ?? "", 0, 0, (p) => {
|
|
1336
|
-
let n, a = t.events && t.events.click;
|
|
1337
|
-
a && (n = a.call(t, p)), n !== !1 && this.clickButton(e), this.isActive = !0;
|
|
1338
|
-
}, g, o && o.hover, o && o.select, o && o.disabled).attr({ "text-align": "center", width: i }).add(this.buttonGroup), t.title && d[e].attr("title", t.title);
|
|
1339
|
-
}
|
|
1340
|
-
alignElements() {
|
|
1341
|
-
let { buttonGroup: t, buttons: e, chart: i, group: o, inputGroup: r, options: d, zoomText: h } = this, u = i.options, c = u.exporting && u.exporting.enabled !== !1 && u.navigation && u.navigation.buttonOptions, { buttonPosition: g, inputPosition: p, verticalAlign: n } = d, a = (f, m, b) => c && this.titleCollision(i) && n === "top" && b && m.y - f.getBBox().height - 12 < (c.y || 0) + (c.height || 0) + i.spacing[0] ? -40 : 0, l = i.plotLeft;
|
|
1342
|
-
if (o && g && p) {
|
|
1343
|
-
let f = g.x - i.spacing[3];
|
|
1344
|
-
if (t) {
|
|
1345
|
-
if (this.positionButtons(), !this.initialButtonGroupWidth) {
|
|
1346
|
-
let E = 0;
|
|
1347
|
-
h && (E += h.getBBox().width + 5), e.forEach((S, C) => {
|
|
1348
|
-
E += S.width || 0, C !== e.length - 1 && (E += d.buttonSpacing);
|
|
1349
|
-
}), this.initialButtonGroupWidth = E;
|
|
1350
|
-
}
|
|
1351
|
-
l -= i.spacing[3];
|
|
1352
|
-
let y = a(t, g, g.align === "right" || p.align === "right");
|
|
1353
|
-
this.alignButtonGroup(y), this.buttonGroup?.translateY && this.dropdownLabel.attr({ y: this.buttonGroup.translateY }), o.placed = t.placed = i.hasLoaded;
|
|
1354
|
-
}
|
|
1355
|
-
let m = 0;
|
|
1356
|
-
d.inputEnabled && r && (m = a(r, p, g.align === "right" || p.align === "right"), p.align === "left" ? f = l : p.align === "right" && (f = -Math.max(i.axisOffset[1], -m)), r.align({ y: p.y, width: r.getBBox().width, align: p.align, x: p.x + f - 2 }, !0, i.spacingBox), r.placed = i.hasLoaded), this.handleCollision(m), o.align({ verticalAlign: n }, !0, i.spacingBox);
|
|
1357
|
-
let b = o.alignAttr.translateY, x = o.getBBox().height + 20, v = 0;
|
|
1358
|
-
if (n === "bottom") {
|
|
1359
|
-
let y = i.legend && i.legend.options;
|
|
1360
|
-
v = b - (x = x + (y && y.verticalAlign === "bottom" && y.enabled && !y.floating ? i.legend.legendHeight + D(y.margin, 10) : 0) - 20) - (d.floating ? 0 : d.y) - (i.titleOffset ? i.titleOffset[2] : 0) - 10;
|
|
1361
|
-
}
|
|
1362
|
-
n === "top" ? (d.floating && (v = 0), i.titleOffset && i.titleOffset[0] && (v = i.titleOffset[0]), v += i.margin[0] - i.spacing[0] || 0) : n === "middle" && (p.y === g.y ? v = b : (p.y || g.y) && (p.y < 0 || g.y < 0 ? v -= Math.min(p.y, g.y) : v = b - x)), o.translate(d.x, d.y + Math.floor(v));
|
|
1363
|
-
let { minInput: M, maxInput: w, dropdown: A } = this;
|
|
1364
|
-
d.inputEnabled && M && w && (M.style.marginTop = o.translateY + "px", w.style.marginTop = o.translateY + "px"), A && (A.style.marginTop = o.translateY + "px");
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
redrawElements() {
|
|
1368
|
-
let t = this.chart, { inputBoxHeight: e, inputBoxBorderColor: i } = this.options;
|
|
1369
|
-
if (this.maxDateBox?.attr({ height: e }), this.minDateBox?.attr({ height: e }), t.styledMode || (this.maxDateBox?.attr({ stroke: i }), this.minDateBox?.attr({ stroke: i })), this.isDirty) {
|
|
1370
|
-
this.isDirty = !1, this.isCollapsed = void 0;
|
|
1371
|
-
let o = this.options.buttons ?? [], r = Math.min(o.length, this.buttonOptions.length), { dropdown: d, options: h } = this, u = X(h.buttonTheme), c = u && u.states, g = u.width || 28;
|
|
1372
|
-
if (o.length < this.buttonOptions.length) for (let p = this.buttonOptions.length - 1; p >= o.length; p--)
|
|
1373
|
-
this.buttons.pop()?.destroy(), this.dropdown?.options.remove(p + 1);
|
|
1374
|
-
for (let p = r - 1; p >= 0; p--) {
|
|
1375
|
-
let n = o[p];
|
|
1376
|
-
this.buttons[p].destroy(), d?.options.remove(p + 1), this.createButton(n, p, g, c), this.computeButtonRange(n);
|
|
1377
|
-
}
|
|
1378
|
-
if (o.length > this.buttonOptions.length) for (let p = this.buttonOptions.length; p < o.length; p++) this.createButton(o[p], p, g, c), this.computeButtonRange(o[p]);
|
|
1379
|
-
this.buttonOptions = this.options.buttons ?? [], G(this.options.selected) && this.buttons.length && this.clickButton(this.options.selected, !1);
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
alignButtonGroup(t, e) {
|
|
1383
|
-
let { chart: i, options: o, buttonGroup: r, dropdown: d, dropdownLabel: h } = this, { buttonPosition: u } = o, c = i.plotLeft - i.spacing[3], g = u.x - i.spacing[3], p = i.plotLeft;
|
|
1384
|
-
u.align === "right" ? (g += t - c, this.hasVisibleDropdown && (p = i.chartWidth + t - this.maxButtonWidth() - 20)) : u.align === "center" && (g -= c / 2, this.hasVisibleDropdown && (p = i.chartWidth / 2 - this.maxButtonWidth())), d && et(d, { left: p + "px", top: r?.translateY + "px" }), h?.attr({ x: p }), r && r.align({ y: u.y, width: D(e, this.initialButtonGroupWidth), align: u.align, x: g }, !0, i.spacingBox);
|
|
1385
|
-
}
|
|
1386
|
-
positionButtons() {
|
|
1387
|
-
let { buttons: t, chart: e, options: i, zoomText: o } = this, r = e.hasLoaded ? "animate" : "attr", { buttonPosition: d } = i, h = e.plotLeft, u = h;
|
|
1388
|
-
o && o.visibility !== "hidden" && (o[r]({ x: D(h + d.x, h) }), u += d.x + o.getBBox().width + 5);
|
|
1389
|
-
for (let c = 0, g = this.buttonOptions.length; c < g; ++c) t[c].visibility !== "hidden" ? (t[c][r]({ x: u }), u += (t[c].width || 0) + i.buttonSpacing) : t[c][r]({ x: h });
|
|
1390
|
-
}
|
|
1391
|
-
handleCollision(t) {
|
|
1392
|
-
let { chart: e, buttonGroup: i, inputGroup: o, initialButtonGroupWidth: r } = this, { buttonPosition: d, dropdown: h, inputPosition: u } = this.options, c = () => {
|
|
1393
|
-
o && i && o.attr({ translateX: o.alignAttr.translateX + (e.axisOffset[1] >= -t ? 0 : -t), translateY: o.alignAttr.translateY + i.getBBox().height + 10 });
|
|
1394
|
-
};
|
|
1395
|
-
o && i ? u.align === d.align ? (c(), r > e.plotWidth + t - 20 ? this.collapseButtons() : this.expandButtons()) : r - t + o.getBBox().width > e.plotWidth ? h === "responsive" || h === "always" ? this.collapseButtons() : c() : this.expandButtons() : i && h === "responsive" && (r > e.plotWidth ? this.collapseButtons() : this.expandButtons()), i && (h === "always" && this.collapseButtons(), h === "never" && this.expandButtons()), this.alignButtonGroup(t);
|
|
1396
|
-
}
|
|
1397
|
-
collapseButtons() {
|
|
1398
|
-
let { buttons: t, zoomText: e } = this;
|
|
1399
|
-
this.isCollapsed !== !0 && (this.isCollapsed = !0, e.hide(), t.forEach((i) => {
|
|
1400
|
-
i.hide();
|
|
1401
|
-
}), this.showDropdown());
|
|
1402
|
-
}
|
|
1403
|
-
expandButtons() {
|
|
1404
|
-
let { buttons: t, zoomText: e } = this;
|
|
1405
|
-
this.isCollapsed !== !1 && (this.isCollapsed = !1, this.hideDropdown(), e.show(), t.forEach((i) => {
|
|
1406
|
-
i.show();
|
|
1407
|
-
}), this.positionButtons());
|
|
1408
|
-
}
|
|
1409
|
-
showDropdown() {
|
|
1410
|
-
let { buttonGroup: t, dropdownLabel: e, dropdown: i } = this;
|
|
1411
|
-
t && i && (e.show(), et(i, { visibility: "inherit" }), this.hasVisibleDropdown = !0);
|
|
1412
|
-
}
|
|
1413
|
-
hideDropdown() {
|
|
1414
|
-
let { dropdown: t } = this;
|
|
1415
|
-
t && (this.dropdownLabel.hide(), et(t, { visibility: "hidden" }), this.hasVisibleDropdown = !1);
|
|
1416
|
-
}
|
|
1417
|
-
getHeight() {
|
|
1418
|
-
let t = this.options, e = this.group, i = t.inputPosition, o = t.buttonPosition, r = t.y, d = o.y, h = i.y, u = 0;
|
|
1419
|
-
if (t.height) return t.height;
|
|
1420
|
-
this.alignElements(), u = e ? e.getBBox(!0).height + 13 + r : 0;
|
|
1421
|
-
let c = Math.min(h, d);
|
|
1422
|
-
return (h < 0 && d < 0 || h > 0 && d > 0) && (u += Math.abs(c)), u;
|
|
1423
|
-
}
|
|
1424
|
-
titleCollision(t) {
|
|
1425
|
-
return !(t.options.title.text || t.options.subtitle.text);
|
|
1426
|
-
}
|
|
1427
|
-
update(t, e = !0) {
|
|
1428
|
-
let i = this.chart;
|
|
1429
|
-
if (X(!0, this.options, t), this.options.selected && this.options.selected >= this.options.buttons.length && (this.options.selected = void 0, i.options.rangeSelector.selected = void 0), G(t.enabled)) return this.destroy(), this.init(i);
|
|
1430
|
-
this.isDirty = !!t.buttons || !!t.buttonTheme, e && this.render();
|
|
1431
|
-
}
|
|
1432
|
-
destroy() {
|
|
1433
|
-
let t = this, e = t.minInput, i = t.maxInput;
|
|
1434
|
-
t.eventsToUnbind && (t.eventsToUnbind.forEach((o) => o()), t.eventsToUnbind = void 0), Ut(t.buttons), e && (e.onfocus = e.onblur = e.onchange = null), i && (i.onfocus = i.onblur = i.onchange = null), it(t, function(o, r) {
|
|
1435
|
-
o && r !== "chart" && (o instanceof Ae() ? o.destroy() : o instanceof window.HTMLElement && o?.parentElement?.removeChild(o), delete t[r]), o !== At.prototype[r] && (t[r] = null);
|
|
1436
|
-
}, this), this.buttons = [];
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
F(At.prototype, { inputTypeFormats: { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" } });
|
|
1440
|
-
var ts = H(960), Se = H.n(ts);
|
|
1441
|
-
let { format: es } = Jt(), { getOptions: Oe } = W(), { setFixedRange: is } = fe;
|
|
1442
|
-
function te(s, t, e) {
|
|
1443
|
-
return s === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0 } : s === "yAxis" ? { labels: { y: -2 }, opposite: e.opposite ?? t.opposite ?? !0, showLastLabel: !!(t.categories || t.type === "category"), title: { text: void 0 } } : {};
|
|
1444
|
-
}
|
|
1445
|
-
function Te(s, t) {
|
|
1446
|
-
if (s === "xAxis") {
|
|
1447
|
-
let e = D(t.navigator?.enabled, Zt.enabled, !0), i = { type: "datetime", categories: void 0 };
|
|
1448
|
-
return e && (i.startOnTick = !1, i.endOnTick = !1), i;
|
|
1449
|
-
}
|
|
1450
|
-
return {};
|
|
1451
|
-
}
|
|
1452
|
-
class ee extends Se() {
|
|
1453
|
-
init(t, e) {
|
|
1454
|
-
let i = Oe(), o = t.xAxis, r = t.yAxis, d = D(t.navigator?.enabled, Zt.enabled, !0);
|
|
1455
|
-
t.xAxis = t.yAxis = void 0;
|
|
1456
|
-
let h = X({ chart: { panning: { enabled: !0, type: "x" }, zooming: { pinchType: "x", mouseWheel: { type: "x" } } }, navigator: { enabled: d }, scrollbar: { enabled: D(St.enabled, !0) }, rangeSelector: { enabled: D(ve.enabled, !0) }, title: { text: null }, tooltip: { split: D(i.tooltip?.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, t, { isStock: !0 });
|
|
1457
|
-
t.xAxis = o, t.yAxis = r, h.xAxis = ft(t.xAxis || {}).map((u) => X(te("xAxis", u, i.xAxis), u, Te("xAxis", t))), h.yAxis = ft(t.yAxis || {}).map((u) => X(te("yAxis", u, i.yAxis), u)), super.init(h, e);
|
|
1458
|
-
}
|
|
1459
|
-
createAxis(t, e) {
|
|
1460
|
-
return e.axis = X(te(t, e.axis, Oe()[t]), e.axis, Te(t, this.userOptions)), super.createAxis(t, e);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
B(Se(), "update", function(s) {
|
|
1464
|
-
let t = s.options;
|
|
1465
|
-
"scrollbar" in t && this.navigator && (X(!0, this.options.scrollbar, t.scrollbar), this.navigator.update({ enabled: !!this.navigator.navigatorEnabled }), delete t.scrollbar);
|
|
1466
|
-
}), (function(s) {
|
|
1467
|
-
function t(c) {
|
|
1468
|
-
if (!(this.crosshair?.label?.enabled && this.cross && O(this.min) && O(this.max))) return;
|
|
1469
|
-
let g = this.chart, p = this.logarithmic, n = this.crosshair.label, a = this.horiz, l = this.opposite, f = this.left, m = this.top, b = this.width, x = this.options.tickPosition === "inside", v = this.crosshair.snap !== !1, M = c.e || this.cross?.e, w = c.point, A = this.crossLabel, y, E, S = n.format, C = "", k, T = 0, R = this.min, P = this.max;
|
|
1470
|
-
p && (R = p.lin2log(this.min), P = p.lin2log(this.max));
|
|
1471
|
-
let I = a ? "center" : l ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center";
|
|
1472
|
-
!A && (A = this.crossLabel = g.renderer.label("", 0, void 0, n.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (w?.series ? w.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: n.align || I, padding: D(n.padding, 8), r: D(n.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), g.styledMode || A.attr({ fill: n.backgroundColor || w?.series?.color || "#666666", stroke: n.borderColor || "", "stroke-width": n.borderWidth || 0 }).css(F({ color: "#ffffff", fontWeight: "normal", fontSize: "0.7em", textAlign: "center" }, n.style || {}))), a ? (y = v ? (w.plotX || 0) + f : M.chartX, E = m + (l ? 0 : this.height)) : (y = f + this.offset + (l ? b : 0), E = v ? (w.plotY || 0) + m : M.chartY), S || n.formatter || (this.dateTime && (C = "%b %d, %Y"), S = "{value" + (C ? ":" + C : "") + "}");
|
|
1473
|
-
let z = v ? this.isXAxis ? w.x : w.y : this.toValue(a ? M.chartX : M.chartY), Z = w?.series ? w.series.isPointInside(w) : O(z) && z > R && z < P, N = "";
|
|
1474
|
-
S ? N = es(S, { value: z }, g) : n.formatter && O(z) && (N = n.formatter.call(this, z, this)), A.attr({ text: N, x: y, y: E, visibility: Z ? "inherit" : "hidden" });
|
|
1475
|
-
let Y = A.getBBox();
|
|
1476
|
-
!O(A.x) || a || l || (y = A.x - Y.width / 2), O(A.y) && (a ? (x && !l || !x && l) && (E = A.y - Y.height) : E = A.y - Y.height / 2), k = a ? { left: f, right: f + this.width } : { left: this.labelAlign === "left" ? f : 0, right: this.labelAlign === "right" ? f + this.width : g.chartWidth };
|
|
1477
|
-
let V = A.translateX || 0;
|
|
1478
|
-
V < k.left && (T = k.left - V), V + Y.width >= k.right && (T = -(V + Y.width - k.right)), A.attr({ x: Math.max(0, y + T), y: Math.max(0, E), anchorX: a ? y : this.opposite ? 0 : g.chartWidth, anchorY: a ? this.opposite ? g.chartHeight : 0 : E + Y.height / 2 });
|
|
1479
|
-
}
|
|
1480
|
-
function e() {
|
|
1481
|
-
this.crossLabel && (this.crossLabel = this.crossLabel.hide());
|
|
1482
|
-
}
|
|
1483
|
-
function i(c) {
|
|
1484
|
-
let g = this.chart, p = this.options, n = g._labelPanes = g._labelPanes || {}, a = p.labels;
|
|
1485
|
-
if (g.options.isStock && this.coll === "yAxis") {
|
|
1486
|
-
let l = p.top + "," + p.height;
|
|
1487
|
-
!n[l] && a.enabled && (a.distance === 15 && this.side === 1 && (a.distance = 0), a.align === void 0 && (a.align = "right"), n[l] = this, c.align = "right", c.preventDefault());
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
function o() {
|
|
1491
|
-
let c = this.chart, g = this.options && this.options.top + "," + this.options.height;
|
|
1492
|
-
g && c._labelPanes && c._labelPanes[g] === this && delete c._labelPanes[g];
|
|
1493
|
-
}
|
|
1494
|
-
function r(c) {
|
|
1495
|
-
let g = this.isLinked && !this.series && this.linkedParent ? this.linkedParent.series : this.series, { chart: p, horiz: n } = this, a = p.renderer, l = [], { acrossPanes: f = !0, force: m, translatedValue: b, value: x } = c, v = (this.isXAxis ? p.yAxis : p.xAxis) || [];
|
|
1496
|
-
function M(E, S, C) {
|
|
1497
|
-
l.push(["M", n ? E : S, n ? S : E], ["L", n ? E : C, n ? C : E]);
|
|
1498
|
-
}
|
|
1499
|
-
let w = [], A, y;
|
|
1500
|
-
if (p.options.isStock && (this.coll === "xAxis" || this.coll === "yAxis")) {
|
|
1501
|
-
let E, S;
|
|
1502
|
-
for (let C of (c.preventDefault(), E = this.coll === "xAxis" ? "yAxis" : "xAxis", S = this.options[E], w = f && !this.options.isInternal ? v.filter((k) => !k.options.isInternal) : O(S) ? [p[E][S]] : ut(S) ? [p.get(S)] : g.map((k) => k[E]), v)) if (!C.options.isInternal) {
|
|
1503
|
-
let k = C.isXAxis ? "yAxis" : "xAxis";
|
|
1504
|
-
this === (G(C.options[k]) && p[k][C.options[k]]) && w.push(C);
|
|
1505
|
-
}
|
|
1506
|
-
for (let C of (A = w.length ? [] : [this.isXAxis ? p.yAxis[0] : p.xAxis[0]], w)) A.indexOf(C) !== -1 || Vt(A, (k) => k.pos === C.pos && k.len === C.len) || A.push(C);
|
|
1507
|
-
if (O(y = D(b, this.translate(x || 0, void 0, void 0, c.old)))) {
|
|
1508
|
-
let C, k = n ? y + this.pos : this.pos + this.len - y;
|
|
1509
|
-
if (m !== "pass" && (k < this.pos || k > this.pos + this.len) && (m ? k = Nt(k, this.pos, this.pos + this.len) : C = !0), !C) {
|
|
1510
|
-
let T = n ? "top" : "left", R = n ? "height" : "width";
|
|
1511
|
-
if (!f && (this.options[T] || this.options[R])) M(k, this[T], this[T] + this[R]);
|
|
1512
|
-
else for (let P of A) M(k, P.pos, P.pos + P.len);
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
c.path = l.length > 0 ? a.crispPolyLine(l, c.lineWidth || 1) : void 0;
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
function d(c) {
|
|
1519
|
-
if (this.chart.options.isStock) {
|
|
1520
|
-
let g;
|
|
1521
|
-
this.is("column") || this.is("columnrange") ? g = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (g = { marker: { enabled: !1, radius: 2 } }), g && (c.plotOptions[this.type] = X(c.plotOptions[this.type], g));
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
function h() {
|
|
1525
|
-
let c = this.chart, g = this.options.dataGrouping;
|
|
1526
|
-
return this.allowDG !== !1 && g && D(g.enabled, c.options.isStock);
|
|
1527
|
-
}
|
|
1528
|
-
function u(c, g) {
|
|
1529
|
-
for (let p = 0; p < c.length; p += 2) {
|
|
1530
|
-
let n = c[p], a = c[p + 1];
|
|
1531
|
-
G(n[1]) && n[1] === a[1] && (n[1] = a[1] = Q(n[1], g)), G(n[2]) && n[2] === a[2] && (n[2] = a[2] = Q(n[2], g));
|
|
1532
|
-
}
|
|
1533
|
-
return c;
|
|
1534
|
-
}
|
|
1535
|
-
s.compose = function(c, g, p, n) {
|
|
1536
|
-
let a = p.prototype;
|
|
1537
|
-
a.forceCropping || (B(g, "afterDrawCrosshair", t), B(g, "afterHideCrosshair", e), B(g, "autoLabelAlign", i), B(g, "destroy", o), B(g, "getPlotLinePath", r), c.prototype.setFixedRange = is, a.forceCropping = h, B(p, "setOptions", d), n.prototype.crispPolyLine = u);
|
|
1538
|
-
}, s.stockChart = function(c, g, p) {
|
|
1539
|
-
return new s(c, g, p);
|
|
1540
|
-
};
|
|
1541
|
-
})(ee || (ee = {}));
|
|
1542
|
-
let Ee = ee, { column: { prototype: { pointClass: ss } } } = tt().seriesTypes, { column: Be } = tt().seriesTypes, { defaultOptions: os } = W();
|
|
1543
|
-
class ie extends Be {
|
|
1544
|
-
extendStem(t, e, i) {
|
|
1545
|
-
let o = t[0], r = t[1];
|
|
1546
|
-
typeof o[2] == "number" && (o[2] = Math.max(i + e, o[2])), typeof r[2] == "number" && (r[2] = Math.min(i - e, r[2]));
|
|
1547
|
-
}
|
|
1548
|
-
getPointPath(t, e) {
|
|
1549
|
-
let i = e.strokeWidth(), o = t.series, r = Q(t.plotX || 0, i), d = Math.round(t.shapeArgs.width / 2), h = [["M", r, Math.round(t.yBottom)], ["L", r, Math.round(t.plotHigh)]];
|
|
1550
|
-
if (t.close !== null) {
|
|
1551
|
-
let u = Q(t.plotClose, i);
|
|
1552
|
-
h.push(["M", r, u], ["L", r + d, u]), o.extendStem(h, i / 2, u);
|
|
1553
|
-
}
|
|
1554
|
-
return h;
|
|
1555
|
-
}
|
|
1556
|
-
drawSinglePoint(t) {
|
|
1557
|
-
let e = t.series, i = e.chart, o, r = t.graphic;
|
|
1558
|
-
t.plotY !== void 0 && (r || (t.graphic = r = i.renderer.path().add(e.group)), i.styledMode || r.attr(e.pointAttribs(t, t.selected && "select")), o = e.getPointPath(t, r), r[r ? "animate" : "attr"]({ d: o }).addClass(t.getClassName(), !0));
|
|
1559
|
-
}
|
|
1560
|
-
drawPoints() {
|
|
1561
|
-
this.points.forEach(this.drawSinglePoint);
|
|
1562
|
-
}
|
|
1563
|
-
init() {
|
|
1564
|
-
super.init.apply(this, arguments), this.options.stacking = void 0;
|
|
1565
|
-
}
|
|
1566
|
-
pointAttribs(t, e) {
|
|
1567
|
-
let i = super.pointAttribs.call(this, t, e);
|
|
1568
|
-
return delete i.fill, i;
|
|
1569
|
-
}
|
|
1570
|
-
toYData(t) {
|
|
1571
|
-
return [t.high, t.low, t.close];
|
|
1572
|
-
}
|
|
1573
|
-
translate() {
|
|
1574
|
-
let t = this, e = t.yAxis, i = this.pointArrayMap && this.pointArrayMap.slice() || [], o = i.map((r) => `plot${r.charAt(0).toUpperCase() + r.slice(1)}`);
|
|
1575
|
-
o.push("yBottom"), i.push("low"), super.translate.apply(t), t.points.forEach(function(r) {
|
|
1576
|
-
i.forEach(function(d, h) {
|
|
1577
|
-
let u = r[d];
|
|
1578
|
-
u !== null && (t.dataModify && (u = t.dataModify.modifyValue(u)), r[o[h]] = e.toPixels(u, !0));
|
|
1579
|
-
}), r.tooltipPos[1] = r.plotHigh + e.pos - t.chart.plotTop;
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
ie.defaultOptions = X(Be.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), F(ie.prototype, { pointClass: class extends ss {
|
|
1584
|
-
}, animate: null, directTouch: !1, keysAffectYAxis: ["low", "high"], pointArrayMap: ["high", "low", "close"], pointAttrToOptions: { stroke: "color", "stroke-width": "lineWidth" }, pointValKey: "close" }), F(os.lang, { stockOpen: "Open", stockHigh: "High", stockLow: "Low", stockClose: "Close" }), tt().registerSeriesType("hlc", ie);
|
|
1585
|
-
let { seriesTypes: { hlc: rs } } = tt();
|
|
1586
|
-
class ns extends rs.prototype.pointClass {
|
|
1587
|
-
getClassName() {
|
|
1588
|
-
return super.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
|
|
1589
|
-
}
|
|
1590
|
-
resolveUpColor() {
|
|
1591
|
-
this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
|
|
1592
|
-
}
|
|
1593
|
-
resolveColor() {
|
|
1594
|
-
super.resolveColor(), this.series.is("heikinashi") || this.resolveUpColor();
|
|
1595
|
-
}
|
|
1596
|
-
getZone() {
|
|
1597
|
-
let t = super.getZone();
|
|
1598
|
-
return this.resolveUpColor(), t;
|
|
1599
|
-
}
|
|
1600
|
-
applyOptions() {
|
|
1601
|
-
return super.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
let { composed: as } = W(), { hlc: Ce } = tt().seriesTypes;
|
|
1605
|
-
function ls(s) {
|
|
1606
|
-
let t = s.options, e = t.dataGrouping;
|
|
1607
|
-
e && t.useOhlcData && t.id !== "highcharts-navigator-series" && (e.approximation = "ohlc");
|
|
1608
|
-
}
|
|
1609
|
-
function hs(s) {
|
|
1610
|
-
let t = s.options;
|
|
1611
|
-
t.useOhlcData && t.id !== "highcharts-navigator-series" && F(this, { pointValKey: dt.prototype.pointValKey, pointArrayMap: dt.prototype.pointArrayMap, toYData: dt.prototype.toYData });
|
|
1612
|
-
}
|
|
1613
|
-
class dt extends Ce {
|
|
1614
|
-
static compose(t) {
|
|
1615
|
-
rt(as, "OHLCSeries") && (B(t, "afterSetOptions", ls), B(t, "init", hs));
|
|
1616
|
-
}
|
|
1617
|
-
getPointPath(t, e) {
|
|
1618
|
-
let i = super.getPointPath(t, e), o = e.strokeWidth(), r = Q(t.plotX || 0, o), d = Math.round(t.shapeArgs.width / 2);
|
|
1619
|
-
if (t.open !== null) {
|
|
1620
|
-
let h = Q(t.plotOpen, o);
|
|
1621
|
-
i.push(["M", r, h], ["L", r - d, h]), super.extendStem(i, o / 2, h);
|
|
1622
|
-
}
|
|
1623
|
-
return i;
|
|
1624
|
-
}
|
|
1625
|
-
pointAttribs(t, e) {
|
|
1626
|
-
let i = super.pointAttribs.call(this, t, e), o = this.options;
|
|
1627
|
-
return delete i.fill, !t.options.color && o.upColor && t.open < t.close && (i.stroke = o.upColor), i;
|
|
1628
|
-
}
|
|
1629
|
-
toYData(t) {
|
|
1630
|
-
return [t.open, t.high, t.low, t.close];
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
dt.defaultOptions = X(Ce.defaultOptions, { tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockOpen}: {point.open}<br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>' } }), F(dt.prototype, { pointClass: ns, pointArrayMap: ["open", "high", "low", "close"] }), tt().registerSeriesType("ohlc", dt);
|
|
1634
|
-
let { column: ds, ohlc: se } = tt().seriesTypes;
|
|
1635
|
-
class Pe extends se {
|
|
1636
|
-
pointAttribs(t, e) {
|
|
1637
|
-
let i = ds.prototype.pointAttribs.call(this, t, e), o = this.options, r = t.open < t.close, d = o.lineColor || this.color, h = t.color || this.color;
|
|
1638
|
-
if (i["stroke-width"] = o.lineWidth, i.fill = t.options.color || r && o.upColor || h, i.stroke = t.options.lineColor || r && o.upLineColor || d, e) {
|
|
1639
|
-
let u = o.states[e];
|
|
1640
|
-
i.fill = u.color || i.fill, i.stroke = u.lineColor || i.stroke, i["stroke-width"] = u.lineWidth || i["stroke-width"];
|
|
1641
|
-
}
|
|
1642
|
-
return i;
|
|
1643
|
-
}
|
|
1644
|
-
drawPoints() {
|
|
1645
|
-
let t = this.points, e = this.chart, i = this.yAxis.reversed;
|
|
1646
|
-
for (let o of t) {
|
|
1647
|
-
let r = o.graphic, d, h, u, c, g, p, n, a, l, f = !r;
|
|
1648
|
-
if (o.plotY !== void 0) {
|
|
1649
|
-
r || (o.graphic = r = e.renderer.path().add(this.group)), this.chart.styledMode || r.attr(this.pointAttribs(o, o.selected && "select")).shadow(this.options.shadow);
|
|
1650
|
-
let m = r.strokeWidth();
|
|
1651
|
-
n = Q(o.plotX || 0, m), u = Math.min(d = o.plotOpen, h = o.plotClose), c = Math.max(d, h), l = Math.round(o.shapeArgs.width / 2), g = i ? c !== o.yBottom : Math.round(u) !== Math.round(o.plotHigh || 0), p = i ? Math.round(u) !== Math.round(o.plotHigh || 0) : c !== o.yBottom, u = Q(u, m), c = Q(c, m), (a = []).push(["M", n - l, c], ["L", n - l, u], ["L", n + l, u], ["L", n + l, c], ["Z"], ["M", n, u], ["L", n, g ? Math.round(i ? o.yBottom : o.plotHigh) : u], ["M", n, c], ["L", n, p ? Math.round(i ? o.plotHigh : o.yBottom) : c]), r[f ? "attr" : "animate"]({ d: a }).addClass(o.getClassName(), !0);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
Pe.defaultOptions = X(se.defaultOptions, { tooltip: se.defaultOptions.tooltip }, { states: { hover: { lineWidth: 2 } }, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), tt().registerSeriesType("candlestick", Pe);
|
|
1657
|
-
let { column: { prototype: { pointClass: ps } } } = tt().seriesTypes, us = class extends ps {
|
|
1658
|
-
constructor() {
|
|
1659
|
-
super(...arguments), this.ttBelow = !1;
|
|
1660
|
-
}
|
|
1661
|
-
isValid() {
|
|
1662
|
-
return O(this.y) || this.y === void 0;
|
|
1663
|
-
}
|
|
1664
|
-
hasNewShapeType() {
|
|
1665
|
-
let s = this.options.shape || this.series.options.shape;
|
|
1666
|
-
return this.graphic && s && s !== this.graphic.symbolKey;
|
|
1667
|
-
}
|
|
1668
|
-
};
|
|
1669
|
-
(function(s) {
|
|
1670
|
-
let t = [];
|
|
1671
|
-
function e(o, r, d, h, u) {
|
|
1672
|
-
let c = u && u.anchorX || o, g = u && u.anchorY || r, p = this.circle(c - 1, g - 1, 2, 2);
|
|
1673
|
-
return p.push(["M", c, g], ["L", o, r + h], ["L", o, r], ["L", o + d, r], ["L", o + d, r + h], ["L", o, r + h], ["Z"]), p;
|
|
1674
|
-
}
|
|
1675
|
-
function i(o, r) {
|
|
1676
|
-
o[r + "pin"] = function(d, h, u, c, g) {
|
|
1677
|
-
let p, n = g && g.anchorX, a = g && g.anchorY;
|
|
1678
|
-
if (r === "circle" && c > u && (d -= Math.round((c - u) / 2), u = c), p = o[r](d, h, u, c, g), n && a) {
|
|
1679
|
-
let l = n;
|
|
1680
|
-
if (r === "circle") l = d + u / 2;
|
|
1681
|
-
else {
|
|
1682
|
-
let m = p[0], b = p[1];
|
|
1683
|
-
m[0] === "M" && b[0] === "L" && (l = (m[1] + b[1]) / 2);
|
|
1684
|
-
}
|
|
1685
|
-
let f = h > a ? h : h + c;
|
|
1686
|
-
p.push(["M", l, f], ["L", n, a]), p = p.concat(o.circle(n - 1, a - 1, 2, 2));
|
|
1687
|
-
}
|
|
1688
|
-
return p;
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
s.compose = function(o) {
|
|
1692
|
-
if (t.indexOf(o) === -1) {
|
|
1693
|
-
t.push(o);
|
|
1694
|
-
let d = o.prototype.symbols;
|
|
1695
|
-
d.flag = e, i(d, "circle"), i(d, "square");
|
|
1696
|
-
}
|
|
1697
|
-
let r = ge().getRendererType();
|
|
1698
|
-
t.indexOf(r) && t.push(r);
|
|
1699
|
-
};
|
|
1700
|
-
})(Wt || (Wt = {}));
|
|
1701
|
-
let cs = Wt;
|
|
1702
|
-
var gs = H(448), fs = H.n(gs);
|
|
1703
|
-
let { composed: ms } = W(), { prototype: xs } = fs(), { prototype: bs } = le();
|
|
1704
|
-
var oe = Xt || (Xt = {});
|
|
1705
|
-
function De(s) {
|
|
1706
|
-
return bs.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this, s);
|
|
1707
|
-
}
|
|
1708
|
-
function Re() {
|
|
1709
|
-
xs.translate.apply(this);
|
|
1710
|
-
let s = this, t = s.options, e = s.chart, i = s.points, o = t.onSeries, r = o && e.get(o), d = r && r.options.step, h = r && r.points, u = e.inverted, c = s.xAxis, g = s.yAxis, p = i.length - 1, n, a, l = t.onKey || "y", f = h && h.length, m = 0, b, x, v, M, w;
|
|
1711
|
-
if (r && r.visible && f) {
|
|
1712
|
-
for (m = (r.pointXOffset || 0) + (r.barW || 0) / 2, M = r.currentDataGrouping, x = h[f - 1].x + (M ? M.totalRange : 0), (function(A, y) {
|
|
1713
|
-
let E, S, C = A.length;
|
|
1714
|
-
for (S = 0; S < C; S++) A[S].safeI = S;
|
|
1715
|
-
for (A.sort(function(k, T) {
|
|
1716
|
-
return (E = y(k, T)) === 0 ? k.safeI - T.safeI : E;
|
|
1717
|
-
}), S = 0; S < C; S++) delete A[S].safeI;
|
|
1718
|
-
})(i, (A, y) => A.x - y.x), l = "plot" + l[0].toUpperCase() + l.substr(1); f-- && i[p]; ) if (b = h[f], (n = i[p]).y = b.y, b.x <= n.x && b[l] !== void 0) {
|
|
1719
|
-
if (n.x <= x && (n.plotY = b[l], b.x < n.x && !d && (v = h[f + 1])) && v[l] !== void 0) if (G(n.plotX) && r.is("spline")) {
|
|
1720
|
-
let A = [b.plotX || 0, b.plotY || 0], y = [v.plotX || 0, v.plotY || 0], E = b.controlPoints?.high || A, S = v.controlPoints?.low || y, C = (P, I) => Math.pow(1 - P, 3) * A[I] + 3 * (1 - P) * (1 - P) * P * E[I] + 3 * (1 - P) * P * P * S[I] + P * P * P * y[I], k = 0, T = 1, R;
|
|
1721
|
-
for (let P = 0; P < 100; P++) {
|
|
1722
|
-
let I = (k + T) / 2, z = C(I, 0);
|
|
1723
|
-
if (z === null) break;
|
|
1724
|
-
if (0.25 > Math.abs(z - n.plotX)) {
|
|
1725
|
-
R = I;
|
|
1726
|
-
break;
|
|
1727
|
-
}
|
|
1728
|
-
z < n.plotX ? k = I : T = I;
|
|
1729
|
-
}
|
|
1730
|
-
G(R) && (n.plotY = C(R, 1), n.y = g.toValue(n.plotY, !0));
|
|
1731
|
-
} else w = (n.x - b.x) / (v.x - b.x), n.plotY += w * (v[l] - b[l]), n.y += w * (v.y - b.y);
|
|
1732
|
-
if (p--, f++, p < 0) break;
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
i.forEach((A, y) => {
|
|
1736
|
-
let E;
|
|
1737
|
-
A.plotX += m, (A.plotY === void 0 || u) && (A.plotX >= 0 && A.plotX <= c.len ? u ? (A.plotY = c.translate(A.x, 0, 1, 0, 1), A.plotX = G(A.y) ? g.translate(A.y, 0, 0, 0, 1) : 0) : A.plotY = (c.opposite ? 0 : s.yAxis.len) + c.offset : A.shapeArgs = {}), (a = i[y - 1]) && a.plotX === A.plotX && (a.stackIndex === void 0 && (a.stackIndex = 0), E = a.stackIndex + 1), A.stackIndex = E;
|
|
1738
|
-
}), this.onSeries = r;
|
|
1739
|
-
}
|
|
1740
|
-
oe.compose = function(s) {
|
|
1741
|
-
if (rt(ms, "OnSeries")) {
|
|
1742
|
-
let t = s.prototype;
|
|
1743
|
-
t.getPlotBox = De, t.translate = Re;
|
|
1744
|
-
}
|
|
1745
|
-
return s;
|
|
1746
|
-
}, oe.getPlotBox = De, oe.translate = Re;
|
|
1747
|
-
let vs = Xt, { noop: ys } = W(), { distribute: Ms } = W(), { series: Ge, seriesTypes: { column: Ie } } = tt();
|
|
1748
|
-
class mt extends Ie {
|
|
1749
|
-
animate(t) {
|
|
1750
|
-
t && this.setClip();
|
|
1751
|
-
}
|
|
1752
|
-
drawPoints() {
|
|
1753
|
-
var t, e;
|
|
1754
|
-
let i, o, r, d, h, u, c, g, p, n, a, l, f = this.points, m = this.chart, b = m.renderer, x = m.inverted, v = this.options, M = v.y, w = this.yAxis, A = {}, y = [], E = O(v.borderRadius) ? v.borderRadius : 0;
|
|
1755
|
-
for (d = f.length; d--; ) h = f[d], n = (x ? h.plotY : h.plotX) > this.xAxis.len, i = h.plotX, c = h.stackIndex, r = h.options.shape || v.shape, (o = h.plotY) !== void 0 && (o = h.plotY + M - (c !== void 0 && c * v.stackDistance)), h.anchorX = c ? void 0 : h.plotX, g = c ? void 0 : h.plotY, a = r !== "flag", u = h.graphic, o !== void 0 && i >= 0 && !n ? (u && h.hasNewShapeType() && (u = u.destroy()), u || (u = h.graphic = b.label("", 0, void 0, r, void 0, void 0, v.useHTML).addClass(h.getClassName()).add(this.markerGroup), h.graphic.div && (h.graphic.div.point = h), u.isNew = !0), u.attr({ align: a ? "center" : "left", width: v.width, height: v.height, "text-align": v.textAlign, r: E }), m.styledMode || u.attr(this.pointAttribs(h)).css(X(v.style, h.style)).shadow(v.shadow), i > 0 && (i -= u.strokeWidth() % 2), p = { y: o, anchorY: g }, v.allowOverlapX && (p.x = i, p.anchorX = h.anchorX), u.attr({ text: h.options.title ?? v.title ?? "A" })[u.isNew ? "attr" : "animate"](p), v.allowOverlapX || (A[h.plotX] ? A[h.plotX].size = Math.max(A[h.plotX].size, u.width || 0) : A[h.plotX] = { align: 0.5 * !!a, size: u.width || 0, target: i, anchorX: i }), h.tooltipPos = [i, o + w.pos - m.plotTop]) : u && (h.graphic = u.destroy());
|
|
1756
|
-
if (!v.allowOverlapX) {
|
|
1757
|
-
let S = 100;
|
|
1758
|
-
for (let C of (it(A, function(k) {
|
|
1759
|
-
k.plotX = k.anchorX, y.push(k), S = Math.max(k.size, S);
|
|
1760
|
-
}), Ms(y, x ? w.len : this.xAxis.len, S), f)) {
|
|
1761
|
-
let k = C.plotX, T = C.graphic, R = T && A[k];
|
|
1762
|
-
R && T && (G(R.pos) ? T[T.isNew ? "attr" : "animate"]({ x: R.pos + (R.align || 0) * R.size, anchorX: C.anchorX }).show().isNew = !1 : T.hide().isNew = !0);
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
v.useHTML && this.markerGroup && (t = this.markerGroup, e = function(S) {
|
|
1766
|
-
return Ae().prototype.on.apply(S.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
|
|
1767
|
-
}, l = t.on, t.on = function() {
|
|
1768
|
-
let S = arguments, C = this;
|
|
1769
|
-
return e.apply(this, [function() {
|
|
1770
|
-
return l.apply(C, arguments.length ? arguments : S);
|
|
1771
|
-
}].concat([].slice.call(arguments)));
|
|
1772
|
-
});
|
|
1773
|
-
}
|
|
1774
|
-
drawTracker() {
|
|
1775
|
-
let t = this.points;
|
|
1776
|
-
for (let e of (super.drawTracker(), t)) {
|
|
1777
|
-
let i = e.graphic;
|
|
1778
|
-
i && (e.unbindMouseOver && e.unbindMouseOver(), e.unbindMouseOver = B(i.element, "mouseover", function() {
|
|
1779
|
-
for (let o of (e.stackIndex > 0 && !e.raised && (e._y = i.y, i.attr({ y: e._y - 8 }), e.raised = !0), t)) o !== e && o.raised && o.graphic && (o.graphic.attr({ y: o._y }), o.raised = !1);
|
|
1780
|
-
}));
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
pointAttribs(t, e) {
|
|
1784
|
-
let i = this.options, o = t && t.color || this.color, r = i.lineColor, d = t && t.lineWidth, h = t && t.fillColor || i.fillColor;
|
|
1785
|
-
return e && (h = i.states[e].fillColor, r = i.states[e].lineColor, d = i.states[e].lineWidth), { fill: h || o, stroke: r || o, "stroke-width": d || i.lineWidth || 0 };
|
|
1786
|
-
}
|
|
1787
|
-
setClip() {
|
|
1788
|
-
Ge.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
mt.compose = cs.compose, mt.defaultOptions = X(Ie.defaultOptions, { borderRadius: 0, pointRange: 0, allowOverlapX: !1, shape: "flag", stackDistance: 12, textAlign: "center", tooltip: { pointFormat: "{point.text}" }, threshold: null, y: -30, fillColor: "#ffffff", lineWidth: 1, states: { hover: { lineColor: "#000000", fillColor: "#ccd3ff" } }, style: { color: "#000000", fontSize: "0.7em", fontWeight: "bold" } }), vs.compose(mt), F(mt.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: us, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: ys, init: Ge.prototype.init }), tt().registerSeriesType("flags", mt);
|
|
1792
|
-
var As = H(184), ks = H.n(As);
|
|
1793
|
-
(function(s) {
|
|
1794
|
-
function t() {
|
|
1795
|
-
this.brokenAxis !== void 0 && this.brokenAxis.setBreaks(this.options.breaks, !1);
|
|
1796
|
-
}
|
|
1797
|
-
function e() {
|
|
1798
|
-
Object.keys(this.options.breaks?.[0] || {}).length && (this.options.ordinal = !1);
|
|
1799
|
-
}
|
|
1800
|
-
function i() {
|
|
1801
|
-
let g = this.brokenAxis;
|
|
1802
|
-
if (g?.hasBreaks) {
|
|
1803
|
-
let p = this.tickPositions, n = this.tickPositions.info, a = [];
|
|
1804
|
-
for (let l = 0; l < p.length; l++) g.isInAnyBreak(p[l]) || a.push(p[l]);
|
|
1805
|
-
this.tickPositions = a, this.tickPositions.info = n;
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
function o() {
|
|
1809
|
-
this.brokenAxis || (this.brokenAxis = new c(this));
|
|
1810
|
-
}
|
|
1811
|
-
function r() {
|
|
1812
|
-
let { isDirty: g, options: { connectNulls: p }, points: n, xAxis: a, yAxis: l } = this;
|
|
1813
|
-
if (g) {
|
|
1814
|
-
let f = n.length;
|
|
1815
|
-
for (; f--; ) {
|
|
1816
|
-
let m = n[f], b = (m.y !== null || p !== !1) && (a?.brokenAxis?.isInAnyBreak(m.x, !0) || l?.brokenAxis?.isInAnyBreak(m.y, !0));
|
|
1817
|
-
m.visible = !b && m.options.visible !== !1;
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
function d() {
|
|
1822
|
-
this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, D(this.pointArrayMap, ["y"]));
|
|
1823
|
-
}
|
|
1824
|
-
function h(g, p) {
|
|
1825
|
-
let n, a, l, f = this, m = f.points;
|
|
1826
|
-
if (g?.brokenAxis?.hasBreaks) {
|
|
1827
|
-
let b = g.brokenAxis;
|
|
1828
|
-
p.forEach(function(x) {
|
|
1829
|
-
n = b?.breakArray || [], a = g.isXAxis ? g.min : D(f.options.threshold, g.min), m.forEach(function(v) {
|
|
1830
|
-
l = v["stack" + x.toUpperCase()] ?? v[x], n.forEach(function(M) {
|
|
1831
|
-
if (O(a) && O(l)) {
|
|
1832
|
-
let w = "";
|
|
1833
|
-
a < M.from && l > M.to || a > M.from && l < M.from ? w = "pointBreak" : (a < M.from && l > M.from && l < M.to || a > M.from && l > M.to && l < M.from) && (w = "pointInBreak"), w && _(g, w, { point: v, brk: M });
|
|
1834
|
-
}
|
|
1835
|
-
});
|
|
1836
|
-
});
|
|
1837
|
-
});
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
function u() {
|
|
1841
|
-
let g = this.currentDataGrouping, p = g?.gapSize, n = this.points.slice(), a = this.yAxis, l = this.options.gapSize, f = n.length - 1;
|
|
1842
|
-
if (l && f > 0) {
|
|
1843
|
-
let m, b;
|
|
1844
|
-
for (this.options.gapUnit !== "value" && (l *= this.basePointRange), p && p > l && p >= this.basePointRange && (l = p); f--; ) if (b && b.visible !== !1 || (b = n[f + 1]), m = n[f], b.visible !== !1 && m.visible !== !1) {
|
|
1845
|
-
if (b.x - m.x > l) {
|
|
1846
|
-
let x = (m.x + b.x) / 2;
|
|
1847
|
-
n.splice(f + 1, 0, { isNull: !0, x }), a.stacking && this.options.stacking && ((a.stacking.stacks[this.stackKey][x] = new (ks())(a, a.options.stackLabels, !1, x, this.stack ?? "")).total = 0);
|
|
1848
|
-
}
|
|
1849
|
-
b = m;
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
return this.getGraphPath(n);
|
|
1853
|
-
}
|
|
1854
|
-
s.compose = function(g, p) {
|
|
1855
|
-
if (!g.keepProps.includes("brokenAxis")) {
|
|
1856
|
-
g.keepProps.push("brokenAxis"), B(g, "init", o), B(g, "afterInit", t), B(g, "afterSetTickPositions", i), B(g, "afterSetOptions", e);
|
|
1857
|
-
let n = p.prototype;
|
|
1858
|
-
n.drawBreaks = h, n.gappedPath = u, B(p, "afterGeneratePoints", r), B(p, "afterRender", d);
|
|
1859
|
-
}
|
|
1860
|
-
return g;
|
|
1861
|
-
};
|
|
1862
|
-
class c {
|
|
1863
|
-
static isInBreak(p, n) {
|
|
1864
|
-
let a = p.repeat || 1 / 0, l = p.from, f = p.to - p.from, m = n >= l ? (n - l) % a : a - (l - n) % a;
|
|
1865
|
-
return p.inclusive ? m <= f : m < f && m !== 0;
|
|
1866
|
-
}
|
|
1867
|
-
static lin2Val(p) {
|
|
1868
|
-
let n = this.min || 0, a = this.brokenAxis, l = a?.breakArray;
|
|
1869
|
-
if (!l?.length || !O(p)) return p;
|
|
1870
|
-
let f = p;
|
|
1871
|
-
if (p > n) for (let m of l) {
|
|
1872
|
-
if (m.from > f) break;
|
|
1873
|
-
(m.to <= f && m.to > n || c.isInBreak(m, f)) && (f += m.len);
|
|
1874
|
-
}
|
|
1875
|
-
else if (p < n) for (let m of l) {
|
|
1876
|
-
if (m.from > n) break;
|
|
1877
|
-
(m.from >= f && m.from < n || c.isInBreak(m, f)) && (f -= m.len);
|
|
1878
|
-
}
|
|
1879
|
-
return f;
|
|
1880
|
-
}
|
|
1881
|
-
static val2Lin(p) {
|
|
1882
|
-
let n = this.min || 0, a = this.brokenAxis, l = a?.breakArray;
|
|
1883
|
-
if (!l?.length || !O(p)) return p;
|
|
1884
|
-
let f = p;
|
|
1885
|
-
if (p > n)
|
|
1886
|
-
for (let m of l) if (m.to <= p && m.to > n) f -= m.len;
|
|
1887
|
-
else {
|
|
1888
|
-
if (m.from > p) break;
|
|
1889
|
-
if (c.isInBreak(m, p)) {
|
|
1890
|
-
f -= p - m.from;
|
|
1891
|
-
break;
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
else if (p < n)
|
|
1895
|
-
for (let m of l) if (m.from >= p && m.from < n) f += m.len;
|
|
1896
|
-
else {
|
|
1897
|
-
if (m.from > n) break;
|
|
1898
|
-
if (c.isInBreak(m, p)) {
|
|
1899
|
-
f += m.to - p;
|
|
1900
|
-
break;
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
return f;
|
|
1904
|
-
}
|
|
1905
|
-
constructor(p) {
|
|
1906
|
-
this.axis = p;
|
|
1907
|
-
}
|
|
1908
|
-
findBreakAt(p, n) {
|
|
1909
|
-
return Vt(n, function(a) {
|
|
1910
|
-
return a.from < p && p < a.to;
|
|
1911
|
-
});
|
|
1912
|
-
}
|
|
1913
|
-
isInAnyBreak(p, n) {
|
|
1914
|
-
let a = this.axis, l = a.options.breaks || [], f = l.length, m, b, x;
|
|
1915
|
-
if (f && O(p)) {
|
|
1916
|
-
for (; f--; ) c.isInBreak(l[f], p) && (m = !0, b || (b = D(l[f].showPoints, !a.isXAxis)));
|
|
1917
|
-
x = m && n ? m && !b : m;
|
|
1918
|
-
}
|
|
1919
|
-
return x;
|
|
1920
|
-
}
|
|
1921
|
-
setBreaks(p, n) {
|
|
1922
|
-
let a = this, l = a.axis, f = l.chart.time, m = ct(p) && !!Object.keys(p?.[0] || {}).length;
|
|
1923
|
-
l.isDirty = (a.hasBreaks ?? !1) !== m, a.hasBreaks = m, p?.forEach((b) => {
|
|
1924
|
-
b.from = f.parse(b.from) || 0, b.to = f.parse(b.to) || 0;
|
|
1925
|
-
}), p !== l.options.breaks && (l.options.breaks = l.userOptions.breaks = p), l.forceRedraw = !0, l.series.forEach(function(b) {
|
|
1926
|
-
b.isDirty = !0;
|
|
1927
|
-
}), m || l.val2lin !== c.val2Lin || (delete l.val2lin, delete l.lin2val), m && (l.userOptions.ordinal = !1, l.lin2val = c.lin2Val, l.val2lin = c.val2Lin, l.setExtremes = function(b, x, v, M, w) {
|
|
1928
|
-
if (a.hasBreaks && !l.treeGrid?.tree) {
|
|
1929
|
-
let A, y = this.brokenAxis.breakArray || [];
|
|
1930
|
-
for (; A = a.findBreakAt(b, y); ) b = A.to;
|
|
1931
|
-
for (; A = a.findBreakAt(x, y); ) x = A.from;
|
|
1932
|
-
x < b && (x = b);
|
|
1933
|
-
}
|
|
1934
|
-
l.constructor.prototype.setExtremes.call(this, b, x, v, M, w);
|
|
1935
|
-
}, l.setAxisTranslation = function() {
|
|
1936
|
-
if (l.constructor.prototype.setAxisTranslation.call(this), a.unitLength = void 0, a.hasBreaks) {
|
|
1937
|
-
let b = l.options.breaks || [], x = [], v = [], M = l.pointRangePadding ?? 0, w = 0, A, y, E = l.userMin ?? l.min, S = l.userMax ?? l.max, C = l.dataMin ?? E, k = l.dataMax ?? S, T, R;
|
|
1938
|
-
O(l.threshold) && (C = Math.min(C ?? l.threshold, l.threshold), k = Math.max(k ?? l.threshold, l.threshold)), l.treeGrid?.tree || b.forEach(function(P) {
|
|
1939
|
-
y = P.repeat || 1 / 0, O(E) && O(S) && (c.isInBreak(P, E) && (E += P.to % y - E % y), c.isInBreak(P, S) && (S -= S % y - P.from % y));
|
|
1940
|
-
}), O(C) && O(k) && b.forEach(function(P) {
|
|
1941
|
-
for (T = P.from, y = P.repeat || 1 / 0; T - y > C; ) T -= y;
|
|
1942
|
-
for (; T < C; ) T += y;
|
|
1943
|
-
for (R = T; R < k; R += y) x.push({ value: R, move: "in" }), x.push({ value: R + P.to - P.from, move: "out", size: P.breakSize });
|
|
1944
|
-
}), x.sort(function(P, I) {
|
|
1945
|
-
return P.value === I.value ? (P.move !== "in") - (I.move !== "in") : P.value - I.value;
|
|
1946
|
-
}), A = 0, T = C, x.forEach((P) => {
|
|
1947
|
-
(A += P.move === "in" ? 1 : -1) === 1 && P.move === "in" && (T = P.value), A === 0 && O(T) && (v.push({ from: T, to: P.value, len: P.value - T - (P.size || 0) }), O(E) && O(S) && T < S && P.value > E && (w += P.value - T - (P.size || 0)));
|
|
1948
|
-
}), a.breakArray = v, O(E) && O(S) && O(l.min) && (a.unitLength = S - E - w + M, _(l, "afterBreaks"), l.staticScale ? l.transA = l.staticScale : a.unitLength && (l.transA *= (S - l.min + M) / a.unitLength), M && (l.minPixelPadding = l.transA * (l.minPointOffset || 0)), l.min = E, l.max = S);
|
|
1949
|
-
}
|
|
1950
|
-
}), D(n, !0) && l.chart.redraw();
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
s.Additions = c;
|
|
1954
|
-
})(Ht || (Ht = {}));
|
|
1955
|
-
let ws = Ht, kt = W();
|
|
1956
|
-
kt.BrokenAxis = kt.BrokenAxis || ws, kt.BrokenAxis.compose(kt.Axis, kt.Series);
|
|
1957
|
-
let $ = {};
|
|
1958
|
-
function ze(s) {
|
|
1959
|
-
let t = s.length, e = Le(s);
|
|
1960
|
-
return O(e) && t && (e = U(e / t)), e;
|
|
1961
|
-
}
|
|
1962
|
-
function Le(s) {
|
|
1963
|
-
let t = s.length, e;
|
|
1964
|
-
if (!t && s.hasNulls) e = null;
|
|
1965
|
-
else if (t) for (e = 0; t--; ) e += s[t];
|
|
1966
|
-
return e;
|
|
1967
|
-
}
|
|
1968
|
-
let We = { average: ze, averages: function() {
|
|
1969
|
-
let s = [];
|
|
1970
|
-
return [].forEach.call(arguments, function(t) {
|
|
1971
|
-
s.push(ze(t));
|
|
1972
|
-
}), s[0] === void 0 ? void 0 : s;
|
|
1973
|
-
}, close: function(s) {
|
|
1974
|
-
return s.length ? s[s.length - 1] : s.hasNulls ? null : void 0;
|
|
1975
|
-
}, high: function(s) {
|
|
1976
|
-
return s.length ? de(s) : s.hasNulls ? null : void 0;
|
|
1977
|
-
}, hlc: function(s, t, e) {
|
|
1978
|
-
if (s = $.high(s), t = $.low(t), e = $.close(e), O(s) || O(t) || O(e)) return [s, t, e];
|
|
1979
|
-
}, low: function(s) {
|
|
1980
|
-
return s.length ? he(s) : s.hasNulls ? null : void 0;
|
|
1981
|
-
}, ohlc: function(s, t, e, i) {
|
|
1982
|
-
if (s = $.open(s), t = $.high(t), e = $.low(e), i = $.close(i), O(s) || O(t) || O(e) || O(i)) return [s, t, e, i];
|
|
1983
|
-
}, open: function(s) {
|
|
1984
|
-
return s.length ? s[0] : s.hasNulls ? null : void 0;
|
|
1985
|
-
}, range: function(s, t) {
|
|
1986
|
-
return s = $.low(s), t = $.high(t), O(s) || O(t) ? [s, t] : s === null && t === null ? null : void 0;
|
|
1987
|
-
}, sum: Le };
|
|
1988
|
-
F($, We);
|
|
1989
|
-
let Tt = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: ["%[AebHMSL]", "%[AebHMSL]", "-%[HMSL]"], second: ["%[AebHMS]", "%[AebHMS]", "-%[HMS]"], minute: ["%[AebHM]", "%[AebHM]", "-%[HM]"], hour: ["%[AebHM]", "%[AebHM]", "-%[HM]"], day: ["%[AebY]", "%[Aeb]", "-%[AebY]"], week: ["%v %[AebY]", "%[Aeb]", "-%[AebY]"], month: ["%[BY]", "%[B]", "-%[BY]"], year: ["%Y", "%Y", "-%Y"] } }, Xe = { line: {}, spline: {}, area: {}, areaspline: {}, arearange: {}, column: { groupPixelWidth: 10 }, columnrange: { groupPixelWidth: 10 }, candlestick: { groupPixelWidth: 10 }, ohlc: { groupPixelWidth: 5 }, hlc: { groupPixelWidth: 5 }, heikinashi: { groupPixelWidth: 10 } }, Ss = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
|
|
1990
|
-
function He(s) {
|
|
1991
|
-
let t = this, e = t.series;
|
|
1992
|
-
e.forEach(function(i) {
|
|
1993
|
-
i.groupPixelWidth = void 0;
|
|
1994
|
-
}), e.forEach(function(i) {
|
|
1995
|
-
i.groupPixelWidth = t.getGroupPixelWidth && t.getGroupPixelWidth(), i.groupPixelWidth && (i.hasProcessed = !0), i.applyGrouping(!!s.hasExtremesChanged);
|
|
1996
|
-
});
|
|
1997
|
-
}
|
|
1998
|
-
function Os() {
|
|
1999
|
-
let s = this.series, t = s.length, e = 0, i = !1, o, r;
|
|
2000
|
-
for (; t--; ) (r = s[t].options.dataGrouping) && (e = Math.max(e, D(r.groupPixelWidth, Tt.groupPixelWidth)), o = (s[t].dataTable.getModified() || s[t].dataTable).rowCount, (s[t].groupPixelWidth || o > this.chart.plotSizeX / e || o && r.forced) && (i = !0));
|
|
2001
|
-
return i ? e : 0;
|
|
2002
|
-
}
|
|
2003
|
-
function Ts() {
|
|
2004
|
-
this.series.forEach(function(s) {
|
|
2005
|
-
s.hasProcessed = !1;
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
function Es(s, t) {
|
|
2009
|
-
let e;
|
|
2010
|
-
if (t = D(t, !0), s || (s = { forced: !1, units: null }), this instanceof re) for (e = this.series.length; e--; ) this.series[e].update({ dataGrouping: s }, !1);
|
|
2011
|
-
else this.chart.options.series.forEach(function(i) {
|
|
2012
|
-
i.dataGrouping = typeof s == "boolean" ? s : X(s, i.dataGrouping);
|
|
2013
|
-
});
|
|
2014
|
-
this.ordinal && (this.ordinal.slope = void 0), t && this.chart.redraw();
|
|
2015
|
-
}
|
|
2016
|
-
let Bs = function(s) {
|
|
2017
|
-
re = s;
|
|
2018
|
-
let t = s.prototype;
|
|
2019
|
-
t.applyGrouping || (B(s, "afterSetScale", Ts), B(s, "postProcessData", He), F(t, { applyGrouping: He, getGroupPixelWidth: Os, setDataGrouping: Es }));
|
|
2020
|
-
};
|
|
2021
|
-
(function(s) {
|
|
2022
|
-
function t() {
|
|
2023
|
-
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
|
|
2024
|
-
}
|
|
2025
|
-
function e() {
|
|
2026
|
-
if (this.type !== "datetime") {
|
|
2027
|
-
this.dateTime = void 0;
|
|
2028
|
-
return;
|
|
2029
|
-
}
|
|
2030
|
-
this.dateTime || (this.dateTime = new i(this));
|
|
2031
|
-
}
|
|
2032
|
-
s.compose = function(o) {
|
|
2033
|
-
return o.keepProps.includes("dateTime") || (o.keepProps.push("dateTime"), o.prototype.getTimeTicks = t, B(o, "afterSetType", e)), o;
|
|
2034
|
-
};
|
|
2035
|
-
class i {
|
|
2036
|
-
constructor(r) {
|
|
2037
|
-
this.axis = r;
|
|
2038
|
-
}
|
|
2039
|
-
normalizeTimeTickInterval(r, d) {
|
|
2040
|
-
let h = d || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]], u = h[h.length - 1], c = q.timeUnits[u[0]], g = u[1], p, n;
|
|
2041
|
-
for (p = 0; p < h.length; p++) if (u = h[p], c = q.timeUnits[u[0]], g = u[1], h[p + 1]) {
|
|
2042
|
-
let l = (c * g[g.length - 1] + q.timeUnits[h[p + 1][0]]) / 2;
|
|
2043
|
-
if (r <= l) {
|
|
2044
|
-
n = l / r;
|
|
2045
|
-
break;
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
c === q.timeUnits.year && r < 5 * c && (g = [1, 2, 5]);
|
|
2049
|
-
let a = (function(l, f, m, b, x) {
|
|
2050
|
-
let v, M = l;
|
|
2051
|
-
m = D(m, pe(l));
|
|
2052
|
-
let w = l / m;
|
|
2053
|
-
for (f || (f = [1, 2, 2.5, 5, 10]), v = 0; v < f.length && (M = f[v], !(w <= (f[v] + (f[v + 1] || f[v])) / 2)); v++) ;
|
|
2054
|
-
return U(M * m, -Math.round(Math.log(1e-3) / Math.LN10));
|
|
2055
|
-
})(r / c, g, u[0] === "year" ? Math.max(pe(r / c), 1) : 1);
|
|
2056
|
-
return { unitRange: c, count: a, unitName: u[0], match: n };
|
|
2057
|
-
}
|
|
2058
|
-
getXDateFormat(r, d) {
|
|
2059
|
-
let { axis: h } = this, u = h.chart.time;
|
|
2060
|
-
return h.closestPointRange ? u.getDateFormat(h.closestPointRange, r, h.options.startOfWeek, d) || u.resolveDTLFormat(d.year).main : u.resolveDTLFormat(d.day).main;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
s.Additions = i;
|
|
2064
|
-
})(Yt || (Yt = {}));
|
|
2065
|
-
let Cs = Yt, { series: { prototype: Ye } } = tt(), Ps = Ye.generatePoints;
|
|
2066
|
-
function Ds(s) {
|
|
2067
|
-
var t, e, i;
|
|
2068
|
-
let o, r, d = this.chart, h = this.options.dataGrouping, u = this.allowDG !== !1 && h && D(h.enabled, d.options.isStock), c = this.reserveSpace(), g = this.currentDataGrouping, p, n, a = !1;
|
|
2069
|
-
u && !this.requireSorting && (this.requireSorting = a = !0);
|
|
2070
|
-
let l = (t = this, e = s, !!(t.isCartesian && !t.isDirty && !t.xAxis.isDirty && !t.yAxis.isDirty && !e) || !u);
|
|
2071
|
-
if (a && (this.requireSorting = !1), l) return;
|
|
2072
|
-
this.destroyGroupedData();
|
|
2073
|
-
let f = h.groupAll ? this.dataTable : this.dataTable.getModified() || this.dataTable, m = this.getColumn("x", !h.groupAll), b = d.plotSizeX, x = this.xAxis, v = x.getExtremes(), M = x.options.ordinal, w = this.groupPixelWidth;
|
|
2074
|
-
if (w && m && f.rowCount && b && O(v.min)) {
|
|
2075
|
-
r = !0, this.isDirty = !0, this.points = null;
|
|
2076
|
-
let A = v.min, y = v.max, E = M && x.ordinal && x.ordinal.getGroupIntervalFactor(A, y, this) || 1, S = w * (y - A) / b * E, C = x.getTimeTicks(Cs.Additions.prototype.normalizeTimeTickInterval(S, h.units || Ss), Math.min(A, m[0]), Math.max(y, m[m.length - 1]), x.options.startOfWeek, m, this.closestPointRange), k = Ye.groupData.apply(this, [f, C, h.approximation]), T = k.modified, R = T.getColumn("x", !0), P = 0;
|
|
2077
|
-
for (h?.smoothed && T.rowCount && (h.firstAnchor = "firstPoint", h.anchor = "middle", h.lastAnchor = "lastPoint", (0, q.error)(32, !1, d, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), o = 1; o < C.length; o++) C.info.segmentStarts && C.info.segmentStarts.indexOf(o) !== -1 || (P = Math.max(C[o] - C[o - 1], P));
|
|
2078
|
-
(p = C.info).gapSize = P, this.closestPointRange = C.info.totalRange, this.groupMap = k.groupMap, this.currentDataGrouping = p, (function(I, z, Z) {
|
|
2079
|
-
let N = I.options.dataGrouping, Y = I.currentDataGrouping && I.currentDataGrouping.gapSize, V = I.getColumn("x");
|
|
2080
|
-
if (!(N && V.length && Y && I.groupMap)) return;
|
|
2081
|
-
let K = z.length - 1, nt = N.anchor, xt = N.firstAnchor, J = N.lastAnchor, bt = z.length - 1, Bt = 0;
|
|
2082
|
-
if (xt && V[0] >= z[0]) {
|
|
2083
|
-
let at;
|
|
2084
|
-
Bt++;
|
|
2085
|
-
let _e = I.groupMap[0].start, je = I.groupMap[0].length;
|
|
2086
|
-
O(_e) && O(je) && (at = _e + (je - 1)), z[0] = { start: z[0], middle: z[0] + 0.5 * Y, end: z[0] + Y, firstPoint: V[0], lastPoint: at && V[at] }[xt];
|
|
2087
|
-
}
|
|
2088
|
-
if (K > 0 && J && Y && z[K] >= Z - Y) {
|
|
2089
|
-
bt--;
|
|
2090
|
-
let at = I.groupMap[I.groupMap.length - 1].start;
|
|
2091
|
-
z[K] = { start: z[K], middle: z[K] + 0.5 * Y, end: z[K] + Y, firstPoint: at && V[at], lastPoint: V[V.length - 1] }[J];
|
|
2092
|
-
}
|
|
2093
|
-
if (nt && nt !== "start") {
|
|
2094
|
-
let at = Y * { middle: 0.5, end: 1 }[nt];
|
|
2095
|
-
for (; bt >= Bt; ) z[bt] += at, bt--;
|
|
2096
|
-
}
|
|
2097
|
-
})(this, R || [], y), c && R && (G((i = R)[0]) && O(x.min) && O(x.dataMin) && i[0] < x.min && ((!G(x.options.min) && x.min <= x.dataMin || x.min === x.dataMin) && (x.min = Math.min(i[0], x.min)), x.dataMin = Math.min(i[0], x.dataMin)), G(i[i.length - 1]) && O(x.max) && O(x.dataMax) && i[i.length - 1] > x.max && ((!G(x.options.max) && O(x.dataMax) && x.max >= x.dataMax || x.max === x.dataMax) && (x.max = Math.max(i[i.length - 1], x.max)), x.dataMax = Math.max(i[i.length - 1], x.dataMax))), h.groupAll && (this.allGroupedTable = T, R = (T = (n = this.cropData(T, x.min || 0, x.max || 0)).modified).getColumn("x"), this.cropStart = n.start), this.dataTable.modified = T;
|
|
2098
|
-
} else this.groupMap = void 0, this.currentDataGrouping = void 0;
|
|
2099
|
-
this.hasGroupedData = r, this.preventGraphAnimation = (g && g.totalRange) !== (p && p.totalRange);
|
|
2100
|
-
}
|
|
2101
|
-
function Fe() {
|
|
2102
|
-
this.groupedData && (this.groupedData.forEach(function(s, t) {
|
|
2103
|
-
s && (this.groupedData[t] = s.destroy ? s.destroy() : null);
|
|
2104
|
-
}, this), this.groupedData.length = 0, delete this.allGroupedTable);
|
|
2105
|
-
}
|
|
2106
|
-
function Rs() {
|
|
2107
|
-
Ps.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
|
|
2108
|
-
}
|
|
2109
|
-
function Gs() {
|
|
2110
|
-
return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") || this.options.cumulative ? "sum" : "average";
|
|
2111
|
-
}
|
|
2112
|
-
function Ne(s, t, e) {
|
|
2113
|
-
let i = s.getColumn("x", !0) || [], o = s.getColumn("y", !0), r = this, d = r.data, h = r.options && r.options.data, u = [], c = new be(), g = [], p = s.rowCount, n = !!o, a = [], l = r.pointArrayMap, f = l && l.length, m = ["x"].concat(l || ["y"]), b = (l || ["y"]).map(() => []), x = this.options.dataGrouping && this.options.dataGrouping.groupAll, v, M, w, A = 0, y = 0, E = typeof e == "function" ? e : e && $[e] ? $[e] : $[r.getDGApproximation && r.getDGApproximation() || "average"];
|
|
2114
|
-
if (f) {
|
|
2115
|
-
let k = l.length;
|
|
2116
|
-
for (; k--; ) a.push([]);
|
|
2117
|
-
} else a.push([]);
|
|
2118
|
-
let S = f || 1;
|
|
2119
|
-
for (let k = 0; k <= p; k++) if (!(i[k] < t[0])) {
|
|
2120
|
-
for (; t[A + 1] !== void 0 && i[k] >= t[A + 1] || k === p; ) {
|
|
2121
|
-
if (v = t[A], r.dataGroupInfo = { start: x ? y : r.cropStart + y, length: a[0].length, groupStart: v }, w = E.apply(r, a), r.pointClass && !G(r.dataGroupInfo.options) && (r.dataGroupInfo.options = X(r.pointClass.prototype.optionsToObject.call({ series: r }, r.options.data[r.cropStart + y])), m.forEach(function(T) {
|
|
2122
|
-
delete r.dataGroupInfo.options[T];
|
|
2123
|
-
})), w !== void 0) {
|
|
2124
|
-
u.push(v);
|
|
2125
|
-
let T = ft(w);
|
|
2126
|
-
for (let R = 0; R < T.length; R++) b[R].push(T[R]);
|
|
2127
|
-
g.push(r.dataGroupInfo);
|
|
2128
|
-
}
|
|
2129
|
-
y = k;
|
|
2130
|
-
for (let T = 0; T < S; T++) a[T].length = 0, a[T].hasNulls = !1;
|
|
2131
|
-
if (A += 1, k === p) break;
|
|
2132
|
-
}
|
|
2133
|
-
if (k === p) break;
|
|
2134
|
-
if (l) {
|
|
2135
|
-
let T, R = x ? k : r.cropStart + k, P = d && d[R] || r.pointClass.prototype.applyOptions.apply({ series: r }, [h[R]]);
|
|
2136
|
-
for (let I = 0; I < f; I++) O(T = P[l[I]]) ? a[I].push(T) : T === null && (a[I].hasNulls = !0);
|
|
2137
|
-
} else O(M = n ? o[k] : null) ? a[0].push(M) : M === null && (a[0].hasNulls = !0);
|
|
2138
|
-
}
|
|
2139
|
-
let C = { x: u };
|
|
2140
|
-
return (l || ["y"]).forEach((k, T) => {
|
|
2141
|
-
C[k] = b[T];
|
|
2142
|
-
}), c.setColumns(C), { groupMap: g, modified: c };
|
|
2143
|
-
}
|
|
2144
|
-
function Is(s) {
|
|
2145
|
-
let t = s.options, e = this.type, i = this.chart.options.plotOptions, o = this.useCommonDataGrouping && Tt, r = W().defaultOptions.plotOptions[e].dataGrouping;
|
|
2146
|
-
if (i && (Xe[e] || o)) {
|
|
2147
|
-
let d = this.chart.rangeSelector;
|
|
2148
|
-
r || (r = X(Tt, Xe[e])), t.dataGrouping = X(o, r, i.series && i.series.dataGrouping, i[e].dataGrouping, this.userOptions.dataGrouping, !t.isInternal && d && O(d.selected) && d.buttonOptions[d.selected].dataGrouping);
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
let zs = function(s) {
|
|
2152
|
-
let t = s.prototype;
|
|
2153
|
-
t.applyGrouping || (B(s.prototype.pointClass, "update", function() {
|
|
2154
|
-
if (this.dataGroup) return (0, q.error)(24, !1, this.series.chart), !1;
|
|
2155
|
-
}), B(s, "afterSetOptions", Is), B(s, "destroy", Fe), F(t, { applyGrouping: Ds, destroyGroupedData: Fe, generatePoints: Rs, getDGApproximation: Gs, groupData: Ne }));
|
|
2156
|
-
}, { format: Ls } = Jt(), { composed: Ws } = W();
|
|
2157
|
-
function Xs(s) {
|
|
2158
|
-
let t = this.chart, e = t.time, i = s.point, o = i.series, r = o.options, d = o.tooltipOptions, h = r.dataGrouping, u = o.xAxis, c = d.xDateFormat || "", g, p, n, a, l, f = d[s.isFooter ? "footerFormat" : "headerFormat"];
|
|
2159
|
-
if (u && u.options.type === "datetime" && h && O(i.key)) {
|
|
2160
|
-
p = o.currentDataGrouping, n = h.dateTimeLabelFormats || Tt.dateTimeLabelFormats, p ? (a = n[p.unitName], p.count === 1 ? c = a[0] : (c = a[1], g = a[2])) : !c && n && u.dateTime && (c = u.dateTime.getXDateFormat(i.x, d.dateTimeLabelFormats));
|
|
2161
|
-
let m = D(o.groupMap?.[i.index].groupStart, i.key), b = m + (p?.totalRange || 0) - 1;
|
|
2162
|
-
l = e.dateFormat(c, m), g && (l += e.dateFormat(g, b)), o.chart.styledMode && (f = this.styledModeFormat(f)), s.text = Ls(f, { point: F(i, { key: l }), series: o }, t), s.preventDefault();
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
let ot = W();
|
|
2166
|
-
ot.dataGrouping = ot.dataGrouping || {}, ot.dataGrouping.approximationDefaults = ot.dataGrouping.approximationDefaults || We, ot.dataGrouping.approximations = ot.dataGrouping.approximations || $, { compose: function(s, t, e) {
|
|
2167
|
-
Bs(s), zs(t), e && rt(Ws, "DataGrouping") && B(e, "headerFormatter", Xs);
|
|
2168
|
-
}, groupData: Ne }.compose(ot.Axis, ot.Series, ot.Tooltip);
|
|
2169
|
-
let { getAssignedAxis: Ue } = { getAssignedAxis: function(s) {
|
|
2170
|
-
return s.filter((t) => {
|
|
2171
|
-
let e = t.axis.getExtremes(), i = e.min, o = e.max, r = D(t.axis.minPointOffset, 0);
|
|
2172
|
-
return O(i) && O(o) && t.value >= i - r && t.value <= o + r && !t.axis.options.isInternal;
|
|
2173
|
-
})[0];
|
|
2174
|
-
} }, Ve = [], Hs = { enabled: !0, sensitivity: 1.1, showResetButton: !1 }, Ys = function(s, t, e, i, o, r, d) {
|
|
2175
|
-
let h = D(d.type, s.zooming.type, ""), u = [];
|
|
2176
|
-
h === "x" ? u = e : h === "y" ? u = i : h === "xy" && (u = s.axes);
|
|
2177
|
-
let c = s.transform({ axes: u, to: { x: o - 5, y: r - 5, width: 10, height: 10 }, from: { x: o - 5 * t, y: r - 5 * t, width: 10 * t, height: 10 * t }, trigger: "mousewheel", allowResetButton: d.showResetButton });
|
|
2178
|
-
if (c) {
|
|
2179
|
-
var g;
|
|
2180
|
-
G(Gt) && G(g = Gt) && clearTimeout(g), Gt = setTimeout(() => {
|
|
2181
|
-
s.pointer?.drop();
|
|
2182
|
-
}, 400);
|
|
2183
|
-
}
|
|
2184
|
-
return c;
|
|
2185
|
-
};
|
|
2186
|
-
function Fs() {
|
|
2187
|
-
var s;
|
|
2188
|
-
let t = (wt(s = this.zooming.mouseWheel) || (s = { enabled: s ?? !0 }), X(Hs, s));
|
|
2189
|
-
t.enabled && B(this.container, "wheel", (e) => {
|
|
2190
|
-
e = this.pointer?.normalize(e) || e;
|
|
2191
|
-
let { pointer: i } = this, o = i && !i.inClass(e.target, "highcharts-no-mousewheel");
|
|
2192
|
-
if (this.isInsidePlot(e.chartX - this.plotLeft, e.chartY - this.plotTop) && o) {
|
|
2193
|
-
let r = t.sensitivity || 1.1, d = e.detail || (e.deltaY || 0) / 120, h = Ue(i.getCoordinates(e).xAxis), u = Ue(i.getCoordinates(e).yAxis);
|
|
2194
|
-
Ys(this, Math.pow(r, d), h ? [h.axis] : this.xAxis, u ? [u.axis] : this.yAxis, e.chartX, e.chartY, t) && e.preventDefault?.();
|
|
2195
|
-
}
|
|
2196
|
-
});
|
|
2197
|
-
}
|
|
2198
|
-
let Et = W();
|
|
2199
|
-
Et.MouseWheelZoom = Et.MouseWheelZoom || { compose: function(s) {
|
|
2200
|
-
Ve.indexOf(s) === -1 && (Ve.push(s), B(s, "afterGetContainer", Fs));
|
|
2201
|
-
} }, Et.MouseWheelZoom.compose(Et.Chart);
|
|
2202
|
-
let L = W();
|
|
2203
|
-
L.Navigator = L.Navigator || qt, L.OrdinalAxis = L.OrdinalAxis || Yi, L.RangeSelector = L.RangeSelector || At, L.Scrollbar = L.Scrollbar || ht, L.stockChart = L.stockChart || Ee.stockChart, L.StockChart = L.StockChart || L.stockChart, F(L.StockChart, Ee), hi.compose(L.Series, L.Axis, L.Point), mt.compose(L.Renderer), dt.compose(L.Series), L.Navigator.compose(L.Chart, L.Axis, L.Series), L.OrdinalAxis.compose(L.Axis, L.Series, L.Chart), L.RangeSelector.compose(L.Axis, L.Chart), L.Scrollbar.compose(L.Axis), L.StockChart.compose(L.Chart, L.Axis, L.Series, L.SVGRenderer);
|
|
2204
|
-
let Ns = W();
|
|
2205
|
-
return ae.default;
|
|
2206
|
-
})());
|
|
2207
|
-
})(Ct)), Ct.exports;
|
|
2208
|
-
}
|
|
2209
|
-
var Ke = js();
|
|
2210
|
-
const Zs = /* @__PURE__ */ Us(Ke), $s = /* @__PURE__ */ Vs({
|
|
2211
|
-
__proto__: null,
|
|
2212
|
-
default: Zs
|
|
2213
|
-
}, [Ke]);
|
|
2214
|
-
export {
|
|
2215
|
-
$s as s
|
|
2216
|
-
};
|