@carbon/charts 1.23.15 → 1.23.17

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/a11y-ePqvrObQ.mjs.map +1 -1
  3. package/dist/{angle-utils-Re7uVv7K.mjs → angle-utils-BWFhuTnR.mjs} +49 -54
  4. package/dist/{angle-utils-Re7uVv7K.mjs.map → angle-utils-BWFhuTnR.mjs.map} +1 -1
  5. package/dist/{array-CLq6Q40W.mjs → array-4CiuhqlQ.mjs} +2 -2
  6. package/dist/{array-CLq6Q40W.mjs.map → array-4CiuhqlQ.mjs.map} +1 -1
  7. package/dist/axis-scales-CPuwbFQf.mjs.map +1 -1
  8. package/dist/{choropleth-DvuP75LI.mjs → choropleth-CUIYpDaf.mjs} +483 -506
  9. package/dist/choropleth-CUIYpDaf.mjs.map +1 -0
  10. package/dist/{color-scale-utils-BPsvYA85.mjs → color-scale-utils-DCBFJmbg.mjs} +1152 -1161
  11. package/dist/{color-scale-utils-BPsvYA85.mjs.map → color-scale-utils-DCBFJmbg.mjs.map} +1 -1
  12. package/dist/components/index.mjs +1 -1
  13. package/dist/{index-Ciju2yyn.mjs → index-BILVb6NZ.mjs} +442 -447
  14. package/dist/{index-Ciju2yyn.mjs.map → index-BILVb6NZ.mjs.map} +1 -1
  15. package/dist/index.d.cts +21 -0
  16. package/dist/index.mjs +62 -63
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/model/index.mjs +22 -22
  19. package/dist/model/index.mjs.map +1 -1
  20. package/dist/services/index.mjs +3 -3
  21. package/dist/styles.css +96 -0
  22. package/dist/styles.css.map +1 -1
  23. package/dist/styles.min.css +1 -1
  24. package/dist/styles.min.css.map +1 -1
  25. package/dist/umd/bundle.umd.cjs +14 -14
  26. package/dist/umd/bundle.umd.cjs.map +1 -1
  27. package/dist/umd/bundle.umd.js +14 -14
  28. package/package.json +24 -25
  29. package/styles.css +96 -0
  30. package/styles.min.css +1 -1
  31. package/dist/choropleth-DvuP75LI.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { a1 as tt, a2 as et, au as st, av as w, aw as $, ad as N, ax as at, ay as nt, az as ot, ap as P, ar as k, g as p, w as E, c as F, v as rt, ao as L, J as z, aA as H, a as R, r as Z, V as Q, ac as C, L as W, ai as it, aB as lt, aa as A } from "../color-scale-utils-BPsvYA85.mjs";
1
+ import { a1 as tt, a2 as et, au as st, av as w, aw as $, ad as N, ax as at, ay as nt, az as ot, ap as P, ar as k, g as p, w as E, c as V, v as rt, ao as L, J as z, aA as H, a as R, r as Z, V as Q, ac as C, L as W, ai as it, aB as lt, aa as A } from "../color-scale-utils-DCBFJmbg.mjs";
2
2
  import { S as b, $ as U, d as X, e as q, s as ct } from "../axis-scales-CPuwbFQf.mjs";
