theme
Configuration Structure
theme: {}mode
''Changing the theme.mode will also update the text and background colors of the chart.
Available Options
- light
- dark
palette
'palette1'Available palettes - palette1 to palette10
A chart that names no palette follows the mode: palette4 in dark mode and palette1 otherwise, switching when the mode changes, including through undo, redo and an applied Perspective. A palette the page names, in the chart options, in window.Apex or in an updateOptions() payload, is kept in either mode. Before 8.7.0, palette1 named in dark mode and palette4 named in light mode were swapped for the mode's default at render and after every updateOptions(), and a mode-only updateOptions() replaced any named palette with the new mode's default.
| palette1 | #008FFB | #00E396 | #FEB019 | #FF4560 | #775DD0 |
| palette2 | #3f51b5 | #03a9f4 | #4caf50 | #f9ce1d | #FF9800 |
| palette3 | #33b2df | #546E7A | #d4526e | #13d8aa | #A5978B |
| palette4 | #4ecdc4 | #c7f464 | #81D4FA | #546E7A | #fd6a6a |
| palette5 | #2b908f | #f9a3a4 | #90ee7e | #fa4443 | #69d2e7 |
| palette6 | #449DD1 | #F86624 | #EA3546 | #662E9B | #C5D86D |
| palette7 | #D7263D | #1B998B | #2E294E | #F46036 | #E2C044 |
| palette8 | #662E9B | #F86624 | #F9C80E | #EA3546 | #43BCCD |
| palette9 | #5C4742 | #A5978B | #8D5B4C | #5A2A27 | #C4BBAF |
| palette10 | #A300D6 | #7D02EB | #5653FE | #2983FF | #00B1F2 |
tokens
trueFacet: read --apx-* CSS custom properties from the cascade as the chart's design tokens (accent, foreground, grid, surface, a series palette, the font family and a radius factor). On by default, and part of the core library, so it needs no import. Tokens that are absent change nothing. They rank below explicit options. Set false to ignore them, which also turns off the design system layer. Tokens are re-read on each render; after changing a token at runtime without triggering a render, call chart.refreshTokens().
:root { --apx-accent: #4f46e5; --apx-grid: #e5e7eb; --apx-surface: #fff; }
designSystem
trueSince 8.8.0. Follow a design system's stylesheet on the page. Has an effect only while the Ignite UI add-on is loaded (import 'apexcharts/features/ignite-ui', or dist/features/ignite-ui.js after apexcharts.js); without it the --ig-* tokens are ignored and this option does nothing.
With the add-on and an Ignite UI theme on the page, its --ig-* tokens supply the series colors, the text, grid and overlay colors, the font, and an unset mode (from --ig-theme-variant). It ranks below everything else: explicit options, the chart's own CSS variables, --apx-* tokens, a named theme and an explicit palette all win. colorBlindMode and monochrome keep their own colors.
Defaults to true. Set false to turn this layer off for one chart and keep the --apx-* tokens; tokens: false turns it off as well. See Using with Ignite UI.
follow
falseFacet: follow the operating system's appearance with no JavaScript. Set 'os' to track the system light/dark and contrast preferences; leave false to ignore them. Requires import 'apexcharts/features/facet'.
name
''Facet: apply a named theme previously registered with ApexCharts.registerTheme(name, def). From 8.8.0 a registered theme's tokens.font sets the chart font unless chart.fontFamily is passed.
ApexCharts.registerTheme('brand', { palette: ['#4f46e5', '#0ea5e9'], tokens: { accent: '#4f46e5' } })
const options = { theme: { follow: 'os', name: 'brand' } }
monochrome
Single color is used as a base and shades are generated from that color.
enabled
falseWhether to enable monochrome theme option.
color
'#008FFB'A hex color which will be used as the base color for generating shades
shadeTo
'light'Accepts either light or dark
shadeIntensity
0.65What should be the intensity while generating shades Accepts from 0 to 1
accessibility
Color-blind-friendly palette overrides. When a mode is selected, ApexCharts remaps the series colors so that adjacent series remain visually distinguishable for users with the chosen form of color-vision deficiency.
colorBlindMode
''Pick a color-blind-safe palette. Available Options:
''(default, no remapping)- deuteranopia: red/green deficiency (most common form).
- protanopia: red/green deficiency (red-weak variant).
- tritanopia: blue/yellow deficiency.
- highContrast: maximum contrast palette, useful for low-vision users or print.
theme: {
accessibility: {
colorBlindMode: 'deuteranopia'
}
}