Skip to content
EliteChart

ChartForgeTheme

Documentation


Documentation / @elitechart/themes / ChartForgeTheme

Defined in: core/dist/index.d.ts:1467

A theme is a named bag of CSS-variable tokens. Pass to ChartOptions.theme or chart.setTheme(...).

Example

code
const myTheme: ChartForgeTheme = {
  name: 'my-dark',
  tokens: {
    '--cf-color-bg-canvas': '#0b0e13',
    '--cf-color-series-up': '#26a69a',
    '--cf-color-series-down': '#ef5350',
  },
};
chart.setTheme(myTheme);

Properties

name

code
readonly name: string;

Defined in: core/dist/index.d.ts:1468


tokens

code
readonly tokens: Readonly<Record<CfTokenKey, string>>;

Defined in: core/dist/index.d.ts:1469