ApexCharts is a modern, open-source JavaScript charting library for building interactive data visualizations. It provides a wide array of over a dozen chart types, offering responsive and feature-rich charts suitable for applications and dashboards. The current stable version is 5.10.6, with frequent patch releases addressing bugs and introducing minor features, sometimes on a weekly or bi-weekly cadence. Key differentiators include its extensive chart catalogue, built-in server-side rendering (SSR) support, modular entry points for efficient tree-shaking, and accessibility features like color-blind modes. It also offers official wrappers for popular frameworks like React, Vue, and Angular, simplifying integration into various web environments.
npm install apexchartsVerified import paths — ran on the pinned version, not inferred.
This quickstart code initializes and renders a basic bar chart using ApexCharts in a client-side browser environment, demonstrating chart creation with minimal configuration.
Ensure your `package.json` correctly lists `sideEffects` for `dist/*.esm.js` and `dist/features/*.esm.js`. For projects mixing module systems, consolidate to ESM where possible or ensure bundler `optimizeDeps` is configured to prevent duplicate module instances. Since v5.10.1, the chart registry is more robust to duplicate instances, but proper bundling is still recommended.
Change `import ApexCharts from 'apexcharts'` to `import ApexCharts from 'apexcharts/ssr'` for all SSR related code paths. Verify your SSR configuration to ensure `global.SVG` and other browser globals are correctly polyfilled or mocked if necessary.
To optimize bundle size, import the core library (`import ApexCharts from 'apexcharts/core'`) and then explicitly import only the chart types (e.g., `import 'apexcharts/line'`) and optional features (e.g., `import 'apexcharts/features/legend'`) your application uses.
Update any custom locale imports or configurations to use the correct ISO codes (e.g., `sr`, `sv`, `uk`) for Serbian, Swedish, and Ukrainian locales.
Ensure `sideEffects` are properly configured in `package.json` for `apexcharts` (check v5.10.2 release notes for patterns). If using modular imports, make sure `import 'apexcharts/<chart-type>'` statements are not inadvertently tree-shaken. For bundler issues with duplicate modules (e.g., CJS/ESM mix), try to unify module systems or configure `optimizeDeps` if using Vite.
Ensure you are importing `ApexCharts` from `apexcharts/ssr` for all server-side rendering logic. If the issue persists, check your SSR framework's documentation for mocking browser globals.
Upgrade ApexCharts to version 5.10.6 or newer to resolve this specific visual regression.
No dependency data recorded yet.