@carbon/charts 1.11.3 → 1.11.4

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 (41) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{_baseEach-477c04db.js → _baseEach-326db134.js} +2 -2
  3. package/dist/{_baseEach-477c04db.js.map → _baseEach-326db134.js.map} +1 -1
  4. package/dist/{_baseEach-05847c57.mjs → _baseEach-9b6a12fa.mjs} +2 -2
  5. package/dist/{_baseEach-05847c57.mjs.map → _baseEach-9b6a12fa.mjs.map} +1 -1
  6. package/dist/angle-utils-264ed176.mjs +840 -0
  7. package/dist/angle-utils-264ed176.mjs.map +1 -0
  8. package/dist/angle-utils-ccc0d890.js +3 -0
  9. package/dist/angle-utils-ccc0d890.js.map +1 -0
  10. package/dist/{choropleth-449cf25e.mjs → choropleth-141685a0.mjs} +271 -268
  11. package/dist/{choropleth-449cf25e.mjs.map → choropleth-141685a0.mjs.map} +1 -1
  12. package/dist/{choropleth-db3ae9eb.js → choropleth-b1a3729f.js} +8 -8
  13. package/dist/{choropleth-db3ae9eb.js.map → choropleth-b1a3729f.js.map} +1 -1
  14. package/dist/color-scale-utils-2cd523be.js +2 -0
  15. package/dist/color-scale-utils-2cd523be.js.map +1 -0
  16. package/dist/color-scale-utils-b9604b2c.mjs +3335 -0
  17. package/dist/color-scale-utils-b9604b2c.mjs.map +1 -0
  18. package/dist/components/index.js +1 -1
  19. package/dist/components/index.mjs +4 -4
  20. package/dist/demo/index.js +1 -1
  21. package/dist/demo/index.js.map +1 -1
  22. package/dist/demo/index.mjs +6 -6
  23. package/dist/{index-e425a7b5.mjs → index-4b5d1e49.mjs} +3 -3
  24. package/dist/{index-e425a7b5.mjs.map → index-4b5d1e49.mjs.map} +1 -1
  25. package/dist/{index-4203ca23.js → index-eace9da9.js} +2 -2
  26. package/dist/{index-4203ca23.js.map → index-eace9da9.js.map} +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/index.mjs +38 -38
  29. package/dist/model/index.js +1 -1
  30. package/dist/model/index.mjs +34 -34
  31. package/dist/services/index.js +1 -1
  32. package/dist/services/index.mjs +10 -10
  33. package/package.json +3 -3
  34. package/dist/angle-utils-512bc5cd.js +0 -2
  35. package/dist/angle-utils-512bc5cd.js.map +0 -1
  36. package/dist/angle-utils-7255d1d9.mjs +0 -387
  37. package/dist/angle-utils-7255d1d9.mjs.map +0 -1
  38. package/dist/color-scale-utils-222feda6.mjs +0 -3815
  39. package/dist/color-scale-utils-222feda6.mjs.map +0 -1
  40. package/dist/color-scale-utils-79786095.js +0 -3
  41. package/dist/color-scale-utils-79786095.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { U as z, W as F, ad as U, g as u, A as S, f as A, z as j, ab as M, N as k, ae as L, h as _, w as V, a2 as K, a3 as y, P as R, a0 as x } from "../color-scale-utils-222feda6.mjs";
