@carbon/charts 1.22.0 → 1.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +3 -2
- package/dist/{angle-utils-CGNI01fr.mjs → angle-utils-RQSA_x-9.mjs} +29 -29
- package/dist/{angle-utils-CGNI01fr.mjs.map → angle-utils-RQSA_x-9.mjs.map} +1 -1
- package/dist/{array-D7iT_STy.mjs → array-DUMAG1_w.mjs} +2 -2
- package/dist/{array-D7iT_STy.mjs.map → array-DUMAG1_w.mjs.map} +1 -1
- package/dist/{choropleth-0DsmaWsP.mjs → choropleth-C1BTZZfm.mjs} +829 -854
- package/dist/choropleth-C1BTZZfm.mjs.map +1 -0
- package/dist/{color-scale-utils-f3PWy_Op.mjs → color-scale-utils-CKd_DujW.mjs} +1380 -1375
- package/dist/color-scale-utils-CKd_DujW.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/{index-DFubnvsv.mjs → index-CiAo-vQV.mjs} +558 -534
- package/dist/index-CiAo-vQV.mjs.map +1 -0
- package/dist/index.mjs +35 -35
- package/dist/index.mjs.map +1 -1
- package/dist/model/index.mjs +4 -4
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/styles.css +294 -288
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/dist/umd/bundle.umd.cjs +17 -22
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +17 -22
- package/package.json +23 -23
- package/scss/components/_axis.scss +8 -0
- package/styles.css +294 -288
- package/styles.min.css +1 -1
- package/telemetry.yml +1 -1
- package/dist/choropleth-0DsmaWsP.mjs.map +0 -1
- package/dist/color-scale-utils-f3PWy_Op.mjs.map +0 -1
- package/dist/index-DFubnvsv.mjs.map +0 -1
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import { a3 as
|
|
2
|
-
import { z as
|
|
3
|
-
import { $ as
|
|
4
|
-
function
|
|
1
|
+
import { a3 as Lt, aC as Nt, aD as Ct, aE as It, aF as ut, aG as Zt, aH as Ft, aI as zt, a1 as Vt, aJ as Ht, aK as Yt, aL as Xt, ax as q, aM as Gt, aN as $t, aO as Ut, _ as Kt, W as qt, n as j, g as c, F as W, aP as T, aQ as M, aR as E, aS as jt, aT as ft, aU as mt, h as J, ar as Wt, ao as Jt, ad as dt, ai as Qt, H as ti } from "./color-scale-utils-CKd_DujW.mjs";
|
|
2
|
+
import { z as ii, A as O, e as Q, S as A, D as ei, s as ni, v as si, x as oi, y as ai, u as ri } from "./angle-utils-RQSA_x-9.mjs";
|
|
3
|
+
import { $ as w, e as _, i as C, S as m } from "./axis-scales-CPuwbFQf.mjs";
|
|
4
|
+
function pt(i) {
|
|
5
5
|
var t = i == null ? 0 : i.length;
|
|
6
|
-
return t ?
|
|
6
|
+
return t ? Lt(i, 1) : [];
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function hi(i) {
|
|
9
|
+
return Nt(Ct(i, void 0, pt), i + "");
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
var
|
|
13
|
-
t < 0 && (t = -t > s ? 0 : s + t),
|
|
14
|
-
for (var o = Array(s); ++
|
|
15
|
-
o[
|
|
11
|
+
function ci(i, t, e) {
|
|
12
|
+
var n = -1, s = i.length;
|
|
13
|
+
t < 0 && (t = -t > s ? 0 : s + t), e = e > s ? s : e, e < 0 && (e += s), s = t > e ? 0 : e - t >>> 0, t >>>= 0;
|
|
14
|
+
for (var o = Array(s); ++n < s; )
|
|
15
|
+
o[n] = i[n + t];
|
|
16
16
|
return o;
|
|
17
17
|
}
|
|
18
|
-
function ci(i, t) {
|
|
19
|
-
return t.length < 2 ? i : Ct(i, hi(t, 0, -1));
|
|
20
|
-
}
|
|
21
18
|
function li(i, t) {
|
|
22
|
-
return t
|
|
19
|
+
return t.length < 2 ? i : It(i, ci(t, 0, -1));
|
|
20
|
+
}
|
|
21
|
+
function _i(i, t) {
|
|
22
|
+
return t = ut(t, i), i = li(i, t), i == null || delete i[Zt(Ft(t))];
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function ui(i) {
|
|
25
|
+
return zt(i) ? void 0 : i;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
27
|
+
var fi = 1, mi = 2, di = 4, pi = hi(function(i, t) {
|
|
28
|
+
var e = {};
|
|
29
29
|
if (i == null)
|
|
30
|
-
return
|
|
31
|
-
var
|
|
32
|
-
t =
|
|
33
|
-
return o =
|
|
34
|
-
}),
|
|
30
|
+
return e;
|
|
31
|
+
var n = !1;
|
|
32
|
+
t = Vt(t, function(o) {
|
|
33
|
+
return o = ut(o, i), n || (n = o.length > 1), o;
|
|
34
|
+
}), Ht(i, Yt(i), e), n && (e = Xt(e, fi | mi | di, ui));
|
|
35
35
|
for (var s = t.length; s--; )
|
|
36
|
-
|
|
37
|
-
return
|
|
36
|
+
_i(e, t[s]);
|
|
37
|
+
return e;
|
|
38
38
|
});
|
|
39
|
-
function
|
|
39
|
+
function tt(i) {
|
|
40
40
|
return Math.log(i);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function it(i) {
|
|
43
43
|
return Math.exp(i);
|
|
44
44
|
}
|
|
45
|
-
function pi(i) {
|
|
46
|
-
return -Math.log(-i);
|
|
47
|
-
}
|
|
48
45
|
function xi(i) {
|
|
49
|
-
return -Math.
|
|
46
|
+
return -Math.log(-i);
|
|
50
47
|
}
|
|
51
48
|
function gi(i) {
|
|
52
|
-
return
|
|
49
|
+
return -Math.exp(-i);
|
|
53
50
|
}
|
|
54
51
|
function yi(i) {
|
|
55
|
-
return i
|
|
52
|
+
return isFinite(i) ? +("1e" + i) : i < 0 ? 0 : i;
|
|
56
53
|
}
|
|
57
54
|
function vi(i) {
|
|
55
|
+
return i === 10 ? yi : i === Math.E ? Math.exp : (t) => Math.pow(i, t);
|
|
56
|
+
}
|
|
57
|
+
function Ti(i) {
|
|
58
58
|
return i === Math.E ? Math.log : i === 10 && Math.log10 || i === 2 && Math.log2 || (i = Math.log(i), (t) => Math.log(t) / i);
|
|
59
59
|
}
|
|
60
60
|
function et(i) {
|
|
61
|
-
return (t,
|
|
61
|
+
return (t, e) => -i(-t, e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const t = i(
|
|
65
|
-
let
|
|
63
|
+
function Di(i) {
|
|
64
|
+
const t = i(tt, it), e = t.domain;
|
|
65
|
+
let n = 10, s, o;
|
|
66
66
|
function a() {
|
|
67
|
-
return s =
|
|
67
|
+
return s = Ti(n), o = vi(n), e()[0] < 0 ? (s = et(s), o = et(o), i(xi, gi)) : i(tt, it), t;
|
|
68
68
|
}
|
|
69
69
|
return t.base = function(r) {
|
|
70
|
-
return arguments.length ? (
|
|
70
|
+
return arguments.length ? (n = +r, a()) : n;
|
|
71
71
|
}, t.domain = function(r) {
|
|
72
|
-
return arguments.length ? (
|
|
72
|
+
return arguments.length ? (e(r), a()) : e();
|
|
73
73
|
}, t.ticks = (r) => {
|
|
74
|
-
const h =
|
|
74
|
+
const h = e();
|
|
75
75
|
let l = h[0], f = h[h.length - 1];
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
let p = s(l),
|
|
76
|
+
const y = f < l;
|
|
77
|
+
y && ([l, f] = [f, l]);
|
|
78
|
+
let p = s(l), v = s(f), g, d;
|
|
79
79
|
const D = r == null ? 10 : +r;
|
|
80
80
|
let u = [];
|
|
81
|
-
if (!(
|
|
82
|
-
if (p = Math.floor(p),
|
|
83
|
-
for (; p <=
|
|
84
|
-
for (
|
|
85
|
-
if (d = p < 0 ?
|
|
81
|
+
if (!(n % 1) && v - p < D) {
|
|
82
|
+
if (p = Math.floor(p), v = Math.ceil(v), l > 0) {
|
|
83
|
+
for (; p <= v; ++p)
|
|
84
|
+
for (g = 1; g < n; ++g)
|
|
85
|
+
if (d = p < 0 ? g / o(-p) : g * o(p), !(d < l)) {
|
|
86
86
|
if (d > f) break;
|
|
87
87
|
u.push(d);
|
|
88
88
|
}
|
|
89
|
-
} else for (; p <=
|
|
90
|
-
for (
|
|
91
|
-
if (d = p > 0 ?
|
|
89
|
+
} else for (; p <= v; ++p)
|
|
90
|
+
for (g = n - 1; g >= 1; --g)
|
|
91
|
+
if (d = p > 0 ? g / o(-p) : g * o(p), !(d < l)) {
|
|
92
92
|
if (d > f) break;
|
|
93
93
|
u.push(d);
|
|
94
94
|
}
|
|
95
|
-
u.length * 2 < D && (u =
|
|
95
|
+
u.length * 2 < D && (u = q(l, f, D));
|
|
96
96
|
} else
|
|
97
|
-
u =
|
|
98
|
-
return
|
|
97
|
+
u = q(p, v, Math.min(v - p, D)).map(o);
|
|
98
|
+
return y ? u.reverse() : u;
|
|
99
99
|
}, t.tickFormat = (r, h) => {
|
|
100
|
-
if (r == null && (r = 10), h == null && (h =
|
|
101
|
-
const l = Math.max(1,
|
|
100
|
+
if (r == null && (r = 10), h == null && (h = n === 10 ? "s" : ","), typeof h != "function" && (!(n % 1) && (h = Gt(h)).precision == null && (h.trim = !0), h = $t(h)), r === 1 / 0) return h;
|
|
101
|
+
const l = Math.max(1, n * r / t.ticks().length);
|
|
102
102
|
return (f) => {
|
|
103
|
-
let
|
|
104
|
-
return
|
|
103
|
+
let y = f / o(Math.round(s(f)));
|
|
104
|
+
return y * n < n - 0.5 && (y *= n), y <= l ? h(f) : "";
|
|
105
105
|
};
|
|
106
|
-
}, t.nice = () =>
|
|
106
|
+
}, t.nice = () => e(ii(e(), {
|
|
107
107
|
floor: (r) => o(Math.floor(s(r))),
|
|
108
108
|
ceil: (r) => o(Math.ceil(s(r)))
|
|
109
109
|
})), t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const i =
|
|
113
|
-
return i.copy = () =>
|
|
111
|
+
function xt() {
|
|
112
|
+
const i = Di(Ut()).domain([1, 10]);
|
|
113
|
+
return i.copy = () => Kt(i, xt()).base(i.base()), qt.apply(i, arguments), i;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function k(i, t, e) {
|
|
116
116
|
i._context.bezierCurveTo(
|
|
117
117
|
(2 * i._x0 + i._x1) / 3,
|
|
118
118
|
(2 * i._y0 + i._y1) / 3,
|
|
119
119
|
(i._x0 + 2 * i._x1) / 3,
|
|
120
120
|
(i._y0 + 2 * i._y1) / 3,
|
|
121
121
|
(i._x0 + 4 * i._x1 + t) / 6,
|
|
122
|
-
(i._y0 + 4 * i._y1 +
|
|
122
|
+
(i._y0 + 4 * i._y1 + e) / 6
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function L(i) {
|
|
126
126
|
this._context = i;
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
L.prototype = {
|
|
129
129
|
areaStart: function() {
|
|
130
130
|
this._line = 0;
|
|
131
131
|
},
|
|
@@ -138,7 +138,7 @@ B.prototype = {
|
|
|
138
138
|
lineEnd: function() {
|
|
139
139
|
switch (this._point) {
|
|
140
140
|
case 3:
|
|
141
|
-
|
|
141
|
+
k(this, this._x1, this._y1);
|
|
142
142
|
case 2:
|
|
143
143
|
this._context.lineTo(this._x1, this._y1);
|
|
144
144
|
break;
|
|
@@ -156,19 +156,19 @@ B.prototype = {
|
|
|
156
156
|
case 2:
|
|
157
157
|
this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
|
|
158
158
|
default:
|
|
159
|
-
|
|
159
|
+
k(this, i, t);
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
162
|
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
function
|
|
166
|
-
return new
|
|
165
|
+
function Ai(i) {
|
|
166
|
+
return new L(i);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function gt(i) {
|
|
169
169
|
this._context = i;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
gt.prototype = {
|
|
172
172
|
areaStart: O,
|
|
173
173
|
areaEnd: O,
|
|
174
174
|
lineStart: function() {
|
|
@@ -202,19 +202,19 @@ yt.prototype = {
|
|
|
202
202
|
this._point = 3, this._x4 = i, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + i) / 6, (this._y0 + 4 * this._y1 + t) / 6);
|
|
203
203
|
break;
|
|
204
204
|
default:
|
|
205
|
-
|
|
205
|
+
k(this, i, t);
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
208
|
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
function
|
|
212
|
-
return new
|
|
211
|
+
function Oi(i) {
|
|
212
|
+
return new gt(i);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function yt(i) {
|
|
215
215
|
this._context = i;
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
yt.prototype = {
|
|
218
218
|
areaStart: function() {
|
|
219
219
|
this._line = 0;
|
|
220
220
|
},
|
|
@@ -237,34 +237,34 @@ vt.prototype = {
|
|
|
237
237
|
break;
|
|
238
238
|
case 2:
|
|
239
239
|
this._point = 3;
|
|
240
|
-
var
|
|
241
|
-
this._line ? this._context.lineTo(
|
|
240
|
+
var e = (this._x0 + 4 * this._x1 + i) / 6, n = (this._y0 + 4 * this._y1 + t) / 6;
|
|
241
|
+
this._line ? this._context.lineTo(e, n) : this._context.moveTo(e, n);
|
|
242
242
|
break;
|
|
243
243
|
case 3:
|
|
244
244
|
this._point = 4;
|
|
245
245
|
default:
|
|
246
|
-
|
|
246
|
+
k(this, i, t);
|
|
247
247
|
break;
|
|
248
248
|
}
|
|
249
249
|
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
return new
|
|
252
|
+
function Mi(i) {
|
|
253
|
+
return new yt(i);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
this._basis = new
|
|
255
|
+
function vt(i, t) {
|
|
256
|
+
this._basis = new L(i), this._beta = t;
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
vt.prototype = {
|
|
259
259
|
lineStart: function() {
|
|
260
260
|
this._x = [], this._y = [], this._basis.lineStart();
|
|
261
261
|
},
|
|
262
262
|
lineEnd: function() {
|
|
263
|
-
var i = this._x, t = this._y,
|
|
264
|
-
if (
|
|
265
|
-
for (var
|
|
266
|
-
h = r /
|
|
267
|
-
this._beta * i[r] + (1 - this._beta) * (
|
|
263
|
+
var i = this._x, t = this._y, e = i.length - 1;
|
|
264
|
+
if (e > 0)
|
|
265
|
+
for (var n = i[0], s = t[0], o = i[e] - n, a = t[e] - s, r = -1, h; ++r <= e; )
|
|
266
|
+
h = r / e, this._basis.point(
|
|
267
|
+
this._beta * i[r] + (1 - this._beta) * (n + h * o),
|
|
268
268
|
this._beta * t[r] + (1 - this._beta) * (s + h * a)
|
|
269
269
|
);
|
|
270
270
|
this._x = this._y = null, this._basis.lineEnd();
|
|
@@ -273,28 +273,28 @@ Tt.prototype = {
|
|
|
273
273
|
this._x.push(+i), this._y.push(+t);
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
const
|
|
277
|
-
function n
|
|
278
|
-
return t === 1 ? new
|
|
276
|
+
const bi = function i(t) {
|
|
277
|
+
function e(n) {
|
|
278
|
+
return t === 1 ? new L(n) : new vt(n, t);
|
|
279
279
|
}
|
|
280
|
-
return
|
|
281
|
-
return i(+
|
|
282
|
-
},
|
|
280
|
+
return e.beta = function(n) {
|
|
281
|
+
return i(+n);
|
|
282
|
+
}, e;
|
|
283
283
|
}(0.85);
|
|
284
|
-
function
|
|
284
|
+
function R(i, t, e) {
|
|
285
285
|
i._context.bezierCurveTo(
|
|
286
286
|
i._x1 + i._k * (i._x2 - i._x0),
|
|
287
287
|
i._y1 + i._k * (i._y2 - i._y0),
|
|
288
288
|
i._x2 + i._k * (i._x1 - t),
|
|
289
|
-
i._y2 + i._k * (i._y1 -
|
|
289
|
+
i._y2 + i._k * (i._y1 - e),
|
|
290
290
|
i._x2,
|
|
291
291
|
i._y2
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function z(i, t) {
|
|
295
295
|
this._context = i, this._k = (1 - t) / 6;
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
z.prototype = {
|
|
298
298
|
areaStart: function() {
|
|
299
299
|
this._line = 0;
|
|
300
300
|
},
|
|
@@ -310,7 +310,7 @@ F.prototype = {
|
|
|
310
310
|
this._context.lineTo(this._x2, this._y2);
|
|
311
311
|
break;
|
|
312
312
|
case 3:
|
|
313
|
-
|
|
313
|
+
R(this, this._x1, this._y1);
|
|
314
314
|
break;
|
|
315
315
|
}
|
|
316
316
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
@@ -326,24 +326,24 @@ F.prototype = {
|
|
|
326
326
|
case 2:
|
|
327
327
|
this._point = 3;
|
|
328
328
|
default:
|
|
329
|
-
|
|
329
|
+
R(this, i, t);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
|
-
const
|
|
336
|
-
function n
|
|
337
|
-
return new
|
|
335
|
+
const Si = function i(t) {
|
|
336
|
+
function e(n) {
|
|
337
|
+
return new z(n, t);
|
|
338
338
|
}
|
|
339
|
-
return
|
|
340
|
-
return i(+
|
|
341
|
-
},
|
|
339
|
+
return e.tension = function(n) {
|
|
340
|
+
return i(+n);
|
|
341
|
+
}, e;
|
|
342
342
|
}(0);
|
|
343
|
-
function
|
|
343
|
+
function V(i, t) {
|
|
344
344
|
this._context = i, this._k = (1 - t) / 6;
|
|
345
345
|
}
|
|
346
|
-
|
|
346
|
+
V.prototype = {
|
|
347
347
|
areaStart: O,
|
|
348
348
|
areaEnd: O,
|
|
349
349
|
lineStart: function() {
|
|
@@ -377,24 +377,24 @@ z.prototype = {
|
|
|
377
377
|
this._point = 3, this._x5 = i, this._y5 = t;
|
|
378
378
|
break;
|
|
379
379
|
default:
|
|
380
|
-
|
|
380
|
+
R(this, i, t);
|
|
381
381
|
break;
|
|
382
382
|
}
|
|
383
383
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
const
|
|
387
|
-
function n
|
|
388
|
-
return new
|
|
386
|
+
const Pi = function i(t) {
|
|
387
|
+
function e(n) {
|
|
388
|
+
return new V(n, t);
|
|
389
389
|
}
|
|
390
|
-
return
|
|
391
|
-
return i(+
|
|
392
|
-
},
|
|
390
|
+
return e.tension = function(n) {
|
|
391
|
+
return i(+n);
|
|
392
|
+
}, e;
|
|
393
393
|
}(0);
|
|
394
|
-
function
|
|
394
|
+
function H(i, t) {
|
|
395
395
|
this._context = i, this._k = (1 - t) / 6;
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
H.prototype = {
|
|
398
398
|
areaStart: function() {
|
|
399
399
|
this._line = 0;
|
|
400
400
|
},
|
|
@@ -421,36 +421,36 @@ V.prototype = {
|
|
|
421
421
|
case 3:
|
|
422
422
|
this._point = 4;
|
|
423
423
|
default:
|
|
424
|
-
|
|
424
|
+
R(this, i, t);
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
427
427
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
const
|
|
431
|
-
function n
|
|
432
|
-
return new
|
|
430
|
+
const Ei = function i(t) {
|
|
431
|
+
function e(n) {
|
|
432
|
+
return new H(n, t);
|
|
433
433
|
}
|
|
434
|
-
return
|
|
435
|
-
return i(+
|
|
436
|
-
},
|
|
434
|
+
return e.tension = function(n) {
|
|
435
|
+
return i(+n);
|
|
436
|
+
}, e;
|
|
437
437
|
}(0);
|
|
438
|
-
function Y(i, t,
|
|
439
|
-
var
|
|
440
|
-
if (i._l01_a >
|
|
438
|
+
function Y(i, t, e) {
|
|
439
|
+
var n = i._x1, s = i._y1, o = i._x2, a = i._y2;
|
|
440
|
+
if (i._l01_a > Q) {
|
|
441
441
|
var r = 2 * i._l01_2a + 3 * i._l01_a * i._l12_a + i._l12_2a, h = 3 * i._l01_a * (i._l01_a + i._l12_a);
|
|
442
|
-
|
|
442
|
+
n = (n * r - i._x0 * i._l12_2a + i._x2 * i._l01_2a) / h, s = (s * r - i._y0 * i._l12_2a + i._y2 * i._l01_2a) / h;
|
|
443
443
|
}
|
|
444
|
-
if (i._l23_a >
|
|
444
|
+
if (i._l23_a > Q) {
|
|
445
445
|
var l = 2 * i._l23_2a + 3 * i._l23_a * i._l12_a + i._l12_2a, f = 3 * i._l23_a * (i._l23_a + i._l12_a);
|
|
446
|
-
o = (o * l + i._x1 * i._l23_2a - t * i._l12_2a) / f, a = (a * l + i._y1 * i._l23_2a -
|
|
446
|
+
o = (o * l + i._x1 * i._l23_2a - t * i._l12_2a) / f, a = (a * l + i._y1 * i._l23_2a - e * i._l12_2a) / f;
|
|
447
447
|
}
|
|
448
|
-
i._context.bezierCurveTo(
|
|
448
|
+
i._context.bezierCurveTo(n, s, o, a, i._x2, i._y2);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Tt(i, t) {
|
|
451
451
|
this._context = i, this._alpha = t;
|
|
452
452
|
}
|
|
453
|
-
|
|
453
|
+
Tt.prototype = {
|
|
454
454
|
areaStart: function() {
|
|
455
455
|
this._line = 0;
|
|
456
456
|
},
|
|
@@ -473,8 +473,8 @@ Dt.prototype = {
|
|
|
473
473
|
},
|
|
474
474
|
point: function(i, t) {
|
|
475
475
|
if (i = +i, t = +t, this._point) {
|
|
476
|
-
var
|
|
477
|
-
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(
|
|
476
|
+
var e = this._x2 - i, n = this._y2 - t;
|
|
477
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
478
478
|
}
|
|
479
479
|
switch (this._point) {
|
|
480
480
|
case 0:
|
|
@@ -492,18 +492,18 @@ Dt.prototype = {
|
|
|
492
492
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
493
493
|
}
|
|
494
494
|
};
|
|
495
|
-
const
|
|
496
|
-
function n
|
|
497
|
-
return t ? new
|
|
495
|
+
const wi = function i(t) {
|
|
496
|
+
function e(n) {
|
|
497
|
+
return t ? new Tt(n, t) : new z(n, 0);
|
|
498
498
|
}
|
|
499
|
-
return
|
|
500
|
-
return i(+
|
|
501
|
-
},
|
|
499
|
+
return e.alpha = function(n) {
|
|
500
|
+
return i(+n);
|
|
501
|
+
}, e;
|
|
502
502
|
}(0.5);
|
|
503
|
-
function
|
|
503
|
+
function Dt(i, t) {
|
|
504
504
|
this._context = i, this._alpha = t;
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
Dt.prototype = {
|
|
507
507
|
areaStart: O,
|
|
508
508
|
areaEnd: O,
|
|
509
509
|
lineStart: function() {
|
|
@@ -527,8 +527,8 @@ At.prototype = {
|
|
|
527
527
|
},
|
|
528
528
|
point: function(i, t) {
|
|
529
529
|
if (i = +i, t = +t, this._point) {
|
|
530
|
-
var
|
|
531
|
-
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(
|
|
530
|
+
var e = this._x2 - i, n = this._y2 - t;
|
|
531
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
532
532
|
}
|
|
533
533
|
switch (this._point) {
|
|
534
534
|
case 0:
|
|
@@ -547,18 +547,18 @@ At.prototype = {
|
|
|
547
547
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
|
-
const
|
|
551
|
-
function n
|
|
552
|
-
return t ? new
|
|
550
|
+
const ki = function i(t) {
|
|
551
|
+
function e(n) {
|
|
552
|
+
return t ? new Dt(n, t) : new V(n, 0);
|
|
553
553
|
}
|
|
554
|
-
return
|
|
555
|
-
return i(+
|
|
556
|
-
},
|
|
554
|
+
return e.alpha = function(n) {
|
|
555
|
+
return i(+n);
|
|
556
|
+
}, e;
|
|
557
557
|
}(0.5);
|
|
558
|
-
function
|
|
558
|
+
function At(i, t) {
|
|
559
559
|
this._context = i, this._alpha = t;
|
|
560
560
|
}
|
|
561
|
-
|
|
561
|
+
At.prototype = {
|
|
562
562
|
areaStart: function() {
|
|
563
563
|
this._line = 0;
|
|
564
564
|
},
|
|
@@ -573,8 +573,8 @@ Ot.prototype = {
|
|
|
573
573
|
},
|
|
574
574
|
point: function(i, t) {
|
|
575
575
|
if (i = +i, t = +t, this._point) {
|
|
576
|
-
var
|
|
577
|
-
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(
|
|
576
|
+
var e = this._x2 - i, n = this._y2 - t;
|
|
577
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
|
|
578
578
|
}
|
|
579
579
|
switch (this._point) {
|
|
580
580
|
case 0:
|
|
@@ -595,33 +595,33 @@ Ot.prototype = {
|
|
|
595
595
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
const
|
|
599
|
-
function n
|
|
600
|
-
return t ? new
|
|
598
|
+
const Ri = function i(t) {
|
|
599
|
+
function e(n) {
|
|
600
|
+
return t ? new At(n, t) : new H(n, 0);
|
|
601
601
|
}
|
|
602
|
-
return
|
|
603
|
-
return i(+
|
|
604
|
-
},
|
|
602
|
+
return e.alpha = function(n) {
|
|
603
|
+
return i(+n);
|
|
604
|
+
}, e;
|
|
605
605
|
}(0.5);
|
|
606
|
-
function
|
|
606
|
+
function nt(i) {
|
|
607
607
|
return i < 0 ? -1 : 1;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
var
|
|
611
|
-
return (
|
|
609
|
+
function st(i, t, e) {
|
|
610
|
+
var n = i._x1 - i._x0, s = t - i._x1, o = (i._y1 - i._y0) / (n || s < 0 && -0), a = (e - i._y1) / (s || n < 0 && -0), r = (o * s + a * n) / (n + s);
|
|
611
|
+
return (nt(o) + nt(a)) * Math.min(Math.abs(o), Math.abs(a), 0.5 * Math.abs(r)) || 0;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
var
|
|
615
|
-
return
|
|
613
|
+
function ot(i, t) {
|
|
614
|
+
var e = i._x1 - i._x0;
|
|
615
|
+
return e ? (3 * (i._y1 - i._y0) / e - t) / 2 : t;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
var
|
|
619
|
-
i._context.bezierCurveTo(
|
|
617
|
+
function I(i, t, e) {
|
|
618
|
+
var n = i._x0, s = i._y0, o = i._x1, a = i._y1, r = (o - n) / 3;
|
|
619
|
+
i._context.bezierCurveTo(n + r, s + r * t, o - r, a - r * e, o, a);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function B(i) {
|
|
622
622
|
this._context = i;
|
|
623
623
|
}
|
|
624
|
-
|
|
624
|
+
B.prototype = {
|
|
625
625
|
areaStart: function() {
|
|
626
626
|
this._line = 0;
|
|
627
627
|
},
|
|
@@ -637,13 +637,13 @@ R.prototype = {
|
|
|
637
637
|
this._context.lineTo(this._x1, this._y1);
|
|
638
638
|
break;
|
|
639
639
|
case 3:
|
|
640
|
-
|
|
640
|
+
I(this, this._t0, ot(this, this._t0));
|
|
641
641
|
break;
|
|
642
642
|
}
|
|
643
643
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
644
644
|
},
|
|
645
645
|
point: function(i, t) {
|
|
646
|
-
var
|
|
646
|
+
var e = NaN;
|
|
647
647
|
if (i = +i, t = +t, !(i === this._x1 && t === this._y1)) {
|
|
648
648
|
switch (this._point) {
|
|
649
649
|
case 0:
|
|
@@ -653,26 +653,26 @@ R.prototype = {
|
|
|
653
653
|
this._point = 2;
|
|
654
654
|
break;
|
|
655
655
|
case 2:
|
|
656
|
-
this._point = 3,
|
|
656
|
+
this._point = 3, I(this, ot(this, e = st(this, i, t)), e);
|
|
657
657
|
break;
|
|
658
658
|
default:
|
|
659
|
-
|
|
659
|
+
I(this, this._t0, e = st(this, i, t));
|
|
660
660
|
break;
|
|
661
661
|
}
|
|
662
|
-
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t, this._t0 =
|
|
662
|
+
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t, this._t0 = e;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
|
-
function
|
|
667
|
-
this._context = new
|
|
666
|
+
function Ot(i) {
|
|
667
|
+
this._context = new Mt(i);
|
|
668
668
|
}
|
|
669
|
-
(
|
|
670
|
-
|
|
669
|
+
(Ot.prototype = Object.create(B.prototype)).point = function(i, t) {
|
|
670
|
+
B.prototype.point.call(this, t, i);
|
|
671
671
|
};
|
|
672
|
-
function
|
|
672
|
+
function Mt(i) {
|
|
673
673
|
this._context = i;
|
|
674
674
|
}
|
|
675
|
-
|
|
675
|
+
Mt.prototype = {
|
|
676
676
|
moveTo: function(i, t) {
|
|
677
677
|
this._context.moveTo(t, i);
|
|
678
678
|
},
|
|
@@ -682,20 +682,20 @@ bt.prototype = {
|
|
|
682
682
|
lineTo: function(i, t) {
|
|
683
683
|
this._context.lineTo(t, i);
|
|
684
684
|
},
|
|
685
|
-
bezierCurveTo: function(i, t,
|
|
686
|
-
this._context.bezierCurveTo(t, i,
|
|
685
|
+
bezierCurveTo: function(i, t, e, n, s, o) {
|
|
686
|
+
this._context.bezierCurveTo(t, i, n, e, o, s);
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
-
function Ri(i) {
|
|
690
|
-
return new R(i);
|
|
691
|
-
}
|
|
692
689
|
function Bi(i) {
|
|
693
|
-
return new
|
|
690
|
+
return new B(i);
|
|
694
691
|
}
|
|
695
|
-
function
|
|
692
|
+
function Li(i) {
|
|
693
|
+
return new Ot(i);
|
|
694
|
+
}
|
|
695
|
+
function bt(i) {
|
|
696
696
|
this._context = i;
|
|
697
697
|
}
|
|
698
|
-
|
|
698
|
+
bt.prototype = {
|
|
699
699
|
areaStart: function() {
|
|
700
700
|
this._line = 0;
|
|
701
701
|
},
|
|
@@ -706,34 +706,34 @@ St.prototype = {
|
|
|
706
706
|
this._x = [], this._y = [];
|
|
707
707
|
},
|
|
708
708
|
lineEnd: function() {
|
|
709
|
-
var i = this._x, t = this._y,
|
|
710
|
-
if (
|
|
711
|
-
if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]),
|
|
709
|
+
var i = this._x, t = this._y, e = i.length;
|
|
710
|
+
if (e)
|
|
711
|
+
if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]), e === 2)
|
|
712
712
|
this._context.lineTo(i[1], t[1]);
|
|
713
713
|
else
|
|
714
|
-
for (var
|
|
715
|
-
this._context.bezierCurveTo(
|
|
716
|
-
(this._line || this._line !== 0 &&
|
|
714
|
+
for (var n = at(i), s = at(t), o = 0, a = 1; a < e; ++o, ++a)
|
|
715
|
+
this._context.bezierCurveTo(n[0][o], s[0][o], n[1][o], s[1][o], i[a], t[a]);
|
|
716
|
+
(this._line || this._line !== 0 && e === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
|
|
717
717
|
},
|
|
718
718
|
point: function(i, t) {
|
|
719
719
|
this._x.push(+i), this._y.push(+t);
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
function
|
|
723
|
-
var t,
|
|
724
|
-
for (s[0] = 0, o[0] = 2, a[0] = i[0] + 2 * i[1], t = 1; t <
|
|
725
|
-
for (s[
|
|
726
|
-
for (s[
|
|
727
|
-
for (o[
|
|
722
|
+
function at(i) {
|
|
723
|
+
var t, e = i.length - 1, n, s = new Array(e), o = new Array(e), a = new Array(e);
|
|
724
|
+
for (s[0] = 0, o[0] = 2, a[0] = i[0] + 2 * i[1], t = 1; t < e - 1; ++t) s[t] = 1, o[t] = 4, a[t] = 4 * i[t] + 2 * i[t + 1];
|
|
725
|
+
for (s[e - 1] = 2, o[e - 1] = 7, a[e - 1] = 8 * i[e - 1] + i[e], t = 1; t < e; ++t) n = s[t] / o[t - 1], o[t] -= n, a[t] -= n * a[t - 1];
|
|
726
|
+
for (s[e - 1] = a[e - 1] / o[e - 1], t = e - 2; t >= 0; --t) s[t] = (a[t] - s[t + 1]) / o[t];
|
|
727
|
+
for (o[e - 1] = (i[e] + s[e - 1]) / 2, t = 0; t < e - 1; ++t) o[t] = 2 * i[t + 1] - s[t + 1];
|
|
728
728
|
return [s, o];
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return new
|
|
730
|
+
function Ni(i) {
|
|
731
|
+
return new bt(i);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function N(i, t) {
|
|
734
734
|
this._context = i, this._t = t;
|
|
735
735
|
}
|
|
736
|
-
|
|
736
|
+
N.prototype = {
|
|
737
737
|
areaStart: function() {
|
|
738
738
|
this._line = 0;
|
|
739
739
|
},
|
|
@@ -757,8 +757,8 @@ L.prototype = {
|
|
|
757
757
|
if (this._t <= 0)
|
|
758
758
|
this._context.lineTo(this._x, t), this._context.lineTo(i, t);
|
|
759
759
|
else {
|
|
760
|
-
var
|
|
761
|
-
this._context.lineTo(
|
|
760
|
+
var e = this._x * (1 - this._t) + i * this._t;
|
|
761
|
+
this._context.lineTo(e, this._y), this._context.lineTo(e, t);
|
|
762
762
|
}
|
|
763
763
|
break;
|
|
764
764
|
}
|
|
@@ -766,234 +766,258 @@ L.prototype = {
|
|
|
766
766
|
this._x = i, this._y = t;
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
|
-
function Ni(i) {
|
|
770
|
-
return new L(i, 0.5);
|
|
771
|
-
}
|
|
772
769
|
function Ci(i) {
|
|
773
|
-
return new
|
|
770
|
+
return new N(i, 0.5);
|
|
774
771
|
}
|
|
775
772
|
function Ii(i) {
|
|
776
|
-
return new
|
|
773
|
+
return new N(i, 0);
|
|
777
774
|
}
|
|
778
|
-
|
|
775
|
+
function Zi(i) {
|
|
776
|
+
return new N(i, 1);
|
|
777
|
+
}
|
|
778
|
+
class ne extends A {
|
|
779
779
|
/**
|
|
780
780
|
* focal: object to zoom into
|
|
781
781
|
* canvasElements: all the elements to translate and zoom on the chart area
|
|
782
782
|
* zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours
|
|
783
783
|
* */
|
|
784
|
-
zoomIn(t,
|
|
784
|
+
zoomIn(t, e, n) {
|
|
785
785
|
let s, o, a;
|
|
786
|
-
const r =
|
|
786
|
+
const r = n || j;
|
|
787
787
|
t && (s = t.x, o = t.y, a = 2);
|
|
788
|
-
const { width: h, height: l } =
|
|
788
|
+
const { width: h, height: l } = ei.getSVGElementSize(this.services.domUtils.getHolder(), {
|
|
789
789
|
useClientDimensions: !0
|
|
790
790
|
});
|
|
791
|
-
|
|
791
|
+
e.transition().duration(r.duration).ease(r.ease).attr(
|
|
792
792
|
"transform",
|
|
793
793
|
`translate(${h / 2}, ${l / 2}) scale(${a}) translate(${-s},${-o})`
|
|
794
|
-
), this.services.events.dispatchEvent(
|
|
794
|
+
), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_IN, {
|
|
795
795
|
element: ni(t)
|
|
796
796
|
});
|
|
797
797
|
}
|
|
798
|
-
zoomOut(t,
|
|
799
|
-
const
|
|
800
|
-
t.transition().duration(
|
|
798
|
+
zoomOut(t, e) {
|
|
799
|
+
const n = e || j;
|
|
800
|
+
t.transition().duration(n.duration).ease(n.ease).attr("transform", ""), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_OUT);
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
class
|
|
803
|
+
class se extends A {
|
|
804
804
|
init() {
|
|
805
805
|
this.documentFragment = document.createDocumentFragment();
|
|
806
806
|
}
|
|
807
|
-
addEventListener(t,
|
|
808
|
-
this.documentFragment.addEventListener(t,
|
|
807
|
+
addEventListener(t, e) {
|
|
808
|
+
this.documentFragment.addEventListener(t, e);
|
|
809
809
|
}
|
|
810
|
-
removeEventListener(t,
|
|
811
|
-
this.documentFragment.removeEventListener(t,
|
|
810
|
+
removeEventListener(t, e) {
|
|
811
|
+
this.documentFragment.removeEventListener(t, e);
|
|
812
812
|
}
|
|
813
|
-
dispatchEvent(t,
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
detail:
|
|
817
|
-
}) : (
|
|
813
|
+
dispatchEvent(t, e) {
|
|
814
|
+
let n;
|
|
815
|
+
e ? n = new CustomEvent(t, {
|
|
816
|
+
detail: e
|
|
817
|
+
}) : (n = document.createEvent("Event"), n.initEvent(t, !1, !0)), this.documentFragment.dispatchEvent(n);
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
-
class
|
|
821
|
-
constructor(t,
|
|
822
|
-
super(t,
|
|
820
|
+
class oe extends A {
|
|
821
|
+
constructor(t, e) {
|
|
822
|
+
super(t, e);
|
|
823
823
|
}
|
|
824
|
-
downloadCSV(t,
|
|
825
|
-
const
|
|
824
|
+
downloadCSV(t, e) {
|
|
825
|
+
const n = document.createElement("a"), s = "text/csv;encoding:utf-8";
|
|
826
826
|
if (navigator.msSaveBlob)
|
|
827
827
|
navigator.msSaveBlob(
|
|
828
828
|
new Blob([t], {
|
|
829
829
|
type: s
|
|
830
830
|
}),
|
|
831
|
-
|
|
831
|
+
e
|
|
832
832
|
);
|
|
833
|
-
else if (URL && "download" in
|
|
833
|
+
else if (URL && "download" in n) {
|
|
834
834
|
const o = URL.createObjectURL(
|
|
835
835
|
new Blob([t], {
|
|
836
836
|
type: s
|
|
837
837
|
})
|
|
838
838
|
);
|
|
839
|
-
|
|
839
|
+
n.href = o, n.setAttribute("download", e), document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(o);
|
|
840
840
|
} else
|
|
841
841
|
location.href = `data:application/octet-stream,${encodeURIComponent(t)}`;
|
|
842
842
|
}
|
|
843
|
-
downloadImage(t,
|
|
844
|
-
const
|
|
845
|
-
|
|
843
|
+
downloadImage(t, e) {
|
|
844
|
+
const n = document.createElement("a");
|
|
845
|
+
n.download = e, n.href = t, document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
class
|
|
848
|
+
class ae extends A {
|
|
849
849
|
constructor() {
|
|
850
850
|
super(...arguments), this.pendingTransitions = {};
|
|
851
851
|
}
|
|
852
852
|
init() {
|
|
853
853
|
var t;
|
|
854
|
-
(t = this.services.events) == null || t.addEventListener(
|
|
854
|
+
(t = this.services.events) == null || t.addEventListener(w.Model.UPDATE, () => {
|
|
855
855
|
this.pendingTransitions = {};
|
|
856
856
|
});
|
|
857
857
|
}
|
|
858
|
-
setupTransition({ transition: t, name:
|
|
858
|
+
setupTransition({ transition: t, name: e, animate: n }) {
|
|
859
859
|
return this.pendingTransitions[t._id] = t, t.on("end interrupt cancel", () => {
|
|
860
860
|
delete this.pendingTransitions[t._id];
|
|
861
|
-
}), this.model.getOptions().animations === !1 ||
|
|
862
|
-
c(
|
|
861
|
+
}), this.model.getOptions().animations === !1 || n === !1 ? t.duration(0) : t.duration(
|
|
862
|
+
c(W, e, "duration") || W.default.duration
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
865
|
getPendingTransitions() {
|
|
866
866
|
return this.pendingTransitions;
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
const
|
|
871
|
-
return
|
|
872
|
-
}
|
|
873
|
-
function Zi(i, t) {
|
|
874
|
-
const n = x(i), e = x(t);
|
|
875
|
-
return n.getFullYear() - e.getFullYear();
|
|
869
|
+
function S(i, t) {
|
|
870
|
+
const e = +T(i) - +T(t);
|
|
871
|
+
return e < 0 ? -1 : e > 0 ? 1 : e;
|
|
876
872
|
}
|
|
877
|
-
function Fi(i, t) {
|
|
878
|
-
const n
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
873
|
+
function Fi(i, t, e) {
|
|
874
|
+
const [n, s] = M(
|
|
875
|
+
e == null ? void 0 : e.in,
|
|
876
|
+
i,
|
|
877
|
+
t
|
|
878
|
+
);
|
|
879
|
+
return n.getFullYear() - s.getFullYear();
|
|
880
|
+
}
|
|
881
|
+
function zi(i, t, e) {
|
|
882
|
+
const [n, s] = M(
|
|
883
|
+
e == null ? void 0 : e.in,
|
|
884
|
+
i,
|
|
885
|
+
t
|
|
886
|
+
), o = S(n, s), a = Math.abs(Fi(n, s));
|
|
887
|
+
n.setFullYear(1584), s.setFullYear(1584);
|
|
888
|
+
const r = S(n, s) === -o, h = o * (a - +r);
|
|
889
|
+
return h === 0 ? 0 : h;
|
|
890
|
+
}
|
|
891
|
+
function X(i, t, e) {
|
|
892
|
+
const n = T(i, e == null ? void 0 : e.in);
|
|
893
|
+
if (isNaN(t)) return E(i, NaN);
|
|
886
894
|
if (!t)
|
|
887
895
|
return n;
|
|
888
|
-
const
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
return
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
896
|
+
const s = n.getDate(), o = E(i, n.getTime());
|
|
897
|
+
o.setMonth(n.getMonth() + t + 1, 0);
|
|
898
|
+
const a = o.getDate();
|
|
899
|
+
return s >= a ? o : (n.setFullYear(
|
|
900
|
+
o.getFullYear(),
|
|
901
|
+
o.getMonth(),
|
|
902
|
+
s
|
|
895
903
|
), n);
|
|
896
904
|
}
|
|
897
|
-
function
|
|
898
|
-
return
|
|
899
|
-
}
|
|
900
|
-
function zi(i, t) {
|
|
901
|
-
return Pt(i, -t);
|
|
905
|
+
function St(i, t, e) {
|
|
906
|
+
return X(i, t * 12, e);
|
|
902
907
|
}
|
|
903
|
-
function Vi(i, t) {
|
|
904
|
-
|
|
905
|
-
return s * 12 + o;
|
|
908
|
+
function Vi(i, t, e) {
|
|
909
|
+
return St(i, -t, e);
|
|
906
910
|
}
|
|
907
|
-
function
|
|
908
|
-
const
|
|
909
|
-
|
|
911
|
+
function Hi(i, t, e) {
|
|
912
|
+
const [n, s] = M(
|
|
913
|
+
e == null ? void 0 : e.in,
|
|
914
|
+
i,
|
|
915
|
+
t
|
|
916
|
+
), o = n.getFullYear() - s.getFullYear(), a = n.getMonth() - s.getMonth();
|
|
917
|
+
return o * 12 + a;
|
|
910
918
|
}
|
|
911
|
-
function
|
|
912
|
-
const
|
|
913
|
-
return
|
|
919
|
+
function Yi(i, t) {
|
|
920
|
+
const e = T(i, t == null ? void 0 : t.in);
|
|
921
|
+
return e.setHours(23, 59, 59, 999), e;
|
|
914
922
|
}
|
|
915
|
-
function Xi(i) {
|
|
916
|
-
const
|
|
917
|
-
return
|
|
923
|
+
function Xi(i, t) {
|
|
924
|
+
const e = T(i, t == null ? void 0 : t.in), n = e.getMonth();
|
|
925
|
+
return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
|
|
918
926
|
}
|
|
919
927
|
function Gi(i, t) {
|
|
920
|
-
const
|
|
921
|
-
|
|
928
|
+
const e = T(i, t == null ? void 0 : t.in);
|
|
929
|
+
return +Yi(e, t) == +Xi(e, t);
|
|
930
|
+
}
|
|
931
|
+
function $i(i, t, e) {
|
|
932
|
+
const [n, s, o] = M(
|
|
933
|
+
e == null ? void 0 : e.in,
|
|
934
|
+
i,
|
|
935
|
+
i,
|
|
936
|
+
t
|
|
937
|
+
), a = S(s, o), r = Math.abs(
|
|
938
|
+
Hi(s, o)
|
|
922
939
|
);
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
return
|
|
932
|
-
}
|
|
933
|
-
function
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
940
|
+
if (r < 1) return 0;
|
|
941
|
+
s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - a * r);
|
|
942
|
+
let h = S(s, o) === -a;
|
|
943
|
+
Gi(n) && r === 1 && S(n, o) === 1 && (h = !1);
|
|
944
|
+
const l = a * (r - +h);
|
|
945
|
+
return l === 0 ? 0 : l;
|
|
946
|
+
}
|
|
947
|
+
function Ui(i, t, e) {
|
|
948
|
+
return X(i, -t, e);
|
|
949
|
+
}
|
|
950
|
+
function Ki(i, t, e) {
|
|
951
|
+
const [n, s] = M(
|
|
952
|
+
e == null ? void 0 : e.in,
|
|
953
|
+
i,
|
|
954
|
+
t
|
|
955
|
+
), o = rt(n, s), a = Math.abs(
|
|
956
|
+
jt(n, s)
|
|
957
|
+
);
|
|
958
|
+
n.setDate(n.getDate() - o * a);
|
|
959
|
+
const r = +(rt(n, s) === -o), h = o * (a - r);
|
|
960
|
+
return h === 0 ? 0 : h;
|
|
941
961
|
}
|
|
942
|
-
function
|
|
943
|
-
const
|
|
944
|
-
return
|
|
962
|
+
function rt(i, t) {
|
|
963
|
+
const e = i.getFullYear() - t.getFullYear() || i.getMonth() - t.getMonth() || i.getDate() - t.getDate() || i.getHours() - t.getHours() || i.getMinutes() - t.getMinutes() || i.getSeconds() - t.getSeconds() || i.getMilliseconds() - t.getMilliseconds();
|
|
964
|
+
return e < 0 ? -1 : e > 0 ? 1 : e;
|
|
945
965
|
}
|
|
946
|
-
function
|
|
947
|
-
const n =
|
|
948
|
-
return isNaN(t) ?
|
|
966
|
+
function Pt(i, t, e) {
|
|
967
|
+
const n = T(i, e == null ? void 0 : e.in);
|
|
968
|
+
return isNaN(t) ? E(i, NaN) : (t && n.setDate(n.getDate() + t), n);
|
|
949
969
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
970
|
+
function qi(i, t, e) {
|
|
971
|
+
return Pt(i, -t, e);
|
|
952
972
|
}
|
|
953
|
-
function
|
|
973
|
+
function G(i) {
|
|
954
974
|
return (t) => {
|
|
955
|
-
const
|
|
956
|
-
return
|
|
975
|
+
const n = (i ? Math[i] : Math.trunc)(t);
|
|
976
|
+
return n === 0 ? 0 : n;
|
|
957
977
|
};
|
|
958
978
|
}
|
|
959
|
-
function
|
|
960
|
-
|
|
979
|
+
function ji(i, t, e) {
|
|
980
|
+
const [n, s] = M(
|
|
981
|
+
e == null ? void 0 : e.in,
|
|
982
|
+
i,
|
|
983
|
+
t
|
|
984
|
+
), o = (+n - +s) / ft;
|
|
985
|
+
return G(e == null ? void 0 : e.roundingMethod)(o);
|
|
961
986
|
}
|
|
962
|
-
function
|
|
963
|
-
|
|
964
|
-
return X(n == null ? void 0 : n.roundingMethod)(e);
|
|
987
|
+
function Et(i, t, e) {
|
|
988
|
+
return E(i, +T(i) + t);
|
|
965
989
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
968
|
-
return P(i, n + t);
|
|
990
|
+
function wt(i, t, e) {
|
|
991
|
+
return Et(i, t * ft);
|
|
969
992
|
}
|
|
970
|
-
function
|
|
971
|
-
return $(i, t * mt);
|
|
972
|
-
}
|
|
973
|
-
function ji(i, t) {
|
|
993
|
+
function Wi(i, t, e) {
|
|
974
994
|
return wt(i, -t);
|
|
975
995
|
}
|
|
976
|
-
function
|
|
977
|
-
|
|
978
|
-
|
|
996
|
+
function kt(i, t) {
|
|
997
|
+
return +T(i) - +T(t);
|
|
998
|
+
}
|
|
999
|
+
function ht(i, t, e) {
|
|
1000
|
+
const n = kt(i, t) / mt;
|
|
1001
|
+
return G(e == null ? void 0 : e.roundingMethod)(n);
|
|
979
1002
|
}
|
|
980
|
-
function
|
|
981
|
-
|
|
1003
|
+
function Z(i, t, e) {
|
|
1004
|
+
const n = T(i, e == null ? void 0 : e.in);
|
|
1005
|
+
return n.setTime(n.getTime() + t * mt), n;
|
|
982
1006
|
}
|
|
983
|
-
function
|
|
984
|
-
return
|
|
1007
|
+
function ct(i, t, e) {
|
|
1008
|
+
return Z(i, -t, e);
|
|
985
1009
|
}
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
return
|
|
1010
|
+
function lt(i, t, e) {
|
|
1011
|
+
const n = kt(i, t) / 1e3;
|
|
1012
|
+
return G(e == null ? void 0 : e.roundingMethod)(n);
|
|
989
1013
|
}
|
|
990
|
-
function
|
|
991
|
-
return
|
|
1014
|
+
function F(i, t, e) {
|
|
1015
|
+
return Et(i, t * 1e3);
|
|
992
1016
|
}
|
|
993
|
-
function
|
|
994
|
-
return
|
|
1017
|
+
function _t(i, t, e) {
|
|
1018
|
+
return F(i, -t);
|
|
995
1019
|
}
|
|
996
|
-
class
|
|
1020
|
+
class re extends A {
|
|
997
1021
|
constructor() {
|
|
998
1022
|
super(...arguments), this.scaleTypes = {
|
|
999
1023
|
top: null,
|
|
@@ -1010,17 +1034,17 @@ class rn extends A {
|
|
|
1010
1034
|
}
|
|
1011
1035
|
getDomainAxisPosition({ datum: t = null } = {}) {
|
|
1012
1036
|
if (this.dualAxes && t) {
|
|
1013
|
-
const
|
|
1037
|
+
const e = this.model.getOptions(), { groupMapsTo: n } = e.data, s = c(e, "axes", this.secondaryDomainAxisPosition), o = t[n];
|
|
1014
1038
|
if (s != null && s.correspondingDatasets && s.correspondingDatasets.includes(o))
|
|
1015
1039
|
return this.secondaryDomainAxisPosition;
|
|
1016
1040
|
}
|
|
1017
1041
|
return this.domainAxisPosition;
|
|
1018
1042
|
}
|
|
1019
|
-
getRangeAxisPosition({ datum: t = null, groups:
|
|
1043
|
+
getRangeAxisPosition({ datum: t = null, groups: e = null } = {}) {
|
|
1020
1044
|
if (this.dualAxes) {
|
|
1021
|
-
const
|
|
1045
|
+
const n = this.model.getOptions(), { groupMapsTo: s } = n.data, o = c(n, "axes", this.secondaryRangeAxisPosition);
|
|
1022
1046
|
let a;
|
|
1023
|
-
if (t !== null ? a = t[s] :
|
|
1047
|
+
if (t !== null ? a = t[s] : e && e.length > 0 && (a = e[0]), o != null && o.correspondingDatasets && o.correspondingDatasets.includes(a))
|
|
1024
1048
|
return this.secondaryRangeAxisPosition;
|
|
1025
1049
|
}
|
|
1026
1050
|
return this.rangeAxisPosition;
|
|
@@ -1037,8 +1061,8 @@ class rn extends A {
|
|
|
1037
1061
|
return this.getAxisOptions(t);
|
|
1038
1062
|
}
|
|
1039
1063
|
getScaleLabel(t) {
|
|
1040
|
-
const
|
|
1041
|
-
return
|
|
1064
|
+
const n = this.getAxisOptions(t).title;
|
|
1065
|
+
return n || (t === _.BOTTOM || t === _.TOP ? "x-value" : "y-value");
|
|
1042
1066
|
}
|
|
1043
1067
|
getDomainLabel() {
|
|
1044
1068
|
return this.getScaleLabel(this.getDomainAxisPosition());
|
|
@@ -1048,20 +1072,20 @@ class rn extends A {
|
|
|
1048
1072
|
}
|
|
1049
1073
|
update() {
|
|
1050
1074
|
this.determineAxisDuality(), this.findDomainAndRangeAxes(), this.determineOrientation(), Object.keys(_).map(
|
|
1051
|
-
(
|
|
1052
|
-
).forEach((
|
|
1053
|
-
this.scales[
|
|
1075
|
+
(e) => _[e]
|
|
1076
|
+
).forEach((e) => {
|
|
1077
|
+
this.scales[e] = this.createScale(e);
|
|
1054
1078
|
});
|
|
1055
1079
|
}
|
|
1056
1080
|
findDomainAndRangeAxes() {
|
|
1057
|
-
const t = this.findVerticalAxesPositions(),
|
|
1081
|
+
const t = this.findVerticalAxesPositions(), e = this.findHorizontalAxesPositions(), n = this.findDomainAndRangeAxesPositions(
|
|
1058
1082
|
t,
|
|
1059
|
-
|
|
1083
|
+
e
|
|
1060
1084
|
);
|
|
1061
|
-
this.domainAxisPosition =
|
|
1085
|
+
this.domainAxisPosition = n.primaryDomainAxisPosition, this.rangeAxisPosition = n.primaryRangeAxisPosition, this.isDualAxes() && (this.secondaryDomainAxisPosition = n.secondaryDomainAxisPosition, this.secondaryRangeAxisPosition = n.secondaryRangeAxisPosition);
|
|
1062
1086
|
}
|
|
1063
1087
|
determineOrientation() {
|
|
1064
|
-
(this.rangeAxisPosition === _.LEFT || this.rangeAxisPosition === _.RIGHT) && (this.domainAxisPosition === _.BOTTOM || this.domainAxisPosition === _.TOP) ? this.orientation =
|
|
1088
|
+
(this.rangeAxisPosition === _.LEFT || this.rangeAxisPosition === _.RIGHT) && (this.domainAxisPosition === _.BOTTOM || this.domainAxisPosition === _.TOP) ? this.orientation = C.VERTICAL : this.orientation = C.HORIZONTAL;
|
|
1065
1089
|
}
|
|
1066
1090
|
isDualAxes() {
|
|
1067
1091
|
return this.dualAxes;
|
|
@@ -1069,19 +1093,19 @@ class rn extends A {
|
|
|
1069
1093
|
// if any of the axes objects have correspondingDatasets [] asserted we flag the chart as dual axes
|
|
1070
1094
|
// it does not count as dual axes if it just has another axis turned on but is not actually using it to map a dataset
|
|
1071
1095
|
determineAxisDuality() {
|
|
1072
|
-
var
|
|
1073
|
-
const t = this.model.getOptions(),
|
|
1074
|
-
((
|
|
1096
|
+
var n, s, o, a;
|
|
1097
|
+
const t = this.model.getOptions(), e = c(t, "axes");
|
|
1098
|
+
((n = e[_.LEFT]) != null && n.correspondingDatasets && e[_.RIGHT] || (s = e[_.RIGHT]) != null && s.correspondingDatasets && e[_.LEFT] || (o = e[_.TOP]) != null && o.correspondingDatasets && e[_.BOTTOM] || (a = e[_.BOTTOM]) != null && a.correspondingDatasets && e[_.TOP]) && (this.dualAxes = !0);
|
|
1075
1099
|
}
|
|
1076
1100
|
getCustomDomainValuesByposition(t) {
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1101
|
+
const e = c(this.model.getOptions(), "axes", t, "domain");
|
|
1102
|
+
if (e && !Array.isArray(e))
|
|
1079
1103
|
throw new Error(`Domain in ${t} axis is not a valid array`);
|
|
1080
|
-
if (Array.isArray(
|
|
1104
|
+
if (Array.isArray(e) && (this.scaleTypes[t] === m.LINEAR || this.scaleTypes[t] === m.TIME) && e.length !== 2)
|
|
1081
1105
|
throw new Error(
|
|
1082
1106
|
`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`
|
|
1083
1107
|
);
|
|
1084
|
-
return
|
|
1108
|
+
return e;
|
|
1085
1109
|
}
|
|
1086
1110
|
getOrientation() {
|
|
1087
1111
|
return this.orientation;
|
|
@@ -1110,14 +1134,14 @@ class rn extends A {
|
|
|
1110
1134
|
getMainXAxisPosition() {
|
|
1111
1135
|
const t = [_.BOTTOM, _.TOP];
|
|
1112
1136
|
return [this.domainAxisPosition, this.rangeAxisPosition].find(
|
|
1113
|
-
(
|
|
1137
|
+
(e) => t.indexOf(e) > -1
|
|
1114
1138
|
);
|
|
1115
1139
|
}
|
|
1116
1140
|
// Find the main y-axis out of the 2 y-axis on the chart (when 2D axis is used)
|
|
1117
1141
|
getMainYAxisPosition() {
|
|
1118
1142
|
const t = [_.LEFT, _.RIGHT];
|
|
1119
1143
|
return [this.domainAxisPosition, this.rangeAxisPosition].find(
|
|
1120
|
-
(
|
|
1144
|
+
(e) => t.indexOf(e) > -1
|
|
1121
1145
|
);
|
|
1122
1146
|
}
|
|
1123
1147
|
getMainXScale() {
|
|
@@ -1126,10 +1150,10 @@ class rn extends A {
|
|
|
1126
1150
|
getMainYScale() {
|
|
1127
1151
|
return this.scales[this.getMainYAxisPosition()];
|
|
1128
1152
|
}
|
|
1129
|
-
getValueFromScale(t,
|
|
1130
|
-
const o = this.model.getOptions(), r = c(o, "axes")[
|
|
1153
|
+
getValueFromScale(t, e, n, s) {
|
|
1154
|
+
const o = this.model.getOptions(), r = c(o, "axes")[n], { mapsTo: h } = r, l = c(s, h) !== null ? s[h] : s;
|
|
1131
1155
|
let f;
|
|
1132
|
-
switch (
|
|
1156
|
+
switch (e) {
|
|
1133
1157
|
case m.LABELS:
|
|
1134
1158
|
f = t(l) + t.step() / 2;
|
|
1135
1159
|
break;
|
|
@@ -1142,27 +1166,27 @@ class rn extends A {
|
|
|
1142
1166
|
return f;
|
|
1143
1167
|
}
|
|
1144
1168
|
getBoundedScaledValues(t) {
|
|
1145
|
-
const { bounds:
|
|
1169
|
+
const { bounds: e } = this.model.getOptions(), n = this.getRangeAxisPosition({ datum: t }), s = this.scales[n], o = this.model.getOptions(), r = c(o, "axes")[n], { mapsTo: h } = r, l = t[h] !== void 0 ? t[h] : t;
|
|
1146
1170
|
return [
|
|
1147
1171
|
s(
|
|
1148
|
-
c(t,
|
|
1172
|
+
c(t, e.upperBoundMapsTo) !== null ? t[e.upperBoundMapsTo] : l
|
|
1149
1173
|
),
|
|
1150
1174
|
s(
|
|
1151
|
-
c(t,
|
|
1175
|
+
c(t, e.lowerBoundMapsTo) !== null ? t[e.lowerBoundMapsTo] : l
|
|
1152
1176
|
)
|
|
1153
1177
|
];
|
|
1154
1178
|
}
|
|
1155
|
-
getValueThroughAxisPosition(t,
|
|
1156
|
-
const
|
|
1157
|
-
return this.getValueFromScale(s,
|
|
1179
|
+
getValueThroughAxisPosition(t, e) {
|
|
1180
|
+
const n = this.scaleTypes[t], s = this.scales[t];
|
|
1181
|
+
return this.getValueFromScale(s, n, t, e);
|
|
1158
1182
|
}
|
|
1159
1183
|
getDomainValue(t) {
|
|
1160
|
-
const
|
|
1161
|
-
return this.getValueThroughAxisPosition(
|
|
1184
|
+
const e = this.getDomainAxisPosition({ datum: t });
|
|
1185
|
+
return this.getValueThroughAxisPosition(e, t);
|
|
1162
1186
|
}
|
|
1163
1187
|
getRangeValue(t) {
|
|
1164
|
-
const
|
|
1165
|
-
return this.getValueThroughAxisPosition(
|
|
1188
|
+
const e = this.getRangeAxisPosition({ datum: t });
|
|
1189
|
+
return this.getValueThroughAxisPosition(e, t);
|
|
1166
1190
|
}
|
|
1167
1191
|
getMainXScaleType() {
|
|
1168
1192
|
return this.getScaleTypeByPosition(this.getMainXAxisPosition());
|
|
@@ -1171,201 +1195,201 @@ class rn extends A {
|
|
|
1171
1195
|
return this.getScaleTypeByPosition(this.getMainYAxisPosition());
|
|
1172
1196
|
}
|
|
1173
1197
|
getDomainIdentifier(t) {
|
|
1174
|
-
const
|
|
1175
|
-
return c(
|
|
1198
|
+
const e = this.model.getOptions();
|
|
1199
|
+
return c(e, "axes", this.getDomainAxisPosition({ datum: t }), "mapsTo");
|
|
1176
1200
|
}
|
|
1177
1201
|
getRangeIdentifier(t) {
|
|
1178
|
-
const
|
|
1179
|
-
return c(
|
|
1202
|
+
const e = this.model.getOptions();
|
|
1203
|
+
return c(e, "axes", this.getRangeAxisPosition({ datum: t }), "mapsTo");
|
|
1180
1204
|
}
|
|
1181
|
-
extendsDomain(t,
|
|
1182
|
-
const
|
|
1205
|
+
extendsDomain(t, e) {
|
|
1206
|
+
const n = this.model.getOptions(), s = c(n, "axes", t);
|
|
1183
1207
|
if (s.scaleType === m.TIME) {
|
|
1184
|
-
const o = c(
|
|
1185
|
-
return
|
|
1208
|
+
const o = c(n, "timeScale", "addSpaceOnEdges");
|
|
1209
|
+
return Ji(e, o);
|
|
1186
1210
|
} else
|
|
1187
|
-
return
|
|
1211
|
+
return Qi(e, J.paddingRatio, s.scaleType);
|
|
1188
1212
|
}
|
|
1189
1213
|
findVerticalAxesPositions() {
|
|
1190
|
-
const t = this.model.getOptions(),
|
|
1191
|
-
return c(
|
|
1214
|
+
const t = this.model.getOptions(), e = c(t, "axes"), n = this.isDualAxes();
|
|
1215
|
+
return c(e, _.LEFT) === null && c(e, _.RIGHT) !== null || c(e, _.RIGHT, "main") === !0 || n && c(e, _.LEFT, "correspondingDatasets") ? {
|
|
1192
1216
|
primary: _.RIGHT,
|
|
1193
1217
|
secondary: _.LEFT
|
|
1194
1218
|
} : { primary: _.LEFT, secondary: _.RIGHT };
|
|
1195
1219
|
}
|
|
1196
1220
|
findHorizontalAxesPositions() {
|
|
1197
|
-
const t = this.model.getOptions(),
|
|
1198
|
-
return c(
|
|
1221
|
+
const t = this.model.getOptions(), e = c(t, "axes"), n = this.isDualAxes();
|
|
1222
|
+
return c(e, _.BOTTOM) === null && c(e, _.TOP) !== null || c(e, _.TOP, "main") === !0 || n && c(e, _.BOTTOM, "correspondingDatasets") ? {
|
|
1199
1223
|
primary: _.TOP,
|
|
1200
1224
|
secondary: _.BOTTOM
|
|
1201
1225
|
} : { primary: _.BOTTOM, secondary: _.TOP };
|
|
1202
1226
|
}
|
|
1203
|
-
findDomainAndRangeAxesPositions(t,
|
|
1204
|
-
const
|
|
1227
|
+
findDomainAndRangeAxesPositions(t, e) {
|
|
1228
|
+
const n = this.model.getOptions(), s = c(n, "axes", t.primary), o = c(n, "axes", e.primary), a = s.scaleType || m.LINEAR, r = o.scaleType || m.LINEAR, h = {
|
|
1205
1229
|
primaryDomainAxisPosition: null,
|
|
1206
1230
|
secondaryDomainAxisPosition: null,
|
|
1207
1231
|
primaryRangeAxisPosition: null,
|
|
1208
1232
|
secondaryRangeAxisPosition: null
|
|
1209
1233
|
};
|
|
1210
|
-
return h.primaryDomainAxisPosition =
|
|
1234
|
+
return h.primaryDomainAxisPosition = e.primary, h.primaryRangeAxisPosition = t.primary, h.secondaryDomainAxisPosition = e.secondary, h.secondaryRangeAxisPosition = t.secondary, (!(r === m.LABELS || r === m.TIME) && a === m.LABELS || a === m.TIME) && (h.primaryDomainAxisPosition = t.primary, h.primaryRangeAxisPosition = e.primary, h.secondaryDomainAxisPosition = t.secondary, h.secondaryRangeAxisPosition = e.secondary), h;
|
|
1211
1235
|
}
|
|
1212
1236
|
getScaleDomain(t) {
|
|
1213
|
-
const
|
|
1237
|
+
const e = this.model.getOptions(), n = c(e, "axes", t), s = c(e, "bounds"), { includeZero: o } = n, a = c(n, "scaleType") || m.LINEAR;
|
|
1214
1238
|
if (this.model.isDataEmpty())
|
|
1215
1239
|
return [];
|
|
1216
|
-
if (
|
|
1240
|
+
if (n.binned) {
|
|
1217
1241
|
const { bins: u } = this.model.getBinConfigurations();
|
|
1218
|
-
return [0,
|
|
1219
|
-
} else if (
|
|
1220
|
-
const { bins: u } = this.model.getBinConfigurations(),
|
|
1221
|
-
return [
|
|
1242
|
+
return [0, Wt(u, (x) => x.length)];
|
|
1243
|
+
} else if (n.limitDomainToBins) {
|
|
1244
|
+
const { bins: u } = this.model.getBinConfigurations(), x = this.model.getStackKeys({ bins: u });
|
|
1245
|
+
return [x[0].split(":")[0], x[x.length - 1].split(":")[1]];
|
|
1222
1246
|
}
|
|
1223
|
-
const r = this.model.getDisplayData(), { extendLinearDomainBy: h, mapsTo: l, percentage: f, thresholds:
|
|
1224
|
-
if (
|
|
1225
|
-
return a === m.LABELS ?
|
|
1247
|
+
const r = this.model.getDisplayData(), { extendLinearDomainBy: h, mapsTo: l, percentage: f, thresholds: y } = n, { reference: p, compareTo: v } = J.ratio;
|
|
1248
|
+
if (n.domain)
|
|
1249
|
+
return a === m.LABELS ? n.domain : (a === m.TIME && (n.domain = n.domain.map(
|
|
1226
1250
|
(u) => u.getTime === void 0 ? new Date(u) : u
|
|
1227
|
-
)), this.extendsDomain(t,
|
|
1251
|
+
)), this.extendsDomain(t, n.domain));
|
|
1228
1252
|
if (f)
|
|
1229
1253
|
return [0, 100];
|
|
1230
|
-
if (
|
|
1231
|
-
return
|
|
1232
|
-
let
|
|
1254
|
+
if (n && a === m.LABELS)
|
|
1255
|
+
return Jt(r.map((u) => u[l]));
|
|
1256
|
+
let g, d;
|
|
1233
1257
|
const D = this.model.getDataGroupNames();
|
|
1234
1258
|
if (a === m.LABELS_RATIO)
|
|
1235
|
-
return r.map((u) => `${u[p]}/${u[
|
|
1259
|
+
return r.map((u) => `${u[p]}/${u[v]}`);
|
|
1236
1260
|
if (a === m.TIME)
|
|
1237
1261
|
d = r.map((u) => +new Date(u[l]));
|
|
1238
|
-
else if (s &&
|
|
1262
|
+
else if (s && e.axes)
|
|
1239
1263
|
d = [], r.forEach((u) => {
|
|
1240
1264
|
d.push(u[l]), u[s.upperBoundMapsTo] && d.push(u[s.upperBoundMapsTo]), u[s.lowerBoundMapsTo] && d.push(u[s.lowerBoundMapsTo]);
|
|
1241
1265
|
});
|
|
1242
|
-
else if (
|
|
1243
|
-
const { groupMapsTo: u } =
|
|
1266
|
+
else if (n.stacked === !0 && D && t === this.getRangeAxisPosition()) {
|
|
1267
|
+
const { groupMapsTo: u } = e.data, x = this.model.getDataValuesGroupedByKeys({
|
|
1244
1268
|
groups: D
|
|
1245
|
-
}),
|
|
1246
|
-
(
|
|
1247
|
-
),
|
|
1248
|
-
|
|
1249
|
-
const { ...
|
|
1250
|
-
let
|
|
1251
|
-
Object.values(
|
|
1252
|
-
isNaN(
|
|
1253
|
-
}),
|
|
1269
|
+
}), Rt = r.filter(
|
|
1270
|
+
(b) => !D.includes(b[u])
|
|
1271
|
+
), $ = [];
|
|
1272
|
+
x.forEach((b) => {
|
|
1273
|
+
const { ...Bt } = b;
|
|
1274
|
+
let U = 0, K = 0;
|
|
1275
|
+
Object.values(pi(Bt, "sharedStackKey")).forEach((P) => {
|
|
1276
|
+
isNaN(P) || (P < 0 ? K += P : U += P);
|
|
1277
|
+
}), $.push([K, U]);
|
|
1254
1278
|
}), d = [
|
|
1255
|
-
...
|
|
1256
|
-
...
|
|
1279
|
+
...pt($),
|
|
1280
|
+
...Rt.map((b) => b[l])
|
|
1257
1281
|
];
|
|
1258
1282
|
} else
|
|
1259
1283
|
d = [], r.forEach((u) => {
|
|
1260
|
-
const
|
|
1261
|
-
Array.isArray(
|
|
1284
|
+
const x = u[l];
|
|
1285
|
+
Array.isArray(x) && x.length === 2 ? (d.push(x[0]), d.push(x[1])) : (h && d.push(Math.max(u[l], u[h])), d.push(x));
|
|
1262
1286
|
});
|
|
1263
|
-
return a !== m.TIME && a !== m.LOG && o && d.push(0),
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
}),
|
|
1287
|
+
return a !== m.TIME && a !== m.LOG && o && d.push(0), y && y.length > 0 && y.forEach((u) => {
|
|
1288
|
+
const x = c(u, "value");
|
|
1289
|
+
x !== null && d.push(x);
|
|
1290
|
+
}), g = dt(d), g = this.extendsDomain(t, g), g;
|
|
1267
1291
|
}
|
|
1268
1292
|
createScale(t) {
|
|
1269
|
-
const
|
|
1270
|
-
if (!
|
|
1293
|
+
const e = this.model.getOptions(), n = c(e, "axes", t);
|
|
1294
|
+
if (!n)
|
|
1271
1295
|
return null;
|
|
1272
|
-
const s = c(
|
|
1296
|
+
const s = c(n, "scaleType") || m.LINEAR;
|
|
1273
1297
|
this.scaleTypes[t] = s;
|
|
1274
1298
|
let o;
|
|
1275
|
-
return s === m.TIME ? o =
|
|
1299
|
+
return s === m.TIME ? o = si() : s === m.LOG ? o = xt().base(n.base || 10) : s === m.LABELS || s === m.LABELS_RATIO ? o = oi() : o = Qt(), o.domain(this.getScaleDomain(t)), o;
|
|
1276
1300
|
}
|
|
1277
1301
|
getDomainLowerBound(t) {
|
|
1278
|
-
let
|
|
1279
|
-
return this.getOrientation() ===
|
|
1302
|
+
let e, n = 0;
|
|
1303
|
+
return this.getOrientation() === C.VERTICAL ? e = this.getMainYScale().domain() : e = this.getMainXScale().domain(), c(this.model.getOptions(), "axes", t, "includeZero") === !1 && e[0] > 0 && e[1] > 0 && (n = e[0]), n;
|
|
1280
1304
|
}
|
|
1281
1305
|
getHighestDomainThreshold() {
|
|
1282
|
-
const t = c(this.model.getOptions(), "axes"),
|
|
1283
|
-
if (!Array.isArray(
|
|
1306
|
+
const t = c(this.model.getOptions(), "axes"), e = this.getDomainAxisPosition(), { thresholds: n } = t[e];
|
|
1307
|
+
if (!Array.isArray(n) || Array.isArray(n) && !n.length)
|
|
1284
1308
|
return null;
|
|
1285
|
-
const s = this.getDomainScale(), o =
|
|
1286
|
-
return this.getScaleTypeByPosition(
|
|
1309
|
+
const s = this.getDomainScale(), o = n.sort((r, h) => h.value - r.value)[0];
|
|
1310
|
+
return this.getScaleTypeByPosition(e) === m.TIME && (typeof o.value == "string" || o.value.getTime === void 0) && (o.value = new Date(o.value)), {
|
|
1287
1311
|
threshold: o,
|
|
1288
1312
|
scaleValue: s(o.value)
|
|
1289
1313
|
};
|
|
1290
1314
|
}
|
|
1291
1315
|
getHighestRangeThreshold() {
|
|
1292
|
-
const t = c(this.model.getOptions(), "axes"),
|
|
1293
|
-
if (!Array.isArray(
|
|
1316
|
+
const t = c(this.model.getOptions(), "axes"), e = this.getRangeAxisPosition(), { thresholds: n } = t[e];
|
|
1317
|
+
if (!Array.isArray(n) || Array.isArray(n) && !n.length)
|
|
1294
1318
|
return null;
|
|
1295
|
-
const s = this.getRangeScale(), o =
|
|
1319
|
+
const s = this.getRangeScale(), o = n.sort((a, r) => r.value - a.value)[0];
|
|
1296
1320
|
return {
|
|
1297
1321
|
threshold: o,
|
|
1298
1322
|
scaleValue: s(o.value)
|
|
1299
1323
|
};
|
|
1300
1324
|
}
|
|
1301
1325
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const
|
|
1304
|
-
return
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
] :
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
] :
|
|
1326
|
+
function Ji(i, t) {
|
|
1327
|
+
const e = new Date(i[0]), n = new Date(i[1]);
|
|
1328
|
+
return zi(n, e) > 1 ? [Vi(e, t), St(n, t)] : $i(n, e) > 1 ? [Ui(e, t), X(n, t)] : Ki(n, e) > 1 ? [qi(e, t), Pt(n, t)] : ji(n, e) > 1 ? [Wi(e, t), wt(n, t)] : ht(n, e) > 30 ? [
|
|
1329
|
+
ct(e, t * 30),
|
|
1330
|
+
Z(n, t * 30)
|
|
1331
|
+
] : ht(n, e) > 1 ? [ct(e, t), Z(n, t)] : lt(n, e) > 15 ? [
|
|
1332
|
+
_t(e, t * 15),
|
|
1333
|
+
F(n, t * 15)
|
|
1334
|
+
] : lt(n, e) > 1 ? [_t(e, t), F(n, t)] : [e, n];
|
|
1311
1335
|
}
|
|
1312
|
-
function
|
|
1313
|
-
const o = (t - i) *
|
|
1336
|
+
function Qi([i, t], e, n) {
|
|
1337
|
+
const o = (t - i) * e, a = t <= 0 && t + o > 0 ? 0 : t + o;
|
|
1314
1338
|
let r = i >= 0 && i - o < 0 ? 0 : i - o;
|
|
1315
|
-
if (
|
|
1339
|
+
if (n === m.LOG && r <= 0) {
|
|
1316
1340
|
if (i <= 0)
|
|
1317
1341
|
throw Error("Data must have values greater than 0 if log scale type is used.");
|
|
1318
1342
|
r = i;
|
|
1319
1343
|
}
|
|
1320
1344
|
return [r, a];
|
|
1321
1345
|
}
|
|
1322
|
-
class
|
|
1346
|
+
class he extends A {
|
|
1323
1347
|
constructor() {
|
|
1324
1348
|
super(...arguments), this.curveTypes = {
|
|
1325
|
-
curveLinear:
|
|
1349
|
+
curveLinear: ri,
|
|
1326
1350
|
curveLinearClosed: ai,
|
|
1327
|
-
curveBasis:
|
|
1328
|
-
curveBasisClosed:
|
|
1329
|
-
curveBasisOpen:
|
|
1330
|
-
curveBundle:
|
|
1331
|
-
curveCardinal:
|
|
1332
|
-
curveCardinalClosed:
|
|
1333
|
-
curveCardinalOpen:
|
|
1334
|
-
curveCatmullRom:
|
|
1335
|
-
curveCatmullRomClosed:
|
|
1336
|
-
curveCatmullRomOpen:
|
|
1337
|
-
curveMonotoneX:
|
|
1338
|
-
curveMonotoneY:
|
|
1339
|
-
curveNatural:
|
|
1340
|
-
curveStep:
|
|
1341
|
-
curveStepAfter:
|
|
1342
|
-
curveStepBefore:
|
|
1351
|
+
curveBasis: Ai,
|
|
1352
|
+
curveBasisClosed: Oi,
|
|
1353
|
+
curveBasisOpen: Mi,
|
|
1354
|
+
curveBundle: bi,
|
|
1355
|
+
curveCardinal: Si,
|
|
1356
|
+
curveCardinalClosed: Pi,
|
|
1357
|
+
curveCardinalOpen: Ei,
|
|
1358
|
+
curveCatmullRom: wi,
|
|
1359
|
+
curveCatmullRomClosed: ki,
|
|
1360
|
+
curveCatmullRomOpen: Ri,
|
|
1361
|
+
curveMonotoneX: Bi,
|
|
1362
|
+
curveMonotoneY: Li,
|
|
1363
|
+
curveNatural: Ni,
|
|
1364
|
+
curveStep: Ci,
|
|
1365
|
+
curveStepAfter: Zi,
|
|
1366
|
+
curveStepBefore: Ii
|
|
1343
1367
|
};
|
|
1344
1368
|
}
|
|
1345
1369
|
getD3Curve() {
|
|
1346
1370
|
let t = "curveLinear";
|
|
1347
|
-
const
|
|
1348
|
-
if (
|
|
1349
|
-
let
|
|
1350
|
-
return
|
|
1351
|
-
|
|
1352
|
-
}),
|
|
1371
|
+
const e = this.model.getOptions().curve;
|
|
1372
|
+
if (e && (typeof e == "string" ? t = e : t = e.name), this.curveTypes[t]) {
|
|
1373
|
+
let n = this.curveTypes[t];
|
|
1374
|
+
return e && Object.keys(e).forEach((s) => {
|
|
1375
|
+
n[s] && (n = n[s](e[s]));
|
|
1376
|
+
}), n;
|
|
1353
1377
|
}
|
|
1354
1378
|
return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`), this.curveTypes.curveLinear;
|
|
1355
1379
|
}
|
|
1356
1380
|
}
|
|
1357
|
-
class
|
|
1381
|
+
class ce extends A {
|
|
1358
1382
|
isZoomBarEnabled() {
|
|
1359
1383
|
if (!this.services.cartesianScales || !c(this.model.getOptions(), "zoomBar", "top", "enabled"))
|
|
1360
1384
|
return !1;
|
|
1361
1385
|
this.services.cartesianScales.findDomainAndRangeAxes();
|
|
1362
|
-
const t = this.services.cartesianScales.getMainXAxisPosition(),
|
|
1386
|
+
const t = this.services.cartesianScales.getMainXAxisPosition(), e = c(
|
|
1363
1387
|
this.model.getOptions(),
|
|
1364
1388
|
"axes",
|
|
1365
1389
|
t,
|
|
1366
1390
|
"scaleType"
|
|
1367
1391
|
);
|
|
1368
|
-
return t === _.BOTTOM &&
|
|
1392
|
+
return t === _.BOTTOM && e === m.TIME;
|
|
1369
1393
|
}
|
|
1370
1394
|
// get display data for zoom bar
|
|
1371
1395
|
// basically it's sum of value grouped by time
|
|
@@ -1375,20 +1399,20 @@ class cn extends A {
|
|
|
1375
1399
|
}
|
|
1376
1400
|
getDefaultZoomBarDomain(t) {
|
|
1377
1401
|
if (!this.services.zoom) throw new Error("Services zoom not defined");
|
|
1378
|
-
const
|
|
1379
|
-
if (!
|
|
1380
|
-
const s =
|
|
1402
|
+
const e = t || this.services.zoom.getZoomBarData(), { cartesianScales: n } = this.services;
|
|
1403
|
+
if (!n) throw new Error("Services cartesianScales undefined");
|
|
1404
|
+
const s = n.getMainXAxisPosition(), o = n.getDomainIdentifier(), a = c(this.model.getOptions(), "axes", s, "domain");
|
|
1381
1405
|
if (Array.isArray(a) && a.length === 2)
|
|
1382
1406
|
return a;
|
|
1383
1407
|
if (!s) throw new Error("Not defined: mainXAxisPosition");
|
|
1384
|
-
return
|
|
1408
|
+
return n.extendsDomain(
|
|
1385
1409
|
s,
|
|
1386
|
-
|
|
1410
|
+
dt(e, (r) => r[o])
|
|
1387
1411
|
);
|
|
1388
1412
|
}
|
|
1389
|
-
handleDomainChange(t,
|
|
1390
|
-
var
|
|
1391
|
-
this.model.set({ zoomDomain: t }, { animate: !1 }),
|
|
1413
|
+
handleDomainChange(t, e = { dispatchEvent: !0 }) {
|
|
1414
|
+
var n;
|
|
1415
|
+
this.model.set({ zoomDomain: t }, { animate: !1 }), e.dispatchEvent && ((n = this.services.events) == null || n.dispatchEvent(w.ZoomDomain.CHANGE, {
|
|
1392
1416
|
newDomain: t
|
|
1393
1417
|
}));
|
|
1394
1418
|
}
|
|
@@ -1397,16 +1421,16 @@ class cn extends A {
|
|
|
1397
1421
|
}
|
|
1398
1422
|
// filter out data not inside zoom domain
|
|
1399
1423
|
// to get better range value for axis label
|
|
1400
|
-
filterDataForRangeAxis(t,
|
|
1424
|
+
filterDataForRangeAxis(t, e) {
|
|
1401
1425
|
var a;
|
|
1402
|
-
const
|
|
1426
|
+
const n = this.model.get("zoomDomain"), s = Object.assign(
|
|
1403
1427
|
{ stacked: !1 },
|
|
1404
1428
|
// default configs
|
|
1405
|
-
|
|
1429
|
+
e
|
|
1406
1430
|
), o = c(this.model.getOptions(), "zoomBar", "updateRangeAxis");
|
|
1407
|
-
if (this.isZoomBarEnabled() && o &&
|
|
1431
|
+
if (this.isZoomBarEnabled() && o && n) {
|
|
1408
1432
|
const r = s.stacked ? "sharedStackKey" : (a = this.services.cartesianScales) == null ? void 0 : a.getDomainIdentifier(), h = t.filter(
|
|
1409
|
-
(l) => new Date(l[r]) >=
|
|
1433
|
+
(l) => new Date(l[r]) >= n[0] && new Date(l[r]) <= n[1]
|
|
1410
1434
|
);
|
|
1411
1435
|
if (h.length > 0)
|
|
1412
1436
|
return h;
|
|
@@ -1414,44 +1438,44 @@ class cn extends A {
|
|
|
1414
1438
|
return t;
|
|
1415
1439
|
}
|
|
1416
1440
|
zoomIn(t = this.getZoomRatio()) {
|
|
1417
|
-
var
|
|
1418
|
-
const
|
|
1441
|
+
var v;
|
|
1442
|
+
const e = this.model.get("zoomDomain"), n = ti.handleWidth, s = (v = this.services.cartesianScales) == null ? void 0 : v.getMainXScale().copy();
|
|
1419
1443
|
s.domain(this.getDefaultZoomBarDomain());
|
|
1420
|
-
const o = s(
|
|
1421
|
-
if (a - o <
|
|
1444
|
+
const o = s(e[0]), a = s(e[1]);
|
|
1445
|
+
if (a - o < n + 1)
|
|
1422
1446
|
return;
|
|
1423
1447
|
const r = s.range(), h = a - o, l = Math.min((r[1] - r[0]) / 2 * (t / 2), h / 2);
|
|
1424
|
-
let f = o + l,
|
|
1425
|
-
f >=
|
|
1426
|
-
const p = [s.invert(f), s.invert(
|
|
1427
|
-
(
|
|
1448
|
+
let f = o + l, y = a - l;
|
|
1449
|
+
f >= y && (f = o + h / 2 - n / 2, y = a - h / 2 + n / 2);
|
|
1450
|
+
const p = [s.invert(f), s.invert(y)];
|
|
1451
|
+
(e[0].valueOf() !== p[0].valueOf() || e[1].valueOf() !== p[1].valueOf()) && this.handleDomainChange(p);
|
|
1428
1452
|
}
|
|
1429
1453
|
zoomOut(t = this.getZoomRatio()) {
|
|
1430
|
-
const
|
|
1454
|
+
const e = this.model.get("zoomDomain");
|
|
1431
1455
|
if (!this.services.cartesianScales) throw new Error("Services cartesianScales undefined");
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1434
|
-
const s = e
|
|
1435
|
-
(
|
|
1456
|
+
const n = this.services.cartesianScales.getMainXScale().copy();
|
|
1457
|
+
n.domain(this.getDefaultZoomBarDomain());
|
|
1458
|
+
const s = n(e[0]), o = n(e[1]), a = n.range(), r = (a[1] - a[0]) / 2 * (t / 2), h = Math.max(s - r, a[0]), l = Math.min(o + r, a[1]), f = [n.invert(h), n.invert(l)];
|
|
1459
|
+
(e[0].valueOf() !== f[0].valueOf() || e[1].valueOf() !== f[1].valueOf()) && this.handleDomainChange(f);
|
|
1436
1460
|
}
|
|
1437
1461
|
resetZoomDomain() {
|
|
1438
|
-
const t = this.model.get("zoomDomain"),
|
|
1439
|
-
(t[0].valueOf() !==
|
|
1462
|
+
const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
|
|
1463
|
+
(t[0].valueOf() !== e[0].valueOf() || t[1].valueOf() !== e[1].valueOf()) && this.handleDomainChange(e);
|
|
1440
1464
|
}
|
|
1441
1465
|
// check if current zoom domain is already the min zoom domain
|
|
1442
1466
|
// when toolbar is rendered, we don't render chart yet
|
|
1443
1467
|
// don't depend on scale range
|
|
1444
1468
|
isMinZoomDomain() {
|
|
1445
|
-
const t = this.model.get("zoomDomain"),
|
|
1446
|
-
if (!t || !
|
|
1469
|
+
const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
|
|
1470
|
+
if (!t || !e)
|
|
1447
1471
|
return !1;
|
|
1448
|
-
const
|
|
1449
|
-
return
|
|
1472
|
+
const n = t[1].valueOf() - t[0].valueOf(), s = e[1].valueOf() - e[0].valueOf(), o = c(this.model.getOptions(), "zoomBar", "minZoomRatio");
|
|
1473
|
+
return n / s < o;
|
|
1450
1474
|
}
|
|
1451
1475
|
// check if current zoom domain is already the max zoom domain
|
|
1452
1476
|
isMaxZoomDomain() {
|
|
1453
|
-
const t = this.model.get("zoomDomain"),
|
|
1454
|
-
return !!(t &&
|
|
1477
|
+
const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
|
|
1478
|
+
return !!(t && e && t[0].valueOf() === e[0].valueOf() && t[1].valueOf() === e[1].valueOf());
|
|
1455
1479
|
}
|
|
1456
1480
|
isEmptyState() {
|
|
1457
1481
|
return this.getZoomBarData().length === 0;
|
|
@@ -1464,14 +1488,14 @@ class cn extends A {
|
|
|
1464
1488
|
}
|
|
1465
1489
|
}
|
|
1466
1490
|
export {
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1491
|
+
ne as C,
|
|
1492
|
+
se as E,
|
|
1493
|
+
oe as F,
|
|
1494
|
+
ae as T,
|
|
1495
|
+
ce as Z,
|
|
1496
|
+
he as a,
|
|
1497
|
+
ci as b,
|
|
1498
|
+
re as c,
|
|
1499
|
+
pt as f
|
|
1476
1500
|
};
|
|
1477
|
-
//# sourceMappingURL=index-
|
|
1501
|
+
//# sourceMappingURL=index-CiAo-vQV.mjs.map
|