Skip to content

Theming

SwiftChart ships with four built-in themes. Each is a complete palette covering background, surface, grid, axes, and series colors.

Built-in themes

Custom themes

Register your own palette and reference it by name from anywhere:

import { addTheme } from '@arshad-shah/swift-chart';
addTheme('neon', {
bg: '#0a0a0f',
surface: '#111118',
grid: '#ffffff08',
text: '#e0e0ff',
textMuted: '#6060a0',
axis: '#2a2a4a',
colors: ['#ff00ff', '#00ffff', '#ffff00', '#ff6600'],
});
new LineChart('#chart', { theme: 'neon' });

You can also pass an inline Theme object instead of a name. See the Core API reference for the full Theme shape.