2
- import { bin as Z, stack as G, 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";
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-05847c57.mjs";
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 } = S.items.status, s = this.getDataGroups(t), { groupMapsTo: a } = this.getOptions().data;
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(A(t)), s = this.generateDataGroups(e);
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 } = S.items.status;
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}`, b = this.aggregateBinDataByGroup(d);
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: b[C] || 0,
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 G().keys(s)(o).map((i, r) => Object.keys(i).filter((n) => !isNaN(n)).map((n) => {
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 ? G().offset(H) : G()).keys(i)(r).map((l, c) => Object.keys(l).filter((p) => !isNaN(p)).map((p) => {
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 } = S.items.status, a = this.getDataGroups(), o = a.some((c) => c.status === s), i = a.filter((c) => c.status === e);
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 } = S.items.status, o = this.getOptions(), i = M(t.map((n) => n[e]));
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 T extends m {
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(A(t)) : this.getDisplayData();
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 T {
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 T {
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, b = [], C = [];
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 ? b.push(v) : C.push(v);
546
- l.outliers = b;
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 T {
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 T {
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] = A(o);
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(A(t)), s = this.generateDataGroups(e);
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 Tt extends T {
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 bt extends m {
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 St extends T {
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 At extends m {
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 Gt extends m {
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
- Tt as ChartModelBinned,
1095
- T as ChartModelCartesian,
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
- bt as MeterChartModel,
1100
+ Tt as MeterChartModel,
1101
1101
  vt as PieChartModel,
1102
- St as RadarChartModel,
1102
+ bt as RadarChartModel,
1103
1103
  Ot as TreeChartModel,
1104
- At as TreemapChartModel,
1105
- Gt as WordCloudModel
1104
+ Gt as TreemapChartModel,
1105
+ At as WordCloudModel
1106
1106
  };
1107
1107
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../color-scale-utils-79786095.js"),i=require("../angle-utils-512bc5cd.js"),a=require("../index-4203ca23.js");require("d3");require("../enums-aa2efd99.js");require("../index-d865d500.js");exports.TIME_INTERVALS=e.TIME_INTERVALS;exports.computeTimeIntervalName=e.computeTimeIntervalName;exports.formatDateTillMilliSeconds=e.formatDateTillMilliSeconds;exports.formatTick=e.formatTick;exports.getColorScale=e.getColorScale;exports.getDomain=e.getDomain;exports.getTimeformats=e.getTimeformats;exports.isTickPrimary=e.isTickPrimary;exports.DOMUtils=i.DOMUtils;exports.GradientUtils=i.GradientUtils;exports.Service=i.Service;exports.degToRad=i.degToRad;exports.distanceBetweenPointOnCircAndVerticalDiameter=i.distanceBetweenPointOnCircAndVerticalDiameter;exports.polarToCartesianCoords=i.polarToCartesianCoords;exports.radToDeg=i.radToDeg;exports.radialLabelPlacement=i.radialLabelPlacement;exports.CanvasZoom=a.CanvasZoom;exports.CartesianScales=a.CartesianScales;exports.Curves=a.Curves;exports.Events=a.Events;exports.Files=a.Files;exports.Transitions=a.Transitions;exports.Zoom=a.Zoom;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../color-scale-utils-2cd523be.js"),i=require("../angle-utils-ccc0d890.js"),a=require("../index-eace9da9.js");require("d3");require("../enums-aa2efd99.js");require("../index-d865d500.js");exports.TIME_INTERVALS=e.TIME_INTERVALS;exports.computeTimeIntervalName=e.computeTimeIntervalName;exports.formatDateTillMilliSeconds=e.formatDateTillMilliSeconds;exports.formatTick=e.formatTick;exports.getColorScale=e.getColorScale;exports.getDomain=e.getDomain;exports.getTimeformats=e.getTimeformats;exports.isTickPrimary=e.isTickPrimary;exports.DOMUtils=i.DOMUtils;exports.GradientUtils=i.GradientUtils;exports.Service=i.Service;exports.degToRad=i.degToRad;exports.distanceBetweenPointOnCircAndVerticalDiameter=i.distanceBetweenPointOnCircAndVerticalDiameter;exports.polarToCartesianCoords=i.polarToCartesianCoords;exports.radToDeg=i.radToDeg;exports.radialLabelPlacement=i.radialLabelPlacement;exports.CanvasZoom=a.CanvasZoom;exports.CartesianScales=a.CartesianScales;exports.Curves=a.Curves;exports.Events=a.Events;exports.Files=a.Files;exports.Transitions=a.Transitions;exports.Zoom=a.Zoom;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import { T as i, M as t, N as m, O as l, P as n, Q as T, R as c, S as d } from "../color-scale-utils-222feda6.mjs";
2
- import { D as C, G as S, S as f, d as D, a as g, p as v, b as E, r as M } from "../angle-utils-7255d1d9.mjs";
3
- import { C as b, a as x, b as I, E as N, F as O, T as R, Z } from "../index-e425a7b5.mjs";
1
+ import { T as i, L as t, M as m, N as l, O as n, P as T, Q as c, R as d } from "../color-scale-utils-b9604b2c.mjs";
2
+ import { D as C, G as f, S as D, d as S, a as g, p as v, b as E, r as M } from "../angle-utils-264ed176.mjs";
3
+ import { C as b, a as x, b as I, E as L, F as N, T as O, Z as R } from "../index-4b5d1e49.mjs";
4
4
  import "d3";
5
5
  import "../enums-a96ef472.mjs";
6
6
  import "../index-becfb567.mjs";
@@ -9,15 +9,15 @@ export {
9
9
  x as CartesianScales,
10
10
  I as Curves,
11
11
  C as DOMUtils,
12
- N as Events,
13
- O as Files,
14
- S as GradientUtils,
15
- f as Service,
12
+ L as Events,
13
+ N as Files,
14
+ f as GradientUtils,
15
+ D as Service,
16
16
  i as TIME_INTERVALS,
17
- R as Transitions,
18
- Z as Zoom,
17
+ O as Transitions,
18
+ R as Zoom,
19
19
  t as computeTimeIntervalName,
20
- D as degToRad,
20
+ S as degToRad,
21
21
  g as distanceBetweenPointOnCircAndVerticalDiameter,
22
22
  m as formatDateTillMilliSeconds,
23
23
  l as formatTick,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "1.11.3",
3
+ "version": "1.11.4",
4
4
  "description": "Carbon Charts component library",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -90,7 +90,7 @@
90
90
  "d3-cloud": "^1.2.5",
91
91
  "d3-sankey": "^0.12.3",
92
92
  "date-fns": "^2.30.0",
93
- "dom-to-image-more": "^3.1.6",
93
+ "html-to-image": "^1.11.11",
94
94
  "lodash-es": "^4.17.21",
95
95
  "topojson-client": "^3.1.0",
96
96
  "tslib": "^2.6.0"
@@ -192,5 +192,5 @@
192
192
  "url": "https://github.com/theiliad"
193
193
  }
194
194
  ],
195
- "gitHead": "6c5676b549135ca9eab19cff1f2f1f61f792c335"
195
+ "gitHead": "cb00c7db04f1add0754b99336bfd98ad1967a84f"
196
196
  }
@@ -1,2 +0,0 @@
1
- "use strict";const h=require("d3"),f=require("./color-scale-utils-79786095.js"),a=require("./enums-aa2efd99.js");var z=/\s/;function P(s){for(var e=s.length;e--&&z.test(s.charAt(e)););return e}var k=/^\s+/;function V(s){return s&&s.slice(0,P(s)+1).replace(k,"")}var H=0/0,$=/^[-+]0x[0-9a-f]+$/i,q=/^0b[01]+$/i,W=/^0o[0-7]+$/i,U=parseInt;function w(s){if(typeof s=="number")return s;if(f.isSymbol(s))return H;if(f.isObject(s)){var e=typeof s.valueOf=="function"?s.valueOf():s;s=f.isObject(e)?e+"":e}if(typeof s!="string")return s===0?s:+s;s=V(s);var t=q.test(s);return t||W.test(s)?U(s.slice(2),t?2:8):$.test(s)?H:+s}var _=function(){return f.root.Date.now()};const v=_;var j="Expected a function",J=Math.max,X=Math.min;function L(s,e,t){var n,i,o,r,c,u,g=0,y=!1,m=!1,d=!0;if(typeof s!="function")throw new TypeError(j);e=w(e)||0,f.isObject(t)&&(y=!!t.leading,m="maxWait"in t,o=m?J(w(t.maxWait)||0,e):o,d="trailing"in t?!!t.trailing:d);function p(l){var x=n,b=i;return n=i=void 0,g=l,r=s.apply(b,x),r}function S(l){return g=l,c=setTimeout(C,e),y?p(l):r}function T(l){var x=l-u,b=l-g,F=e-x;return m?X(F,o-b):F}function M(l){var x=l-u,b=l-g;return u===void 0||x>=e||x<0||m&&b>=o}function C(){var l=v();if(M(l))return R(l);c=setTimeout(C,T(l))}function R(l){return c=void 0,d&&n?p(l):(n=i=void 0,r)}function O(){c!==void 0&&clearTimeout(c),g=0,n=u=i=c=void 0}function G(){return c===void 0?r:R(v())}function I(){var l=v(),x=M(l);if(n=arguments,i=this,u=l,x){if(c===void 0)return S(u);if(m)return clearTimeout(c),c=setTimeout(C,e),p(u)}return c===void 0&&(c=setTimeout(C,e)),r}return I.cancel=O,I.flush=G,I}class A{constructor(e,t){this.model=e,this.services=t,this.init()}init(){}update(){}setModel(e){this.model=e}setServices(e){this.services=e}}const Y="DONT_STYLE_ME_css_styles_verifier";class D extends A{constructor(e,t){super(e,t),this.chartID=""}static getHTMLElementSize(e){return{width:e.clientWidth,height:e.clientHeight}}static getSVGElementSize(e,t={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){e.attr||(e=h.select(e));const n={width:0,height:0},i=d=>{d&&Object.keys(n).forEach(p=>{if(d[p]){const S=d[p],T=parseFloat(S);S&&T>n[p]&&(""+S).indexOf("%")===-1&&(n[p]=T)}})},o={width:e.attr("width"),height:e.attr("height")},r=e.node();let c,u,g,y;try{typeof r.getBBox=="function"&&(c=r.getBBox(),u={width:c.width,height:c.height})}catch(d){console.error(d)}try{typeof(r==null?void 0:r.getBoundingClientRect)=="function"&&(g=r.getBoundingClientRect(),y={width:g.width,height:g.height})}catch(d){console.error(d)}let m;if(r instanceof SVGSVGElement&&(m={width:r.clientWidth,height:r.clientHeight}),t){if(t.useAttrs&&(i(o),n.width>0&&n.height>0))return n;if(t.useClientDimensions&&(i(m),n.width>0&&n.height>0))return m;if(t.useBBox&&(i(u),n.width>0&&n.height>0))return u;if(t.useBoundingRect&&(i(y),n.width>0&&n.height>0))return y}try{const d={width:f.getProperty(e.node(),"width","baseVal","value"),height:f.getProperty(e.node(),"height","baseVal","value")};i(d)}catch{i(m),i(u),i(o)}return n}static appendOrSelect(e,t){const n=e.select(`${t}`);if(n.empty()){let i=t.split("#"),o,r;return i.length===2?(o=i[0],i=i[1].split("."),r=i[0]):(i=t.split("."),o=i[0]),e.append(o).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.styleHolderElement(),this.initializeID(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(e){return`chart-${this.chartID}-${e}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const e=this.model.getOptions(),t=f.getProperty(e,"style","prefix"),n=h.select(this.getHolder()).append("div").classed(`${f.carbonPrefix}--${t}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class",Y),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const e=this.getHolder(),{width:t,height:n,theme:i}=this.model.getOptions();t!==this.width&&(e.style.width=t,this.width=t),n!==this.height&&(e.style.height=n,this.height=n),h.select(this.getHolder()).classed(`${f.carbonPrefix}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const e=this,t=this.getHolder(),n=h.select(t);n.classed("filled",!0),f.domToImage.toJpeg(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(t).getPropertyValue("background-color"):void 0,quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var o;(o=e.services.files)==null||o.downloadImage(i,"myChart.jpg"),n.classed("filled",!1)})}exportToPNG(){const e=this,t=this.getHolder(),n=h.select(t);n.classed("filled",!0),f.domToImage.toPng(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(t).getPropertyValue("background-color"):void 0,quality:1,filter:i=>!(i.classList&&i.classList.contains("cds--cc--toolbar"))}).then(function(i){var o;(o=e.services.files)==null||o.downloadImage(i,"myChart.png"),n.classed("filled",!1)}).catch(function(i){console.error("oops, something went wrong!",i)})}toggleFullscreen(){const e=this.getHolder();h.select(e).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const e=h.select(this.getHolder()),t=e.classed("fullscreen");e.classed("fullscreen",!t)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=D.getSVGElementSize(h.select(this.mainContainer),{useBBox:!0}),t=h.select(this.mainContainer).attr("class"),n=h.select(this.mainContainer).selectAll(`.${t} > svg`);let i=0;n.nodes().forEach(function(o){i+=Number(D.getSVGElementSize(h.select(o),{useBBox:!0}).height)}),i<=e?h.select(this.mainContainer).attr("height",i):h.select(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const e=this.getHolder();e&&h.select(e).on("mouseover",()=>{var t;(t=this.services.events)==null||t.dispatchEvent(a.Events.Chart.MOUSEOVER)}).on("mouseout",()=>{var t;(t=this.services.events)==null||t.dispatchEvent(a.Events.Chart.MOUSEOUT)})}addResizeListener(){const e=this.getHolder();if(!e)return;let t=e.clientWidth,n=e.clientHeight;const i=L(()=>{var r;e&&(Math.abs(t-e.clientWidth)>1||Math.abs(n-e.clientHeight)>1)&&(t=e.clientWidth,n=e.clientHeight,(r=this.services.events)==null||r.dispatchEvent(a.Events.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(e)}}class B extends A{static appendOrUpdateLinearGradient(e){let t=e.svg.select(`defs linearGradient#${e.id}`);t.empty()&&(t=e.svg.append("defs").append("linearGradient").attr("id",e.id).attr("x1",e.x1).attr("x2",e.x2).attr("y1",e.y1).attr("y2",e.y2)),t.selectAll("stop").remove(),t.selectAll("stop").data(e.stops).enter().append("stop").attr("offset",n=>n.offset).style("stop-color",n=>n.color).style("stop-opacity",n=>n.opacity)}static getOffsetRatio(e){return(Math.abs(e[1])*100/Math.abs(e[0]-e[1])).toFixed(2)+"%"}static getStops(e,t){const n=e[0]<0&&e[1]>0;let i=[{offset:"0%",color:t,opacity:"0.6"},{offset:"80%",color:t,opacity:"0"}];return n&&(i=[{offset:"0%",color:t,opacity:"0.6"},{offset:B.getOffsetRatio(e),color:t,opacity:"0"},{offset:"100%",color:t,opacity:"0.6"}]),i}}function Z(s){const e=Q(N(s),360);return E(e,[0,10])||E(e,[350,0])?{textAnchor:a.TextAnchor.START,dominantBaseline:a.DominantBaseline.MIDDLE}:E(e,[10,80])?{textAnchor:a.TextAnchor.START,dominantBaseline:a.DominantBaseline.HANGING}:E(e,[80,100])?{textAnchor:a.TextAnchor.MIDDLE,dominantBaseline:a.DominantBaseline.HANGING}:E(e,[100,170])?{textAnchor:a.TextAnchor.END,dominantBaseline:a.DominantBaseline.HANGING}:E(e,[170,190])?{textAnchor:a.TextAnchor.END,dominantBaseline:a.DominantBaseline.MIDDLE}:E(e,[190,260])?{textAnchor:a.TextAnchor.END,dominantBaseline:a.DominantBaseline.BASELINE}:E(e,[260,280])?{textAnchor:a.TextAnchor.MIDDLE,dominantBaseline:a.DominantBaseline.BASELINE}:{textAnchor:a.TextAnchor.START,dominantBaseline:a.DominantBaseline.BASELINE}}function Q(s,e){return(s%e+e)%e}function E(s,[e,t]){return s>=e&&s<=t}function N(s){return s*(180/Math.PI)}function K(s){return s*(Math.PI/180)}function ee(s,e,t={x:0,y:0}){const n=e*Math.cos(s)+t.x,i=e*Math.sin(s)+t.y;return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}}function te(s,e){return e*Math.sin(s-Math.PI/2)}exports.DOMUtils=D;exports.GradientUtils=B;exports.Service=A;exports.debounce=L;exports.degToRad=K;exports.distanceBetweenPointOnCircAndVerticalDiameter=te;exports.polarToCartesianCoords=ee;exports.radToDeg=N;exports.radialLabelPlacement=Z;exports.toNumber=w;
2
- //# sourceMappingURL=angle-utils-512bc5cd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"angle-utils-512bc5cd.js","sources":["../node_modules/lodash-es/_trimmedEndIndex.js","../node_modules/lodash-es/_baseTrim.js","../node_modules/lodash-es/toNumber.js","../node_modules/lodash-es/now.js","../node_modules/lodash-es/debounce.js","../src/services/service.ts","../src/services/essentials/dom-utils.ts","../src/services/essentials/gradient-utils.ts","../src/services/angle-utils.ts"],"sourcesContent":["/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import type { ChartModel } from '@/model/model'\nimport type { Services } from '@/interfaces/services'\n\nexport class Service {\n\tprotected model: ChartModel\n\tprotected services: Services\n\n\tconstructor(model: ChartModel, services: Services) {\n\t\tthis.model = model\n\t\tthis.services = services\n\n\t\tthis.init()\n\t}\n\n\tinit() {\n\t\t// do nothing.\n\t}\n\n\tupdate() {\n\t\t// do nothing.\n\t}\n\n\t// Used to pass down information to the components\n\tsetModel(newObj: ChartModel) {\n\t\tthis.model = newObj\n\t}\n\n\t// Used to pass down services to the components\n\tsetServices(newObj: Services) {\n\t\tthis.services = newObj\n\t}\n}\n","import { select, type Selection } from 'd3'\nimport domToImage from 'dom-to-image-more'\nimport { debounce, getProperty } from '@/tools'\nimport { carbonPrefix } from '@/configuration-non-customizable' // CSS prefix\nimport type { ChartModel } from '@/model/model'\nimport { Service } from '@/services/service'\nimport { Events } from '@/interfaces/enums'\n\nconst CSS_VERIFIER_ELEMENT_CLASSNAME = 'DONT_STYLE_ME_css_styles_verifier'\n\n// Functions like validateAndSetDimensions() may return strings or numbers\nexport interface Dimensions {\n height: number\n width: number\n}\n\nexport interface getSVGElementSizeOptions {\n\tuseAttrs?: boolean\n\tuseClientDimensions?: boolean\n\tuseBBox?: boolean\n\tuseBoundingRect?: boolean\n}\n\nexport class DOMUtils extends Service {\n\tprivate chartID = '' // initialized in initializeID() called by init()\n\n\tconstructor(model: ChartModel, services: any) {\n\t\tsuper(model, services)\n\t}\n\n\tstatic getHTMLElementSize(element: HTMLElement) {\n\t\treturn {\n\t\t\twidth: element.clientWidth,\n\t\t\theight: element.clientHeight\n\t\t}\n\t}\n\n\tstatic getSVGElementSize(\n\t\tsvgSelector: Selection<SVGGraphicsElement, any, Element, any>,\n\t\toptions: getSVGElementSizeOptions = {\n\t\t\tuseAttrs: false,\n\t\t\tuseClientDimensions: false,\n\t\t\tuseBBox: false,\n\t\t\tuseBoundingRect: false\n\t\t}\n\t) {\n\t\tif (!svgSelector.attr) {\n\t\t\tsvgSelector = select<SVGGraphicsElement, any>(svgSelector as any) // issue with @types/d3 - select can handle Selection parameters just fine\n\t\t}\n\n\t\tconst finalDimensions = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t}\n\n\t\t// Dimensions can be width and height as numbers or strings\n\t\tconst validateAndSetDimensions = (dimensions: any) => {\n\t\t\tif (dimensions) {\n\t\t\t\tObject.keys(finalDimensions).forEach((dimensionKey: 'width' | 'height') => {\n\t\t\t\t\tif (dimensions[dimensionKey]) {\n\t\t\t\t\t\tconst dimension = dimensions[dimensionKey]\n\t\t\t\t\t\tconst dimensionNumber = parseFloat(dimension)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdimension &&\n\t\t\t\t\t\t\tdimensionNumber > finalDimensions[dimensionKey] &&\n\t\t\t\t\t\t\t('' + dimension).indexOf('%') === -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfinalDimensions[dimensionKey] = dimensionNumber\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst attrDimensions = {\n\t\t\twidth: svgSelector.attr('width'),\n\t\t\theight: svgSelector.attr('height')\n\t\t}\n\n\t\tconst svgElement = svgSelector.node()\n\n\t\tlet bbox: DOMRect,\n\t\t\tbboxDimensions: Dimensions,\n\t\t\tboundingRect: DOMRect,\n\t\t\tboundingRectDimensions: Dimensions\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have bounding boxes (eg <defs>, <title>, <styles>)\n\t\t\tif (typeof svgElement.getBBox === 'function') {\n\t\t\t\tbbox = svgElement.getBBox()\n\t\t\t\tbboxDimensions = {\n\t\t\t\t\twidth: bbox.width,\n\t\t\t\t\theight: bbox.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have...\n\t\t\tif (typeof svgElement?.getBoundingClientRect === 'function') {\n\t\t\t\tboundingRect = svgElement.getBoundingClientRect()\n\t\t\t\tboundingRectDimensions = {\n\t\t\t\t\twidth: boundingRect.width,\n\t\t\t\t\theight: boundingRect.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\t// Not all SVG graphics elements have...\n\t\tlet clientDimensions: Dimensions\n\t\tif (svgElement instanceof SVGSVGElement) {\n\t\t\tclientDimensions = {\n\t\t\t\twidth: svgElement.clientWidth,\n\t\t\t\theight: svgElement.clientHeight\n\t\t\t}\n\t\t}\n\n\t\t// If both attribute values are numbers\n\t\t// And not percentages or NaN\n\t\tif (options) {\n\t\t\tif (options.useAttrs) {\n\t\t\t\tvalidateAndSetDimensions(attrDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn finalDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useClientDimensions) {\n\t\t\t\tvalidateAndSetDimensions(clientDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn clientDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBBox) {\n\t\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn bboxDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBoundingRect) {\n\t\t\t\tvalidateAndSetDimensions(boundingRectDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn boundingRectDimensions\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst nativeDimensions = {\n\t\t\t\twidth: getProperty(svgSelector.node(), 'width', 'baseVal', 'value'),\n\t\t\t\theight: getProperty(svgSelector.node(), 'height', 'baseVal', 'value')\n\t\t\t}\n\n\t\t\tvalidateAndSetDimensions(nativeDimensions)\n\t\t} catch (e) {\n\t\t\tvalidateAndSetDimensions(clientDimensions)\n\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\t\t\tvalidateAndSetDimensions(attrDimensions)\n\t\t}\n\t\treturn finalDimensions\n\t}\n\n\tstatic appendOrSelect(parent: Selection<SVGElement | HTMLDivElement, any, Element, any>, query: string) {\n\t\tconst selection = parent.select(`${query}`)\n\n\t\tif (selection.empty()) {\n\t\t\t// see if there is an id\n\t\t\tlet querySections = query.split('#')\n\t\t\tlet elementToAppend: any\n\t\t\tlet id: string\n\t\t\t// if there is an id\n\t\t\tif (querySections.length === 2) {\n\t\t\t\t// take out the element to append\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t\t// split it by classes\n\t\t\t\tquerySections = querySections[1].split('.')\n\t\t\t\t// the first string is the id\n\t\t\t\tid = querySections[0]\n\t\t\t} else {\n\t\t\t\tquerySections = query.split('.')\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t}\n\n\t\t\treturn parent\n\t\t\t\t.append(elementToAppend)\n\t\t\t\t.attr('id', id)\n\t\t\t\t.attr('class', querySections.slice(1).join(' '))\n\t\t}\n\n\t\treturn selection\n\t}\n\n\tprotected mainContainer: HTMLDivElement\n\tprotected width: string\n\tprotected height: string\n\n\tinit() {\n\t\t// Add width & height to the chart holder if necessary, and add a classname\n\t\tthis.styleHolderElement()\n\n\t\t// Initialize chart ID\n\t\tthis.initializeID()\n\n\t\tthis.addMainContainer()\n\n\t\tif (this.model.getOptions().resizable) {\n\t\t\tthis.addResizeListener()\n\t\t}\n\n\t\tthis.addHolderListeners()\n\n\t\tthis.handleFullscreenChange()\n\t}\n\n\tgetChartID() {\n\t\treturn this.chartID\n\t}\n\n\tgenerateElementIDString(originalID: string | number) {\n\t\treturn `chart-${this.chartID}-${originalID}`\n\t}\n\n\tprivate initializeID() {\n\t\tthis.chartID = Math.floor((1 + Math.random()) * 0x1000000000000).toString(16)\n\t}\n\n\taddMainContainer() {\n\t\tconst options = this.model.getOptions()\n\t\tconst chartsprefix = getProperty(options, 'style', 'prefix')\n\n\t\tconst mainContainer = select(this.getHolder())\n\t\t\t.append('div')\n\t\t\t.classed(`${carbonPrefix}--${chartsprefix}--chart-wrapper`, true)\n\t\t\t.attr('id', `chart-${this.getChartID()}`)\n\t\t\t.style('height', '100%')\n\t\t\t.style('width', '100%')\n\n\t\tmainContainer.append('g').attr('class', CSS_VERIFIER_ELEMENT_CLASSNAME)\n\n\t\tthis.mainContainer = mainContainer.node()\n\t}\n\n\tupdate() {\n\t\tthis.styleHolderElement()\n\t}\n\n\tstyleHolderElement() {\n\t\tconst holderElement = this.getHolder() as HTMLElement\n\n\t\t// In order for resize events to not clash with these updates\n\t\t// We'll check if the width & height values passed in options\n\t\t// Have changed, before setting them to the holder\n\t\tconst { width, height, theme } = this.model.getOptions()\n\t\tif (width !== this.width) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.width = width\n\n\t\t\tthis.width = width\n\t\t}\n\n\t\tif (height !== this.height) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.height = height\n\n\t\t\tthis.height = height\n\t\t}\n\n\t\t// Add class to chart holder\n\t\tselect(this.getHolder())\n\t\t\t.classed(`${carbonPrefix}--chart-holder`, true)\n\t\t\t.attr('data-carbon-theme', theme)\n\t}\n\n\tgetHolder() {\n\t\treturn this.model.get('holder')\n\t}\n\n\texportToJPG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toJpeg(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: any) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.jpg')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t}\n\n\texportToPNG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toPng(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: HTMLElement) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.png')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t\t\t.catch(function (error: Error) {\n\t\t\t\tconsole.error('oops, something went wrong!', error)\n\t\t\t})\n\t}\n\n\ttoggleFullscreen() {\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\n\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\tif (\n\t\t\tisFullScreen &&\n\t\t\t(document.fullscreenElement ||\n\t\t\t\tdocument['webkitFullscreenElement'] ||\n\t\t\t\tdocument['mozFullScreenElement'] ||\n\t\t\t\tdocument['msFullscreenElement'])\n\t\t) {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (document.exitFullscreen) {\n\t\t\t\tdocument.exitFullscreen()\n\t\t\t} else if (document['webkitExitFullscreen']) {\n\t\t\t\tdocument['webkitExitFullscreen']()\n\t\t\t} else if (document['mozCancelFullScreen']) {\n\t\t\t\tdocument['mozCancelFullScreen']()\n\t\t\t} else if (document['msExitFullscreen']) {\n\t\t\t\tdocument['msExitFullscreen']()\n\t\t\t}\n\t\t} else {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (holder.requestFullscreen) {\n\t\t\t\tholder.requestFullscreen()\n\t\t\t} else if (holder.webkitRequestFullscreen) {\n\t\t\t\tholder.webkitRequestFullscreen()\n\t\t\t} else if (holder.mozRequestFullScreen) {\n\t\t\t\tholder.mozRequestFullScreen()\n\t\t\t} else if (holder.msRequestFullscreen) {\n\t\t\t\tholder.msRequestFullscreen()\n\t\t\t}\n\t\t}\n\t}\n\n\thandleFullscreenChange() {\n\t\tdocument.addEventListener('fullscreenchange', () => {\n\t\t\tconst holderSelection = select(this.getHolder())\n\t\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\t\t// Toggle the `fullscreen` classname\n\t\t\tholderSelection.classed('fullscreen', !isFullScreen)\n\t\t})\n\t}\n\n\tsetSVGMaxHeight() {\n\t\t// if there is a set height on the holder, leave the chart svg height at 100%\n\t\tif (!this.model.getOptions().height) {\n\t\t\tconst { height: chartHeight } = DOMUtils.getSVGElementSize(\n\t\t\t\tselect(this.mainContainer) as any,\n\t\t\t\t{\n\t\t\t\t\tuseBBox: true\n\t\t\t\t}\n\t\t\t)\n\t\t\tconst chartSVGSelector = select(this.mainContainer).attr('class')\n\t\t\tconst children = select(this.mainContainer).selectAll(`.${chartSVGSelector} > svg`)\n\n\t\t\t// get the height of the children SVGs (spacers, titles, etc)\n\t\t\tlet childrenHeight = 0\n\t\t\tchildren.nodes().forEach(function (childSVG) {\n\t\t\t\tchildrenHeight += Number(\n\t\t\t\t\tDOMUtils.getSVGElementSize(select<SVGGraphicsElement, any>(childSVG as any), {\n\t\t\t\t\t\tuseBBox: true\n\t\t\t\t\t}).height\n\t\t\t\t)\n\t\t\t})\n\n\t\t\t// set the chart svg height to the children height\n\t\t\t// forcing the chart not to take up any more space than it requires\n\t\t\tchildrenHeight <= chartHeight\n\t\t\t\t? select(this.mainContainer).attr('height', childrenHeight)\n\t\t\t\t: select(this.mainContainer).attr('height', '100%')\n\t\t}\n\t}\n\n\tgetMainContainer() {\n\t\treturn this.mainContainer\n\t}\n\n\taddHolderListeners() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\tselect(holder)\n\t\t\t.on('mouseover', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOVER)\n\t\t\t})\n\t\t\t.on('mouseout', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOUT)\n\t\t\t})\n\t}\n\n\taddResizeListener() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\t// Grab current dimensions of the chart holder\n\t\tlet containerWidth = holder.clientWidth\n\t\tlet containerHeight = holder.clientHeight\n\n\t\t// The resize callback function\n\t\tconst resizeCallback = debounce(() => {\n\t\t\tif (!holder) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tMath.abs(containerWidth - holder.clientWidth) > 1 ||\n\t\t\t\tMath.abs(containerHeight - holder.clientHeight) > 1\n\t\t\t) {\n\t\t\t\tcontainerWidth = holder.clientWidth\n\t\t\t\tcontainerHeight = holder.clientHeight\n\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.RESIZE)\n\t\t\t}\n\t\t}, 12.5)\n\n\t\t// Observe the behaviour of resizing on the holder\n\t\tconst resizeObserver = new ResizeObserver(resizeCallback)\n\t\tresizeObserver.observe(holder)\n\t}\n}\n","import { Service } from '@/services/service'\n\nexport class GradientUtils extends Service {\n\tstatic appendOrUpdateLinearGradient(configs: any) {\n\t\tlet lg = configs.svg.select(`defs linearGradient#${configs.id}`)\n\t\tif (lg.empty()) {\n\t\t\tlg = configs.svg\n\t\t\t\t.append('defs')\n\t\t\t\t.append('linearGradient')\n\t\t\t\t.attr('id', configs.id)\n\t\t\t\t.attr('x1', configs.x1)\n\t\t\t\t.attr('x2', configs.x2)\n\t\t\t\t.attr('y1', configs.y1)\n\t\t\t\t.attr('y2', configs.y2)\n\t\t}\n\n\t\tlg.selectAll('stop').remove()\n\t\tlg.selectAll('stop')\n\t\t\t.data(configs.stops)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (d: any) => d.offset)\n\t\t\t.style('stop-color', (d: any) => d.color)\n\t\t\t.style('stop-opacity', (d: any) => d.opacity)\n\t}\n\n\tstatic getOffsetRatio(domain: any) {\n\t\tconst offsetRatio =\n\t\t\t((Math.abs(domain[1]) * 100) / Math.abs(domain[0] - domain[1])).toFixed(2) + '%'\n\t\treturn offsetRatio\n\t}\n\n\tstatic getStops(domain: any, color: string) {\n\t\tconst need3Stops = domain[0] < 0 && domain[1] > 0\n\t\tlet stops: object[] = [\n\t\t\t{\n\t\t\t\toffset: '0%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0.6'\n\t\t\t},\n\t\t\t{\n\t\t\t\toffset: '80%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0'\n\t\t\t}\n\t\t]\n\n\t\tif (need3Stops) {\n\t\t\tstops = [\n\t\t\t\t{\n\t\t\t\t\toffset: '0%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: GradientUtils.getOffsetRatio(domain),\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: '100%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t\treturn stops\n\t}\n}\n","import { TextAnchor, DominantBaseline } from '@/interfaces/enums'\n\nexport interface Point {\n\tx: number\n\ty: number\n}\n\nexport type Angle = number\n\nexport interface LabelAlignment {\n\ttextAnchor: TextAnchor\n\tdominantBaseline: DominantBaseline\n}\n\nexport function radialLabelPlacement(angleRadians: Angle): LabelAlignment {\n\tconst angle = mod(radToDeg(angleRadians), 360)\n\n\tif (isInRange(angle, [0, 10]) || isInRange(angle, [350, 0])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [10, 80])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [80, 100])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [100, 170])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [170, 190])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [190, 260])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else if (isInRange(angle, [260, 280])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else {\n\t\t// 280 - 350\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t}\n}\n\nfunction mod(n: number, m: number) {\n\treturn ((n % m) + m) % m\n}\n\nfunction isInRange(x: number, [min, max]: [number, number]) {\n\treturn x >= min && x <= max\n}\n\nexport function radToDeg(rad: Angle): Angle {\n\treturn rad * (180 / Math.PI)\n}\n\nexport function degToRad(deg: Angle): Angle {\n\treturn deg * (Math.PI / 180)\n}\n\nexport function polarToCartesianCoords(a: Angle, r: number, t: Point = { x: 0, y: 0 }): Point {\n\tconst x = r * Math.cos(a) + t.x\n\tconst y = r * Math.sin(a) + t.y\n\n\t// NaN is rendered at coordinate 0 in browsers\n\t// By setting it to 0, further operations can be performed\n\treturn { x: isNaN(x) ? 0 : x, y: isNaN(y) ? 0 : y }\n}\n\n// Return the distance between a point (described with polar coordinates)\n// on a circumference and the vertical diameter.\n// If the point is on the left if the diameter, its distance is positive,\n// if it is on the right of the diameter, its distance is negative.\nexport function distanceBetweenPointOnCircAndVerticalDiameter(a: Angle, r: number) {\n\treturn r * Math.sin(a - Math.PI / 2)\n}\n"],"names":["reWhitespace","trimmedEndIndex","string","index","reTrimStart","baseTrim","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","isSymbol","isObject","other","isBinary","now","root","now$1","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","Service","model","services","newObj","CSS_VERIFIER_ELEMENT_CLASSNAME","DOMUtils","element","svgSelector","select","finalDimensions","validateAndSetDimensions","dimensions","dimensionKey","dimension","dimensionNumber","attrDimensions","svgElement","bbox","bboxDimensions","boundingRect","boundingRectDimensions","e","clientDimensions","nativeDimensions","getProperty","parent","query","selection","querySections","elementToAppend","id","originalID","chartsprefix","mainContainer","carbonPrefix","holderElement","width","height","theme","self","holder","holderSelection","domToImage","node","dataUrl","_a","error","isFullScreen","chartHeight","chartSVGSelector","children","childrenHeight","childSVG","Events","containerWidth","containerHeight","resizeCallback","GradientUtils","configs","lg","d","domain","color","need3Stops","stops","radialLabelPlacement","angleRadians","angle","mod","radToDeg","isInRange","TextAnchor","DominantBaseline","n","m","x","min","max","rad","degToRad","deg","polarToCartesianCoords","a","r","y","distanceBetweenPointOnCircAndVerticalDiameter"],"mappings":"iHACA,IAAIA,EAAe,KAUnB,SAASC,EAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,EAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CCbA,IAAIC,EAAc,OASlB,SAASC,EAASH,EAAQ,CACxB,OAAOA,GACHA,EAAO,MAAM,EAAGD,EAAgBC,CAAM,EAAI,CAAC,EAAE,QAAQE,EAAa,EAAE,CAE1E,CCXA,IAAIE,EAAM,EAAI,EAGVC,EAAa,qBAGb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