@carbon/charts 1.27.3 → 1.27.10
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 +72 -0
- package/dist/{angle-utils-jnw9HSFu.mjs → angle-utils-Dy0Gf7Eb.mjs} +42 -42
- package/dist/{angle-utils-jnw9HSFu.mjs.map → angle-utils-Dy0Gf7Eb.mjs.map} +1 -1
- package/dist/{array-CmsYzTI6.mjs → array-D6ni_TQq.mjs} +2 -2
- package/dist/{array-CmsYzTI6.mjs.map → array-D6ni_TQq.mjs.map} +1 -1
- package/dist/{axis-scales-CPuwbFQf.mjs → axis-scales-CFRGPXH8.mjs} +26 -25
- package/dist/{axis-scales-CPuwbFQf.mjs.map → axis-scales-CFRGPXH8.mjs.map} +1 -1
- package/dist/{choropleth-CKAPopp2.mjs → choropleth-TkZkP8Rn.mjs} +2215 -2190
- package/dist/choropleth-TkZkP8Rn.mjs.map +1 -0
- package/dist/{color-scale-utils-BzjNNGXE.mjs → color-scale-utils-C4KU2jNr.mjs} +128 -85
- package/dist/color-scale-utils-C4KU2jNr.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/{index-DVamZWt0.mjs → index-CHbrPDmO.mjs} +125 -132
- package/dist/index-CHbrPDmO.mjs.map +1 -0
- package/dist/index-CLdAL6df.mjs +64 -0
- package/dist/index-CLdAL6df.mjs.map +1 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +211 -190
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/index.mjs +37 -36
- package/dist/model/index.mjs +35 -35
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.cjs +16 -16
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +16 -16
- package/package.json +6 -5
- package/dist/choropleth-CKAPopp2.mjs.map +0 -1
- package/dist/color-scale-utils-BzjNNGXE.mjs.map +0 -1
- package/dist/index-DVamZWt0.mjs.map +0 -1
- package/dist/index-DwV8lNnO.mjs +0 -63
- package/dist/index-DwV8lNnO.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as e, k as r, X as o, A as t, a8 as i, F as l, B as n, o as d, p as h, C as p, f as u, e as S, r as C, s as c, q as g, a9 as B, D as m, z as T, a7 as L, G as b, v as k, E as A, H as x, I as P, Y as R, b as w, L as G, j as H, K as v, O as M, N as f, M as D, P as Z, Q as j, R as q, l as y, w as z, m as E, J as W, S as F, x as I, t as J, u as K, y as N, g as O, T as Q, a as U, d as V, U as X, V as Y, i as _, W as $, n as aa, Z as sa, _ as ea, $ as ra, a0 as oa, a1 as ta, a2 as ia, a3 as la, a4 as na, a5 as da, a6 as ha } from "../choropleth-
|
|
1
|
+
import { h as e, k as r, X as o, A as t, a8 as i, F as l, B as n, o as d, p as h, C as p, f as u, e as S, r as C, s as c, q as g, a9 as B, D as m, z as T, a7 as L, G as b, v as k, E as A, H as x, I as P, Y as R, b as w, L as G, j as H, K as v, O as M, N as f, M as D, P as Z, Q as j, R as q, l as y, w as z, m as E, J as W, S as F, x as I, t as J, u as K, y as N, g as O, T as Q, a as U, d as V, U as X, V as Y, i as _, W as $, n as aa, Z as sa, _ as ea, $ as ra, a0 as oa, a1 as ta, a2 as ia, a3 as la, a4 as na, a5 as da, a6 as ha } from "../choropleth-TkZkP8Rn.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as Alluvial,
|
|
4
4
|
r as Area,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { z as ii, A, e as
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
1
|
+
import { aj as Nt, aK as Ct, aL as It, aM as Zt, aN as ft, aO as K, aP as Ft, aQ as zt, ag as Vt, aR as Yt, aS as Xt, aT as Ht, aU as Gt, ae as $t, aa as Ut, aG as q, aV as jt, aW as Kt, n as W, g as c, F as Q, aX as v, aY as M, aZ as E, a_ as qt, a$ as pt, b0 as mt, h as J, aA as Wt, ax as Qt, as as dt, au as Jt, H as ti } from "./color-scale-utils-C4KU2jNr.mjs";
|
|
2
|
+
import { z as ii, A, e as tt, S as O, D as ni, s as ei, v as si, x as oi, y as ai, u as ri } from "./angle-utils-Dy0Gf7Eb.mjs";
|
|
3
|
+
import { a0 as w, e as _, i as C, S as p } from "./axis-scales-CFRGPXH8.mjs";
|
|
4
|
+
function xt(i) {
|
|
5
5
|
var t = i == null ? 0 : i.length;
|
|
6
|
-
return t ?
|
|
6
|
+
return t ? Nt(i, 1) : [];
|
|
7
7
|
}
|
|
8
8
|
function hi(i) {
|
|
9
|
-
return
|
|
9
|
+
return Ct(It(i, void 0, xt), i + "");
|
|
10
10
|
}
|
|
11
11
|
function ci(i, t, n) {
|
|
12
12
|
var e = -1, s = i.length;
|
|
@@ -16,28 +16,21 @@ function ci(i, t, n) {
|
|
|
16
16
|
return o;
|
|
17
17
|
}
|
|
18
18
|
function li(i, t) {
|
|
19
|
-
return t.length < 2 ? i :
|
|
19
|
+
return t.length < 2 ? i : Zt(i, ci(t, 0, -1));
|
|
20
20
|
}
|
|
21
21
|
var _i = Object.prototype, ui = _i.hasOwnProperty;
|
|
22
22
|
function fi(i, t) {
|
|
23
|
-
t =
|
|
23
|
+
t = ft(t, i);
|
|
24
24
|
var n = -1, e = t.length;
|
|
25
25
|
if (!e)
|
|
26
26
|
return !0;
|
|
27
|
-
for (
|
|
28
|
-
var
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
return !1;
|
|
32
|
-
if (o === "constructor" && n + 1 < e && typeof t[n + 1] == "string" && t[n + 1] === "prototype") {
|
|
33
|
-
if (s && n === 0)
|
|
34
|
-
continue;
|
|
35
|
-
return !1;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
27
|
+
for (; ++n < e; ) {
|
|
28
|
+
var s = K(t[n]);
|
|
29
|
+
if (s === "__proto__" && !ui.call(i, "__proto__") || (s === "constructor" || s === "prototype") && n < e - 1)
|
|
30
|
+
return !1;
|
|
38
31
|
}
|
|
39
|
-
var
|
|
40
|
-
return
|
|
32
|
+
var o = li(i, t);
|
|
33
|
+
return o == null || delete o[K(Ft(t))];
|
|
41
34
|
}
|
|
42
35
|
function pi(i) {
|
|
43
36
|
return zt(i) ? void 0 : i;
|
|
@@ -48,16 +41,16 @@ var mi = 1, di = 2, xi = 4, gi = hi(function(i, t) {
|
|
|
48
41
|
return n;
|
|
49
42
|
var e = !1;
|
|
50
43
|
t = Vt(t, function(o) {
|
|
51
|
-
return o =
|
|
52
|
-
}),
|
|
44
|
+
return o = ft(o, i), e || (e = o.length > 1), o;
|
|
45
|
+
}), Yt(i, Xt(i), n), e && (n = Ht(n, mi | di | xi, pi));
|
|
53
46
|
for (var s = t.length; s--; )
|
|
54
47
|
fi(n, t[s]);
|
|
55
48
|
return n;
|
|
56
49
|
});
|
|
57
|
-
function
|
|
50
|
+
function it(i) {
|
|
58
51
|
return Math.log(i);
|
|
59
52
|
}
|
|
60
|
-
function
|
|
53
|
+
function nt(i) {
|
|
61
54
|
return Math.exp(i);
|
|
62
55
|
}
|
|
63
56
|
function yi(i) {
|
|
@@ -75,14 +68,14 @@ function Di(i) {
|
|
|
75
68
|
function Oi(i) {
|
|
76
69
|
return i === Math.E ? Math.log : i === 10 && Math.log10 || i === 2 && Math.log2 || (i = Math.log(i), (t) => Math.log(t) / i);
|
|
77
70
|
}
|
|
78
|
-
function
|
|
71
|
+
function et(i) {
|
|
79
72
|
return (t, n) => -i(-t, n);
|
|
80
73
|
}
|
|
81
74
|
function Ai(i) {
|
|
82
|
-
const t = i(
|
|
75
|
+
const t = i(it, nt), n = t.domain;
|
|
83
76
|
let e = 10, s, o;
|
|
84
77
|
function a() {
|
|
85
|
-
return s = Oi(e), o = Di(e), n()[0] < 0 ? (s =
|
|
78
|
+
return s = Oi(e), o = Di(e), n()[0] < 0 ? (s = et(s), o = et(o), i(yi, vi)) : i(it, nt), t;
|
|
86
79
|
}
|
|
87
80
|
return t.base = function(r) {
|
|
88
81
|
return arguments.length ? (e = +r, a()) : e;
|
|
@@ -110,12 +103,12 @@ function Ai(i) {
|
|
|
110
103
|
if (m > f) break;
|
|
111
104
|
u.push(m);
|
|
112
105
|
}
|
|
113
|
-
u.length * 2 < D && (u =
|
|
106
|
+
u.length * 2 < D && (u = q(l, f, D));
|
|
114
107
|
} else
|
|
115
|
-
u =
|
|
108
|
+
u = q(d, T, Math.min(T - d, D)).map(o);
|
|
116
109
|
return y ? u.reverse() : u;
|
|
117
110
|
}, t.tickFormat = (r, h) => {
|
|
118
|
-
if (r == null && (r = 10), h == null && (h = e === 10 ? "s" : ","), typeof h != "function" && (!(e % 1) && (h =
|
|
111
|
+
if (r == null && (r = 10), h == null && (h = e === 10 ? "s" : ","), typeof h != "function" && (!(e % 1) && (h = jt(h)).precision == null && (h.trim = !0), h = Kt(h)), r === 1 / 0) return h;
|
|
119
112
|
const l = Math.max(1, e * r / t.ticks().length);
|
|
120
113
|
return (f) => {
|
|
121
114
|
let y = f / o(Math.round(s(f)));
|
|
@@ -126,9 +119,9 @@ function Ai(i) {
|
|
|
126
119
|
ceil: (r) => o(Math.ceil(s(r)))
|
|
127
120
|
})), t;
|
|
128
121
|
}
|
|
129
|
-
function
|
|
122
|
+
function gt() {
|
|
130
123
|
const i = Ai(Gt()).domain([1, 10]);
|
|
131
|
-
return i.copy = () => $t(i,
|
|
124
|
+
return i.copy = () => $t(i, gt()).base(i.base()), Ut.apply(i, arguments), i;
|
|
132
125
|
}
|
|
133
126
|
function k(i, t, n) {
|
|
134
127
|
i._context.bezierCurveTo(
|
|
@@ -185,10 +178,10 @@ L.prototype = {
|
|
|
185
178
|
function Mi(i) {
|
|
186
179
|
return new L(i);
|
|
187
180
|
}
|
|
188
|
-
function
|
|
181
|
+
function yt(i) {
|
|
189
182
|
this._context = i;
|
|
190
183
|
}
|
|
191
|
-
|
|
184
|
+
yt.prototype = {
|
|
192
185
|
areaStart: A,
|
|
193
186
|
areaEnd: A,
|
|
194
187
|
lineStart: function() {
|
|
@@ -229,12 +222,12 @@ gt.prototype = {
|
|
|
229
222
|
}
|
|
230
223
|
};
|
|
231
224
|
function bi(i) {
|
|
232
|
-
return new
|
|
225
|
+
return new yt(i);
|
|
233
226
|
}
|
|
234
|
-
function
|
|
227
|
+
function vt(i) {
|
|
235
228
|
this._context = i;
|
|
236
229
|
}
|
|
237
|
-
|
|
230
|
+
vt.prototype = {
|
|
238
231
|
areaStart: function() {
|
|
239
232
|
this._line = 0;
|
|
240
233
|
},
|
|
@@ -271,12 +264,12 @@ yt.prototype = {
|
|
|
271
264
|
}
|
|
272
265
|
};
|
|
273
266
|
function Si(i) {
|
|
274
|
-
return new
|
|
267
|
+
return new vt(i);
|
|
275
268
|
}
|
|
276
|
-
function
|
|
269
|
+
function Tt(i, t) {
|
|
277
270
|
this._basis = new L(i), this._beta = t;
|
|
278
271
|
}
|
|
279
|
-
|
|
272
|
+
Tt.prototype = {
|
|
280
273
|
lineStart: function() {
|
|
281
274
|
this._x = [], this._y = [], this._basis.lineStart();
|
|
282
275
|
},
|
|
@@ -296,7 +289,7 @@ vt.prototype = {
|
|
|
296
289
|
};
|
|
297
290
|
const Pi = function i(t) {
|
|
298
291
|
function n(e) {
|
|
299
|
-
return t === 1 ? new L(e) : new
|
|
292
|
+
return t === 1 ? new L(e) : new Tt(e, t);
|
|
300
293
|
}
|
|
301
294
|
return n.beta = function(e) {
|
|
302
295
|
return i(+e);
|
|
@@ -413,10 +406,10 @@ const wi = function i(t) {
|
|
|
413
406
|
return i(+e);
|
|
414
407
|
}, n;
|
|
415
408
|
}(0);
|
|
416
|
-
function
|
|
409
|
+
function Y(i, t) {
|
|
417
410
|
this._context = i, this._k = (1 - t) / 6;
|
|
418
411
|
}
|
|
419
|
-
|
|
412
|
+
Y.prototype = {
|
|
420
413
|
areaStart: function() {
|
|
421
414
|
this._line = 0;
|
|
422
415
|
},
|
|
@@ -452,28 +445,28 @@ H.prototype = {
|
|
|
452
445
|
};
|
|
453
446
|
const ki = function i(t) {
|
|
454
447
|
function n(e) {
|
|
455
|
-
return new
|
|
448
|
+
return new Y(e, t);
|
|
456
449
|
}
|
|
457
450
|
return n.tension = function(e) {
|
|
458
451
|
return i(+e);
|
|
459
452
|
}, n;
|
|
460
453
|
}(0);
|
|
461
|
-
function
|
|
454
|
+
function X(i, t, n) {
|
|
462
455
|
var e = i._x1, s = i._y1, o = i._x2, a = i._y2;
|
|
463
|
-
if (i._l01_a >
|
|
456
|
+
if (i._l01_a > tt) {
|
|
464
457
|
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);
|
|
465
458
|
e = (e * 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;
|
|
466
459
|
}
|
|
467
|
-
if (i._l23_a >
|
|
460
|
+
if (i._l23_a > tt) {
|
|
468
461
|
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);
|
|
469
462
|
o = (o * l + i._x1 * i._l23_2a - t * i._l12_2a) / f, a = (a * l + i._y1 * i._l23_2a - n * i._l12_2a) / f;
|
|
470
463
|
}
|
|
471
464
|
i._context.bezierCurveTo(e, s, o, a, i._x2, i._y2);
|
|
472
465
|
}
|
|
473
|
-
function
|
|
466
|
+
function Dt(i, t) {
|
|
474
467
|
this._context = i, this._alpha = t;
|
|
475
468
|
}
|
|
476
|
-
|
|
469
|
+
Dt.prototype = {
|
|
477
470
|
areaStart: function() {
|
|
478
471
|
this._line = 0;
|
|
479
472
|
},
|
|
@@ -510,7 +503,7 @@ Tt.prototype = {
|
|
|
510
503
|
this._point = 3;
|
|
511
504
|
// falls through
|
|
512
505
|
default:
|
|
513
|
-
|
|
506
|
+
X(this, i, t);
|
|
514
507
|
break;
|
|
515
508
|
}
|
|
516
509
|
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;
|
|
@@ -518,16 +511,16 @@ Tt.prototype = {
|
|
|
518
511
|
};
|
|
519
512
|
const Ri = function i(t) {
|
|
520
513
|
function n(e) {
|
|
521
|
-
return t ? new
|
|
514
|
+
return t ? new Dt(e, t) : new z(e, 0);
|
|
522
515
|
}
|
|
523
516
|
return n.alpha = function(e) {
|
|
524
517
|
return i(+e);
|
|
525
518
|
}, n;
|
|
526
519
|
}(0.5);
|
|
527
|
-
function
|
|
520
|
+
function Ot(i, t) {
|
|
528
521
|
this._context = i, this._alpha = t;
|
|
529
522
|
}
|
|
530
|
-
|
|
523
|
+
Ot.prototype = {
|
|
531
524
|
areaStart: A,
|
|
532
525
|
areaEnd: A,
|
|
533
526
|
lineStart: function() {
|
|
@@ -565,7 +558,7 @@ Dt.prototype = {
|
|
|
565
558
|
this._point = 3, this._x5 = i, this._y5 = t;
|
|
566
559
|
break;
|
|
567
560
|
default:
|
|
568
|
-
|
|
561
|
+
X(this, i, t);
|
|
569
562
|
break;
|
|
570
563
|
}
|
|
571
564
|
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;
|
|
@@ -573,16 +566,16 @@ Dt.prototype = {
|
|
|
573
566
|
};
|
|
574
567
|
const Bi = function i(t) {
|
|
575
568
|
function n(e) {
|
|
576
|
-
return t ? new
|
|
569
|
+
return t ? new Ot(e, t) : new V(e, 0);
|
|
577
570
|
}
|
|
578
571
|
return n.alpha = function(e) {
|
|
579
572
|
return i(+e);
|
|
580
573
|
}, n;
|
|
581
574
|
}(0.5);
|
|
582
|
-
function
|
|
575
|
+
function At(i, t) {
|
|
583
576
|
this._context = i, this._alpha = t;
|
|
584
577
|
}
|
|
585
|
-
|
|
578
|
+
At.prototype = {
|
|
586
579
|
areaStart: function() {
|
|
587
580
|
this._line = 0;
|
|
588
581
|
},
|
|
@@ -614,7 +607,7 @@ Ot.prototype = {
|
|
|
614
607
|
this._point = 4;
|
|
615
608
|
// falls through
|
|
616
609
|
default:
|
|
617
|
-
|
|
610
|
+
X(this, i, t);
|
|
618
611
|
break;
|
|
619
612
|
}
|
|
620
613
|
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;
|
|
@@ -622,20 +615,20 @@ Ot.prototype = {
|
|
|
622
615
|
};
|
|
623
616
|
const Li = function i(t) {
|
|
624
617
|
function n(e) {
|
|
625
|
-
return t ? new
|
|
618
|
+
return t ? new At(e, t) : new Y(e, 0);
|
|
626
619
|
}
|
|
627
620
|
return n.alpha = function(e) {
|
|
628
621
|
return i(+e);
|
|
629
622
|
}, n;
|
|
630
623
|
}(0.5);
|
|
631
|
-
function
|
|
624
|
+
function st(i) {
|
|
632
625
|
return i < 0 ? -1 : 1;
|
|
633
626
|
}
|
|
634
|
-
function
|
|
627
|
+
function ot(i, t, n) {
|
|
635
628
|
var e = i._x1 - i._x0, s = t - i._x1, o = (i._y1 - i._y0) / (e || s < 0 && -0), a = (n - i._y1) / (s || e < 0 && -0), r = (o * s + a * e) / (e + s);
|
|
636
|
-
return (
|
|
629
|
+
return (st(o) + st(a)) * Math.min(Math.abs(o), Math.abs(a), 0.5 * Math.abs(r)) || 0;
|
|
637
630
|
}
|
|
638
|
-
function
|
|
631
|
+
function at(i, t) {
|
|
639
632
|
var n = i._x1 - i._x0;
|
|
640
633
|
return n ? (3 * (i._y1 - i._y0) / n - t) / 2 : t;
|
|
641
634
|
}
|
|
@@ -662,7 +655,7 @@ B.prototype = {
|
|
|
662
655
|
this._context.lineTo(this._x1, this._y1);
|
|
663
656
|
break;
|
|
664
657
|
case 3:
|
|
665
|
-
I(this, this._t0,
|
|
658
|
+
I(this, this._t0, at(this, this._t0));
|
|
666
659
|
break;
|
|
667
660
|
}
|
|
668
661
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
@@ -678,26 +671,26 @@ B.prototype = {
|
|
|
678
671
|
this._point = 2;
|
|
679
672
|
break;
|
|
680
673
|
case 2:
|
|
681
|
-
this._point = 3, I(this,
|
|
674
|
+
this._point = 3, I(this, at(this, n = ot(this, i, t)), n);
|
|
682
675
|
break;
|
|
683
676
|
default:
|
|
684
|
-
I(this, this._t0, n =
|
|
677
|
+
I(this, this._t0, n = ot(this, i, t));
|
|
685
678
|
break;
|
|
686
679
|
}
|
|
687
680
|
this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t, this._t0 = n;
|
|
688
681
|
}
|
|
689
682
|
}
|
|
690
683
|
};
|
|
691
|
-
function
|
|
692
|
-
this._context = new
|
|
684
|
+
function Mt(i) {
|
|
685
|
+
this._context = new bt(i);
|
|
693
686
|
}
|
|
694
|
-
(
|
|
687
|
+
(Mt.prototype = Object.create(B.prototype)).point = function(i, t) {
|
|
695
688
|
B.prototype.point.call(this, t, i);
|
|
696
689
|
};
|
|
697
|
-
function
|
|
690
|
+
function bt(i) {
|
|
698
691
|
this._context = i;
|
|
699
692
|
}
|
|
700
|
-
|
|
693
|
+
bt.prototype = {
|
|
701
694
|
moveTo: function(i, t) {
|
|
702
695
|
this._context.moveTo(t, i);
|
|
703
696
|
},
|
|
@@ -715,12 +708,12 @@ function Ni(i) {
|
|
|
715
708
|
return new B(i);
|
|
716
709
|
}
|
|
717
710
|
function Ci(i) {
|
|
718
|
-
return new
|
|
711
|
+
return new Mt(i);
|
|
719
712
|
}
|
|
720
|
-
function
|
|
713
|
+
function St(i) {
|
|
721
714
|
this._context = i;
|
|
722
715
|
}
|
|
723
|
-
|
|
716
|
+
St.prototype = {
|
|
724
717
|
areaStart: function() {
|
|
725
718
|
this._line = 0;
|
|
726
719
|
},
|
|
@@ -736,7 +729,7 @@ bt.prototype = {
|
|
|
736
729
|
if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]), n === 2)
|
|
737
730
|
this._context.lineTo(i[1], t[1]);
|
|
738
731
|
else
|
|
739
|
-
for (var e =
|
|
732
|
+
for (var e = rt(i), s = rt(t), o = 0, a = 1; a < n; ++o, ++a)
|
|
740
733
|
this._context.bezierCurveTo(e[0][o], s[0][o], e[1][o], s[1][o], i[a], t[a]);
|
|
741
734
|
(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
|
|
742
735
|
},
|
|
@@ -744,7 +737,7 @@ bt.prototype = {
|
|
|
744
737
|
this._x.push(+i), this._y.push(+t);
|
|
745
738
|
}
|
|
746
739
|
};
|
|
747
|
-
function
|
|
740
|
+
function rt(i) {
|
|
748
741
|
var t, n = i.length - 1, e, s = new Array(n), o = new Array(n), a = new Array(n);
|
|
749
742
|
for (s[0] = 0, o[0] = 2, a[0] = i[0] + 2 * i[1], t = 1; t < n - 1; ++t) s[t] = 1, o[t] = 4, a[t] = 4 * i[t] + 2 * i[t + 1];
|
|
750
743
|
for (s[n - 1] = 2, o[n - 1] = 7, a[n - 1] = 8 * i[n - 1] + i[n], t = 1; t < n; ++t) e = s[t] / o[t - 1], o[t] -= e, a[t] -= e * a[t - 1];
|
|
@@ -753,7 +746,7 @@ function at(i) {
|
|
|
753
746
|
return [s, o];
|
|
754
747
|
}
|
|
755
748
|
function Ii(i) {
|
|
756
|
-
return new
|
|
749
|
+
return new St(i);
|
|
757
750
|
}
|
|
758
751
|
function N(i, t) {
|
|
759
752
|
this._context = i, this._t = t;
|
|
@@ -809,7 +802,7 @@ class an extends O {
|
|
|
809
802
|
* */
|
|
810
803
|
zoomIn(t, n, e) {
|
|
811
804
|
let s, o, a;
|
|
812
|
-
const r = e ||
|
|
805
|
+
const r = e || W;
|
|
813
806
|
t && (s = t.x, o = t.y, a = 2);
|
|
814
807
|
const { width: h, height: l } = ni.getSVGElementSize(this.services.domUtils.getHolder(), {
|
|
815
808
|
useClientDimensions: !0
|
|
@@ -822,7 +815,7 @@ class an extends O {
|
|
|
822
815
|
});
|
|
823
816
|
}
|
|
824
817
|
zoomOut(t, n) {
|
|
825
|
-
const e = n ||
|
|
818
|
+
const e = n || W;
|
|
826
819
|
t.transition().duration(e.duration).ease(e.ease).attr("transform", ""), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_OUT);
|
|
827
820
|
}
|
|
828
821
|
}
|
|
@@ -884,7 +877,7 @@ class cn extends O {
|
|
|
884
877
|
return this.pendingTransitions[t._id] = t, t.on("end interrupt cancel", () => {
|
|
885
878
|
delete this.pendingTransitions[t._id];
|
|
886
879
|
}), this.model.getOptions().animations === !1 || e === !1 ? t.duration(0) : t.duration(
|
|
887
|
-
c(
|
|
880
|
+
c(Q, n, "duration") || Q.default.duration
|
|
888
881
|
);
|
|
889
882
|
}
|
|
890
883
|
getPendingTransitions() {
|
|
@@ -903,7 +896,7 @@ function Vi(i, t, n) {
|
|
|
903
896
|
);
|
|
904
897
|
return e.getFullYear() - s.getFullYear();
|
|
905
898
|
}
|
|
906
|
-
function
|
|
899
|
+
function Yi(i, t, n) {
|
|
907
900
|
const [e, s] = M(
|
|
908
901
|
n?.in,
|
|
909
902
|
i,
|
|
@@ -913,7 +906,7 @@ function Hi(i, t, n) {
|
|
|
913
906
|
const r = S(e, s) === -o, h = o * (a - +r);
|
|
914
907
|
return h === 0 ? 0 : h;
|
|
915
908
|
}
|
|
916
|
-
function
|
|
909
|
+
function H(i, t, n) {
|
|
917
910
|
const e = v(i, n?.in);
|
|
918
911
|
if (isNaN(t)) return E(i, NaN);
|
|
919
912
|
if (!t)
|
|
@@ -927,13 +920,13 @@ function X(i, t, n) {
|
|
|
927
920
|
s
|
|
928
921
|
), e);
|
|
929
922
|
}
|
|
930
|
-
function
|
|
931
|
-
return
|
|
932
|
-
}
|
|
933
|
-
function Yi(i, t, n) {
|
|
934
|
-
return St(i, -t, n);
|
|
923
|
+
function Pt(i, t, n) {
|
|
924
|
+
return H(i, t * 12, n);
|
|
935
925
|
}
|
|
936
926
|
function Xi(i, t, n) {
|
|
927
|
+
return Pt(i, -t, n);
|
|
928
|
+
}
|
|
929
|
+
function Hi(i, t, n) {
|
|
937
930
|
const [e, s] = M(
|
|
938
931
|
n?.in,
|
|
939
932
|
i,
|
|
@@ -953,14 +946,14 @@ function Ui(i, t) {
|
|
|
953
946
|
const n = v(i, t?.in);
|
|
954
947
|
return +Gi(n, t) == +$i(n, t);
|
|
955
948
|
}
|
|
956
|
-
function
|
|
949
|
+
function ji(i, t, n) {
|
|
957
950
|
const [e, s, o] = M(
|
|
958
951
|
n?.in,
|
|
959
952
|
i,
|
|
960
953
|
i,
|
|
961
954
|
t
|
|
962
955
|
), a = S(s, o), r = Math.abs(
|
|
963
|
-
|
|
956
|
+
Hi(s, o)
|
|
964
957
|
);
|
|
965
958
|
if (r < 1) return 0;
|
|
966
959
|
s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - a * r);
|
|
@@ -969,31 +962,31 @@ function Ki(i, t, n) {
|
|
|
969
962
|
const l = a * (r - +h);
|
|
970
963
|
return l === 0 ? 0 : l;
|
|
971
964
|
}
|
|
972
|
-
function
|
|
973
|
-
return
|
|
965
|
+
function Ki(i, t, n) {
|
|
966
|
+
return H(i, -t, n);
|
|
974
967
|
}
|
|
975
968
|
function qi(i, t, n) {
|
|
976
969
|
const [e, s] = M(
|
|
977
970
|
n?.in,
|
|
978
971
|
i,
|
|
979
972
|
t
|
|
980
|
-
), o =
|
|
973
|
+
), o = ht(e, s), a = Math.abs(
|
|
981
974
|
qt(e, s)
|
|
982
975
|
);
|
|
983
976
|
e.setDate(e.getDate() - o * a);
|
|
984
|
-
const r = +(
|
|
977
|
+
const r = +(ht(e, s) === -o), h = o * (a - r);
|
|
985
978
|
return h === 0 ? 0 : h;
|
|
986
979
|
}
|
|
987
|
-
function
|
|
980
|
+
function ht(i, t) {
|
|
988
981
|
const n = 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();
|
|
989
982
|
return n < 0 ? -1 : n > 0 ? 1 : n;
|
|
990
983
|
}
|
|
991
|
-
function
|
|
984
|
+
function Et(i, t, n) {
|
|
992
985
|
const e = v(i, n?.in);
|
|
993
986
|
return isNaN(t) ? E(i, NaN) : (t && e.setDate(e.getDate() + t), e);
|
|
994
987
|
}
|
|
995
988
|
function Wi(i, t, n) {
|
|
996
|
-
return
|
|
989
|
+
return Et(i, -t, n);
|
|
997
990
|
}
|
|
998
991
|
function G(i) {
|
|
999
992
|
return (t) => {
|
|
@@ -1001,45 +994,45 @@ function G(i) {
|
|
|
1001
994
|
return e === 0 ? 0 : e;
|
|
1002
995
|
};
|
|
1003
996
|
}
|
|
1004
|
-
function
|
|
997
|
+
function Qi(i, t, n) {
|
|
1005
998
|
const [e, s] = M(
|
|
1006
999
|
n?.in,
|
|
1007
1000
|
i,
|
|
1008
1001
|
t
|
|
1009
|
-
), o = (+e - +s) /
|
|
1002
|
+
), o = (+e - +s) / pt;
|
|
1010
1003
|
return G(n?.roundingMethod)(o);
|
|
1011
1004
|
}
|
|
1012
|
-
function
|
|
1005
|
+
function wt(i, t, n) {
|
|
1013
1006
|
return E(i, +v(i) + t);
|
|
1014
1007
|
}
|
|
1015
|
-
function
|
|
1016
|
-
return
|
|
1008
|
+
function kt(i, t, n) {
|
|
1009
|
+
return wt(i, t * pt);
|
|
1017
1010
|
}
|
|
1018
|
-
function
|
|
1019
|
-
return
|
|
1011
|
+
function Ji(i, t, n) {
|
|
1012
|
+
return kt(i, -t);
|
|
1020
1013
|
}
|
|
1021
|
-
function
|
|
1014
|
+
function Rt(i, t) {
|
|
1022
1015
|
return +v(i) - +v(t);
|
|
1023
1016
|
}
|
|
1024
|
-
function
|
|
1025
|
-
const e =
|
|
1017
|
+
function ct(i, t, n) {
|
|
1018
|
+
const e = Rt(i, t) / mt;
|
|
1026
1019
|
return G(n?.roundingMethod)(e);
|
|
1027
1020
|
}
|
|
1028
1021
|
function Z(i, t, n) {
|
|
1029
1022
|
const e = v(i, n?.in);
|
|
1030
|
-
return e.setTime(e.getTime() + t *
|
|
1023
|
+
return e.setTime(e.getTime() + t * mt), e;
|
|
1031
1024
|
}
|
|
1032
|
-
function
|
|
1025
|
+
function lt(i, t, n) {
|
|
1033
1026
|
return Z(i, -t, n);
|
|
1034
1027
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const e =
|
|
1028
|
+
function _t(i, t, n) {
|
|
1029
|
+
const e = Rt(i, t) / 1e3;
|
|
1037
1030
|
return G(n?.roundingMethod)(e);
|
|
1038
1031
|
}
|
|
1039
1032
|
function F(i, t, n) {
|
|
1040
|
-
return
|
|
1033
|
+
return wt(i, t * 1e3);
|
|
1041
1034
|
}
|
|
1042
|
-
function
|
|
1035
|
+
function ut(i, t, n) {
|
|
1043
1036
|
return F(i, -t);
|
|
1044
1037
|
}
|
|
1045
1038
|
class ln extends O {
|
|
@@ -1276,7 +1269,7 @@ class ln extends O {
|
|
|
1276
1269
|
if (f)
|
|
1277
1270
|
return [0, 100];
|
|
1278
1271
|
if (e && a === p.LABELS)
|
|
1279
|
-
return
|
|
1272
|
+
return Qt(r.map((u) => u[l]));
|
|
1280
1273
|
let g, m;
|
|
1281
1274
|
const D = this.model.getDataGroupNames();
|
|
1282
1275
|
if (a === p.LABELS_RATIO)
|
|
@@ -1290,18 +1283,18 @@ class ln extends O {
|
|
|
1290
1283
|
else if (e.stacked === !0 && D && t === this.getRangeAxisPosition()) {
|
|
1291
1284
|
const { groupMapsTo: u } = n.data, x = this.model.getDataValuesGroupedByKeys({
|
|
1292
1285
|
groups: D
|
|
1293
|
-
}),
|
|
1286
|
+
}), Bt = r.filter(
|
|
1294
1287
|
(b) => !D.includes(b[u])
|
|
1295
1288
|
), $ = [];
|
|
1296
1289
|
x.forEach((b) => {
|
|
1297
|
-
const { ...
|
|
1298
|
-
let U = 0,
|
|
1299
|
-
Object.values(gi(
|
|
1300
|
-
isNaN(P) || (P < 0 ?
|
|
1301
|
-
}), $.push([
|
|
1290
|
+
const { ...Lt } = b;
|
|
1291
|
+
let U = 0, j = 0;
|
|
1292
|
+
Object.values(gi(Lt, "sharedStackKey")).forEach((P) => {
|
|
1293
|
+
isNaN(P) || (P < 0 ? j += P : U += P);
|
|
1294
|
+
}), $.push([j, U]);
|
|
1302
1295
|
}), m = [
|
|
1303
|
-
...
|
|
1304
|
-
...
|
|
1296
|
+
...xt($),
|
|
1297
|
+
...Bt.map((b) => b[l])
|
|
1305
1298
|
];
|
|
1306
1299
|
} else
|
|
1307
1300
|
m = [], r.forEach((u) => {
|
|
@@ -1311,7 +1304,7 @@ class ln extends O {
|
|
|
1311
1304
|
return a !== p.TIME && a !== p.LOG && o && m.push(0), y && y.length > 0 && y.forEach((u) => {
|
|
1312
1305
|
const x = c(u, "value");
|
|
1313
1306
|
x !== null && m.push(x);
|
|
1314
|
-
}), g =
|
|
1307
|
+
}), g = dt(m), g = this.extendsDomain(t, g), g;
|
|
1315
1308
|
}
|
|
1316
1309
|
createScale(t) {
|
|
1317
1310
|
const n = this.model.getOptions(), e = c(n, "axes", t);
|
|
@@ -1320,7 +1313,7 @@ class ln extends O {
|
|
|
1320
1313
|
const s = c(e, "scaleType") || p.LINEAR;
|
|
1321
1314
|
this.scaleTypes[t] = s;
|
|
1322
1315
|
let o;
|
|
1323
|
-
return s === p.TIME ? o = si() : s === p.LOG ? o =
|
|
1316
|
+
return s === p.TIME ? o = si() : s === p.LOG ? o = gt().base(e.base || 10) : s === p.LABELS || s === p.LABELS_RATIO ? o = oi() : o = Jt(), o.domain(this.getScaleDomain(t)), o;
|
|
1324
1317
|
}
|
|
1325
1318
|
getDomainLowerBound(t) {
|
|
1326
1319
|
let n, e = 0;
|
|
@@ -1349,13 +1342,13 @@ class ln extends O {
|
|
|
1349
1342
|
}
|
|
1350
1343
|
function tn(i, t) {
|
|
1351
1344
|
const n = new Date(i[0]), e = new Date(i[1]);
|
|
1352
|
-
return
|
|
1353
|
-
|
|
1345
|
+
return Yi(e, n) > 1 ? [Xi(n, t), Pt(e, t)] : ji(e, n) > 1 ? [Ki(n, t), H(e, t)] : qi(e, n) > 1 ? [Wi(n, t), Et(e, t)] : Qi(e, n) > 1 ? [Ji(n, t), kt(e, t)] : ct(e, n) > 30 ? [
|
|
1346
|
+
lt(n, t * 30),
|
|
1354
1347
|
Z(e, t * 30)
|
|
1355
|
-
] :
|
|
1356
|
-
|
|
1348
|
+
] : ct(e, n) > 1 ? [lt(n, t), Z(e, t)] : _t(e, n) > 15 ? [
|
|
1349
|
+
ut(n, t * 15),
|
|
1357
1350
|
F(e, t * 15)
|
|
1358
|
-
] :
|
|
1351
|
+
] : _t(e, n) > 1 ? [ut(n, t), F(e, t)] : [n, e];
|
|
1359
1352
|
}
|
|
1360
1353
|
function nn([i, t], n, e) {
|
|
1361
1354
|
const o = (t - i) * n, a = t <= 0 && t + o > 0 ? 0 : t + o;
|
|
@@ -1431,7 +1424,7 @@ class un extends O {
|
|
|
1431
1424
|
if (!s) throw new Error("Not defined: mainXAxisPosition");
|
|
1432
1425
|
return e.extendsDomain(
|
|
1433
1426
|
s,
|
|
1434
|
-
|
|
1427
|
+
dt(n, (r) => r[o])
|
|
1435
1428
|
);
|
|
1436
1429
|
}
|
|
1437
1430
|
handleDomainChange(t, n = { dispatchEvent: !0, type: "manual" }) {
|
|
@@ -1518,6 +1511,6 @@ export {
|
|
|
1518
1511
|
_n as a,
|
|
1519
1512
|
ci as b,
|
|
1520
1513
|
ln as c,
|
|
1521
|
-
|
|
1514
|
+
xt as f
|
|
1522
1515
|
};
|
|
1523
|
-
//# sourceMappingURL=index-
|
|
1516
|
+
//# sourceMappingURL=index-CHbrPDmO.mjs.map
|