Bug Fixes
Chart Registry Survives Duplicate Module Instances
Problem: When a bundler (Vite, webpack, etc.) accidentally creates two separate copies of the ApexCharts module - for example when mixing CJS and ESM imports, or when optimizeDeps is not configured - ApexCharts.use() would write to one module's registry while the chart renderer read from another. The chart type was effectively never registered, causing a runtime error.
Fix: The chart type registry is now stored on globalThis.__apexcharts_registry__ instead of a module-local variable. All module instances share a single registry on the global object, so registration is never silently lost regardless of how many module copies the bundler created.
This is a defense-in-depth fix. For best results, configure your bundler to deduplicate ApexCharts (Vite: add
apexchartstooptimizeDeps.include). TheglobalThisregistry ensures the library degrades gracefully even when deduplication is not configured.