@carbon/charts 1.27.2 → 1.27.3

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 CHANGED
@@ -3,6 +3,15 @@
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.3 (2026-03-11)
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
+
6
15
  ## 1.27.2 (2026-01-06)
7
16
 
8
17
  **Note:** Version bump only for package @carbon/charts
@@ -18,22 +18,40 @@ function ci(i, t, n) {
18
18
  function li(i, t) {
19
19
  return t.length < 2 ? i : It(i, ci(t, 0, -1));
20
20
  }
21
- function _i(i, t) {
22
- return t = ut(t, i), i = li(i, t), i == null || delete i[Zt(Ft(t))];
21
+ var _i = Object.prototype, ui = _i.hasOwnProperty;
22
+ function fi(i, t) {
23
+ t = ut(t, i);
24
+ var n = -1, e = t.length;
25
+ if (!e)
26
+ return !0;
27
+ for (var s = i == null || typeof i != "object" && typeof i != "function"; ++n < e; ) {
28
+ var o = t[n];
29
+ if (typeof o == "string") {
30
+ if (o === "__proto__" && !ui.call(i, "__proto__"))
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
+ }
38
+ }
39
+ var a = li(i, t);
40
+ return a == null || delete a[Zt(Ft(t))];
23
41
  }
24
- function ui(i) {
42
+ function pi(i) {
25
43
  return zt(i) ? void 0 : i;
26
44
  }
27
- var fi = 1, pi = 2, mi = 4, di = hi(function(i, t) {
45
+ var mi = 1, di = 2, xi = 4, gi = hi(function(i, t) {
28
46
  var n = {};
29
47
  if (i == null)
30
48
  return n;
31
49
  var e = !1;
32
50
  t = Vt(t, function(o) {
33
51
  return o = ut(o, i), e || (e = o.length > 1), o;
34
- }), Ht(i, Yt(i), n), e && (n = Xt(n, fi | pi | mi, ui));
52
+ }), Ht(i, Yt(i), n), e && (n = Xt(n, mi | di | xi, pi));
35
53
  for (var s = t.length; s--; )
36
- _i(n, t[s]);
54
+ fi(n, t[s]);
37
55
  return n;
38
56
  });
39
57
  function tt(i) {
@@ -42,29 +60,29 @@ function tt(i) {
42
60
  function it(i) {
43
61
  return Math.exp(i);
44
62
  }
45
- function xi(i) {
63
+ function yi(i) {
46
64
  return -Math.log(-i);
47
65
  }
48
- function gi(i) {
66
+ function vi(i) {
49
67
  return -Math.exp(-i);
50
68
  }
51
- function yi(i) {
69
+ function Ti(i) {
52
70
  return isFinite(i) ? +("1e" + i) : i < 0 ? 0 : i;
53
71
  }
54
- function vi(i) {
55
- return i === 10 ? yi : i === Math.E ? Math.exp : (t) => Math.pow(i, t);
72
+ function Di(i) {
73
+ return i === 10 ? Ti : i === Math.E ? Math.exp : (t) => Math.pow(i, t);
56
74
  }
57
- function Ti(i) {
75
+ function Oi(i) {
58
76
  return i === Math.E ? Math.log : i === 10 && Math.log10 || i === 2 && Math.log2 || (i = Math.log(i), (t) => Math.log(t) / i);
59
77
  }
60
78
  function nt(i) {
61
79
  return (t, n) => -i(-t, n);
62
80
  }
63
- function Di(i) {
81
+ function Ai(i) {
64
82
  const t = i(tt, it), n = t.domain;
65
83
  let e = 10, s, o;
66
84
  function a() {
67
- return s = Ti(e), o = vi(e), n()[0] < 0 ? (s = nt(s), o = nt(o), i(xi, gi)) : i(tt, it), t;
85
+ return s = Oi(e), o = Di(e), n()[0] < 0 ? (s = nt(s), o = nt(o), i(yi, vi)) : i(tt, it), t;
68
86
  }
69
87
  return t.base = function(r) {
70
88
  return arguments.length ? (e = +r, a()) : e;
@@ -109,7 +127,7 @@ function Di(i) {
109
127
  })), t;
110
128
  }
111
129
  function xt() {
112
- const i = Di(Gt()).domain([1, 10]);
130
+ const i = Ai(Gt()).domain([1, 10]);
113
131
  return i.copy = () => $t(i, xt()).base(i.base()), Ut.apply(i, arguments), i;
114
132
  }
115
133
  function k(i, t, n) {
@@ -164,7 +182,7 @@ L.prototype = {
164
182
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
165
183
  }
166
184
  };
167
- function Oi(i) {
185
+ function Mi(i) {
168
186
  return new L(i);
169
187
  }
170
188
  function gt(i) {
@@ -210,7 +228,7 @@ gt.prototype = {
210
228
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
211
229
  }
212
230
  };
213
- function Ai(i) {
231
+ function bi(i) {
214
232
  return new gt(i);
215
233
  }
216
234
  function yt(i) {
@@ -252,7 +270,7 @@ yt.prototype = {
252
270
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
253
271
  }
254
272
  };
255
- function Mi(i) {
273
+ function Si(i) {
256
274
  return new yt(i);
257
275
  }
258
276
  function vt(i, t) {
@@ -276,7 +294,7 @@ vt.prototype = {
276
294
  this._x.push(+i), this._y.push(+t);
277
295
  }
278
296
  };
279
- const bi = function i(t) {
297
+ const Pi = function i(t) {
280
298
  function n(e) {
281
299
  return t === 1 ? new L(e) : new vt(e, t);
282
300
  }
@@ -336,7 +354,7 @@ z.prototype = {
336
354
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
337
355
  }
338
356
  };
339
- const Si = function i(t) {
357
+ const Ei = function i(t) {
340
358
  function n(e) {
341
359
  return new z(e, t);
342
360
  }
@@ -387,7 +405,7 @@ V.prototype = {
387
405
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
388
406
  }
389
407
  };
390
- const Pi = function i(t) {
408
+ const wi = function i(t) {
391
409
  function n(e) {
392
410
  return new V(e, t);
393
411
  }
@@ -432,7 +450,7 @@ H.prototype = {
432
450
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
433
451
  }
434
452
  };
435
- const Ei = function i(t) {
453
+ const ki = function i(t) {
436
454
  function n(e) {
437
455
  return new H(e, t);
438
456
  }
@@ -498,7 +516,7 @@ Tt.prototype = {
498
516
  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;
499
517
  }
500
518
  };
501
- const wi = function i(t) {
519
+ const Ri = function i(t) {
502
520
  function n(e) {
503
521
  return t ? new Tt(e, t) : new z(e, 0);
504
522
  }
@@ -553,7 +571,7 @@ Dt.prototype = {
553
571
  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;
554
572
  }
555
573
  };
556
- const ki = function i(t) {
574
+ const Bi = function i(t) {
557
575
  function n(e) {
558
576
  return t ? new Dt(e, t) : new V(e, 0);
559
577
  }
@@ -602,7 +620,7 @@ Ot.prototype = {
602
620
  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;
603
621
  }
604
622
  };
605
- const Ri = function i(t) {
623
+ const Li = function i(t) {
606
624
  function n(e) {
607
625
  return t ? new Ot(e, t) : new H(e, 0);
608
626
  }
@@ -693,10 +711,10 @@ Mt.prototype = {
693
711
  this._context.bezierCurveTo(t, i, e, n, o, s);
694
712
  }
695
713
  };
696
- function Bi(i) {
714
+ function Ni(i) {
697
715
  return new B(i);
698
716
  }
699
- function Li(i) {
717
+ function Ci(i) {
700
718
  return new At(i);
701
719
  }
702
720
  function bt(i) {
@@ -734,7 +752,7 @@ function at(i) {
734
752
  for (o[n - 1] = (i[n] + s[n - 1]) / 2, t = 0; t < n - 1; ++t) o[t] = 2 * i[t + 1] - s[t + 1];
735
753
  return [s, o];
736
754
  }
737
- function Ni(i) {
755
+ function Ii(i) {
738
756
  return new bt(i);
739
757
  }
740
758
  function N(i, t) {
@@ -774,16 +792,16 @@ N.prototype = {
774
792
  this._x = i, this._y = t;
775
793
  }
776
794
  };
777
- function Ci(i) {
795
+ function Zi(i) {
778
796
  return new N(i, 0.5);
779
797
  }
780
- function Ii(i) {
798
+ function Fi(i) {
781
799
  return new N(i, 0);
782
800
  }
783
- function Zi(i) {
801
+ function zi(i) {
784
802
  return new N(i, 1);
785
803
  }
786
- class sn extends O {
804
+ class an extends O {
787
805
  /**
788
806
  * focal: object to zoom into
789
807
  * canvasElements: all the elements to translate and zoom on the chart area
@@ -808,7 +826,7 @@ class sn extends O {
808
826
  t.transition().duration(e.duration).ease(e.ease).attr("transform", ""), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_OUT);
809
827
  }
810
828
  }
811
- class on extends O {
829
+ class rn extends O {
812
830
  init() {
813
831
  this.documentFragment = document.createDocumentFragment();
814
832
  }
@@ -825,7 +843,7 @@ class on extends O {
825
843
  }) : (e = document.createEvent("Event"), e.initEvent(t, !1, !0)), this.documentFragment.dispatchEvent(e);
826
844
  }
827
845
  }
828
- class an extends O {
846
+ class hn extends O {
829
847
  constructor(t, n) {
830
848
  super(t, n);
831
849
  }
@@ -853,7 +871,7 @@ class an extends O {
853
871
  e.download = n, e.href = t, document.body.appendChild(e), e.click(), document.body.removeChild(e);
854
872
  }
855
873
  }
856
- class rn extends O {
874
+ class cn extends O {
857
875
  constructor() {
858
876
  super(...arguments), this.pendingTransitions = {};
859
877
  }
@@ -877,7 +895,7 @@ function S(i, t) {
877
895
  const n = +v(i) - +v(t);
878
896
  return n < 0 ? -1 : n > 0 ? 1 : n;
879
897
  }
880
- function Fi(i, t, n) {
898
+ function Vi(i, t, n) {
881
899
  const [e, s] = M(
882
900
  n?.in,
883
901
  i,
@@ -885,12 +903,12 @@ function Fi(i, t, n) {
885
903
  );
886
904
  return e.getFullYear() - s.getFullYear();
887
905
  }
888
- function zi(i, t, n) {
906
+ function Hi(i, t, n) {
889
907
  const [e, s] = M(
890
908
  n?.in,
891
909
  i,
892
910
  t
893
- ), o = S(e, s), a = Math.abs(Fi(e, s));
911
+ ), o = S(e, s), a = Math.abs(Vi(e, s));
894
912
  e.setFullYear(1584), s.setFullYear(1584);
895
913
  const r = S(e, s) === -o, h = o * (a - +r);
896
914
  return h === 0 ? 0 : h;
@@ -912,10 +930,10 @@ function X(i, t, n) {
912
930
  function St(i, t, n) {
913
931
  return X(i, t * 12, n);
914
932
  }
915
- function Vi(i, t, n) {
933
+ function Yi(i, t, n) {
916
934
  return St(i, -t, n);
917
935
  }
918
- function Hi(i, t, n) {
936
+ function Xi(i, t, n) {
919
937
  const [e, s] = M(
920
938
  n?.in,
921
939
  i,
@@ -923,38 +941,38 @@ function Hi(i, t, n) {
923
941
  ), o = e.getFullYear() - s.getFullYear(), a = e.getMonth() - s.getMonth();
924
942
  return o * 12 + a;
925
943
  }
926
- function Yi(i, t) {
944
+ function Gi(i, t) {
927
945
  const n = v(i, t?.in);
928
946
  return n.setHours(23, 59, 59, 999), n;
929
947
  }
930
- function Xi(i, t) {
948
+ function $i(i, t) {
931
949
  const n = v(i, t?.in), e = n.getMonth();
932
950
  return n.setFullYear(n.getFullYear(), e + 1, 0), n.setHours(23, 59, 59, 999), n;
933
951
  }
934
- function Gi(i, t) {
952
+ function Ui(i, t) {
935
953
  const n = v(i, t?.in);
936
- return +Yi(n, t) == +Xi(n, t);
954
+ return +Gi(n, t) == +$i(n, t);
937
955
  }
938
- function $i(i, t, n) {
956
+ function Ki(i, t, n) {
939
957
  const [e, s, o] = M(
940
958
  n?.in,
941
959
  i,
942
960
  i,
943
961
  t
944
962
  ), a = S(s, o), r = Math.abs(
945
- Hi(s, o)
963
+ Xi(s, o)
946
964
  );
947
965
  if (r < 1) return 0;
948
966
  s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - a * r);
949
967
  let h = S(s, o) === -a;
950
- Gi(e) && r === 1 && S(e, o) === 1 && (h = !1);
968
+ Ui(e) && r === 1 && S(e, o) === 1 && (h = !1);
951
969
  const l = a * (r - +h);
952
970
  return l === 0 ? 0 : l;
953
971
  }
954
- function Ui(i, t, n) {
972
+ function ji(i, t, n) {
955
973
  return X(i, -t, n);
956
974
  }
957
- function Ki(i, t, n) {
975
+ function qi(i, t, n) {
958
976
  const [e, s] = M(
959
977
  n?.in,
960
978
  i,
@@ -974,7 +992,7 @@ function Pt(i, t, n) {
974
992
  const e = v(i, n?.in);
975
993
  return isNaN(t) ? E(i, NaN) : (t && e.setDate(e.getDate() + t), e);
976
994
  }
977
- function ji(i, t, n) {
995
+ function Wi(i, t, n) {
978
996
  return Pt(i, -t, n);
979
997
  }
980
998
  function G(i) {
@@ -983,7 +1001,7 @@ function G(i) {
983
1001
  return e === 0 ? 0 : e;
984
1002
  };
985
1003
  }
986
- function qi(i, t, n) {
1004
+ function Ji(i, t, n) {
987
1005
  const [e, s] = M(
988
1006
  n?.in,
989
1007
  i,
@@ -997,7 +1015,7 @@ function Et(i, t, n) {
997
1015
  function wt(i, t, n) {
998
1016
  return Et(i, t * ft);
999
1017
  }
1000
- function Wi(i, t, n) {
1018
+ function Qi(i, t, n) {
1001
1019
  return wt(i, -t);
1002
1020
  }
1003
1021
  function kt(i, t) {
@@ -1024,7 +1042,7 @@ function F(i, t, n) {
1024
1042
  function _t(i, t, n) {
1025
1043
  return F(i, -t);
1026
1044
  }
1027
- class hn extends O {
1045
+ class ln extends O {
1028
1046
  constructor() {
1029
1047
  super(...arguments), this.scaleTypes = {
1030
1048
  top: null,
@@ -1212,9 +1230,9 @@ class hn extends O {
1212
1230
  const e = this.model.getOptions(), s = c(e, "axes", t);
1213
1231
  if (s.scaleType === p.TIME) {
1214
1232
  const o = c(e, "timeScale", "addSpaceOnEdges");
1215
- return Ji(n, o);
1233
+ return tn(n, o);
1216
1234
  } else
1217
- return Qi(n, J.paddingRatio, s.scaleType);
1235
+ return nn(n, J.paddingRatio, s.scaleType);
1218
1236
  }
1219
1237
  findVerticalAxesPositions() {
1220
1238
  const t = this.model.getOptions(), n = c(t, "axes"), e = this.isDualAxes();
@@ -1278,7 +1296,7 @@ class hn extends O {
1278
1296
  x.forEach((b) => {
1279
1297
  const { ...Bt } = b;
1280
1298
  let U = 0, K = 0;
1281
- Object.values(di(Bt, "sharedStackKey")).forEach((P) => {
1299
+ Object.values(gi(Bt, "sharedStackKey")).forEach((P) => {
1282
1300
  isNaN(P) || (P < 0 ? K += P : U += P);
1283
1301
  }), $.push([K, U]);
1284
1302
  }), m = [
@@ -1329,9 +1347,9 @@ class hn extends O {
1329
1347
  };
1330
1348
  }
1331
1349
  }
1332
- function Ji(i, t) {
1350
+ function tn(i, t) {
1333
1351
  const n = new Date(i[0]), e = new Date(i[1]);
1334
- return zi(e, n) > 1 ? [Vi(n, t), St(e, t)] : $i(e, n) > 1 ? [Ui(n, t), X(e, t)] : Ki(e, n) > 1 ? [ji(n, t), Pt(e, t)] : qi(e, n) > 1 ? [Wi(n, t), wt(e, t)] : ht(e, n) > 30 ? [
1352
+ return Hi(e, n) > 1 ? [Yi(n, t), St(e, t)] : Ki(e, n) > 1 ? [ji(n, t), X(e, t)] : qi(e, n) > 1 ? [Wi(n, t), Pt(e, t)] : Ji(e, n) > 1 ? [Qi(n, t), wt(e, t)] : ht(e, n) > 30 ? [
1335
1353
  ct(n, t * 30),
1336
1354
  Z(e, t * 30)
1337
1355
  ] : ht(e, n) > 1 ? [ct(n, t), Z(e, t)] : lt(e, n) > 15 ? [
@@ -1339,7 +1357,7 @@ function Ji(i, t) {
1339
1357
  F(e, t * 15)
1340
1358
  ] : lt(e, n) > 1 ? [_t(n, t), F(e, t)] : [n, e];
1341
1359
  }
1342
- function Qi([i, t], n, e) {
1360
+ function nn([i, t], n, e) {
1343
1361
  const o = (t - i) * n, a = t <= 0 && t + o > 0 ? 0 : t + o;
1344
1362
  let r = i >= 0 && i - o < 0 ? 0 : i - o;
1345
1363
  if (e === p.LOG && r <= 0) {
@@ -1349,27 +1367,27 @@ function Qi([i, t], n, e) {
1349
1367
  }
1350
1368
  return [r, a];
1351
1369
  }
1352
- class cn extends O {
1370
+ class _n extends O {
1353
1371
  constructor() {
1354
1372
  super(...arguments), this.curveTypes = {
1355
1373
  curveLinear: ri,
1356
1374
  curveLinearClosed: ai,
1357
- curveBasis: Oi,
1358
- curveBasisClosed: Ai,
1359
- curveBasisOpen: Mi,
1360
- curveBundle: bi,
1361
- curveCardinal: Si,
1362
- curveCardinalClosed: Pi,
1363
- curveCardinalOpen: Ei,
1364
- curveCatmullRom: wi,
1365
- curveCatmullRomClosed: ki,
1366
- curveCatmullRomOpen: Ri,
1367
- curveMonotoneX: Bi,
1368
- curveMonotoneY: Li,
1369
- curveNatural: Ni,
1370
- curveStep: Ci,
1371
- curveStepAfter: Zi,
1372
- curveStepBefore: Ii
1375
+ curveBasis: Mi,
1376
+ curveBasisClosed: bi,
1377
+ curveBasisOpen: Si,
1378
+ curveBundle: Pi,
1379
+ curveCardinal: Ei,
1380
+ curveCardinalClosed: wi,
1381
+ curveCardinalOpen: ki,
1382
+ curveCatmullRom: Ri,
1383
+ curveCatmullRomClosed: Bi,
1384
+ curveCatmullRomOpen: Li,
1385
+ curveMonotoneX: Ni,
1386
+ curveMonotoneY: Ci,
1387
+ curveNatural: Ii,
1388
+ curveStep: Zi,
1389
+ curveStepAfter: zi,
1390
+ curveStepBefore: Fi
1373
1391
  };
1374
1392
  }
1375
1393
  getD3Curve() {
@@ -1384,7 +1402,7 @@ class cn extends O {
1384
1402
  return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`), this.curveTypes.curveLinear;
1385
1403
  }
1386
1404
  }
1387
- class ln extends O {
1405
+ class un extends O {
1388
1406
  isZoomBarEnabled() {
1389
1407
  if (!this.services.cartesianScales || !c(this.model.getOptions(), "zoomBar", "top", "enabled"))
1390
1408
  return !1;
@@ -1492,14 +1510,14 @@ class ln extends O {
1492
1510
  }
1493
1511
  }
1494
1512
  export {
1495
- sn as C,
1496
- on as E,
1497
- an as F,
1498
- rn as T,
1499
- ln as Z,
1500
- cn as a,
1513
+ an as C,
1514
+ rn as E,
1515
+ hn as F,
1516
+ cn as T,
1517
+ un as Z,
1518
+ _n as a,
1501
1519
  ci as b,
1502
- hn as c,
1520
+ ln as c,
1503
1521
  dt as f
1504
1522
  };
1505
- //# sourceMappingURL=index-CQFVDkrk.mjs.map
1523
+ //# sourceMappingURL=index-DVamZWt0.mjs.map