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 |
colorBlindModetakes full priority overtheme.paletteandtheme.monochrome— no conflict resolution needed.- TypeScript:
ApexTheme.accessibilitytype added toapexcharts.d.ts. highContrastmode adds theapexcharts-high-contrastCSS 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: acoreExternalPluginexternalizes ~60 shared modules from sub-entry builds — they are resolved fromapexcharts/coreat 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 directLegendimport that was pulling the entire legend module into the core chunk unnecessarily; uses the already-initializedctx.legendinstance 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.jsbundles are unaffected. The__apex_*exports incore.jsare internal — do not use them in application code.
Bug Fixes
- core:
Core.jsno longer constructs a throwawayLegendinstance just to measure legend dimensions — it reads from the already-initializedctx.legendinstance, 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.jsandapexcharts.ssr.common.jswere removed in v5.9.0. SSR usage should import fromapexcharts/coredirectly and callrenderToString/renderToHTMLfromapexcharts/ssr(available since v5.7.0).