@carbon/charts 1.21.3 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 1.22.0 (2024-09-16)
7
+
8
+ ### Features
9
+
10
+ - **a11y:** add aria-label to <svg> elements
11
+ ([#1892](https://github.com/carbon-design-system/carbon-charts/issues/1892))
12
+ ([65d40e5](https://github.com/carbon-design-system/carbon-charts/commit/65d40e5397336bc9f42f6f008017eebe7bc36c00))
13
+
14
+ # Change Log
15
+
16
+ All notable changes to this project will be documented in this file. See
17
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
18
+
19
+ ## 1.21.4 (2024-09-16)
20
+
21
+ **Note:** Version bump only for package @carbon/charts
22
+
23
+ # Change Log
24
+
25
+ All notable changes to this project will be documented in this file. See
26
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
27
+
6
28
  ## 1.21.3 (2024-09-11)
7
29
 
8
30
  ### Bug Fixes
@@ -2737,13 +2737,13 @@ class ot {
2737
2737
  getParent() {
2738
2738
  return this.parent;
2739
2739
  }
2740
- getComponentContainer(t = { withinChartClip: !1 }) {
2740
+ getComponentContainer(t = { ariaLabel: null, isPresentational: !1, withinChartClip: !1 }) {
2741
2741
  if (this.type) {
2742
2742
  const e = T(this.model.getOptions(), "style", "prefix"), n = this.id ? `#${this.id}` : "", i = _.appendOrSelect(
2743
2743
  this.parent,
2744
2744
  `${this.renderType === st.SVG ? "svg" : "div"}${n}.${qt}--${e}--${this.type}`
2745
2745
  );
2746
- if (t.withinChartClip) {
2746
+ if (t.ariaLabel && i.attr("aria-label", t.ariaLabel), t.isPresentational && i.attr("role", "presentation"), t.withinChartClip) {
2747
2747
  const r = this.model.get("chartClipId");
2748
2748
  if (r) {
2749
2749
  const o = R(`#${r}`).select("rect");
@@ -3311,7 +3311,9 @@ const Qn = (s) => Er.sanitize(s, {
3311
3311
  // @ts-ignore
3312
3312
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3313
3313
  render(t = !0) {
3314
- const e = this.getComponentContainer().attr("role", "toolbar");
3314
+ const e = this.getComponentContainer({
3315
+ ariaLabel: "toolbar"
3316
+ }).attr("role", "group");
3315
3317
  if (T(this.getOptions(), "data", "loading"))
3316
3318
  e.html(""), this.overflowMenu = null;
3317
3319
  else {
@@ -3692,46 +3694,47 @@ const Cs = class Cs extends ot {
3692
3694
  return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((e) => T(e, "growth") === Se.STRETCH).size();
3693
3695
  }
3694
3696
  render(t = !0) {
3695
- const e = this.parent, { width: n, height: i } = _.getHTMLElementSize(e.node()), r = this.configs.direction === Be.ROW || this.configs.direction === Be.ROW_REVERSE, a = T(this.model.getOptions(), "style", "prefix"), o = e.classed(
3696
- `${qt}--${a}--layout-row`,
3697
+ const e = this.model.getOptions(), n = this.parent, { width: i, height: r } = _.getHTMLElementSize(n.node()), a = this.configs.direction === Be.ROW || this.configs.direction === Be.ROW_REVERSE, o = T(this.model.getOptions(), "style", "prefix"), c = n.classed(
3698
+ `${qt}--${o}--layout-row`,
3697
3699
  this.configs.direction === Be.ROW
3698
3700
  ).classed(
3699
- `${qt}--${a}--layout-row-reverse`,
3701
+ `${qt}--${o}--layout-row-reverse`,
3700
3702
  this.configs.direction === Be.ROW_REVERSE
3701
3703
  ).classed(
3702
- `${qt}--${a}--layout-column`,
3704
+ `${qt}--${o}--layout-column`,
3703
3705
  this.configs.direction === Be.COLUMN
3704
3706
  ).classed(
3705
- `${qt}--${a}--layout-column-reverse`,
3707
+ `${qt}--${o}--layout-column-reverse`,
3706
3708
  this.configs.direction === Be.COLUMN_REVERSE
3707
3709
  ).classed(
3708
- `${qt}--${a}--layout-alignitems-center`,
3710
+ `${qt}--${o}--layout-alignitems-center`,
3709
3711
  this.configs.alignItems === tc.CENTER
3710
- ).selectAll(`div.layout-child-${this._instanceID}`).data(this.children, (h) => h.id);
3711
- o.enter().append("div").merge(e.selectAll(`div.layout-child-${this._instanceID}`)).attr("class", (h) => `layout-child layout-child-${this._instanceID} ${h.id}`).each(function(h) {
3712
- h.components.forEach((d) => {
3713
- const u = R(this), f = T(h, "renderType") === st.SVG;
3714
- d.setParent(
3715
- f ? _.appendOrSelect(u, "svg.layout-svg-wrapper").attr("width", "100%").attr("height", "100%") : u
3716
- );
3717
- const g = T(h, "growth");
3718
- (g === Se.PREFERRED || g === Se.FIXED) && d.render(t);
3719
- });
3720
- }), e.selectAll(`div.layout-child-${this._instanceID}`).style("height", null).style("width", null).each(function(h) {
3721
- const d = T(h, "growth"), p = T(h, "renderType") === st.SVG ? _.getSVGElementSize(R(this).select("svg.layout-svg-wrapper"), {
3712
+ ).selectAll(`div.layout-child-${this._instanceID}`).data(this.children, (d) => d.id);
3713
+ c.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class", (d) => `layout-child layout-child-${this._instanceID} ${d.id}`).each(function(d) {
3714
+ d.components.forEach((u) => {
3715
+ var E;
3716
+ const p = R(this), g = T(d, "renderType") === st.SVG;
3717
+ u.setParent(
3718
+ g ? _.appendOrSelect(p, "svg.layout-svg-wrapper").attr("width", "100%").attr("height", "100%") : p
3719
+ ), g && !p.select("svg.layout-svg-wrapper").attr("aria-label") && p.select("svg.layout-svg-wrapper").attr("aria-label", ((E = e == null ? void 0 : e.accessibility) == null ? void 0 : E.svgAriaLabel) || (e == null ? void 0 : e.title));
3720
+ const m = T(d, "growth");
3721
+ (m === Se.PREFERRED || m === Se.FIXED) && u.render(t);
3722
+ });
3723
+ }), n.selectAll(`div.layout-child-${this._instanceID}`).style("height", null).style("width", null).each(function(d) {
3724
+ const u = T(d, "growth"), f = T(d, "renderType") === st.SVG ? _.getSVGElementSize(R(this).select("svg.layout-svg-wrapper"), {
3722
3725
  useBBox: !0
3723
3726
  }) : _.getHTMLElementSize(this);
3724
- if (d === Se.PREFERRED) {
3725
- const f = r ? p.width : p.height, g = r ? n : i;
3726
- h.size = f / g * 100;
3727
+ if (u === Se.PREFERRED) {
3728
+ const g = a ? f.width : f.height, m = a ? i : r;
3729
+ d.size = g / m * 100;
3727
3730
  }
3728
- }), o.exit().remove(), this.children.filter((h) => T(h, "growth") === Se.STRETCH).forEach((h) => {
3729
- h.size = (100 - +this.getPreferedAndFixedSizeSum()) / +this.getNumOfStretchChildren();
3731
+ }), c.exit().remove(), this.children.filter((d) => T(d, "growth") === Se.STRETCH).forEach((d) => {
3732
+ d.size = (100 - +this.getPreferedAndFixedSizeSum()) / +this.getNumOfStretchChildren();
3730
3733
  });
3731
- const l = e.selectAll(`div.layout-child-${this._instanceID}`).data(this.children, (h) => h.id);
3732
- r ? l.style("width", (h) => `${h.size / 100 * n}px`).style("height", "100%") : l.style("height", (h) => `${h.size / 100 * i}px`).style("width", "100%"), l.each(function(h) {
3733
- h.components.forEach((d) => {
3734
- T(h, "growth") === Se.STRETCH && d.render(t);
3734
+ const h = n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children, (d) => d.id);
3735
+ a ? h.style("width", (d) => `${d.size / 100 * i}px`).style("height", "100%") : h.style("height", (d) => `${d.size / 100 * r}px`).style("width", "100%"), h.each(function(d) {
3736
+ d.components.forEach((u) => {
3737
+ T(d, "growth") === Se.STRETCH && u.render(t);
3735
3738
  });
3736
3739
  });
3737
3740
  }
@@ -3763,7 +3766,9 @@ class h0 extends ot {
3763
3766
  // @ts-ignore
3764
3767
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3765
3768
  render(t = !1) {
3766
- this.getComponentContainer().style("width", `${this.configs.size || Fr.default.size}px`).style("height", `${this.configs.size || Fr.default.size}px`).attr("opacity", 0);
3769
+ this.getComponentContainer({
3770
+ isPresentational: !0
3771
+ }).style("width", `${this.configs.size || Fr.default.size}px`).style("height", `${this.configs.size || Fr.default.size}px`).attr("opacity", 0);
3767
3772
  }
3768
3773
  }
3769
3774
  var up = {
@@ -5463,7 +5468,9 @@ const Qe = class Qe extends ot {
5463
5468
  // @ts-ignore
5464
5469
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5465
5470
  render(t = !0) {
5466
- const e = this.parent, n = this.getComponentContainer();
5471
+ const e = this.parent, n = this.getComponentContainer({
5472
+ isPresentational: !0
5473
+ });
5467
5474
  if (!e) throw new Error("SVG was not defined");
5468
5475
  const i = _.appendOrSelect(
5469
5476
  e,
@@ -5528,7 +5535,9 @@ class f0 extends ot {
5528
5535
  // @ts-ignore
5529
5536
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5530
5537
  render(t = !0) {
5531
- const e = this.getComponentContainer(), n = this.services.zoom.isZoomBarLoading(Y.TOP), i = this.services.zoom.isZoomBarLocked(Y.TOP), r = T(this.getOptions(), "zoomBar", Y.TOP, "type"), a = T(this.getOptions(), "axes", Y.BOTTOM, "highlights"), o = Yt.height[r], { width: c } = _.getSVGElementSize(this.parent, {
5538
+ const e = this.getComponentContainer({
5539
+ ariaLabel: "zoom bar"
5540
+ }), n = this.services.zoom.isZoomBarLoading(Y.TOP), i = this.services.zoom.isZoomBarLocked(Y.TOP), r = T(this.getOptions(), "zoomBar", Y.TOP, "type"), a = T(this.getOptions(), "axes", Y.BOTTOM, "highlights"), o = Yt.height[r], { width: c } = _.getSVGElementSize(this.parent, {
5532
5541
  useAttrs: !0
5533
5542
  });
5534
5543
  if (c === 0)
@@ -5725,7 +5734,10 @@ class g0 extends ot {
5725
5734
  });
5726
5735
  }
5727
5736
  });
5728
- const r = this.getComponentContainer({ withinChartClip: !0 }).selectAll("g.axis-thresholds").data(n, (u) => u.axisPosition);
5737
+ const r = this.getComponentContainer({
5738
+ ariaLabel: "threshold lines",
5739
+ withinChartClip: !0
5740
+ }).selectAll("g.axis-thresholds").data(n, (u) => u.axisPosition);
5729
5741
  r.exit().attr("opacity", 0).remove();
5730
5742
  const o = r.enter().append("g").merge(r);
5731
5743
  o.attr("class", (u) => `axis-thresholds ${u.axisPosition}`);
@@ -5865,7 +5877,10 @@ class m0 extends ot {
5865
5877
  });
5866
5878
  }
5867
5879
  });
5868
- const r = this.getComponentContainer({ withinChartClip: !0 }).selectAll("g.axis-highlight").data(n, (u) => u.axisPosition);
5880
+ const r = this.getComponentContainer({
5881
+ ariaLabel: "highlight areas",
5882
+ withinChartClip: !0
5883
+ }).selectAll("g.axis-highlight").data(n, (u) => u.axisPosition);
5869
5884
  r.exit().attr("opacity", 0).remove();
5870
5885
  const o = r.enter().append("g").merge(r);
5871
5886
  o.attr("class", (u) => `axis-highlight ${u.axisPosition}`);
@@ -6382,7 +6397,7 @@ class y0 extends ot {
6382
6397
  // @ts-ignore
6383
6398
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6384
6399
  render(t = !0) {
6385
- const e = this.getComponentContainer({ withinChartClip: !0 });
6400
+ const e = this.getComponentContainer({ ariaLabel: "alluvial graphs", withinChartClip: !0 });
6386
6401
  e.html("");
6387
6402
  const { width: n, height: i } = _.getSVGElementSize(e, {
6388
6403
  useAttrs: !0
@@ -6708,7 +6723,10 @@ class E0 extends ot {
6708
6723
  }
6709
6724
  drawBackdrop(t, e) {
6710
6725
  const n = this.parent, i = this.services.cartesianScales.getMainXScale(), r = this.services.cartesianScales.getMainYScale(), [a, o] = i.range(), [c, l] = r.range();
6711
- this.backdrop = _.appendOrSelect(n, "svg.chart-grid-backdrop");
6726
+ this.backdrop = _.appendOrSelect(n, "svg.chart-grid-backdrop").attr(
6727
+ "role",
6728
+ "presentation"
6729
+ );
6712
6730
  const h = _.appendOrSelect(
6713
6731
  this.backdrop,
6714
6732
  t || e ? "rect.chart-grid-backdrop.stroked" : "rect.chart-grid-backdrop"
@@ -6743,7 +6761,7 @@ class S0 extends ot {
6743
6761
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
6744
6762
  }
6745
6763
  render(t = !0) {
6746
- const e = this.getComponentContainer({ withinChartClip: !0 }), n = this.getOptions();
6764
+ const e = this.getComponentContainer({ ariaLabel: "area graphs", withinChartClip: !0 }), n = this.getOptions();
6747
6765
  let i = [0, 0];
6748
6766
  const { cartesianScales: r } = this.services, a = r.getOrientation(), o = yr().curve(this.services.curves.getD3Curve()).defined((b) => {
6749
6767
  const O = r.getRangeIdentifier(), I = b[O];
@@ -6859,7 +6877,7 @@ class x0 extends ot {
6859
6877
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
6860
6878
  }
6861
6879
  render(t = !0) {
6862
- const e = this.getComponentContainer({ withinChartClip: !0 }), { cartesianScales: n, curves: i } = this.services, r = (f) => n.getDomainValue(f), a = (f) => n.getRangeValue(f), [o, c] = ye(
6880
+ const e = this.getComponentContainer({ ariaLabel: "lines", withinChartClip: !0 }), { cartesianScales: n, curves: i } = this.services, r = (f) => n.getDomainValue(f), a = (f) => n.getRangeValue(f), [o, c] = ye(
6863
6881
  r,
6864
6882
  a,
6865
6883
  n.getOrientation()
@@ -7096,7 +7114,7 @@ class Sr extends ot {
7096
7114
  render(t) {
7097
7115
  if (!(T(this.getOptions(), "points", "enabled") || T(this.getOptions(), "bubble", "enabled")))
7098
7116
  return;
7099
- const n = this.getComponentContainer({ withinChartClip: !0 }), i = this.getOptions(), { groupMapsTo: r } = i.data, { cartesianScales: a } = this.services;
7117
+ const n = this.getComponentContainer({ ariaLabel: "scatter points", withinChartClip: !0 }), i = this.getOptions(), { groupMapsTo: r } = i.data, { cartesianScales: a } = this.services;
7100
7118
  if (!a) throw new Error("Services cartesianScales are undefined.");
7101
7119
  const o = a.getDomainIdentifier(), c = n.selectAll("circle.dot").data(
7102
7120
  this.getScatterData(),
@@ -7259,7 +7277,9 @@ class Ml extends ot {
7259
7277
  }, n && (this.configs = n), this.margins = this.configs.margins;
7260
7278
  }
7261
7279
  render(t = !0) {
7262
- const { position: e } = this.configs, n = this.getOptions(), i = T(n, "axes", e, "visible"), r = this.getComponentContainer(), { width: a, height: o } = _.getSVGElementSize(r, {
7280
+ const { position: e } = this.configs, n = this.getOptions(), i = T(n, "axes", e, "visible"), r = this.getComponentContainer({
7281
+ ariaLabel: "axes"
7282
+ }), { width: a, height: o } = _.getSVGElementSize(r, {
7263
7283
  useAttrs: !0
7264
7284
  }), c = _.appendOrSelect(r, `g.axis.${e}`);
7265
7285
  let l, h;
@@ -7515,7 +7535,9 @@ class Kf extends Ml {
7515
7535
  }
7516
7536
  render(t = !0) {
7517
7537
  super.render(t), super.destroy();
7518
- const e = this.configs.position, n = this.getComponentContainer(), i = _.appendOrSelect(n, `g.axis.${e}`), r = this;
7538
+ const e = this.configs.position, n = this.getComponentContainer({
7539
+ ariaLabel: "axes"
7540
+ }), i = _.appendOrSelect(n, `g.axis.${e}`), r = this;
7519
7541
  i.selectAll("g.tick").each(function(a, o) {
7520
7542
  const c = R(this);
7521
7543
  c.classed("tick-hover", !0).attr("tabindex", o === 0 ? 0 : -1);
@@ -7783,7 +7805,7 @@ class T0 extends ot {
7783
7805
  super(...arguments), this.type = "boxplot", this.renderType = st.SVG;
7784
7806
  }
7785
7807
  render(t) {
7786
- const e = this.getComponentContainer({ withinChartClip: !0 }), n = this.getOptions(), { groupMapsTo: i } = n.data, r = this.model.getDataGroupNames(), a = this.services.cartesianScales.getMainXScale(), o = this.services.cartesianScales.getMainYScale(), [c, l] = a.range(), [h, d] = o.range(), u = l - c, p = h - d;
7808
+ const e = this.getComponentContainer({ ariaLabel: "box plots", withinChartClip: !0 }), n = this.getOptions(), { groupMapsTo: i } = n.data, r = this.model.getDataGroupNames(), a = this.services.cartesianScales.getMainXScale(), o = this.services.cartesianScales.getMainYScale(), [c, l] = a.range(), [h, d] = o.range(), u = l - c, p = h - d;
7787
7809
  if (u === 0)
7788
7810
  return;
7789
7811
  const { cartesianScales: f } = this.services, g = f.getOrientation(), m = g === Ft.VERTICAL, [E, y] = ye(
@@ -8045,7 +8067,9 @@ class O0 extends ot {
8045
8067
  render(t) {
8046
8068
  const e = this.services.cartesianScales.getRangeAxisPosition({
8047
8069
  groups: this.configs.groups
8048
- }), n = this.services.cartesianScales.getScaleByPosition(e), [i, r] = n.domain(), a = i > 0 && r < 0 || i < 0 && r > 0, o = this.getComponentContainer();
8070
+ }), n = this.services.cartesianScales.getScaleByPosition(e), [i, r] = n.domain(), a = i > 0 && r < 0 || i < 0 && r > 0, o = this.getComponentContainer({
8071
+ isPresentational: !0
8072
+ });
8049
8073
  if (!a) {
8050
8074
  o.selectAll("line.domain").remove();
8051
8075
  return;
@@ -8143,7 +8167,7 @@ class L0 extends ot {
8143
8167
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
8144
8168
  }
8145
8169
  render(t) {
8146
- const e = this.getOptions(), { groupMapsTo: n } = e.data, i = this.getComponentContainer({ withinChartClip: !0 }), r = this.model.getDisplayData(this.configs.groups), a = this.services.cartesianScales.getRangeScale(), o = this.services.cartesianScales.getRangeIdentifier(), [c, l] = a.range(), [, h] = a.domain(), d = () => {
8170
+ const e = this.getOptions(), { groupMapsTo: n } = e.data, i = this.getComponentContainer({ ariaLabel: "bullet graphs", withinChartClip: !0 }), r = this.model.getDisplayData(this.configs.groups), a = this.services.cartesianScales.getRangeScale(), o = this.services.cartesianScales.getRangeIdentifier(), [c, l] = a.range(), [, h] = a.domain(), d = () => {
8147
8171
  const g = [];
8148
8172
  r.forEach((y) => {
8149
8173
  y.ranges ? y.ranges.forEach((v, S) => {
@@ -8621,7 +8645,9 @@ class V0 extends Mf {
8621
8645
  // @ts-ignore
8622
8646
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8623
8647
  render(t = !1) {
8624
- const e = this.getOptions(), n = this.getComponentContainer(), { width: i } = _.getSVGElementSize(n, {
8648
+ const e = this.getOptions(), n = this.getComponentContainer({
8649
+ ariaLabel: "legend"
8650
+ }), { width: i } = _.getSVGElementSize(n, {
8625
8651
  useAttrs: !0
8626
8652
  }), r = T(e, "color", "gradient", "colors"), a = T(e, this.chartType, "colorLegend", "type");
8627
8653
  let o = T(e, "color", "pairing", "option");
@@ -8696,7 +8722,9 @@ class B0 extends Af {
8696
8722
  // @ts-ignore
8697
8723
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8698
8724
  render(t = !1) {
8699
- const e = T(this.model.getDisplayData(), 0), n = this.getOptions(), i = this.getComponentContainer(), { groupMapsTo: r } = n.data, a = n.locale.translations.meter.title;
8725
+ const e = T(this.model.getDisplayData(), 0), n = this.getOptions(), i = this.getComponentContainer({
8726
+ ariaLabel: "meter title"
8727
+ }), { groupMapsTo: r } = n.data, a = n.locale.translations.meter.title;
8700
8728
  if (T(n, "meter", "proportional"))
8701
8729
  this.displayTotal(), this.displayBreakdownTitle();
8702
8730
  else {
@@ -8840,7 +8868,10 @@ class G0 extends ot {
8840
8868
  // @ts-ignore
8841
8869
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8842
8870
  render(t = !0) {
8843
- const e = this.getComponentContainer({ withinChartClip: !0 }), { width: n, height: i } = _.getSVGElementSize(this.parent, {
8871
+ const e = this.getComponentContainer({
8872
+ ariaLabel: "circle packs",
8873
+ withinChartClip: !0
8874
+ }), { width: n, height: i } = _.getSVGElementSize(this.parent, {
8844
8875
  useAttrs: !0
8845
8876
  });
8846
8877
  if (n < 1 || i < 1)
@@ -9026,7 +9057,9 @@ class lg extends ot {
9026
9057
  return vt.innerRadius;
9027
9058
  }
9028
9059
  render(t = !0) {
9029
- const e = this, n = this.getComponentContainer(), i = this.getOptions(), { groupMapsTo: r } = i.data, { valueMapsTo: a } = i.pie;
9060
+ const e = this, n = this.getComponentContainer({
9061
+ ariaLabel: "pie graph"
9062
+ }), i = this.getOptions(), { groupMapsTo: r } = i.data, { valueMapsTo: a } = i.pie;
9030
9063
  this.isRendering = !0;
9031
9064
  const o = this.model.getDisplayData().filter((A) => A[a] > 0), c = this.computeRadius();
9032
9065
  this.arc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c), this.hoverArc = Dn().innerRadius(this.getInnerRadius()).outerRadius(c + vt.hoverArc.outerRadiusOffset);
@@ -9184,10 +9217,17 @@ class H0 extends lg {
9184
9217
  super.render(t);
9185
9218
  const e = this;
9186
9219
  if (this.model.isDataEmpty()) {
9187
- this.getComponentContainer().select("g.center").remove();
9220
+ this.getComponentContainer({
9221
+ ariaLabel: "donut graph"
9222
+ }).select("g.center").remove();
9188
9223
  return;
9189
9224
  }
9190
- const n = _.appendOrSelect(this.getComponentContainer(), "g.center"), i = this.getOptions(), r = this.computeRadius(), a = T(i, "donut", "center", "label");
9225
+ const n = _.appendOrSelect(
9226
+ this.getComponentContainer({
9227
+ ariaLabel: "donut graph"
9228
+ }),
9229
+ "g.center"
9230
+ ), i = this.getOptions(), r = this.computeRadius(), a = T(i, "donut", "center", "label");
9191
9231
  _.appendOrSelect(n, "text.donut-figure").attr("text-anchor", "middle").style("dominant-baseline", () => a === null || a === "" ? "central" : "initial").style("font-size", () => i.donut.center.numberFontSize(r)).transition().call(
9192
9232
  (o) => this.services.transitions.setupTransition({
9193
9233
  transition: o,
@@ -9263,7 +9303,9 @@ class U0 extends ot {
9263
9303
  // @ts-ignore
9264
9304
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
9265
9305
  render(t = !0) {
9266
- const e = this.getComponentContainer().attr("width", "100%").attr("height", "100%"), n = this.getOptions(), i = this.getValue(), r = this.getValueRatio(), a = this.getArcSize(), o = this.getStartAngle(), c = r * a, l = o + c, h = o + a, d = this.computeRadius(), u = this.getInnerRadius();
9306
+ const e = this.getComponentContainer({
9307
+ ariaLabel: "gauge graph"
9308
+ }).attr("width", "100%").attr("height", "100%"), n = this.getOptions(), i = this.getValue(), r = this.getValueRatio(), a = this.getArcSize(), o = this.getStartAngle(), c = r * a, l = o + c, h = o + a, d = this.computeRadius(), u = this.getInnerRadius();
9267
9309
  this.backgroundArc = Dn().innerRadius(u).outerRadius(d).startAngle(l).endAngle(h), this.arc = Dn().innerRadius(u).outerRadius(d).startAngle(o).endAngle(l), _.appendOrSelect(e, "path.arc-background").attr("d", this.backgroundArc);
9268
9310
  const p = e.selectAll("path.arc-foreground").data([i]);
9269
9311
  p.enter().append("path").merge(p).attr(
@@ -9400,7 +9442,7 @@ class z0 extends br {
9400
9442
  render(t) {
9401
9443
  const e = this.model.getDisplayData(this.configs.groups), n = this.getOptions(), { groupMapsTo: i } = n.data;
9402
9444
  this.setGroupScale();
9403
- const r = this.getComponentContainer({ withinChartClip: !0 }), a = Jl(
9445
+ const r = this.getComponentContainer({ ariaLabel: "grouped bar graphs", withinChartClip: !0 }), a = Jl(
9404
9446
  e.map((u) => {
9405
9447
  const p = this.services.cartesianScales.getDomainIdentifier(u);
9406
9448
  return u[p] && typeof u[p].toString == "function" ? u[p].toString() : u[p];
@@ -9603,7 +9645,7 @@ class F0 extends ot {
9603
9645
  // @ts-ignore
9604
9646
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
9605
9647
  render(t = !0) {
9606
- const e = this.getComponentContainer({ withinChartClip: !0 });
9648
+ const e = this.getComponentContainer({ ariaLabel: "heatmap", withinChartClip: !0 });
9607
9649
  e.lower();
9608
9650
  const { cartesianScales: n } = this.services;
9609
9651
  if (this.matrix = this.model.getMatrix(), e.html(""), T(this.getOptions(), "data", "loading"))
@@ -9739,7 +9781,9 @@ class W0 extends ot {
9739
9781
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
9740
9782
  }
9741
9783
  render(t) {
9742
- const e = this.getComponentContainer(), n = this.model.getOptions(), { groupIdentifier: i } = n, { groupMapsTo: r } = n.data, a = this.model.getBinnedStackedData(), o = this.services.cartesianScales.getMainXScale(), c = e.selectAll("g.bars").data(a, (h) => yt(h, `0.${r}`));
9784
+ const e = this.getComponentContainer({
9785
+ ariaLabel: "histogram bars"
9786
+ }), n = this.model.getOptions(), { groupIdentifier: i } = n, { groupMapsTo: r } = n.data, a = this.model.getBinnedStackedData(), o = this.services.cartesianScales.getMainXScale(), c = e.selectAll("g.bars").data(a, (h) => yt(h, `0.${r}`));
9743
9787
  c.exit().attr("opacity", 0).remove(), c.enter().append("g").classed("bars", !0).attr("role", it.GROUP);
9744
9788
  const l = e.selectAll("g.bars").selectAll("path.bar").data((h) => h);
9745
9789
  l.exit().remove(), l.enter().append("path").merge(l).classed("bar", !0).attr(i, (h, d) => d).transition().call(
@@ -9838,7 +9882,7 @@ class X0 extends Sr {
9838
9882
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
9839
9883
  }
9840
9884
  render(t) {
9841
- const e = this.getComponentContainer({ withinChartClip: !0 }), n = this.model.getOptions(), { groupMapsTo: i } = n.data, { cartesianScales: r } = this.services, a = r.getMainXScale(), o = r.getMainYScale(), c = r.getDomainIdentifier(), l = (E) => r.getDomainValue(E), h = (E) => r.getRangeValue(E), d = r.getOrientation(), [u, p] = ye(
9885
+ const e = this.getComponentContainer({ ariaLabel: "lines", withinChartClip: !0 }), n = this.model.getOptions(), { groupMapsTo: i } = n.data, { cartesianScales: r } = this.services, a = r.getMainXScale(), o = r.getMainYScale(), c = r.getDomainIdentifier(), l = (E) => r.getDomainValue(E), h = (E) => r.getRangeValue(E), d = r.getOrientation(), [u, p] = ye(
9842
9886
  l,
9843
9887
  h,
9844
9888
  d
@@ -9898,7 +9942,9 @@ class j0 extends ot {
9898
9942
  }));
9899
9943
  }
9900
9944
  render(t = !0) {
9901
- const e = this, n = this.getComponentContainer(), i = this.getOptions(), r = T(i, "meter", "proportional"), a = this.model.getDisplayData(), o = this.model.getStatus(), { width: c } = _.getSVGElementSize(n, {
9945
+ const e = this, n = this.getComponentContainer({
9946
+ ariaLabel: "meter lines"
9947
+ }), i = this.getOptions(), r = T(i, "meter", "proportional"), a = this.model.getDisplayData(), o = this.model.getStatus(), { width: c } = _.getSVGElementSize(n, {
9902
9948
  useAttrs: !0
9903
9949
  }), { groupMapsTo: l } = i.data;
9904
9950
  let h;
@@ -10038,7 +10084,9 @@ class Y0 extends ot {
10038
10084
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
10039
10085
  }
10040
10086
  render(t = !0) {
10041
- const e = this.getComponentContainer(), { width: n, height: i } = _.getSVGElementSize(e, {
10087
+ const e = this.getComponentContainer({
10088
+ ariaLabel: "radar graph"
10089
+ }), { width: n, height: i } = _.getSVGElementSize(e, {
10042
10090
  useAttrs: !0
10043
10091
  }), r = this.model.getData(), a = this.model.getGroupedData(), o = this.getOptions(), c = T(o, "data", "groupMapsTo"), l = T(o, "radar", "axes", "value"), { angle: h, value: d } = T(o, "radar", "axes"), { xLabelPadding: u, yLabelPadding: p, yTicksNumber: f, minRange: g, xAxisRectHeight: m } = Te;
10044
10092
  this.uniqueKeys = Array.from(new Set(r.map((H) => H[h]))), this.uniqueGroups = Array.from(new Set(r.map((H) => H[c]))), this.fullDataNormalized = this.normalizeFlatData(r), this.groupedDataNormalized = this.normalizeGroupedData(a);
@@ -10358,7 +10406,10 @@ class q0 extends br {
10358
10406
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
10359
10407
  }
10360
10408
  render(t) {
10361
- const e = this.getOptions(), { groupMapsTo: n } = e.data, i = this.getComponentContainer({ withinChartClip: !0 }), r = this.model.getDisplayData(this.configs.groups), a = this.services.cartesianScales.getOrientation(), o = i.selectAll("path.bar").data(r, (l) => l[n]);
10409
+ const e = this.getOptions(), { groupMapsTo: n } = e.data, i = this.getComponentContainer({
10410
+ ariaLabel: "bar graphs",
10411
+ withinChartClip: !0
10412
+ }), r = this.model.getDisplayData(this.configs.groups), a = this.services.cartesianScales.getOrientation(), o = i.selectAll("path.bar").data(r, (l) => l[n]);
10362
10413
  o.exit().attr("opacity", 0).remove(), o.enter().append("path").attr("opacity", 0).merge(o).classed("bar", !0).attr("width", this.getBarWidth.bind(this)).transition().call(
10363
10414
  (l) => this.services.transitions.setupTransition({
10364
10415
  transition: l,
@@ -10483,7 +10534,10 @@ class K0 extends ot {
10483
10534
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
10484
10535
  }
10485
10536
  render(t = !0) {
10486
- const e = this.getComponentContainer({ withinChartClip: !0 }), n = this, i = this.getOptions(), { groupMapsTo: r } = i.data, a = Object.keys(i.axes).some((f) => i.axes[f].percentage), o = this.model.getStackedData({
10537
+ const e = this.getComponentContainer({
10538
+ ariaLabel: "stacked area graphs",
10539
+ withinChartClip: !0
10540
+ }), n = this, i = this.getOptions(), { groupMapsTo: r } = i.data, a = Object.keys(i.axes).some((f) => i.axes[f].percentage), o = this.model.getStackedData({
10487
10541
  percentage: a,
10488
10542
  groups: this.configs.groups
10489
10543
  }), c = T(o, 0, 0), l = this.services.cartesianScales.getDomainAxisPosition({ datum: c }), h = this.services.cartesianScales.getRangeAxisPosition({ datum: c }), d = this.services.cartesianScales.getScaleByPosition(h), u = e.selectAll("path.area").data(o, (f) => T(f, 0, r));
@@ -10532,7 +10586,7 @@ class J0 extends br {
10532
10586
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
10533
10587
  }
10534
10588
  render(t) {
10535
- const e = this.getComponentContainer({ withinChartClip: !0 }), n = this.getOptions(), { groupMapsTo: i } = n.data, r = this.model.getStackedData({
10589
+ const e = this.getComponentContainer({ ariaLabel: "stacked bar graphs", withinChartClip: !0 }), n = this.getOptions(), { groupMapsTo: i } = n.data, r = this.model.getStackedData({
10536
10590
  groups: this.configs.groups,
10537
10591
  divergent: !0
10538
10592
  }), a = this.model.getActiveDataGroupNames(), o = e.selectAll("g.bars").data(r, (l) => T(l, 0, i));
@@ -10646,7 +10700,7 @@ class Q0 extends Sr {
10646
10700
  render(t) {
10647
10701
  if (!T(this.getOptions(), "points", "enabled"))
10648
10702
  return;
10649
- const n = this.getComponentContainer({ withinChartClip: !0 }), i = this.getOptions(), { groupMapsTo: r } = i.data, a = Object.keys(i.axes).some((p) => i.axes[p].percentage), o = this.model.getStackedData({
10703
+ const n = this.getComponentContainer({ ariaLabel: "scatter points", withinChartClip: !0 }), i = this.getOptions(), { groupMapsTo: r } = i.data, a = Object.keys(i.axes).some((p) => i.axes[p].percentage), o = this.model.getStackedData({
10650
10704
  groups: this.configs.groups,
10651
10705
  percentage: a
10652
10706
  }), c = n.selectAll("g.dots").data(o, (p) => T(p, 0, r));
@@ -10709,7 +10763,9 @@ class ty extends ot {
10709
10763
  // @ts-ignore
10710
10764
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
10711
10765
  render(t = !0) {
10712
- const e = this.getComponentContainer();
10766
+ const e = this.getComponentContainer({
10767
+ ariaLabel: "tree diagram"
10768
+ });
10713
10769
  e.html("");
10714
10770
  const { width: n, height: i } = _.getSVGElementSize(this.parent, {
10715
10771
  useAttrs: !0
@@ -10982,7 +11038,9 @@ class ey extends ot {
10982
11038
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
10983
11039
  }
10984
11040
  render(t = !0) {
10985
- const e = this.getComponentContainer();
11041
+ const e = this.getComponentContainer({
11042
+ ariaLabel: "treemap"
11043
+ });
10986
11044
  this.model.getData();
10987
11045
  const n = this.model.getDisplayData(), i = this.model.getOptions(), r = T(window, "location"), { width: a, height: o } = _.getSVGElementSize(e, {
10988
11046
  useAttrs: !0
@@ -11404,7 +11462,9 @@ class ny extends ot {
11404
11462
  t.addEventListener(x.Legend.ITEM_HOVER, this.handleLegendOnHover), t.addEventListener(x.Legend.ITEM_MOUSEOUT, this.handleLegendMouseOut);
11405
11463
  }
11406
11464
  render(t = !0) {
11407
- const e = this, n = this.getComponentContainer().attr("width", "100%").attr("height", "100%"), i = this.model.getDisplayData(), r = this.getFontSizeScale(i), a = this.getOptions(), { fontSizeMapsTo: o, wordMapsTo: c } = a.wordCloud, { groupMapsTo: l } = a.data, { width: h, height: d } = _.getSVGElementSize(n, {
11465
+ const e = this, n = this.getComponentContainer({
11466
+ ariaLabel: "word cloud"
11467
+ }).attr("width", "100%").attr("height", "100%"), i = this.model.getDisplayData(), r = this.getFontSizeScale(i), a = this.getOptions(), { fontSizeMapsTo: o, wordMapsTo: c } = a.wordCloud, { groupMapsTo: l } = a.data, { width: h, height: d } = _.getSVGElementSize(n, {
11408
11468
  useAttrs: !0
11409
11469
  });
11410
11470
  if (h === 0 || d === 0)
@@ -11599,7 +11659,7 @@ class sy extends i0 {
11599
11659
  render(t = !0) {
11600
11660
  super.render();
11601
11661
  const e = this.model.getCombinedData();
11602
- this.getComponentContainer({ withinChartClip: !0 }).select("g.geo").selectAll("path").classed("border", !0).attr("class", (r) => this.model.getColorClassName({
11662
+ this.getComponentContainer({ ariaLabel: "map", withinChartClip: !0 }).select("g.geo").selectAll("path").classed("border", !0).attr("class", (r) => this.model.getColorClassName({
11603
11663
  value: e[r.properties.NAME].value,
11604
11664
  originalClassName: "border"
11605
11665
  })), this.addCountryAreaEventListener();
@@ -11715,4 +11775,4 @@ export {
11715
11775
  J0 as y,
11716
11776
  U0 as z
11717
11777
  };
11718
- //# sourceMappingURL=choropleth-CeqRIFeN.mjs.map
11778
+ //# sourceMappingURL=choropleth-0DsmaWsP.mjs.map