@carbon/charts-react 1.11.5 → 1.11.7

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/dist/index.mjs CHANGED
@@ -10878,7 +10878,7 @@ let mL = class extends or {
10878
10878
  * Get the associated status for the data by checking the ranges
10879
10879
  */
10880
10880
  getStatus() {
10881
- const t = this.getOptions(), n = b(this.getDisplayData()), { value: r } = n ? n.reduce((a, o) => ({ value: a.value + o.value })) : 0, i = b(t, "meter", "proportional") ? r : r > 100 ? 100 : r, s = b(t, "meter", "status", "ranges");
10881
+ const t = this.getOptions(), n = b(this.getDisplayData()), r = (n == null ? void 0 : n.reduce((a, o) => a + o.value, 0)) ?? 0, i = b(t, "meter", "proportional") ? r : r > 100 ? 100 : r, s = b(t, "meter", "status", "ranges");
10882
10882
  if (s) {
10883
10883
  const a = s.filter(
10884
10884
  (o) => o.range[0] <= i && i <= o.range[1]
@@ -22695,17 +22695,13 @@ class Rt extends Us.PureComponent {
22695
22695
  createChart(n, r, i) {
22696
22696
  throw new Error("Method not implemented.");
22697
22697
  }
22698
+ componentDidMount() {
22699
+ this.chartRef.current && !this.chart && (this.chart = this.createChart(this.chartRef.current, this.props.data, this.props.options));
22700
+ }
22698
22701
  componentDidUpdate(n) {
22699
22702
  var r, i;
22700
22703
  this.props.data !== n.data && ((r = this.chart) == null || r.model.setData(this.props.data)), this.props.options !== n.options && ((i = this.chart) == null || i.model.setOptions(this.props.options));
22701
22704
  }
22702
- componentWillUnmount() {
22703
- var n;
22704
- (n = this.chart) == null || n.destroy(), this.chart = void 0;
22705
- }
22706
- componentDidMount() {
22707
- this.chartRef.current && !this.chart && (this.chart = this.createChart(this.chartRef.current, this.props.data, this.props.options));
22708
- }
22709
22705
  render() {
22710
22706
  return /* @__PURE__ */ Nt.jsx("div", { ref: this.chartRef, className: "chart-holder" });
22711
22707
  }