THEMES
constTHEMES:Record<string,Theme>
Defined in: core/themes.ts:83
The live registry of all known themes, keyed by name. The four built-in
themes (midnight, arctic, ember, forest) are pre-registered;
custom themes added via addTheme appear here too.
The registry is anchored on globalThis so the core ESM bundle and the
React ESM bundle (which tsup compiles as separate units) share the same
map at runtime.
Direct mutation works but is discouraged — prefer addTheme for registration and resolveTheme for lookup so future versions can add validation and warnings without breaking your code.
Example
Section titled “Example”import { THEMES } from '@arshad-shah/swift-chart';console.log(Object.keys(THEMES)); // ["midnight", "arctic", "ember", "forest"]