@carbon/charts 1.15.1 → 1.15.2

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.
@@ -3,21 +3,21 @@ import { bin as K, stack as S, stackOffsetDiverging as H, scaleOrdinal as R, qua
3
3
  import { S as f, _ as B, d as $, e as A, s as Y } from "./enums-sKf02OL8.mjs";
4
4
  import { b as J } from "./_baseEach-FYvKsL62.mjs";
5
5
  function tt(d, t, e, s) {
6
- for (var a = -1, o = d == null ? 0 : d.length; ++a < o; ) {
7
- var r = d[a];
8
- t(s, r, e(r), d);
6
+ for (var a = -1, n = d == null ? 0 : d.length; ++a < n; ) {
7
+ var o = d[a];
8
+ t(s, o, e(o), d);
9
9
  }
10
10
  return s;
11
11
  }
12
12
  function et(d, t, e, s) {
13
- return J(d, function(a, o, r) {
14
- t(s, a, e(a), r);
13
+ return J(d, function(a, n, o) {
14
+ t(s, a, e(a), o);
15
15
  }), s;
16
16
  }
17
17
  function st(d, t) {
18
18
  return function(e, s) {
19
- var a = w(e) ? tt : et, o = t ? t() : {};
20
- return a(e, d, z(s), o);
19
+ var a = w(e) ? tt : et, n = t ? t() : {};
20
+ return a(e, d, z(s), n);
21
21
  };
22
22
  }
23
23
  function at(d) {
@@ -27,10 +27,10 @@ function at(d) {
27
27
  }
28
28
  return s;
29
29
  }
30
- var ot = Object.prototype, rt = ot.hasOwnProperty, nt = st(function(d, t, e) {
31
- rt.call(d, e) ? d[e].push(t) : j(d, e, [t]);
30
+ var ot = Object.prototype, nt = ot.hasOwnProperty, rt = st(function(d, t, e) {
31
+ nt.call(d, e) ? d[e].push(t) : j(d, e, [t]);
32
32
  });
33
- const it = nt;
33
+ const it = rt;
34
34
  function lt(d) {
35
35
  const t = d.trim();
36
36
  return ["=", "+", "-", "@", " ", "\r"].includes(t.charAt(0)) ? ` ${t}` : /[,\"\n]/.test(t) ? `"${t}"` : t;
@@ -44,17 +44,17 @@ class D {
44
44
  formatTable({ headers: t, cells: e }) {
45
45
  const s = this.getOptions(), {
46
46
  code: a,
47
- date: o,
48
- number: r
49
- } = u(s, "locale"), i = u(s, "tabularRepModal", "tableHeadingFormatter"), n = u(s, "tabularRepModal", "tableCellFormatter"), { cartesianScales: c } = this.services, l = c == null ? void 0 : c.getDomainAxisScaleType();
47
+ date: n,
48
+ number: o
49
+ } = u(s, "locale"), i = u(s, "tabularRepModal", "tableHeadingFormatter"), r = u(s, "tabularRepModal", "tableCellFormatter"), { cartesianScales: c } = this.services, l = c == null ? void 0 : c.getDomainAxisScaleType();
50
50
  let p;
51
- return l === f.TIME && (p = (g) => o(g, a, { month: "short", day: "numeric", year: "numeric" })), [
51
+ return l === f.TIME && (p = (g) => n(g, a, { month: "short", day: "numeric", year: "numeric" })), [
52
52
  typeof i == "function" ? i(t) : t,
53
- ...typeof n == "function" ? n(e) : e.map((g) => {
53
+ ...typeof r == "function" ? r(e) : e.map((g) => {
54
54
  p && (g[1] = p(g[1]));
55
55
  for (let m in g) {
56
56
  let y = g[m];
57
- typeof y == "number" && (g[m] = r(y, a));
57
+ typeof y == "number" && (g[m] = o(y, a));
58
58
  }
59
59
  return g;
60
60
  })
@@ -65,24 +65,24 @@ class D {
65
65
  return null;
66
66
  const e = this.getOptions();
67
67
  let s = this.getData();
68
- const a = this.getDataGroups(), { groupMapsTo: o } = u(e, "data"), r = u(e, "axes");
69
- return t && (s = s.filter((i) => t.includes(i[o]))), r && Object.keys(r).forEach((i) => {
70
- const n = r[i].mapsTo, c = r[i].scaleType;
68
+ const a = this.getDataGroups(), { groupMapsTo: n } = u(e, "data"), o = u(e, "axes");
69
+ return t && (s = s.filter((i) => t.includes(i[n]))), o && Object.keys(o).forEach((i) => {
70
+ const r = o[i].mapsTo, c = o[i].scaleType;
71
71
  if ((c === f.LINEAR || c === f.LOG) && (s = s.map((l) => ({
72
72
  ...l,
73
- [n]: l[n] === null ? l[n] : Number(l[n])
74
- }))), n && r[i].domain)
73
+ [r]: l[r] === null ? l[r] : Number(l[r])
74
+ }))), r && o[i].domain)
75
75
  if (c === f.LABELS)
76
76
  s = s.filter(
77
- (l) => r[i].domain.includes(l[n])
77
+ (l) => o[i].domain.includes(l[r])
78
78
  );
79
79
  else {
80
- const [l, p] = r[i].domain;
80
+ const [l, p] = o[i].domain;
81
81
  s = s.filter(
82
- (h) => !(n in h) || h[n] >= l && h[n] <= p
82
+ (h) => !(r in h) || h[r] >= l && h[r] <= p
83
83
  );
84
84
  }
85
- }), s.filter((i) => a.find((n) => n.name === i[o]));
85
+ }), s.filter((i) => a.find((r) => r.name === i[n]));
86
86
  }
87
87
  /**
88
88
  * Charts that have group configs passed into them, only want to retrieve the display data relevant to that chart
@@ -92,8 +92,8 @@ class D {
92
92
  if (!this.get("data"))
93
93
  return null;
94
94
  const { ACTIVE: e } = O.items.status, s = this.getDataGroups(t), { groupMapsTo: a } = this.getOptions().data;
95
- return this.getAllDataFromDomain(t).filter((r) => s.find(
96
- (i) => i.name === r[a] && i.status === e
95
+ return this.getAllDataFromDomain(t).filter((o) => s.find(
96
+ (i) => i.name === o[a] && i.status === e
97
97
  ));
98
98
  }
99
99
  getData() {
@@ -130,14 +130,14 @@ class D {
130
130
  return it(t, "group");
131
131
  }
132
132
  getBinConfigurations() {
133
- const t = this.getDisplayData(), e = this.getOptions(), s = this.services.cartesianScales.getMainXAxisPosition(), a = this.services.cartesianScales.getDomainIdentifier(), o = e.axes[s], { groupMapsTo: r } = e.data, { bins: i = U.defaultBins } = o, n = Array.isArray(i), c = K().value((g) => g[a]).thresholds(i)(t);
134
- if (n)
133
+ const t = this.getDisplayData(), e = this.getOptions(), s = this.services.cartesianScales.getMainXAxisPosition(), a = this.services.cartesianScales.getDomainIdentifier(), n = e.axes[s], { groupMapsTo: o } = e.data, { bins: i = U.defaultBins } = n, r = Array.isArray(i), c = K().value((g) => g[a]).thresholds(i)(t);
134
+ if (r)
135
135
  c[c.length - 1].x1 = i[i.length - 1];
136
136
  else {
137
137
  const g = c[0].x1 - c[0].x0;
138
138
  c[c.length - 1].x1 = +c[c.length - 1].x0 + g;
139
139
  }
140
- const l = n ? [i[0], i[i.length - 1]] : [c[0].x0, c[c.length - 1].x1], p = Array.from(new Set(t.map((g) => g[r]))), h = [];
140
+ const l = r ? [i[0], i[i.length - 1]] : [c[0].x0, c[c.length - 1].x1], p = Array.from(new Set(t.map((g) => g[o]))), h = [];
141
141
  return c.forEach((g) => {
142
142
  const m = `${g.x0}-${g.x1}`, y = this.aggregateBinDataByGroup(g);
143
143
  p.forEach((x) => {
@@ -154,79 +154,79 @@ class D {
154
154
  };
155
155
  }
156
156
  getBinnedStackedData() {
157
- const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getActiveDataGroupNames(), { bins: a } = this.getBinConfigurations(), o = this.getDataValuesGroupedByKeys({
157
+ const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getActiveDataGroupNames(), { bins: a } = this.getBinConfigurations(), n = this.getDataValuesGroupedByKeys({
158
158
  bins: a
159
159
  });
160
- return S().keys(s)(o).map((r, i) => Object.keys(r).filter((n) => !isNaN(n)).map((n) => {
161
- const c = r[n];
160
+ return S().keys(s)(n).map((o, i) => Object.keys(o).filter((r) => !isNaN(r)).map((r) => {
161
+ const c = o[r];
162
162
  return c[e] = s[i], c;
163
163
  }));
164
164
  }
165
165
  getGroupedData(t) {
166
166
  const e = this.getDisplayData(t), s = {}, { groupMapsTo: a } = this.getOptions().data;
167
- return e.map((o) => {
168
- const r = o[a];
169
- s[r] !== null && s[r] !== void 0 ? s[r].push(o) : s[r] = [o];
170
- }), Object.keys(s).map((o) => ({
171
- name: o,
172
- data: s[o]
167
+ return e.map((n) => {
168
+ const o = n[a];
169
+ s[o] !== null && s[o] !== void 0 ? s[o].push(n) : s[o] = [n];
170
+ }), Object.keys(s).map((n) => ({
171
+ name: n,
172
+ data: s[n]
173
173
  }));
174
174
  }
175
175
  getStackKeys({ bins: t = null, groups: e = null } = { bins: null, groups: null }) {
176
176
  const s = this.getOptions(), a = this.getDisplayData(e);
177
- let o;
178
- t ? o = t.map((n) => `${n.x0}:${n.x1}`) : o = M(
179
- a.map((n) => {
180
- const c = this.services.cartesianScales.getDomainIdentifier(n);
181
- return n[c] instanceof Date ? N(n[c]) : n[c] && typeof n[c].toString == "function" ? n[c].toString() : n[c];
177
+ let n;
178
+ t ? n = t.map((r) => `${r.x0}:${r.x1}`) : n = M(
179
+ a.map((r) => {
180
+ const c = this.services.cartesianScales.getDomainIdentifier(r);
181
+ return r[c] instanceof Date ? N(r[c]) : r[c] && typeof r[c].toString == "function" ? r[c].toString() : r[c];
182
182
  })
183
183
  );
184
- const r = this.services.cartesianScales.domainAxisPosition, i = s.axes[r].scaleType;
185
- return i === f.TIME ? o.sort((n, c) => {
186
- const l = new Date(n), p = new Date(c);
184
+ const o = this.services.cartesianScales.domainAxisPosition, i = s.axes[o].scaleType;
185
+ return i === f.TIME ? n.sort((r, c) => {
186
+ const l = new Date(r), p = new Date(c);
187
187
  return l - p;
188
- }) : (i === f.LOG || i === f.LINEAR) && o.sort((n, c) => n - c), o;
188
+ }) : (i === f.LOG || i === f.LINEAR) && n.sort((r, c) => r - c), n;
189
189
  }
190
190
  getDataValuesGroupedByKeys({ bins: t = null, groups: e = null }) {
191
- const s = this.getOptions(), { groupMapsTo: a } = s.data, o = this.getDisplayData(e), r = this.getDataGroupNames(), i = this.getStackKeys({ bins: t, groups: e });
192
- return t ? i.map((n) => {
193
- const [c, l] = n.split(":"), p = { x0: c, x1: l }, h = t.find((g) => g.x0.toString() === c.toString());
194
- return r.forEach((g) => {
191
+ const s = this.getOptions(), { groupMapsTo: a } = s.data, n = this.getDisplayData(e), o = this.getDataGroupNames(), i = this.getStackKeys({ bins: t, groups: e });
192
+ return t ? i.map((r) => {
193
+ const [c, l] = r.split(":"), p = { x0: c, x1: l }, h = t.find((g) => g.x0.toString() === c.toString());
194
+ return o.forEach((g) => {
195
195
  p[g] = h.filter(
196
196
  (m) => m[a] === g
197
197
  ).length;
198
198
  }), p;
199
- }) : i.map((n) => {
200
- const c = { sharedStackKey: n };
201
- return r.forEach((l) => {
202
- const p = o.find((g) => {
199
+ }) : i.map((r) => {
200
+ const c = { sharedStackKey: r };
201
+ return o.forEach((l) => {
202
+ const p = n.find((g) => {
203
203
  const m = this.services.cartesianScales.getDomainIdentifier(g);
204
- return g[a] === l && Object.prototype.hasOwnProperty.call(g, m) && (g[m] instanceof Date ? N(g[m]) === n : g[m].toString() === n);
204
+ return g[a] === l && Object.prototype.hasOwnProperty.call(g, m) && (g[m] instanceof Date ? N(g[m]) === r : g[m].toString() === r);
205
205
  }), h = this.services.cartesianScales.getRangeIdentifier(c);
206
206
  c[l] = p ? p[h] : null;
207
207
  }), c;
208
208
  });
209
209
  }
210
210
  getStackedData({ percentage: t = !1, groups: e = null, divergent: s = !1 }) {
211
- const a = this.getOptions(), { groupMapsTo: o } = a.data, r = this.getActiveDataGroupNames(e), i = this.getDataValuesGroupedByKeys({
211
+ const a = this.getOptions(), { groupMapsTo: n } = a.data, o = this.getActiveDataGroupNames(e), i = this.getDataValuesGroupedByKeys({
212
212
  groups: e
213
213
  });
214
214
  if (t) {
215
215
  const c = at(i.map((l) => [l.sharedStackKey, 0]));
216
216
  i.forEach((l) => {
217
- r.forEach((p) => {
217
+ o.forEach((p) => {
218
218
  c[l.sharedStackKey] += l[p];
219
219
  });
220
220
  }), i.forEach((l) => {
221
- r.forEach((p) => {
221
+ o.forEach((p) => {
222
222
  const h = c[l.sharedStackKey];
223
223
  c[l.sharedStackKey] ? l[p] = l[p] / h * 100 : l[p] = 0;
224
224
  });
225
225
  });
226
226
  }
227
- return (s ? S().offset(H) : S()).keys(r)(i).map((c, l) => Object.keys(c).filter((p) => !isNaN(p)).map((p) => {
227
+ return (s ? S().offset(H) : S()).keys(o)(i).map((c, l) => Object.keys(c).filter((p) => !isNaN(p)).map((p) => {
228
228
  const h = c[p];
229
- return h[o] = r[l], h;
229
+ return h[n] = o[l], h;
230
230
  }));
231
231
  }
232
232
  /**
@@ -269,9 +269,9 @@ class D {
269
269
  * Data labels
270
270
  */
271
271
  toggleDataLabel(t) {
272
- const { ACTIVE: e, DISABLED: s } = O.items.status, a = this.getDataGroups(), o = a.some((l) => l.status === s), r = a.filter((l) => l.status === e);
273
- if (o)
274
- if (r.length === 1 && r[0].name === t)
272
+ const { ACTIVE: e, DISABLED: s } = O.items.status, a = this.getDataGroups(), n = a.some((l) => l.status === s), o = a.filter((l) => l.status === e);
273
+ if (n)
274
+ if (o.length === 1 && o[0].name === t)
275
275
  a.forEach((l, p) => {
276
276
  a[p].status = e;
277
277
  });
@@ -283,8 +283,8 @@ class D {
283
283
  a.forEach((l, p) => {
284
284
  a[p].status = l.name === t ? e : s;
285
285
  });
286
- const i = a.filter((l) => l.status === e), n = this.getOptions();
287
- a.some((l) => l.status === s) ? n.data.selectedGroups = i.map((l) => l.name) : n.data.selectedGroups = [], this.services.events.dispatchEvent(B.Legend.ITEMS_UPDATE, {
286
+ const i = a.filter((l) => l.status === e), r = this.getOptions();
287
+ a.some((l) => l.status === s) ? r.data.selectedGroups = i.map((l) => l.name) : r.data.selectedGroups = [], this.services.events.dispatchEvent(B.Legend.ITEMS_UPDATE, {
288
288
  dataGroups: a
289
289
  }), this.set({
290
290
  dataGroups: a
@@ -298,16 +298,16 @@ class D {
298
298
  * @param defaultFilled the default for this chart
299
299
  */
300
300
  getIsFilled(t, e, s, a) {
301
- const o = this.getOptions();
302
- return o.getIsFilled ? o.getIsFilled(t, e, s, a) : a;
301
+ const n = this.getOptions();
302
+ return n.getIsFilled ? n.getIsFilled(t, e, s, a) : a;
303
303
  }
304
304
  getFillColor(t, e, s) {
305
- const a = this.getOptions(), o = u(this.colorScale, t);
306
- return a.getFillColor ? a.getFillColor(t, e, s, o) : o;
305
+ const a = this.getOptions(), n = u(this.colorScale, t);
306
+ return a.getFillColor ? a.getFillColor(t, e, s, n) : n;
307
307
  }
308
308
  getStrokeColor(t, e, s) {
309
- const a = this.getOptions(), o = u(this.colorScale, t);
310
- return a.getStrokeColor ? a.getStrokeColor(t, e, s, o) : o;
309
+ const a = this.getOptions(), n = u(this.colorScale, t);
310
+ return a.getStrokeColor ? a.getStrokeColor(t, e, s, n) : n;
311
311
  }
312
312
  isUserProvidedColorScaleValid() {
313
313
  const t = u(this.getOptions(), "color", "scale"), e = this.getDataGroups();
@@ -340,20 +340,20 @@ class D {
340
340
  "We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format"
341
341
  );
342
342
  const e = [], { datasets: s, labels: a } = t;
343
- return s.forEach((o) => {
344
- o.data.forEach((r, i) => {
345
- let n;
346
- const c = u(o, "label");
343
+ return s.forEach((n) => {
344
+ n.data.forEach((o, i) => {
345
+ let r;
346
+ const c = u(n, "label");
347
347
  if (c === null) {
348
348
  const p = u(a, i);
349
- p ? n = p : n = "Ungrouped";
349
+ p ? r = p : r = "Ungrouped";
350
350
  } else
351
- n = c;
351
+ r = c;
352
352
  const l = {
353
- group: n,
353
+ group: r,
354
354
  key: a[i]
355
355
  };
356
- isNaN(r) ? (l.value = r.value, l.date = r.date) : l.value = r, e.push(l);
356
+ isNaN(o) ? (l.value = o.value, l.date = o.date) : l.value = o, e.push(l);
357
357
  });
358
358
  }), e;
359
359
  }
@@ -362,12 +362,12 @@ class D {
362
362
  }
363
363
  exportToCSV() {
364
364
  const e = this.getTabularDataArray().map(
365
- (r) => r.map((i) => `"${(i === "&ndash;" ? "–" : i).split(/[,;'"`]/).map((l) => lt(l)).join("")}"`)
366
- ).map((r) => r.join(",")).join(`
365
+ (o) => o.map((i) => `"${(i === "&ndash;" ? "–" : i).split(/[,;'"`]/).map((l) => lt(l)).join("")}"`)
366
+ ).map((o) => o.join(",")).join(`
367
367
  `), s = this.getOptions();
368
368
  let a = "myChart";
369
- const o = u(s, "fileDownload", "fileName");
370
- typeof o == "function" ? a = o("csv") : typeof o == "string" && (a = o), this.services.files.downloadCSV(e, `${a}.csv`);
369
+ const n = u(s, "fileDownload", "fileName");
370
+ typeof n == "function" ? a = n("csv") : typeof n == "string" && (a = n), this.services.files.downloadCSV(e, `${a}.csv`);
371
371
  }
372
372
  getTabularData(t) {
373
373
  return Array.isArray(t) ? t : this.transformToTabularData(t);
@@ -384,14 +384,14 @@ class D {
384
384
  }) : this.allDataGroups = this.getDataGroupNames();
385
385
  }
386
386
  generateDataGroups(t) {
387
- const { groupMapsTo: e } = this.getOptions().data, { ACTIVE: s, DISABLED: a } = O.items.status, o = this.getOptions(), r = M(t.map((n) => n[e]));
388
- o.data.selectedGroups.length && (o.data.selectedGroups.every(
389
- (c) => r.includes(c)
390
- ) || (o.data.selectedGroups = []));
391
- const i = (n) => !o.data.selectedGroups.length || o.data.selectedGroups.includes(n) ? s : a;
392
- return r.map((n) => ({
393
- name: n,
394
- status: i(n)
387
+ const { groupMapsTo: e } = this.getOptions().data, { ACTIVE: s, DISABLED: a } = O.items.status, n = this.getOptions(), o = M(t.map((r) => r[e]));
388
+ n.data.selectedGroups.length && (n.data.selectedGroups.every(
389
+ (c) => o.includes(c)
390
+ ) || (n.data.selectedGroups = []));
391
+ const i = (r) => !n.data.selectedGroups.length || n.data.selectedGroups.includes(r) ? s : a;
392
+ return o.map((r) => ({
393
+ name: r,
394
+ status: i(r)
395
395
  }));
396
396
  }
397
397
  /*
@@ -415,10 +415,10 @@ class D {
415
415
  let e = u(t, "numberOfVariants");
416
416
  (!e || e < this.allDataGroups.length) && (e = this.allDataGroups.length);
417
417
  let s = u(t, "option");
418
- const a = V.pairingOptions, o = e > 5 ? 14 : e, r = `${o}-color`;
419
- s = s <= a[r] ? s : 1;
418
+ const a = V.pairingOptions, n = e > 5 ? 14 : e, o = `${n}-color`;
419
+ s = s <= a[o] ? s : 1;
420
420
  const i = this.allDataGroups.map(
421
- (n, c) => `${o}-${s}-${c % 14 + 1}`
421
+ (r, c) => `${n}-${s}-${c % 14 + 1}`
422
422
  );
423
423
  this.colorClassNames = R().range(i).domain(this.allDataGroups);
424
424
  }
@@ -438,29 +438,29 @@ class T extends D {
438
438
  secondaryRange: null
439
439
  };
440
440
  return s && (a.secondaryDomain = t.secondaryDomainAxisPosition, a.secondaryRange = t.secondaryRangeAxisPosition), Object.keys(a).forEach(
441
- (o) => {
442
- const r = a[o];
443
- t.scales[r] ? a[o] = {
444
- position: r,
445
- label: t.getScaleLabel(r),
446
- identifier: u(e, "axes", r, "mapsTo")
447
- } : a[o] = null;
441
+ (n) => {
442
+ const o = a[n];
443
+ t.scales[o] ? a[n] = {
444
+ position: o,
445
+ label: t.getScaleLabel(o),
446
+ identifier: u(e, "axes", o, "mapsTo")
447
+ } : a[n] = null;
448
448
  }
449
449
  ), a;
450
450
  }
451
451
  getTabularDataArray() {
452
- const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { primaryDomain: a, primaryRange: o, secondaryDomain: r, secondaryRange: i } = this.assignRangeAndDomains(), { number: n, code: c } = u(this.getOptions(), "locale"), l = [
452
+ const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { primaryDomain: a, primaryRange: n, secondaryDomain: o, secondaryRange: i } = this.assignRangeAndDomains(), { number: r, code: c } = u(this.getOptions(), "locale"), l = [
453
453
  "Group",
454
454
  a.label,
455
- o.label,
456
- ...r ? [r.label] : [],
455
+ n.label,
456
+ ...o ? [o.label] : [],
457
457
  ...i ? [i.label] : []
458
458
  ], p = t.map((h) => [
459
459
  h[s],
460
460
  h[a.identifier] === null ? "&ndash;" : h[a.identifier],
461
- h[o.identifier] === null || isNaN(h[o.identifier]) ? "&ndash;" : n(h[o.identifier], c),
462
- ...r ? [
463
- h[r.identifier] === null ? "&ndash;" : h[r.identifier]
461
+ h[n.identifier] === null || isNaN(h[n.identifier]) ? "&ndash;" : r(h[n.identifier], c),
462
+ ...o ? [
463
+ h[o.identifier] === null ? "&ndash;" : h[o.identifier]
464
464
  ] : [],
465
465
  ...i ? [
466
466
  h[i.identifier] === null || isNaN(h[i.identifier]) ? "&ndash;" : h[i.identifier]
@@ -489,14 +489,14 @@ class T extends D {
489
489
  let s = e;
490
490
  const { cartesianScales: a } = this.services;
491
491
  if (e && a.domainAxisPosition && a.rangeAxisPosition) {
492
- const o = a.getDomainIdentifier(), r = a.getRangeIdentifier();
493
- let i = e.map((n) => n[o].getTime());
494
- i = M(i).sort(), s = i.map((n) => {
492
+ const n = a.getDomainIdentifier(), o = a.getRangeIdentifier();
493
+ let i = e.map((r) => r[n].getTime());
494
+ i = M(i).sort(), s = i.map((r) => {
495
495
  let c = 0;
496
496
  const l = {};
497
497
  return e.forEach((p) => {
498
- p[o].getTime() === n && (c += p[r]);
499
- }), l[o] = new Date(n), l[r] = c, l;
498
+ p[n].getTime() === r && (c += p[o]);
499
+ }), l[n] = new Date(r), l[o] = c, l;
500
500
  });
501
501
  }
502
502
  this.set({ zoomBarData: s });
@@ -510,14 +510,14 @@ class T extends D {
510
510
  return t;
511
511
  const s = [];
512
512
  return Object.keys(A).forEach((a) => {
513
- const o = A[a], r = e.axes[o];
514
- if (r && r.scaleType === f.TIME) {
515
- const i = r.mapsTo;
513
+ const n = A[a], o = e.axes[n];
514
+ if (o && o.scaleType === f.TIME) {
515
+ const i = o.mapsTo;
516
516
  (i !== null || i !== void 0) && s.push(i);
517
517
  }
518
518
  }), s.length > 0 && t.forEach((a) => {
519
- s.forEach((o) => {
520
- u(a, o, "getTime") === null && (a[o] = new Date(a[o]));
519
+ s.forEach((n) => {
520
+ u(a, n, "getTime") === null && (a[n] = new Date(a[n]));
521
521
  });
522
522
  }), t;
523
523
  }
@@ -531,15 +531,15 @@ class gt extends T {
531
531
  }
532
532
  getTabularDataArray() {
533
533
  const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale");
534
- t.sort((r, i) => r.source.localeCompare(i.source));
535
- const a = ["Source", "Target", "Value"], o = [
536
- ...t.map((r) => [
537
- r.source,
538
- r.target,
539
- e(r.value, s)
534
+ t.sort((o, i) => o.source.localeCompare(i.source));
535
+ const a = ["Source", "Target", "Value"], n = [
536
+ ...t.map((o) => [
537
+ o.source,
538
+ o.target,
539
+ o.value === null ? "&ndash;" : e(o.value, s)
540
540
  ])
541
541
  ];
542
- return super.formatTable({ headers: a, cells: o });
542
+ return super.formatTable({ headers: a, cells: n });
543
543
  }
544
544
  }
545
545
  class dt extends T {
@@ -555,15 +555,15 @@ class dt extends T {
555
555
  }
556
556
  getBoxplotData() {
557
557
  const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getGroupedData(), a = [];
558
- for (const { name: o, data: r } of s) {
559
- const i = this.services.cartesianScales.getRangeIdentifier(), n = r.map((v) => v[i]).sort(Z), c = {
560
- [e]: o,
561
- counts: n,
562
- quartiles: this.getBoxQuartiles(n),
558
+ for (const { name: n, data: o } of s) {
559
+ const i = this.services.cartesianScales.getRangeIdentifier(), r = o.map((v) => v[i]).sort(Z), c = {
560
+ [e]: n,
561
+ counts: r,
562
+ quartiles: this.getBoxQuartiles(r),
563
563
  outliers: null,
564
564
  whiskers: null
565
565
  }, l = c.quartiles.q_25, p = c.quartiles.q_75, h = (p - l) * 1.5, g = l - h, m = p + h, y = [], x = [];
566
- for (const v of n)
566
+ for (const v of r)
567
567
  v < g || v > m ? y.push(v) : x.push(v);
568
568
  c.outliers = y;
569
569
  const q = P(x), I = k(x);
@@ -575,32 +575,32 @@ class dt extends T {
575
575
  return a;
576
576
  }
577
577
  getTabularDataArray() {
578
- const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getBoxplotData(), { number: a, code: o } = u(t, "locale"), r = ["Group", "Minimum", "Q1", "Median", "Q3", "Maximum", "IQR", "Outlier(s)"], i = [
579
- ...s.map((n) => {
580
- let c = u(n, "outliers");
578
+ const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getBoxplotData(), { number: a, code: n } = u(t, "locale"), o = ["Group", "Minimum", "Q1", "Median", "Q3", "Maximum", "IQR", "Outlier(s)"], i = [
579
+ ...s.map((r) => {
580
+ let c = u(r, "outliers");
581
581
  return (c === null || c.length === 0) && (c = ["&ndash;"]), [
582
- n[e],
583
- u(n, "whiskers", "min") !== null ? a(u(n, "whiskers", "min"), o) : "&ndash;",
584
- u(n, "quartiles", "q_25") !== null ? a(u(n, "quartiles", "q_25"), o) : "&ndash;",
585
- u(n, "quartiles", "q_50") !== null ? a(u(n, "quartiles", "q_50"), o) : "&ndash;",
586
- u(n, "quartiles", "q_75") !== null ? a(u(n, "quartiles", "q_75"), o) : "&ndash;",
587
- u(n, "whiskers", "max") !== null ? a(u(n, "whiskers", "max"), o) : "&ndash;",
588
- u(n, "quartiles", "q_75") !== null && u(n, "quartiles", "q_25") !== null ? (a(
589
- u(n, "quartiles", "q_75") - u(n, "quartiles", "q_25")
590
- ), o) : "&ndash;",
591
- c.map((l) => a(l, o)).join(",")
582
+ r[e],
583
+ u(r, "whiskers", "min") !== null ? a(u(r, "whiskers", "min"), n) : "&ndash;",
584
+ u(r, "quartiles", "q_25") !== null ? a(u(r, "quartiles", "q_25"), n) : "&ndash;",
585
+ u(r, "quartiles", "q_50") !== null ? a(u(r, "quartiles", "q_50"), n) : "&ndash;",
586
+ u(r, "quartiles", "q_75") !== null ? a(u(r, "quartiles", "q_75"), n) : "&ndash;",
587
+ u(r, "whiskers", "max") !== null ? a(u(r, "whiskers", "max"), n) : "&ndash;",
588
+ u(r, "quartiles", "q_75") !== null && u(r, "quartiles", "q_25") !== null ? (a(
589
+ u(r, "quartiles", "q_75") - u(r, "quartiles", "q_25")
590
+ ), n) : "&ndash;",
591
+ c.map((l) => a(l, n)).join(",")
592
592
  ];
593
593
  })
594
594
  ];
595
- return super.formatTable({ headers: r, cells: i });
595
+ return super.formatTable({ headers: o, cells: i });
596
596
  }
597
597
  setColorClassNames() {
598
598
  const e = u(this.getOptions(), "color", "pairing");
599
599
  let s = u(e, "option");
600
600
  const a = V.pairingOptions;
601
601
  s = s <= a["1-color"] ? s : 1;
602
- const o = this.allDataGroups.map(() => `1-${s}-1`);
603
- this.colorClassNames = R().range(o).domain(this.allDataGroups);
602
+ const n = this.allDataGroups.map(() => `1-${s}-1`);
603
+ this.colorClassNames = R().range(n).domain(this.allDataGroups);
604
604
  }
605
605
  }
606
606
  class mt extends T {
@@ -622,17 +622,17 @@ class mt extends T {
622
622
  return 0;
623
623
  }
624
624
  getTabularDataArray() {
625
- const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.services.cartesianScales.getRangeIdentifier(), { number: o, code: r } = u(e, "locale"), i = u(e, "bullet", "performanceAreaTitles"), n = ["Title", "Group", "Value", "Target", "Percentage", "Performance"], c = [
625
+ const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.services.cartesianScales.getRangeIdentifier(), { number: n, code: o } = u(e, "locale"), i = u(e, "bullet", "performanceAreaTitles"), r = ["Title", "Group", "Value", "Target", "Percentage", "Performance"], c = [
626
626
  ...t.map((l) => [
627
627
  l.title,
628
628
  l[s],
629
- l.value === null ? "&ndash;" : o(l.value, r),
630
- u(l, "marker") === null ? "&ndash;" : o(l.marker, r),
631
- u(l, "marker") === null ? "&ndash;" : `${o(Math.floor(l[a] / l.marker * 100), r)}%`,
629
+ l.value === null ? "&ndash;" : n(l.value, o),
630
+ u(l, "marker") === null ? "&ndash;" : n(l.marker, o),
631
+ u(l, "marker") === null ? "&ndash;" : `${n(Math.floor(l[a] / l.marker * 100), o)}%`,
632
632
  i[this.getMatchingRangeIndexForDatapoint(l)]
633
633
  ])
634
634
  ];
635
- return super.formatTable({ headers: n, cells: c });
635
+ return super.formatTable({ headers: r, cells: c });
636
636
  }
637
637
  }
638
638
  class ft extends D {
@@ -666,14 +666,14 @@ class ft extends D {
666
666
  * @returns Array<Object>
667
667
  */
668
668
  getTabularDataArray() {
669
- const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Country ID", "Country Name", "Value"], o = [
670
- ...t.map((r) => [
671
- r.id === null ? "&ndash;" : r.id,
672
- r.name,
673
- e(r.value, s)
669
+ const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Country ID", "Country Name", "Value"], n = [
670
+ ...t.map((o) => [
671
+ o.id === null ? "&ndash;" : o.id,
672
+ o.name,
673
+ o.value === null ? "&ndash;" : e(o.value, s)
674
674
  ])
675
675
  ];
676
- return super.formatTable({ headers: a, cells: o });
676
+ return super.formatTable({ headers: a, cells: n });
677
677
  }
678
678
  // Uses quantize scale to return class names
679
679
  getColorClassName(t) {
@@ -694,21 +694,21 @@ class Dt extends D {
694
694
  setOptions(t) {
695
695
  const e = this.getOptions(), s = _({}, t, this.getZoomOptions(t));
696
696
  F(e, s);
697
- const a = this.getHierarchyLevel(), o = u(e, "circlePack", "hierarchyLevel");
697
+ const a = this.getHierarchyLevel(), n = u(e, "circlePack", "hierarchyLevel");
698
698
  this.set({
699
699
  options: _(e, s),
700
- depth: o && o < 4 ? o : a
700
+ depth: n && n < 4 ? n : a
701
701
  });
702
702
  }
703
703
  getZoomOptions(t) {
704
704
  if (!this.getDisplayData())
705
705
  return {};
706
706
  const e = this.getDisplayData(), s = t || this.getOptions(), a = e.length === 1 && u(e, 0, "children") ? u(e, 0, "children") : e;
707
- let o = this.getHierarchyLevel();
708
- return a.some((r) => {
709
- if (r.children && r.children.some((i) => i.children))
710
- return o = 3, !1;
711
- }), u(s, "canvasZoom", "enabled") === !0 && o > 2 ? {
707
+ let n = this.getHierarchyLevel();
708
+ return a.some((o) => {
709
+ if (o.children && o.children.some((i) => i.children))
710
+ return n = 3, !1;
711
+ }), u(s, "canvasZoom", "enabled") === !0 && n > 2 ? {
712
712
  legend: {
713
713
  additionalItems: [
714
714
  {
@@ -734,9 +734,9 @@ class Dt extends D {
734
734
  }
735
735
  // set the datagroup name on the items that are it's children
736
736
  setDataGroups() {
737
- const t = this.getData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = t.map((o) => {
738
- const r = o[s];
739
- return this.setChildrenDataGroup(o, r);
737
+ const t = this.getData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = t.map((n) => {
738
+ const o = n[s];
739
+ return this.setChildrenDataGroup(n, o);
740
740
  });
741
741
  this.set(
742
742
  {
@@ -754,11 +754,11 @@ class Dt extends D {
754
754
  } : { ...t, dataGroupName: e };
755
755
  }
756
756
  getTabularDataArray() {
757
- const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Child", "Parent", "Value"], o = [];
758
- return t.forEach((r) => {
759
- let i = r.value ? r.value : 0;
760
- r.children && (i += this.getChildrenDatums(r.children, r.name, o, 0)), o.push(["&ndash;", r.name, e(i, s)]);
761
- }), super.formatTable({ headers: a, cells: o });
757
+ const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Child", "Parent", "Value"], n = [];
758
+ return t.forEach((o) => {
759
+ let i = o.value ? o.value : 0;
760
+ o.children && (i += this.getChildrenDatums(o.children, o.name, n, 0)), n.push(["&ndash;", o.name, e(i, s)]);
761
+ }), super.formatTable({ headers: a, cells: n });
762
762
  }
763
763
  /**
764
764
  * Recursively determine the relationship between all the nested elements in the child
@@ -769,15 +769,15 @@ class Dt extends D {
769
769
  * @returns: number
770
770
  */
771
771
  getChildrenDatums(t, e, s = [], a = 0) {
772
- const o = e, { number: r, code: i } = u(this.getOptions(), "locale");
773
- return t.forEach((n) => {
774
- const c = n.name;
772
+ const n = e, { number: o, code: i } = u(this.getOptions(), "locale");
773
+ return t.forEach((r) => {
774
+ const c = r.name;
775
775
  let l = 0;
776
- if (n.children)
777
- n.children.length > 0 && (typeof n.value == "number" && (a += n.value), l += this.getChildrenDatums(n.children, c, s, l), s.push([c, o, r(l, i)]), a += l);
776
+ if (r.children)
777
+ r.children.length > 0 && (typeof r.value == "number" && (a += r.value), l += this.getChildrenDatums(r.children, c, s, l), s.push([c, n, o(l, i)]), a += l);
778
778
  else {
779
779
  let p = 0;
780
- typeof n.value == "number" && (p = n.value, a += n.value), s.push([n.name, o, r(p, i)]);
780
+ typeof r.value == "number" && (p = r.value, a += r.value), s.push([r.name, n, o(p, i)]);
781
781
  }
782
782
  }), a;
783
783
  }
@@ -793,13 +793,13 @@ class yt extends D {
793
793
  }), e;
794
794
  }
795
795
  getTabularDataArray() {
796
- const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { valueMapsTo: a } = e.pie, { number: o, code: r } = u(e, "locale"), i = ["Group", "Value"], n = [
796
+ const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { valueMapsTo: a } = e.pie, { number: n, code: o } = u(e, "locale"), i = ["Group", "Value"], r = [
797
797
  ...t.map((c) => [
798
798
  c[s],
799
- c[a] === null ? "&ndash;" : o(c[a], r)
799
+ c[a] === null ? "&ndash;" : n(c[a], o)
800
800
  ])
801
801
  ];
802
- return super.formatTable({ headers: i, cells: n });
802
+ return super.formatTable({ headers: i, cells: r });
803
803
  }
804
804
  sanitize(t) {
805
805
  return this.getTabularData(t).sort((s, a) => a.value - s.value);
@@ -813,13 +813,13 @@ class bt extends D {
813
813
  return super.getDataGroups().filter((t) => t.name !== "delta");
814
814
  }
815
815
  getTabularDataArray() {
816
- const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { number: a, code: o } = u(this.getOptions(), "locale"), r = ["Group", "Value"], i = [
817
- ...t.map((n) => [
818
- n[s],
819
- n.value === null ? "&ndash;" : a(n.value, o)
816
+ const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { number: a, code: n } = u(this.getOptions(), "locale"), o = ["Group", "Value"], i = [
817
+ ...t.map((r) => [
818
+ r[s],
819
+ r.value === null ? "&ndash;" : a(r.value, n)
820
820
  ])
821
821
  ];
822
- return super.formatTable({ headers: r, cells: i });
822
+ return super.formatTable({ headers: o, cells: i });
823
823
  }
824
824
  }
825
825
  class vt extends T {
@@ -855,12 +855,12 @@ class vt extends T {
855
855
  */
856
856
  getUniqueDomain() {
857
857
  if (b(this._domains)) {
858
- const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getDomainIdentifier(), a = e.getMainXAxisPosition(), o = e.getCustomDomainValuesByposition(a);
859
- if (o)
860
- return o;
858
+ const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getDomainIdentifier(), a = e.getMainXAxisPosition(), n = e.getCustomDomainValuesByposition(a);
859
+ if (n)
860
+ return n;
861
861
  this._domains = Array.from(
862
862
  new Set(
863
- t.map((r) => r[s])
863
+ t.map((o) => o[s])
864
864
  )
865
865
  );
866
866
  }
@@ -872,12 +872,12 @@ class vt extends T {
872
872
  */
873
873
  getUniqueRanges() {
874
874
  if (b(this._ranges)) {
875
- const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getRangeIdentifier(), a = e.getMainYAxisPosition(), o = e.getCustomDomainValuesByposition(a);
876
- if (o)
877
- return o;
875
+ const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getRangeIdentifier(), a = e.getMainYAxisPosition(), n = e.getCustomDomainValuesByposition(a);
876
+ if (n)
877
+ return n;
878
878
  this._ranges = Array.from(
879
879
  new Set(
880
- t.map((r) => r[s])
880
+ t.map((o) => o[s])
881
881
  )
882
882
  );
883
883
  }
@@ -889,17 +889,17 @@ class vt extends T {
889
889
  */
890
890
  getMatrix() {
891
891
  if (b(this._matrix)) {
892
- const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), o = {};
893
- e.forEach((r) => {
894
- o[r] = {
892
+ const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), n = {};
893
+ e.forEach((o) => {
894
+ n[o] = {
895
895
  value: null,
896
896
  index: -1
897
897
  };
898
- }), t.forEach((r) => {
899
- this._matrix[r] = G(o);
900
- }), this.getDisplayData().forEach((r, i) => {
901
- this._matrix[r[s]][r[a]] = {
902
- value: r.value,
898
+ }), t.forEach((o) => {
899
+ this._matrix[o] = G(n);
900
+ }), this.getDisplayData().forEach((o, i) => {
901
+ this._matrix[o[s]][o[a]] = {
902
+ value: o.value,
903
903
  index: i
904
904
  };
905
905
  });
@@ -923,30 +923,30 @@ class vt extends T {
923
923
  */
924
924
  getMatrixAsArray() {
925
925
  b(this._matrix) && this.getMatrix();
926
- const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), o = [];
927
- return t.forEach((r) => {
926
+ const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), n = [];
927
+ return t.forEach((o) => {
928
928
  e.forEach((i) => {
929
- const n = {
930
- value: this._matrix[r][i].value,
931
- index: this._matrix[r][i].index
929
+ const r = {
930
+ value: this._matrix[o][i].value,
931
+ index: this._matrix[o][i].index
932
932
  };
933
- n[s] = r, n[a] = i, o.push(n);
933
+ r[s] = o, r[a] = i, n.push(r);
934
934
  });
935
- }), o;
935
+ }), n;
936
936
  }
937
937
  /**
938
938
  * Generate tabular data from display data
939
939
  * @returns Array<Object>
940
940
  */
941
941
  getTabularDataArray() {
942
- const t = this.getDisplayData(), { primaryDomain: e, primaryRange: s } = this.assignRangeAndDomains(), { number: a, code: o } = u(this.getOptions(), "locale"), r = [e.label, s.label, "Value"], i = [
943
- ...t.map((n) => [
944
- n[e.identifier] === null ? "&ndash;" : n[e.identifier],
945
- n[s.identifier] === null ? "&ndash;" : n[s.identifier],
946
- a(n.value, o)
942
+ const t = this.getDisplayData(), { primaryDomain: e, primaryRange: s } = this.assignRangeAndDomains(), { number: a, code: n } = u(this.getOptions(), "locale"), o = [e.label, s.label, "Value"], i = [
943
+ ...t.map((r) => [
944
+ r[e.identifier] === null ? "&ndash;" : r[e.identifier],
945
+ r[s.identifier] === null ? "&ndash;" : r[s.identifier],
946
+ r.value === null ? "&ndash;" : a(r.value, n)
947
947
  ])
948
948
  ];
949
- return super.formatTable({ headers: r, cells: i });
949
+ return super.formatTable({ headers: o, cells: i });
950
950
  }
951
951
  // Uses quantize scale to return class names
952
952
  getColorClassName(t) {
@@ -955,36 +955,36 @@ class vt extends T {
955
955
  setColorClassNames() {
956
956
  const t = this.getOptions(), e = u(t, "color", "gradient", "colors"), s = !b(e);
957
957
  let a = u(t, "color", "pairing", "option");
958
- const o = this.getValueDomain(), r = o[0] < 0 && o[1] > 0 ? "diverge" : "mono";
959
- (a < 1 && a > 4 && r === "mono" || a < 1 && a > 2 && r === "diverge") && (a = 1);
958
+ const n = this.getValueDomain(), o = n[0] < 0 && n[1] > 0 ? "diverge" : "mono";
959
+ (a < 1 && a > 4 && o === "mono" || a < 1 && a > 2 && o === "diverge") && (a = 1);
960
960
  const i = s ? e : [];
961
961
  if (!s) {
962
- const c = r === "diverge" ? 17 : 11;
962
+ const c = o === "diverge" ? 17 : 11;
963
963
  for (let l = 1; l < c + 1; l++)
964
- i.push(`fill-${r}-${a}-${l}`);
964
+ i.push(`fill-${o}-${a}-${l}`);
965
965
  }
966
- this._colorScale = X().domain(o).range(i);
967
- const n = u(this.getOptions(), "color");
968
- this._colorScale = L(this.getDisplayData(), n);
966
+ this._colorScale = X().domain(n).range(i);
967
+ const r = u(this.getOptions(), "color");
968
+ this._colorScale = L(this.getDisplayData(), r);
969
969
  }
970
970
  }
971
971
  class Ct extends T {
972
972
  getTabularDataArray() {
973
- const t = this.getOptions(), { groupMapsTo: e } = t.data, { number: s, code: a } = u(this.getOptions(), "locale"), o = this.getBinnedStackedData(), r = [
973
+ const t = this.getOptions(), { groupMapsTo: e } = t.data, { number: s, code: a } = u(this.getOptions(), "locale"), n = this.getBinnedStackedData(), o = [
974
974
  C(t, "bins.rangeLabel") || "Range",
975
- ...o.map((n) => C(n, `0.${e}`))
975
+ ...n.map((r) => C(r, `0.${e}`))
976
976
  ], i = [
977
- ...C(o, 0).map((n, c) => [
978
- `${s(Number(C(n, "data.x0")), a)} – ${s(
979
- Number(C(n, "data.x1")),
977
+ ...C(n, 0).map((r, c) => [
978
+ `${s(Number(C(r, "data.x0")), a)} – ${s(
979
+ Number(C(r, "data.x1")),
980
980
  a
981
981
  )}`,
982
- ...o.map(
982
+ ...n.map(
983
983
  (l) => s(C(l[c], `data.${C(l[c], e)}`), a)
984
984
  )
985
985
  ])
986
986
  ];
987
- return super.formatTable({ headers: r, cells: i });
987
+ return super.formatTable({ headers: o, cells: i });
988
988
  }
989
989
  }
990
990
  class xt extends D {
@@ -1007,43 +1007,45 @@ class xt extends D {
1007
1007
  * Get the associated status for the data by checking the ranges
1008
1008
  */
1009
1009
  getStatus() {
1010
- const t = this.getOptions(), e = u(this.getDisplayData()), s = (e == null ? void 0 : e.reduce((r, i) => r + i.value, 0)) ?? 0, a = u(t, "meter", "proportional") ? s : s > 100 ? 100 : s, o = u(t, "meter", "status", "ranges");
1011
- if (o) {
1012
- const r = o.filter(
1010
+ const t = this.getOptions(), e = u(this.getDisplayData()), s = (e == null ? void 0 : e.reduce((o, i) => o + i.value, 0)) ?? 0, a = u(t, "meter", "proportional") ? s : s > 100 ? 100 : s, n = u(t, "meter", "status", "ranges");
1011
+ if (n) {
1012
+ const o = n.filter(
1013
1013
  (i) => i.range[0] <= a && a <= i.range[1]
1014
1014
  );
1015
- if (r.length > 0)
1016
- return r[0].status;
1015
+ if (o.length > 0)
1016
+ return o[0].status;
1017
1017
  }
1018
1018
  return null;
1019
1019
  }
1020
1020
  getTabularDataArray() {
1021
- const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.getStatus(), o = u(e, "meter", "proportional"), { number: r, code: i } = u(this.getOptions(), "locale");
1022
- let n = [], c = [], l;
1023
- if (o === null) {
1021
+ const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.getStatus(), n = u(e, "meter", "proportional"), { number: o, code: i } = u(this.getOptions(), "locale");
1022
+ let r = [], c = [], l;
1023
+ if (n === null) {
1024
1024
  l = 100;
1025
1025
  const p = t[0];
1026
- n = ["Group", "Value", ...a ? ["Status"] : []], c = [
1026
+ r = ["Group", "Value", ...a ? ["Status"] : []], c = [
1027
1027
  [
1028
1028
  p[s],
1029
- r(p.value, i),
1029
+ p.value === null ? "&ndash;" : o(p.value, i),
1030
1030
  ...a ? [a] : []
1031
1031
  ]
1032
1032
  ];
1033
1033
  } else {
1034
- const p = u(o, "total");
1035
- l = p || this.getMaximumDomain(t), n = ["Group", "Value", "Percentage of total"], c = [
1034
+ const p = u(n, "total");
1035
+ l = p || this.getMaximumDomain(t), r = ["Group", "Value", "Percentage of total"], c = [
1036
1036
  ...t.map((h) => {
1037
- const g = h.value, m = Number((h.value / l * 100).toFixed(2));
1037
+ let g;
1038
+ h.value !== null && h.value !== void 0 ? g = Number(h.value) : g = 0;
1039
+ let m = Number((h.value / l * 100).toFixed(2));
1038
1040
  return [
1039
1041
  h[s],
1040
- r(g, i),
1041
- r(m, i) + " %"
1042
+ h.value === null ? "&ndash;" : o(g, i),
1043
+ o(m, i) + " %"
1042
1044
  ];
1043
1045
  })
1044
1046
  ];
1045
1047
  }
1046
- return super.formatTable({ headers: n, cells: c });
1048
+ return super.formatTable({ headers: r, cells: c });
1047
1049
  }
1048
1050
  }
1049
1051
  class Tt extends T {
@@ -1051,15 +1053,15 @@ class Tt extends T {
1051
1053
  super(t);
1052
1054
  }
1053
1055
  getTabularDataArray() {
1054
- const t = this.getOptions(), e = this.getGroupedData(), { angle: s, value: a } = u(t, "radar", "axes"), { number: o, code: r } = u(t, "locale"), i = u(e, "0", "data").map((l) => l[s]), n = ["Group", ...i], c = [
1056
+ const t = this.getOptions(), e = this.getGroupedData(), { angle: s, value: a } = u(t, "radar", "axes"), { number: n, code: o } = u(t, "locale"), i = u(e, "0", "data").map((l) => l[s]), r = ["Group", ...i], c = [
1055
1057
  ...e.map((l) => [
1056
1058
  l.name,
1057
1059
  ...i.map(
1058
- (p, h) => u(l, "data", h, a) !== null ? o(u(l, "data", h, a), r) : "&ndash;"
1060
+ (p, h) => u(l, "data", h, a) !== null ? n(u(l, "data", h, a), o) : "&ndash;"
1059
1061
  )
1060
1062
  ])
1061
1063
  ];
1062
- return super.formatTable({ headers: n, cells: c });
1064
+ return super.formatTable({ headers: r, cells: c });
1063
1065
  }
1064
1066
  }
1065
1067
  class Ot extends D {
@@ -1088,12 +1090,16 @@ class At extends D {
1088
1090
  super(t);
1089
1091
  }
1090
1092
  getTabularDataArray() {
1091
- const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Child", "Group", "Value"], o = [];
1092
- return t.forEach((r) => {
1093
- Array.isArray(r.children) ? r.children.forEach((i) => {
1094
- o.push([i.name, r.name, e(i.value, s)]);
1095
- }) : u(r.name) !== null && u(r.value) && o.push(["–", r.name, e(r.value, s)]);
1096
- }), super.formatTable({ headers: a, cells: o });
1093
+ const t = this.getDisplayData(), { number: e, code: s } = u(this.getOptions(), "locale"), a = ["Child", "Group", "Value"], n = [];
1094
+ return t.forEach((o) => {
1095
+ Array.isArray(o.children) ? o.children.forEach((i) => {
1096
+ n.push([
1097
+ i.name,
1098
+ o.name,
1099
+ i.value === null ? "&ndash;" : e(i.value, s)
1100
+ ]);
1101
+ }) : u(o.name) !== null && u(o.value) && n.push(["–", o.name, e(o.value, s)]);
1102
+ }), super.formatTable({ headers: a, cells: n });
1097
1103
  }
1098
1104
  }
1099
1105
  class Gt extends D {
@@ -1101,14 +1107,14 @@ class Gt extends D {
1101
1107
  super(t);
1102
1108
  }
1103
1109
  getTabularDataArray() {
1104
- const t = this.getDisplayData(), e = this.getOptions(), { fontSizeMapsTo: s, wordMapsTo: a } = e.wordCloud, { groupMapsTo: o } = e.data, { code: r, number: i } = u(e, "locale"), n = [e.tooltip.wordLabel, "Group", e.tooltip.valueLabel], c = [
1110
+ const t = this.getDisplayData(), e = this.getOptions(), { fontSizeMapsTo: s, wordMapsTo: a } = e.wordCloud, { groupMapsTo: n } = e.data, { code: o, number: i } = u(e, "locale"), r = [e.tooltip.wordLabel, "Group", e.tooltip.valueLabel], c = [
1105
1111
  ...t.map((l) => [
1106
1112
  l[a],
1107
- l[o],
1108
- i(l[s], r)
1113
+ l[n],
1114
+ i(l[s], o)
1109
1115
  ])
1110
1116
  ];
1111
- return super.formatTable({ headers: n, cells: c });
1117
+ return super.formatTable({ headers: r, cells: c });
1112
1118
  }
1113
1119
  }
1114
1120
  export {
@@ -1129,4 +1135,4 @@ export {
1129
1135
  Dt as e,
1130
1136
  At as f
1131
1137
  };
1132
- //# sourceMappingURL=wordcloud-w4x7neZf.mjs.map
1138
+ //# sourceMappingURL=wordcloud-EFHcMnWt.mjs.map