@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,8 +1,8 @@
|
|
|
1
1
|
import { R as e } from "../a11y-ePqvrObQ.mjs";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as n, a as o, b as r, c as i, d as v, e as T, f as l, B as E, g as m, C as p, h as y, i as d, j as C, k as u, l as c, m as g, n as A, D as L, o as h, E as x, G as D, p as R, L as S, q as B, r as P, s as Z, t as G, u as I, v as O, w as b, M as f, x as k, P as w, y as M, R as N, z as j, S as F, F as W, H as q, I as z, T as H, J, K, N as Q, O as U, Q as V, U as X, V as Y, W as _, X as $, Y as aa, Z as sa, _ as ea, $ as ta } from "../axis-scales-CFRGPXH8.mjs";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
n as Alignments,
|
|
5
|
+
o as AreaEvent,
|
|
6
6
|
r as ArrowDirections,
|
|
7
7
|
i as AxisEvent,
|
|
8
8
|
v as AxisFlavor,
|
|
@@ -16,44 +16,45 @@ export {
|
|
|
16
16
|
C as ChartEvent,
|
|
17
17
|
u as ChartTheme,
|
|
18
18
|
c as ChartTypes,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
g as ColorClassNameTypes,
|
|
20
|
+
A as ColorLegendType,
|
|
21
|
+
L as DividerStatus,
|
|
22
|
+
h as DominantBaseline,
|
|
23
|
+
x as Events,
|
|
24
24
|
D as GaugeEvent,
|
|
25
25
|
R as GaugeTypes,
|
|
26
26
|
S as LayoutAlignItems,
|
|
27
27
|
B as LayoutDirection,
|
|
28
28
|
P as LayoutGrowth,
|
|
29
|
-
Z as
|
|
30
|
-
G as
|
|
31
|
-
I as
|
|
32
|
-
O as
|
|
33
|
-
b as
|
|
34
|
-
f as
|
|
35
|
-
k as
|
|
36
|
-
w as
|
|
37
|
-
M as
|
|
38
|
-
N as
|
|
29
|
+
Z as LegendEvent,
|
|
30
|
+
G as LegendItemType,
|
|
31
|
+
I as LegendOrientations,
|
|
32
|
+
O as LegendPositions,
|
|
33
|
+
b as LineEvent,
|
|
34
|
+
f as ModalEvent,
|
|
35
|
+
k as ModelEvent,
|
|
36
|
+
w as PieEvent,
|
|
37
|
+
M as Projection,
|
|
38
|
+
N as RadarEvent,
|
|
39
|
+
j as RenderTypes,
|
|
39
40
|
e as Roles,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
41
|
+
F as ScaleTypes,
|
|
42
|
+
W as ScatterEvent,
|
|
43
|
+
q as Skeletons,
|
|
44
|
+
z as Statuses,
|
|
45
|
+
H as TextAnchor,
|
|
46
|
+
J as ThresholdEvent,
|
|
47
|
+
K as TickRotations,
|
|
48
|
+
Q as TimeIntervalNames,
|
|
49
|
+
U as ToolbarControlTypes,
|
|
50
|
+
V as TooltipEvent,
|
|
51
|
+
X as TreeEvent,
|
|
52
|
+
Y as TreeTypes,
|
|
53
|
+
_ as TreemapEvent,
|
|
54
|
+
$ as TruncationTypes,
|
|
55
|
+
aa as WordCloudEvent,
|
|
56
|
+
sa as ZoomBarTypes,
|
|
57
|
+
ea as ZoomDomainEvent,
|
|
58
|
+
ta as ZoombarEvent
|
|
58
59
|
};
|
|
59
60
|
//# sourceMappingURL=index.mjs.map
|
package/dist/model/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as b,
|
|
3
|
-
import { b as ut, c as I, a as pt } from "../array-
|
|
1
|
+
import { ah as et, ai as st, aD as H, aE as w, aF as $, as as N, aG as at, aH as nt, aI as ot, ay as P, aA as k, g as p, w as E, c as F, v as rt, ax as L, J as z, Y as Z, a as R, r as Q, a9 as W, ar as C, L as X, au as it, aJ as lt, aq as A } from "../color-scale-utils-C4KU2jNr.mjs";
|
|
2
|
+
import { S as b, a0 as U, d as Y, e as q, t as ct } from "../axis-scales-CFRGPXH8.mjs";
|
|
3
|
+
import { b as ut, c as I, a as pt } from "../array-D6ni_TQq.mjs";
|
|
4
4
|
function ht(u, t, e, s) {
|
|
5
5
|
for (var a = -1, n = u == null ? 0 : u.length; ++a < n; ) {
|
|
6
6
|
var o = u[a];
|
|
@@ -15,19 +15,19 @@ function gt(u, t, e, s) {
|
|
|
15
15
|
}
|
|
16
16
|
function ft(u, t) {
|
|
17
17
|
return function(e, s) {
|
|
18
|
-
var a =
|
|
19
|
-
return a(e, u,
|
|
18
|
+
var a = st(e) ? ht : gt, n = {};
|
|
19
|
+
return a(e, u, et(s), n);
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function dt(u) {
|
|
23
23
|
for (var t = -1, e = u == null ? 0 : u.length, s = {}; ++t < e; ) {
|
|
24
24
|
var a = u[t];
|
|
25
|
-
s
|
|
25
|
+
H(s, a[0], a[1]);
|
|
26
26
|
}
|
|
27
27
|
return s;
|
|
28
28
|
}
|
|
29
29
|
var mt = Object.prototype, Dt = mt.hasOwnProperty, yt = ft(function(u, t, e) {
|
|
30
|
-
Dt.call(u, e) ? u[e].push(t) :
|
|
30
|
+
Dt.call(u, e) ? u[e].push(t) : H(u, e, [t]);
|
|
31
31
|
});
|
|
32
32
|
function bt(u, t) {
|
|
33
33
|
let e = 0;
|
|
@@ -39,18 +39,18 @@ function vt(u) {
|
|
|
39
39
|
return u;
|
|
40
40
|
}
|
|
41
41
|
function xt(u = w) {
|
|
42
|
-
if (u === w) return
|
|
42
|
+
if (u === w) return J;
|
|
43
43
|
if (typeof u != "function") throw new TypeError("compare is not a function");
|
|
44
44
|
return (t, e) => {
|
|
45
45
|
const s = u(t, e);
|
|
46
46
|
return s || s === 0 ? s : (u(e, e) === 0) - (u(t, t) === 0);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function J(u, t) {
|
|
50
50
|
return (u == null || !(u >= u)) - (t == null || !(t >= t)) || (u < t ? -1 : u > t ? 1 : 0);
|
|
51
51
|
}
|
|
52
52
|
var Ct = Array.prototype, Tt = Ct.slice;
|
|
53
|
-
function
|
|
53
|
+
function V(u) {
|
|
54
54
|
return () => u;
|
|
55
55
|
}
|
|
56
56
|
function At(u, t, e) {
|
|
@@ -105,19 +105,19 @@ function Mt() {
|
|
|
105
105
|
return x;
|
|
106
106
|
}
|
|
107
107
|
return s.value = function(a) {
|
|
108
|
-
return arguments.length ? (u = typeof a == "function" ? a :
|
|
108
|
+
return arguments.length ? (u = typeof a == "function" ? a : V(a), s) : u;
|
|
109
109
|
}, s.domain = function(a) {
|
|
110
|
-
return arguments.length ? (t = typeof a == "function" ? a :
|
|
110
|
+
return arguments.length ? (t = typeof a == "function" ? a : V([a[0], a[1]]), s) : t;
|
|
111
111
|
}, s.thresholds = function(a) {
|
|
112
|
-
return arguments.length ? (e = typeof a == "function" ? a :
|
|
112
|
+
return arguments.length ? (e = typeof a == "function" ? a : V(Array.isArray(a) ? Tt.call(a) : a), s) : e;
|
|
113
113
|
}, s;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function tt(u, t, e = 0, s = 1 / 0, a) {
|
|
116
116
|
if (t = Math.floor(t), e = Math.floor(Math.max(0, e)), s = Math.floor(Math.min(u.length - 1, s)), !(e <= t && t <= s)) return u;
|
|
117
|
-
for (a = a === void 0 ?
|
|
117
|
+
for (a = a === void 0 ? J : xt(a); s > e; ) {
|
|
118
118
|
if (s - e > 600) {
|
|
119
119
|
const i = s - e + 1, l = t - e + 1, c = Math.log(i), h = 0.5 * Math.exp(2 * c / 3), g = 0.5 * Math.sqrt(c * h * (i - h) / i) * (l - i / 2 < 0 ? -1 : 1), f = Math.max(e, Math.floor(t - l * h / i + g)), d = Math.min(s, Math.floor(t + (i - l) * h / i + g));
|
|
120
|
-
|
|
120
|
+
tt(u, t, f, d, a);
|
|
121
121
|
}
|
|
122
122
|
const n = u[t];
|
|
123
123
|
let o = e, r = s;
|
|
@@ -137,7 +137,7 @@ function B(u, t, e) {
|
|
|
137
137
|
if (u = Float64Array.from(ot(u)), !(!(s = u.length) || isNaN(t = +t))) {
|
|
138
138
|
if (t <= 0 || s < 2) return P(u);
|
|
139
139
|
if (t >= 1) return k(u);
|
|
140
|
-
var s, a = (s - 1) * t, n = Math.floor(a), o = k(
|
|
140
|
+
var s, a = (s - 1) * t, n = Math.floor(a), o = k(tt(u, n).subarray(0, n + 1)), r = P(u.subarray(n + 1));
|
|
141
141
|
return o + (r - o) * (a - n);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -266,7 +266,7 @@ class v {
|
|
|
266
266
|
* @returns {any} - The sanitized version of the provided data.
|
|
267
267
|
*/
|
|
268
268
|
setData(t) {
|
|
269
|
-
const e = this.sanitize(
|
|
269
|
+
const e = this.sanitize(F(t)), s = this.generateDataGroups(e);
|
|
270
270
|
return this.set({
|
|
271
271
|
data: e,
|
|
272
272
|
dataGroups: s
|
|
@@ -419,7 +419,7 @@ class v {
|
|
|
419
419
|
*/
|
|
420
420
|
setOptions(t) {
|
|
421
421
|
const e = this.getOptions();
|
|
422
|
-
|
|
422
|
+
Z(e, t), this.set({
|
|
423
423
|
options: R(e, t)
|
|
424
424
|
});
|
|
425
425
|
}
|
|
@@ -581,18 +581,18 @@ class v {
|
|
|
581
581
|
let e = p(t, "numberOfVariants");
|
|
582
582
|
(!e || e < this.allDataGroups.length) && (e = this.allDataGroups.length);
|
|
583
583
|
let s = p(t, "option");
|
|
584
|
-
const a =
|
|
584
|
+
const a = Q.pairingOptions, n = e > 5 ? 14 : e, o = `${n}-color`;
|
|
585
585
|
s = s <= a[o] ? s : 1;
|
|
586
586
|
const r = this.allDataGroups.map(
|
|
587
587
|
(i, l) => `${n}-${s}-${l % 14 + 1}`
|
|
588
588
|
);
|
|
589
|
-
this.colorClassNames =
|
|
589
|
+
this.colorClassNames = W().range(r).domain(this.allDataGroups);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
592
|
class M extends v {
|
|
593
593
|
// can't be protected as it's used by two-dimensional-axes.ts
|
|
594
594
|
constructor(t) {
|
|
595
|
-
super(t), this.axisFlavor =
|
|
595
|
+
super(t), this.axisFlavor = Y.DEFAULT;
|
|
596
596
|
}
|
|
597
597
|
// get the scales information
|
|
598
598
|
// needed for getTabularArray()
|
|
@@ -657,7 +657,7 @@ class M extends v {
|
|
|
657
657
|
* @param {any} [newZoomBarData] - The new zoom bar data to be set. If not provided, the display data will be used.
|
|
658
658
|
*/
|
|
659
659
|
setZoomBarData(t) {
|
|
660
|
-
const e = t ? this.sanitize(
|
|
660
|
+
const e = t ? this.sanitize(F(t)) : this.getDisplayData();
|
|
661
661
|
let s = e;
|
|
662
662
|
const { cartesianScales: a } = this.services;
|
|
663
663
|
if (e && a.domainAxisPosition && a.rangeAxisPosition) {
|
|
@@ -714,7 +714,7 @@ class kt extends M {
|
|
|
714
714
|
return super.formatTable({ headers: a, cells: n });
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
class
|
|
717
|
+
class Ft extends M {
|
|
718
718
|
constructor(t) {
|
|
719
719
|
super(t);
|
|
720
720
|
}
|
|
@@ -769,13 +769,13 @@ class Vt extends M {
|
|
|
769
769
|
setColorClassNames() {
|
|
770
770
|
const e = p(this.getOptions(), "color", "pairing");
|
|
771
771
|
let s = p(e, "option");
|
|
772
|
-
const a =
|
|
772
|
+
const a = Q.pairingOptions;
|
|
773
773
|
s = s <= a["1-color"] ? s : 1;
|
|
774
774
|
const n = this.allDataGroups.map(() => `1-${s}-1`);
|
|
775
|
-
this.colorClassNames =
|
|
775
|
+
this.colorClassNames = W().range(n).domain(this.allDataGroups);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
class
|
|
778
|
+
class Vt extends M {
|
|
779
779
|
constructor(t) {
|
|
780
780
|
super(t);
|
|
781
781
|
}
|
|
@@ -853,7 +853,7 @@ class Bt extends v {
|
|
|
853
853
|
}
|
|
854
854
|
setColorClassNames() {
|
|
855
855
|
const t = p(this.getOptions(), "color");
|
|
856
|
-
this._colorScale =
|
|
856
|
+
this._colorScale = X(this.getDisplayData(), t);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
class _t extends v {
|
|
@@ -865,7 +865,7 @@ class _t extends v {
|
|
|
865
865
|
}
|
|
866
866
|
setOptions(t) {
|
|
867
867
|
const e = this.getOptions(), s = R({}, t, this.getZoomOptions(t));
|
|
868
|
-
|
|
868
|
+
Z(e, s);
|
|
869
869
|
const a = this.getHierarchyLevel(), n = p(e, "circlePack", "depth");
|
|
870
870
|
this.set({
|
|
871
871
|
options: R(e, s),
|
|
@@ -997,7 +997,7 @@ class $t extends v {
|
|
|
997
997
|
}
|
|
998
998
|
class Lt extends M {
|
|
999
999
|
constructor(t) {
|
|
1000
|
-
super(t), this.axisFlavor =
|
|
1000
|
+
super(t), this.axisFlavor = Y.HOVERABLE, this._colorScale = void 0, this._domains = [], this._ranges = [], this._matrix = {};
|
|
1001
1001
|
const e = p(this.getOptions(), "axes");
|
|
1002
1002
|
if (p(e, "left", "scaleType") && p(e, "left", "scaleType") !== b.LABELS || p(e, "right", "scaleType") && p(e, "right", "scaleType") !== b.LABELS || p(e, "top", "scaleType") && p(e, "top", "scaleType") !== b.LABELS || p(e, "bottom", "scaleType") && p(e, "bottom", "scaleType") !== b.LABELS)
|
|
1003
1003
|
throw Error("Heatmap only supports label scaletypes.");
|
|
@@ -1069,7 +1069,7 @@ class Lt extends M {
|
|
|
1069
1069
|
index: -1
|
|
1070
1070
|
};
|
|
1071
1071
|
}), t.forEach((o) => {
|
|
1072
|
-
this._matrix[o] =
|
|
1072
|
+
this._matrix[o] = F(n);
|
|
1073
1073
|
}), this.getDisplayData().forEach((o, r) => {
|
|
1074
1074
|
this._matrix[o[s]][o[a]] = {
|
|
1075
1075
|
value: o.value,
|
|
@@ -1090,7 +1090,7 @@ class Lt extends M {
|
|
|
1090
1090
|
* @returns {any} - The sanitized version of the provided data.
|
|
1091
1091
|
*/
|
|
1092
1092
|
setData(t) {
|
|
1093
|
-
const e = this.sanitize(
|
|
1093
|
+
const e = this.sanitize(F(t)), s = this.generateDataGroups(e);
|
|
1094
1094
|
return this.set({
|
|
1095
1095
|
data: e,
|
|
1096
1096
|
dataGroups: s
|
|
@@ -1144,7 +1144,7 @@ class Lt extends M {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
this._colorScale = lt().domain(n).range(r);
|
|
1146
1146
|
const i = p(this.getOptions(), "color");
|
|
1147
|
-
this._colorScale =
|
|
1147
|
+
this._colorScale = X(this.getDisplayData(), i);
|
|
1148
1148
|
}
|
|
1149
1149
|
}
|
|
1150
1150
|
class Rt extends M {
|
|
@@ -1305,8 +1305,8 @@ class Ht extends v {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
export {
|
|
1307
1307
|
kt as AlluvialChartModel,
|
|
1308
|
-
|
|
1309
|
-
|
|
1308
|
+
Ft as BoxplotChartModel,
|
|
1309
|
+
Vt as BulletChartModel,
|
|
1310
1310
|
v as ChartModel,
|
|
1311
1311
|
Rt as ChartModelBinned,
|
|
1312
1312
|
M as ChartModelCartesian,
|