@carbon/charts 1.27.2 → 1.27.8
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 +63 -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-DQATcCWY.mjs} +2214 -2189
- package/dist/choropleth-DQATcCWY.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-CQFVDkrk.mjs → index-CHbrPDmO.mjs} +200 -189
- 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-CQFVDkrk.mjs.map +0 -1
- package/dist/index-DwV8lNnO.mjs +0 -63
- package/dist/index-DwV8lNnO.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,69 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.27.8 (2026-04-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts
|
|
9
|
+
|
|
10
|
+
# Change Log
|
|
11
|
+
|
|
12
|
+
All notable changes to this project will be documented in this file. See
|
|
13
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
14
|
+
|
|
15
|
+
## 1.27.7 (2026-04-20)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @carbon/charts
|
|
18
|
+
|
|
19
|
+
# Change Log
|
|
20
|
+
|
|
21
|
+
All notable changes to this project will be documented in this file. See
|
|
22
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
23
|
+
|
|
24
|
+
## 1.27.6 (2026-04-20)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @carbon/charts
|
|
27
|
+
|
|
28
|
+
# Change Log
|
|
29
|
+
|
|
30
|
+
All notable changes to this project will be documented in this file. See
|
|
31
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
32
|
+
|
|
33
|
+
## 1.27.5 (2026-04-20)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @carbon/charts
|
|
36
|
+
|
|
37
|
+
# Change Log
|
|
38
|
+
|
|
39
|
+
## [Unreleased]
|
|
40
|
+
|
|
41
|
+
Updated public api.
|
|
42
|
+
|
|
43
|
+
- Exposed enums `LegendEvent` and `Roles`
|
|
44
|
+
- Exposed helper functions from `/packages/core/src/tools.ts`.
|
|
45
|
+
|
|
46
|
+
# Change Log
|
|
47
|
+
|
|
48
|
+
All notable changes to this project will be documented in this file. See
|
|
49
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
50
|
+
|
|
51
|
+
## 1.27.4 (2026-04-20)
|
|
52
|
+
|
|
53
|
+
**Note:** Version bump only for package @carbon/charts
|
|
54
|
+
|
|
55
|
+
# Change Log
|
|
56
|
+
|
|
57
|
+
All notable changes to this project will be documented in this file. See
|
|
58
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
59
|
+
|
|
60
|
+
## 1.27.3 (2026-03-11)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @carbon/charts
|
|
63
|
+
|
|
64
|
+
# Change Log
|
|
65
|
+
|
|
66
|
+
All notable changes to this project will be documented in this file. See
|
|
67
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
68
|
+
|
|
6
69
|
## 1.27.2 (2026-01-06)
|
|
7
70
|
|
|
8
71
|
**Note:** Version bump only for package @carbon/charts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a4 as qt, a5 as be, a6 as Nt, a7 as Pe, a8 as Gt, a9 as jt, aa as at, ab as Zt, ac as ke, ad as Xt, ae as Qt, g as ne, p as We } from "./color-scale-utils-C4KU2jNr.mjs";
|
|
2
|
+
import { a0 as ye, o as V, T as z } from "./axis-scales-CFRGPXH8.mjs";
|
|
3
3
|
var Jt = /\s/;
|
|
4
4
|
function Kt(e) {
|
|
5
5
|
for (var t = e.length; t-- && Jt.test(e.charAt(t)); )
|
|
@@ -35,19 +35,19 @@ function ln(e, t, n) {
|
|
|
35
35
|
throw new TypeError(an);
|
|
36
36
|
t = Ye(t) || 0, be(n) && (m = !!n.leading, d = "maxWait" in n, o = d ? un(Ye(n.maxWait) || 0, t) : o, h = "trailing" in n ? !!n.trailing : h);
|
|
37
37
|
function T(f) {
|
|
38
|
-
var S = r,
|
|
39
|
-
return r = i = void 0, g = f, s = e.apply(
|
|
38
|
+
var S = r, k = i;
|
|
39
|
+
return r = i = void 0, g = f, s = e.apply(k, S), s;
|
|
40
40
|
}
|
|
41
41
|
function M(f) {
|
|
42
42
|
return g = f, a = setTimeout(P, t), m ? T(f) : s;
|
|
43
43
|
}
|
|
44
44
|
function U(f) {
|
|
45
|
-
var S = f - c,
|
|
46
|
-
return d ? cn(ae, o -
|
|
45
|
+
var S = f - c, k = f - g, ae = t - S;
|
|
46
|
+
return d ? cn(ae, o - k) : ae;
|
|
47
47
|
}
|
|
48
48
|
function H(f) {
|
|
49
|
-
var S = f - c,
|
|
50
|
-
return c === void 0 || S >= t || S < 0 || d &&
|
|
49
|
+
var S = f - c, k = f - g;
|
|
50
|
+
return c === void 0 || S >= t || S < 0 || d && k >= o;
|
|
51
51
|
}
|
|
52
52
|
function P() {
|
|
53
53
|
var f = pe();
|
|
@@ -163,14 +163,14 @@ ce.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ?
|
|
|
163
163
|
t.setTime(+t + n * e);
|
|
164
164
|
}, (t, n) => (n - t) / e) : ce);
|
|
165
165
|
ce.range;
|
|
166
|
-
const
|
|
166
|
+
const W = 1e3, I = W * 60, $ = I * 60, _ = $ * 24, Ee = _ * 7, _e = _ * 30, Ce = _ * 365, K = x((e) => {
|
|
167
167
|
e.setTime(e - e.getMilliseconds());
|
|
168
168
|
}, (e, t) => {
|
|
169
|
-
e.setTime(+e + t *
|
|
170
|
-
}, (e, t) => (t - e) /
|
|
169
|
+
e.setTime(+e + t * W);
|
|
170
|
+
}, (e, t) => (t - e) / W, (e) => e.getUTCSeconds());
|
|
171
171
|
K.range;
|
|
172
172
|
const Ue = x((e) => {
|
|
173
|
-
e.setTime(e - e.getMilliseconds() - e.getSeconds() *
|
|
173
|
+
e.setTime(e - e.getMilliseconds() - e.getSeconds() * W);
|
|
174
174
|
}, (e, t) => {
|
|
175
175
|
e.setTime(+e + t * I);
|
|
176
176
|
}, (e, t) => (t - e) / I, (e) => e.getMinutes());
|
|
@@ -182,7 +182,7 @@ const mn = x((e) => {
|
|
|
182
182
|
}, (e, t) => (t - e) / I, (e) => e.getUTCMinutes());
|
|
183
183
|
mn.range;
|
|
184
184
|
const Fe = x((e) => {
|
|
185
|
-
e.setTime(e - e.getMilliseconds() - e.getSeconds() *
|
|
185
|
+
e.setTime(e - e.getMilliseconds() - e.getSeconds() * W - e.getMinutes() * I);
|
|
186
186
|
}, (e, t) => {
|
|
187
187
|
e.setTime(+e + t * $);
|
|
188
188
|
}, (e, t) => (t - e) / $, (e) => e.getHours());
|
|
@@ -278,10 +278,10 @@ j.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
|
|
|
278
278
|
j.range;
|
|
279
279
|
function vn(e, t, n, r, i, o) {
|
|
280
280
|
const s = [
|
|
281
|
-
[K, 1,
|
|
282
|
-
[K, 5, 5 *
|
|
283
|
-
[K, 15, 15 *
|
|
284
|
-
[K, 30, 30 *
|
|
281
|
+
[K, 1, W],
|
|
282
|
+
[K, 5, 5 * W],
|
|
283
|
+
[K, 15, 15 * W],
|
|
284
|
+
[K, 30, 30 * W],
|
|
285
285
|
[o, 1, I],
|
|
286
286
|
[o, 5, 5 * I],
|
|
287
287
|
[o, 15, 15 * I],
|
|
@@ -305,8 +305,8 @@ function vn(e, t, n, r, i, o) {
|
|
|
305
305
|
}
|
|
306
306
|
function c(g, m, d) {
|
|
307
307
|
const h = Math.abs(m - g) / d, T = Zt(([, , H]) => H).right(s, h);
|
|
308
|
-
if (T === s.length) return e.every(
|
|
309
|
-
if (T === 0) return ce.every(Math.max(
|
|
308
|
+
if (T === s.length) return e.every(ke(g / Ce, m / Ce, d));
|
|
309
|
+
if (T === 0) return ce.every(Math.max(ke(g, m, d), 1));
|
|
310
310
|
const [M, U] = s[h / s[T - 1][2] < s[T][2] / h ? T - 1 : T];
|
|
311
311
|
return M.every(U);
|
|
312
312
|
}
|
|
@@ -348,8 +348,8 @@ function Fn(e) {
|
|
|
348
348
|
L: ct,
|
|
349
349
|
m: Kn,
|
|
350
350
|
M: er,
|
|
351
|
-
p:
|
|
352
|
-
q:
|
|
351
|
+
p: kt,
|
|
352
|
+
q: Wt,
|
|
353
353
|
Q: Xe,
|
|
354
354
|
s: Qe,
|
|
355
355
|
S: tr,
|
|
@@ -423,12 +423,12 @@ function Fn(e) {
|
|
|
423
423
|
U: On,
|
|
424
424
|
V: Pn,
|
|
425
425
|
w: Hn,
|
|
426
|
-
W:
|
|
426
|
+
W: kn,
|
|
427
427
|
x: Lt,
|
|
428
428
|
X: It,
|
|
429
429
|
y: ze,
|
|
430
430
|
Y: Ve,
|
|
431
|
-
Z:
|
|
431
|
+
Z: Wn,
|
|
432
432
|
"%": Nn
|
|
433
433
|
};
|
|
434
434
|
A.x = f(n, A), A.X = f(r, A), A.c = f(t, A), O.x = f(n, O), O.X = f(r, O), O.c = f(t, O);
|
|
@@ -442,7 +442,7 @@ function Fn(e) {
|
|
|
442
442
|
}
|
|
443
443
|
function S(l, y) {
|
|
444
444
|
return function(p) {
|
|
445
|
-
var u = re(1900, void 0, 1), v =
|
|
445
|
+
var u = re(1900, void 0, 1), v = k(u, l, p += "", 0), C, F;
|
|
446
446
|
if (v != p.length) return null;
|
|
447
447
|
if ("Q" in u) return new Date(u.Q);
|
|
448
448
|
if ("s" in u) return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
|
|
@@ -453,7 +453,7 @@ function Fn(e) {
|
|
|
453
453
|
return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, Me(u)) : Se(u);
|
|
454
454
|
};
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function k(l, y, p, u) {
|
|
457
457
|
for (var v = 0, C = y.length, F = p.length, R, G; v < C; ) {
|
|
458
458
|
if (u >= F) return -1;
|
|
459
459
|
if (R = y.charCodeAt(v++), R === 37) {
|
|
@@ -484,13 +484,13 @@ function Fn(e) {
|
|
|
484
484
|
return u ? (l.m = H.get(u[0].toLowerCase()), p + u[0].length) : -1;
|
|
485
485
|
}
|
|
486
486
|
function Rt(l, y, p) {
|
|
487
|
-
return
|
|
487
|
+
return k(l, t, y, p);
|
|
488
488
|
}
|
|
489
489
|
function Lt(l, y, p) {
|
|
490
|
-
return
|
|
490
|
+
return k(l, n, y, p);
|
|
491
491
|
}
|
|
492
492
|
function It(l, y, p) {
|
|
493
|
-
return
|
|
493
|
+
return k(l, r, y, p);
|
|
494
494
|
}
|
|
495
495
|
function Ht(l) {
|
|
496
496
|
return s[l.getDay()];
|
|
@@ -504,10 +504,10 @@ function Fn(e) {
|
|
|
504
504
|
function Pt(l) {
|
|
505
505
|
return a[l.getMonth()];
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function kt(l) {
|
|
508
508
|
return i[+(l.getHours() >= 12)];
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Wt(l) {
|
|
511
511
|
return 1 + ~~(l.getMonth() / 3);
|
|
512
512
|
}
|
|
513
513
|
function $t(l) {
|
|
@@ -585,7 +585,7 @@ function Pn(e, t, n) {
|
|
|
585
585
|
var r = b.exec(t.slice(n, n + 2));
|
|
586
586
|
return r ? (e.V = +r[0], n + r[0].length) : -1;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function kn(e, t, n) {
|
|
589
589
|
var r = b.exec(t.slice(n, n + 2));
|
|
590
590
|
return r ? (e.W = +r[0], n + r[0].length) : -1;
|
|
591
591
|
}
|
|
@@ -597,7 +597,7 @@ function ze(e, t, n) {
|
|
|
597
597
|
var r = b.exec(t.slice(n, n + 2));
|
|
598
598
|
return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Wn(e, t, n) {
|
|
601
601
|
var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
|
|
602
602
|
return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
|
|
603
603
|
}
|
|
@@ -829,7 +829,7 @@ function mt(e, t, n, r, i, o, s, a, c, g) {
|
|
|
829
829
|
function Fi() {
|
|
830
830
|
return at.apply(mt(En, Un, B, Le, me, se, Fe, Ue, K, gt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
|
|
831
831
|
}
|
|
832
|
-
const Ri = Math.abs, Li = Math.atan2, Ii = Math.cos, Hi = Math.max, Ai = Math.min, Oi = Math.sin, Pi = Math.sqrt,
|
|
832
|
+
const Ri = Math.abs, Li = Math.atan2, Ii = Math.cos, Hi = Math.max, Ai = Math.min, Oi = Math.sin, Pi = Math.sqrt, ki = 1e-12, Ie = Math.PI, Je = Ie / 2, Wi = 2 * Ie;
|
|
833
833
|
function $i(e) {
|
|
834
834
|
return e > 1 ? 0 : e < -1 ? Ie : Math.acos(e);
|
|
835
835
|
}
|
|
@@ -940,7 +940,7 @@ function Pr() {
|
|
|
940
940
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
941
941
|
}
|
|
942
942
|
const L = 16384;
|
|
943
|
-
function
|
|
943
|
+
function kr(e) {
|
|
944
944
|
(e.width > L || e.height > L) && (e.width > L && e.height > L ? e.width > e.height ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L) : e.width > L ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L));
|
|
945
945
|
}
|
|
946
946
|
function ge(e) {
|
|
@@ -949,12 +949,12 @@ function ge(e) {
|
|
|
949
949
|
r.decode = () => t(r), r.onload = () => t(r), r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
|
-
async function
|
|
952
|
+
async function Wr(e) {
|
|
953
953
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
|
|
954
954
|
}
|
|
955
955
|
async function $r(e, t, n) {
|
|
956
956
|
const r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), o = document.createElementNS(r, "foreignObject");
|
|
957
|
-
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("x", "0"), o.setAttribute("y", "0"), o.setAttribute("externalResourcesRequired", "true"), i.appendChild(o), o.appendChild(e),
|
|
957
|
+
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("x", "0"), o.setAttribute("y", "0"), o.setAttribute("externalResourcesRequired", "true"), i.appendChild(o), o.appendChild(e), Wr(i);
|
|
958
958
|
}
|
|
959
959
|
const E = (e, t) => {
|
|
960
960
|
if (e instanceof t)
|
|
@@ -1332,7 +1332,7 @@ async function Si(e, t = {}) {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
async function xt(e, t = {}) {
|
|
1334
1334
|
const { width: n, height: r } = pt(e, t), i = await Si(e, t), o = await ge(i), s = document.createElement("canvas"), a = s.getContext("2d"), c = t.pixelRatio || Pr(), g = t.canvasWidth || n, m = t.canvasHeight || r;
|
|
1335
|
-
return s.width = g * c, s.height = m * c, t.skipAutoScale ||
|
|
1335
|
+
return s.width = g * c, s.height = m * c, t.skipAutoScale || kr(s), s.style.width = `${g}`, s.style.height = `${m}`, t.backgroundColor && (a.fillStyle = t.backgroundColor, a.fillRect(0, 0, s.width, s.height)), a.drawImage(o, 0, 0, s.width, s.height), s;
|
|
1336
1336
|
}
|
|
1337
1337
|
async function Mi(e, t = {}) {
|
|
1338
1338
|
return (await xt(e, t)).toDataURL();
|
|
@@ -1463,7 +1463,7 @@ class ve extends bt {
|
|
|
1463
1463
|
t ? this.chartID = t : this.chartID = Math.floor((1 + Math.random()) * 281474976710656).toString(16);
|
|
1464
1464
|
}
|
|
1465
1465
|
addMainContainer() {
|
|
1466
|
-
const t = this.model.getOptions(), n = ne(t, "style", "prefix"), r = D(this.getHolder()).append("div").classed(`${
|
|
1466
|
+
const t = this.model.getOptions(), n = ne(t, "style", "prefix"), r = D(this.getHolder()).append("div").classed(`${We}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
|
|
1467
1467
|
r.append("g").attr("class", bi), this.mainContainer = r.node();
|
|
1468
1468
|
}
|
|
1469
1469
|
update() {
|
|
@@ -1471,7 +1471,7 @@ class ve extends bt {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
styleHolderElement() {
|
|
1473
1473
|
const t = this.getHolder(), { width: n, height: r, theme: i } = this.model.getOptions();
|
|
1474
|
-
n !== this.width && (t.style.width = n, this.width = n), r !== this.height && (t.style.height = r, this.height = r), D(this.getHolder()).classed(`${
|
|
1474
|
+
n !== this.width && (t.style.width = n, this.width = n), r !== this.height && (t.style.height = r, this.height = r), D(this.getHolder()).classed(`${We}--chart-holder`, !0).attr("data-carbon-theme", i);
|
|
1475
1475
|
}
|
|
1476
1476
|
getHolder() {
|
|
1477
1477
|
return this.model.get("holder");
|
|
@@ -1650,9 +1650,9 @@ export {
|
|
|
1650
1650
|
bt as S,
|
|
1651
1651
|
Ni as a,
|
|
1652
1652
|
vi as b,
|
|
1653
|
-
|
|
1653
|
+
Wi as c,
|
|
1654
1654
|
zi as d,
|
|
1655
|
-
|
|
1655
|
+
ki as e,
|
|
1656
1656
|
Ii as f,
|
|
1657
1657
|
Oi as g,
|
|
1658
1658
|
Je as h,
|
|
@@ -1675,4 +1675,4 @@ export {
|
|
|
1675
1675
|
Bi as y,
|
|
1676
1676
|
gn as z
|
|
1677
1677
|
};
|
|
1678
|
-
//# sourceMappingURL=angle-utils-
|
|
1678
|
+
//# sourceMappingURL=angle-utils-Dy0Gf7Eb.mjs.map
|