UNPKG

@lightningchart/lcjs-themes

Version:

Open-source Themes package for LightningChart JS

91 lines 2.81 kB
import { Color, Theme } from '@lightningchart/lcjs'; /** * Configuration options interface for [[makeCustomTheme]]. */ export declare type CustomThemeOptions = { /** * Color of charts background. */ backgroundColor: Color; /** * Color of all text. */ textColor: Color; /** * List of colors for series and other components representing data. * * When many colors are supplied, making several components within 1 chart will result in different colors being picked. */ dataColors: Color[]; /** * Color of Axis lines. */ axisColor: Color; /** * Color of tick gridlines. */ gridLineColor: Color; /** * Color of UI backgrounds, most notably LegendBox and cursor result tables. */ uiBackgroundColor: Color; /** * Color of UI background borders, most notably LegendBox and cursor result tables. */ uiBorderColor: Color; /** * Font family of all text. Same as CSS `font-family`. */ fontFamily: string; /** * Enable gradients? Defaults to `true`. * * Only impactful for Dark themes (`isDark` property). * * `true` -> automatically uses gradients with shifts background colors towards darker and brighter shades. * * `false` -> all colors are flat. */ gradients?: boolean; /** * Enable effects? Defaults to `true`. * * `true` -> Adds subtle shadows behind series, legends, etc. */ effects?: boolean; fontSize?: { chartTitle: number; axisTitle: number; legendTitle: number; other: number; }; /** * **Only needed for Dashboard** * * Color for Dashboard splitter lines. */ dashboardSplitterColor?: Color; /** * **Only needed for non-dark themes** * * Defaults to `true`. * * Switches some default assigned colors between values suitable for dark / light themes. */ isDark?: boolean; }; /** * Factory function for creating a LightningChart JS Theme based on very minimal configuration options. * * No-code interface for this factory can be found at https://arction.github.io/lcjs-themes/ * * Pre-built versions generated using this factory can be found in this library: * * - `flatThemeDark` https://github.com/Arction/lcjs-themes/blob/main/src/flatThemeDark.ts * - `flatThemeLight` https://github.com/Arction/lcjs-themes/blob/main/src/flatThemeLight.ts * * @param options - Configuration options for the created theme. * @returns LightningChart JS `Theme` object. */ export declare const makeCustomTheme: (options: CustomThemeOptions) => Theme; //# sourceMappingURL=customTheme.d.ts.map