github apexcharts/apexcharts.js v5.9.0
💎 Version 5.9.0

latest releases: v5.10.1, v5.10.0
6 hours ago

New Features

Color-Blind Accessibility Mode (theme.accessibility.colorBlindMode)

A new theme.accessibility config object provides built-in support for color vision deficiencies.

new ApexCharts(el, {
  theme: {
    accessibility: {
      colorBlindMode: 'deuteranopia' // 'deuteranopia' | 'protanopia' | 'tritanopia' | 'highContrast' | ''
    }
  }
})
Mode Description
deuteranopia Red-green safe palette (green-weak, ~6% of males) — Wong 2011
protanopia Red-green safe palette (red-weak, ~1% of males) — Wong 2011
tritanopia Blue-yellow safe palette (~0.01% of population)
highContrast WCAG AA-compliant high contrast colors + apexcharts-high-contrast CSS class on wrapper
'' (default) No change, existing behavior
  • colorBlindMode takes full priority over theme.palette and theme.monochrome — no conflict resolution needed.
  • TypeScript: ApexTheme.accessibility type added to apexcharts.d.ts.
  • highContrast mode adds the apexcharts-high-contrast CSS class to the chart wrapper for custom CSS targeting; it does not mutate any config options.

Tree-Shaking: Sub-Entry Bundle Deduplication

Previously, each chart-type sub-entry (bar.esm.js, line.esm.js, etc.) and feature sub-entry (features/legend.esm.js, etc.) bundled its own private copy of all shared ApexCharts utilities (Core, Fill, Graphics, Theme, etc.), resulting in significant duplication when multiple sub-entries were loaded together.

v5.9.0 fixes this:

  • vite.config.mjs: a coreExternalPlugin externalizes ~60 shared modules from sub-entry builds — they are resolved from apexcharts/core at runtime instead of being re-bundled.
  • src/entries/core.js: all shared utilities are re-exported under internal __apex_* names, making them available to sub-entries without additional network requests or parse overhead.
  • src/modules/Core.js: removed a direct Legend import that was pulling the entire legend module into the core chunk unnecessarily; uses the already-initialized ctx.legend instance instead.

Impact: When using the tree-shaking API with multiple chart types or features, total JS parse/execute size is significantly reduced. The apexcharts/core bundle is loaded once; all sub-entries share it.

No breaking changes. The full apexcharts.js / apexcharts.esm.js bundles are unaffected. The __apex_* exports in core.js are internal — do not use them in application code.


Bug Fixes

  • core: Core.js no longer constructs a throwaway Legend instance just to measure legend dimensions — it reads from the already-initialized ctx.legend instance, avoiding a redundant import in the core chunk.

dist/ File Structure

dist/
├── apexcharts.js              # UMD bundle (development)
├── apexcharts.min.js          # UMD bundle (minified)
├── apexcharts.esm.js          # ES module — full bundle (all chart types + features)
├── apexcharts.common.js       # CommonJS — full bundle
├── apexcharts.css             # Default styles
├── apexcharts-legend.css      # Legend styles
│
├── core.esm.js                # ES module — bare core (no chart types, no features)
├── core.common.js             # CommonJS — bare core
│
├── bar.esm.js                 # ES module — bar/column/area/line chart type
├── bar.common.js
├── line.esm.js                # ES module — line/area/scatter/bubble chart type
├── line.common.js
├── pie.esm.js                 # ES module — pie/donut chart type
├── pie.common.js
├── radial.esm.js              # ES module — radialBar/polarArea chart type
├── radial.common.js
├── candlestick.esm.js         # ES module — candlestick/boxPlot chart type
├── candlestick.common.js
├── heatmap.esm.js             # ES module — heatmap/treemap chart type
├── heatmap.common.js
│
├── features/
│   ├── all.esm.js             # ES module — all optional features bundled
│   ├── all.common.js
│   ├── annotations.esm.js     # ES module — annotations feature
│   ├── annotations.common.js
│   ├── exports.esm.js         # ES module — SVG/PNG/CSV export feature
│   ├── exports.common.js
│   ├── toolbar.esm.js         # ES module — toolbar/zoom/pan feature
│   ├── toolbar.common.js
│   ├── legend.esm.js          # ES module — legend feature
│   ├── legend.common.js
│   ├── keyboard.esm.js        # ES module — keyboard navigation feature
│   └── keyboard.common.js
│
└── locales/                   # i18n locale JSON files (ar, de, es, fr, ja, zh-cn, ...)

Note: apexcharts.ssr.esm.js and apexcharts.ssr.common.js were removed in v5.9.0. SSR usage should import from apexcharts/core directly and call renderToString / renderToHTML from apexcharts/ssr (available since v5.7.0).

Don't miss a new apexcharts.js release

NewReleases is sending notifications on new releases.