@carbon/charts 1.11.3 → 1.11.5
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 +29 -0
- package/dist/{_baseEach-477c04db.js → _baseEach-326db134.js} +2 -2
- package/dist/{_baseEach-477c04db.js.map → _baseEach-326db134.js.map} +1 -1
- package/dist/{_baseEach-05847c57.mjs → _baseEach-9b6a12fa.mjs} +2 -2
- package/dist/{_baseEach-05847c57.mjs.map → _baseEach-9b6a12fa.mjs.map} +1 -1
- package/dist/angle-utils-264ed176.mjs +840 -0
- package/dist/angle-utils-264ed176.mjs.map +1 -0
- package/dist/angle-utils-ccc0d890.js +3 -0
- package/dist/angle-utils-ccc0d890.js.map +1 -0
- package/dist/{choropleth-db3ae9eb.js → choropleth-300f112d.js} +15 -15
- package/dist/{choropleth-db3ae9eb.js.map → choropleth-300f112d.js.map} +1 -1
- package/dist/{choropleth-449cf25e.mjs → choropleth-9123f871.mjs} +1534 -1531
- package/dist/{choropleth-449cf25e.mjs.map → choropleth-9123f871.mjs.map} +1 -1
- package/dist/color-scale-utils-2cd523be.js +2 -0
- package/dist/color-scale-utils-2cd523be.js.map +1 -0
- package/dist/color-scale-utils-b9604b2c.mjs +3335 -0
- package/dist/color-scale-utils-b9604b2c.mjs.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +4 -4
- package/dist/demo/index.js +10 -10
- package/dist/demo/index.js.map +1 -1
- package/dist/demo/index.mjs +291 -300
- package/dist/demo/index.mjs.map +1 -1
- package/dist/demo/utils/package-versions.d.ts +5 -5
- package/dist/{index-e425a7b5.mjs → index-4b5d1e49.mjs} +3 -3
- package/dist/{index-e425a7b5.mjs.map → index-4b5d1e49.mjs.map} +1 -1
- package/dist/index-becfb567.mjs.map +1 -1
- package/dist/index-d865d500.js.map +1 -1
- package/dist/{index-4203ca23.js → index-eace9da9.js} +2 -2
- package/dist/{index-4203ca23.js.map → index-eace9da9.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -38
- package/dist/index.mjs.map +1 -1
- package/dist/model/index.js +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/index.mjs +34 -34
- package/dist/model/index.mjs.map +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.mjs +10 -10
- package/package.json +17 -19
- package/dist/angle-utils-512bc5cd.js +0 -2
- package/dist/angle-utils-512bc5cd.js.map +0 -1
- package/dist/angle-utils-7255d1d9.mjs +0 -387
- package/dist/angle-utils-7255d1d9.mjs.map +0 -1
- package/dist/color-scale-utils-222feda6.mjs +0 -3815
- package/dist/color-scale-utils-222feda6.mjs.map +0 -1
- package/dist/color-scale-utils-79786095.js +0 -3
- package/dist/color-scale-utils-79786095.js.map +0 -1
package/dist/model/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { bin as Z, stack as
|
|
1
|
+
import { S as z, V as F, ab as U, g as u, z as b, e as G, y as j, a9 as M, M as k, ac as L, f as _, v as V, a0 as K, a1 as y, O as R, _ as x } from "../color-scale-utils-b9604b2c.mjs";
|
|
2
|
+
import { bin as Z, stack as A, stackOffsetDiverging as H, scaleOrdinal as $, quantile as E, ascending as Q, min as P, max as N, extent as W, scaleLinear as X, scaleQuantize as Y } from "d3";
|
|
3
3
|
import { S as D, _ as B, d as w, e as O, s as J } from "../enums-a96ef472.mjs";
|
|
4
|
-
import { b as tt } from "../_baseEach-
|
|
4
|
+
import { b as tt } from "../_baseEach-9b6a12fa.mjs";
|
|
5
5
|
import "../index-becfb567.mjs";
|
|
6
6
|
function et(h, t, e, s) {
|
|
7
7
|
for (var a = -1, o = h == null ? 0 : h.length; ++a < o; ) {
|
|
@@ -69,7 +69,7 @@ class m {
|
|
|
69
69
|
getDisplayData(t) {
|
|
70
70
|
if (!this.get("data"))
|
|
71
71
|
return null;
|
|
72
|
-
const { ACTIVE: e } =
|
|
72
|
+
const { ACTIVE: e } = b.items.status, s = this.getDataGroups(t), { groupMapsTo: a } = this.getOptions().data;
|
|
73
73
|
return this.getAllDataFromDomain(t).filter((i) => s.find(
|
|
74
74
|
(r) => r.name === i[a] && r.status === e
|
|
75
75
|
));
|
|
@@ -85,7 +85,7 @@ class m {
|
|
|
85
85
|
* @param newData The new raw data to be set
|
|
86
86
|
*/
|
|
87
87
|
setData(t) {
|
|
88
|
-
const e = this.sanitize(
|
|
88
|
+
const e = this.sanitize(G(t)), s = this.generateDataGroups(e);
|
|
89
89
|
return this.set({
|
|
90
90
|
data: e,
|
|
91
91
|
dataGroups: s
|
|
@@ -95,7 +95,7 @@ class m {
|
|
|
95
95
|
return u(this.getOptions(), "data", "loading") ? [] : t ? this.get("dataGroups").filter((s) => t.includes(s.name)) : this.get("dataGroups");
|
|
96
96
|
}
|
|
97
97
|
getActiveDataGroups(t) {
|
|
98
|
-
const { ACTIVE: e } =
|
|
98
|
+
const { ACTIVE: e } = b.items.status;
|
|
99
99
|
return this.getDataGroups(t).filter((s) => s.status === e);
|
|
100
100
|
}
|
|
101
101
|
getDataGroupNames(t) {
|
|
@@ -117,12 +117,12 @@ class m {
|
|
|
117
117
|
}
|
|
118
118
|
const c = n ? [r[0], r[r.length - 1]] : [l[0].x0, l[l.length - 1].x1], p = Array.from(new Set(t.map((d) => d[i]))), g = [];
|
|
119
119
|
return l.forEach((d) => {
|
|
120
|
-
const f = `${d.x0}-${d.x1}`,
|
|
120
|
+
const f = `${d.x0}-${d.x1}`, T = this.aggregateBinDataByGroup(d);
|
|
121
121
|
p.forEach((C) => {
|
|
122
122
|
g.push({
|
|
123
123
|
group: C,
|
|
124
124
|
key: f,
|
|
125
|
-
value:
|
|
125
|
+
value: T[C] || 0,
|
|
126
126
|
bin: d.x0
|
|
127
127
|
});
|
|
128
128
|
});
|
|
@@ -135,7 +135,7 @@ class m {
|
|
|
135
135
|
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getActiveDataGroupNames(), { bins: a } = this.getBinConfigurations(), o = this.getDataValuesGroupedByKeys({
|
|
136
136
|
bins: a
|
|
137
137
|
});
|
|
138
|
-
return
|
|
138
|
+
return A().keys(s)(o).map((i, r) => Object.keys(i).filter((n) => !isNaN(n)).map((n) => {
|
|
139
139
|
const l = i[n];
|
|
140
140
|
return l[e] = s[r], l;
|
|
141
141
|
}));
|
|
@@ -202,7 +202,7 @@ class m {
|
|
|
202
202
|
});
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
return (s ?
|
|
205
|
+
return (s ? A().offset(H) : A()).keys(i)(r).map((l, c) => Object.keys(l).filter((p) => !isNaN(p)).map((p) => {
|
|
206
206
|
const g = l[p];
|
|
207
207
|
return g[o] = i[c], g;
|
|
208
208
|
}));
|
|
@@ -247,7 +247,7 @@ class m {
|
|
|
247
247
|
* Data labels
|
|
248
248
|
*/
|
|
249
249
|
toggleDataLabel(t) {
|
|
250
|
-
const { ACTIVE: e, DISABLED: s } =
|
|
250
|
+
const { ACTIVE: e, DISABLED: s } = b.items.status, a = this.getDataGroups(), o = a.some((c) => c.status === s), i = a.filter((c) => c.status === e);
|
|
251
251
|
if (o)
|
|
252
252
|
if (i.length === 1 && i[0].name === t)
|
|
253
253
|
a.forEach((c, p) => {
|
|
@@ -363,7 +363,7 @@ class m {
|
|
|
363
363
|
}) : this.allDataGroups = this.getDataGroupNames();
|
|
364
364
|
}
|
|
365
365
|
generateDataGroups(t) {
|
|
366
|
-
const { groupMapsTo: e } = this.getOptions().data, { ACTIVE: s, DISABLED: a } =
|
|
366
|
+
const { groupMapsTo: e } = this.getOptions().data, { ACTIVE: s, DISABLED: a } = b.items.status, o = this.getOptions(), i = M(t.map((n) => n[e]));
|
|
367
367
|
o.data.selectedGroups.length && (o.data.selectedGroups.every(
|
|
368
368
|
(l) => i.includes(l)
|
|
369
369
|
) || (o.data.selectedGroups = []));
|
|
@@ -404,7 +404,7 @@ class m {
|
|
|
404
404
|
this.colorClassNames = $().range(r).domain(this.allDataGroups);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class S extends m {
|
|
408
408
|
// can't be protected as it's used by two-dimensional-axes.ts
|
|
409
409
|
constructor(t) {
|
|
410
410
|
super(t), this.axisFlavor = w.DEFAULT;
|
|
@@ -468,7 +468,7 @@ class T extends m {
|
|
|
468
468
|
* @param zoomBarData any special zoom bar data to use instead of the model data
|
|
469
469
|
*/
|
|
470
470
|
setZoomBarData(t) {
|
|
471
|
-
const e = t ? this.sanitize(
|
|
471
|
+
const e = t ? this.sanitize(G(t)) : this.getDisplayData();
|
|
472
472
|
let s = e;
|
|
473
473
|
const { cartesianScales: a } = this.services;
|
|
474
474
|
if (e && a.domainAxisPosition && a.rangeAxisPosition) {
|
|
@@ -508,7 +508,7 @@ class T extends m {
|
|
|
508
508
|
return t = super.sanitize(t), t = this.sanitizeDateValues(t), t;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
class dt extends
|
|
511
|
+
class dt extends S {
|
|
512
512
|
constructor(t) {
|
|
513
513
|
super(t);
|
|
514
514
|
}
|
|
@@ -520,7 +520,7 @@ class dt extends T {
|
|
|
520
520
|
];
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
class Dt extends
|
|
523
|
+
class Dt extends S {
|
|
524
524
|
constructor(t) {
|
|
525
525
|
super(t);
|
|
526
526
|
}
|
|
@@ -540,10 +540,10 @@ class Dt extends T {
|
|
|
540
540
|
quartiles: this.getBoxQuartiles(n),
|
|
541
541
|
outliers: null,
|
|
542
542
|
whiskers: null
|
|
543
|
-
}, c = l.quartiles.q_25, p = l.quartiles.q_75, g = (p - c) * 1.5, d = c - g, f = p + g,
|
|
543
|
+
}, c = l.quartiles.q_25, p = l.quartiles.q_75, g = (p - c) * 1.5, d = c - g, f = p + g, T = [], C = [];
|
|
544
544
|
for (const v of n)
|
|
545
|
-
v < d || v > f ?
|
|
546
|
-
l.outliers =
|
|
545
|
+
v < d || v > f ? T.push(v) : C.push(v);
|
|
546
|
+
l.outliers = T;
|
|
547
547
|
const I = P(C), q = N(C);
|
|
548
548
|
l.whiskers = {
|
|
549
549
|
min: I || P([l.quartiles.q_25, l.quartiles.q_50, l.quartiles.q_75]),
|
|
@@ -580,7 +580,7 @@ class Dt extends T {
|
|
|
580
580
|
this.colorClassNames = $().range(o).domain(this.allDataGroups);
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
class ft extends
|
|
583
|
+
class ft extends S {
|
|
584
584
|
constructor(t) {
|
|
585
585
|
super(t);
|
|
586
586
|
}
|
|
@@ -803,7 +803,7 @@ class xt extends m {
|
|
|
803
803
|
];
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
class Ct extends
|
|
806
|
+
class Ct extends S {
|
|
807
807
|
constructor(t) {
|
|
808
808
|
super(t), this.axisFlavor = w.HOVERABLE, this._colorScale = void 0, this._domains = [], this._ranges = [], this._matrix = {};
|
|
809
809
|
const e = u(this.getOptions(), "axes");
|
|
@@ -877,7 +877,7 @@ class Ct extends T {
|
|
|
877
877
|
index: -1
|
|
878
878
|
};
|
|
879
879
|
}), t.forEach((i) => {
|
|
880
|
-
this._matrix[i] =
|
|
880
|
+
this._matrix[i] = G(o);
|
|
881
881
|
}), this.getDisplayData().forEach((i, r) => {
|
|
882
882
|
this._matrix[i[s]][i[a]] = {
|
|
883
883
|
value: i.value,
|
|
@@ -892,7 +892,7 @@ class Ct extends T {
|
|
|
892
892
|
* @param newData The new raw data to be set
|
|
893
893
|
*/
|
|
894
894
|
setData(t) {
|
|
895
|
-
const e = this.sanitize(
|
|
895
|
+
const e = this.sanitize(G(t)), s = this.generateDataGroups(e);
|
|
896
896
|
return this.set({
|
|
897
897
|
data: e,
|
|
898
898
|
dataGroups: s
|
|
@@ -950,7 +950,7 @@ class Ct extends T {
|
|
|
950
950
|
this._colorScale = R(this.getDisplayData(), n);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
class
|
|
953
|
+
class St extends S {
|
|
954
954
|
getTabularDataArray() {
|
|
955
955
|
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getBinnedStackedData();
|
|
956
956
|
return [
|
|
@@ -965,7 +965,7 @@ class Tt extends T {
|
|
|
965
965
|
];
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
class
|
|
968
|
+
class Tt extends m {
|
|
969
969
|
constructor(t) {
|
|
970
970
|
super(t);
|
|
971
971
|
}
|
|
@@ -1019,7 +1019,7 @@ class bt extends m {
|
|
|
1019
1019
|
return i;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
class
|
|
1022
|
+
class bt extends S {
|
|
1023
1023
|
constructor(t) {
|
|
1024
1024
|
super(t);
|
|
1025
1025
|
}
|
|
@@ -1057,7 +1057,7 @@ class Ot extends m {
|
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
class
|
|
1060
|
+
class Gt extends m {
|
|
1061
1061
|
constructor(t) {
|
|
1062
1062
|
super(t);
|
|
1063
1063
|
}
|
|
@@ -1070,7 +1070,7 @@ class At extends m {
|
|
|
1070
1070
|
}), e;
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
|
-
class
|
|
1073
|
+
class At extends m {
|
|
1074
1074
|
constructor(t) {
|
|
1075
1075
|
super(t);
|
|
1076
1076
|
}
|
|
@@ -1091,17 +1091,17 @@ export {
|
|
|
1091
1091
|
Dt as BoxplotChartModel,
|
|
1092
1092
|
ft as BulletChartModel,
|
|
1093
1093
|
m as ChartModel,
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
St as ChartModelBinned,
|
|
1095
|
+
S as ChartModelCartesian,
|
|
1096
1096
|
mt as ChoroplethModel,
|
|
1097
1097
|
yt as CirclePackChartModel,
|
|
1098
1098
|
xt as GaugeChartModel,
|
|
1099
1099
|
Ct as HeatmapModel,
|
|
1100
|
-
|
|
1100
|
+
Tt as MeterChartModel,
|
|
1101
1101
|
vt as PieChartModel,
|
|
1102
|
-
|
|
1102
|
+
bt as RadarChartModel,
|
|
1103
1103
|
Ot as TreeChartModel,
|
|
1104
|
-
|
|
1105
|
-
|
|
1104
|
+
Gt as TreemapChartModel,
|
|
1105
|
+
At as WordCloudModel
|
|
1106
1106
|
};
|
|
1107
1107
|
//# sourceMappingURL=index.mjs.map
|