3
- import { b as ut, c as I, a as pt } from "../array-CLq6Q40W.mjs";
3
+ import { b as ut, c as I, a as pt } from "../array-4CiuhqlQ.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];
@@ -50,7 +50,7 @@ function Y(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 B(u) {
53
+ function F(u) {
54
54
  return () => u;
55
55
  }
56
56
  function At(u, t, e) {
@@ -105,11 +105,11 @@ function Mt() {
105
105
  return x;
106
106
  }
107
107
  return s.value = function(a) {
108
- return arguments.length ? (u = typeof a == "function" ? a : B(a), s) : u;
108
+ return arguments.length ? (u = typeof a == "function" ? a : F(a), s) : u;
109
109
  }, s.domain = function(a) {
110
- return arguments.length ? (t = typeof a == "function" ? a : B([a[0], a[1]]), s) : t;
110
+ return arguments.length ? (t = typeof a == "function" ? a : F([a[0], a[1]]), s) : t;
111
111
  }, s.thresholds = function(a) {
112
- return arguments.length ? (e = typeof a == "function" ? a : B(Array.isArray(a) ? Tt.call(a) : a), s) : e;
112
+ return arguments.length ? (e = typeof a == "function" ? a : F(Array.isArray(a) ? Tt.call(a) : a), s) : e;
113
113
  }, s;
114
114
  }
115
115
  function J(u, t, e = 0, s = 1 / 0, a) {
@@ -133,7 +133,7 @@ function G(u, t, e) {
133
133
  const s = u[t];
134
134
  u[t] = u[e], u[e] = s;
135
135
  }
136
- function V(u, t, e) {
136
+ 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);
@@ -200,7 +200,7 @@ class v {
200
200
  code: a,
201
201
  date: n,
202
202
  number: o
203
- } = p(s, "locale"), r = p(s, "tabularRepModal", "tableHeadingFormatter"), i = p(s, "tabularRepModal", "tableCellFormatter"), { cartesianScales: l } = this.services, c = l == null ? void 0 : l.getDomainAxisScaleType();
203
+ } = p(s, "locale"), r = p(s, "tabularRepModal", "tableHeadingFormatter"), i = p(s, "tabularRepModal", "tableCellFormatter"), { cartesianScales: l } = this.services, c = l?.getDomainAxisScaleType();
204
204
  let h;
205
205
  return c === b.TIME && (h = (f) => n(f, a, { month: "short", day: "numeric", year: "numeric" })), [
206
206
  typeof r == "function" ? r(t) : t,
@@ -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(F(t)), s = this.generateDataGroups(e);
269
+ const e = this.sanitize(V(t)), s = this.generateDataGroups(e);
270
270
  return this.set({
271
271
  data: e,
272
272
  dataGroups: s
@@ -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(F(t)) : this.getDisplayData();
660
+ const e = t ? this.sanitize(V(t)) : this.getDisplayData();
661
661
  let s = e;
662
662
  const { cartesianScales: a } = this.services;
663
663
  if (e && a.domainAxisPosition && a.rangeAxisPosition) {
@@ -714,15 +714,15 @@ class kt extends M {
714
714
  return super.formatTable({ headers: a, cells: n });
715
715
  }
716
716
  }
717
- class Ft extends M {
717
+ class Vt extends M {
718
718
  constructor(t) {
719
719
  super(t);
720
720
  }
721
721
  getBoxQuartiles(t) {
722
722
  return {
723
- q_25: V(t, 0.25),
724
- q_50: V(t, 0.5),
725
- q_75: V(t, 0.75)
723
+ q_25: B(t, 0.25),
724
+ q_50: B(t, 0.5),
725
+ q_75: B(t, 0.75)
726
726
  };
727
727
  }
728
728
  getBoxplotData() {
@@ -775,7 +775,7 @@ class Ft extends M {
775
775
  this.colorClassNames = Q().range(n).domain(this.allDataGroups);
776
776
  }
777
777
  }
778
- class Bt extends M {
778
+ class Ft extends M {
779
779
  constructor(t) {
780
780
  super(t);
781
781
  }
@@ -807,7 +807,7 @@ class Bt extends M {
807
807
  return super.formatTable({ headers: i, cells: l });
808
808
  }
809
809
  }
810
- class Vt extends v {
810
+ class Bt extends v {
811
811
  constructor(t) {
812
812
  super(t), this._colorScale = void 0, this._matrix = {};
813
813
  }
@@ -1069,7 +1069,7 @@ class Lt extends M {
1069
1069
  index: -1
1070
1070
  };
1071
1071
  }), t.forEach((o) => {
1072
- this._matrix[o] = F(n);
1072
+ this._matrix[o] = V(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(F(t)), s = this.generateDataGroups(e);
1093
+ const e = this.sanitize(V(t)), s = this.generateDataGroups(e);
1094
1094
  return this.set({
1095
1095
  data: e,
1096
1096
  dataGroups: s
@@ -1186,7 +1186,7 @@ class zt extends v {
1186
1186
  * Get the associated status for the data by checking the ranges
1187
1187
  */
1188
1188
  getStatus() {
1189
- const t = this.getOptions(), e = p(this.getDisplayData()), s = (e == null ? void 0 : e.reduce((o, r) => o + r.value, 0)) ?? 0, a = p(t, "meter", "proportional") ? s : s > 100 ? 100 : s, n = p(t, "meter", "status", "ranges");
1189
+ const t = this.getOptions(), s = p(this.getDisplayData())?.reduce((o, r) => o + r.value, 0) ?? 0, a = p(t, "meter", "proportional") ? s : s > 100 ? 100 : s, n = p(t, "meter", "status", "ranges");
1190
1190
  if (n) {
1191
1191
  const o = n.filter(
1192
1192
  (r) => r.range[0] <= a && a <= r.range[1]
@@ -1305,12 +1305,12 @@ class Ht extends v {
1305
1305
  }
1306
1306
  export {
1307
1307
  kt as AlluvialChartModel,
1308
- Ft as BoxplotChartModel,
1309
- Bt as BulletChartModel,
1308
+ Vt as BoxplotChartModel,
1309
+ Ft as BulletChartModel,
1310
1310
  v as ChartModel,
1311
1311
  Rt as ChartModelBinned,
1312
1312
  M as ChartModelCartesian,
1313
- Vt as ChoroplethModel,
1313
+ Bt as ChoroplethModel,
1314
1314
  _t as CirclePackChartModel,
1315
1315
  $t as GaugeChartModel,
1316
1316
  Lt as HeatmapModel,