github apexcharts/apexcharts.js v5.15.1
💎 Version 5.15.1

latest release: v5.15.2
3 hours ago

A small patch release with a single stability fix: charts that are torn down before they ever mount no longer throw.


Fixes

destroy() no longer throws on an un-mounted / detached chart

Calling destroy() (or an internal clear()) on a chart that never finished rendering threw:

TypeError: Cannot read properties of undefined (reading 'node')

This happened when a chart was constructed against an element that wasn't connected to the DOM - so create() bailed out early before building the SVG, leaving w.dom.Paper undefined - and the chart was then destroyed. Common triggers:

  • A React useEffect cleanup (or a Vue unmounted hook) tearing the chart down before the element was ever attached.
  • A queued resize/update() firing after the host element had already been removed.

The teardown path now guards on the SVG actually having been created, cancels any pending resize redraw, and tolerates a missing Apex._chartInstances registry, so destroying a never-mounted chart is a safe no-op.

Fixes react-apexcharts#602 and vue-apexcharts#256.

Don't miss a new apexcharts.js release

NewReleases is sending notifications on new releases.