主题 类型
主题 标识符、外观 修补 和 目录 类型。
import type { ChartTheme } from "@sixtyfold/themes";使用上方所示的公开入口。仅类型导入不会保留在应用 JavaScript 中。
ChartThemeId
用于一种公共图表外观预设的稳定标识符。
type ChartThemeId = (typeof PUBLIC_THEME_IDS)[number]ChartThemePreset
一个深度不可变、与内容无关的线条和股票外观预设。
type ChartThemePreset = DeepReadonly<{
/** Stable catalog identifier. */
id: ChartThemeId;
/** Human-readable English display name. */
label: string;
/** Recommended surrounding-page color scheme. */
colorScheme: "dark" | "light";
/** Line-chart appearance and repeating per-series visual patches. */
line: {
/** Content-neutral patch for `LineChart.updateAppearance`. */
appearance: DeepPartial<LineAppearanceOptions>;
/** Repeating visual patches for `LineChart.updateSeriesAppearance`. */
series: DeepPartial<SeriesAppearanceOptions>[];
};
/** Stock-chart appearance patch. */
stock: {
/** Content-neutral patch for `StockChart.updateAppearance`. */
appearance: DeepPartial<StockAppearanceOptions>;
};
}>LineThemePreset
对一个递归冻结的公共主题预设的仅线条视图。
type LineThemePreset = DeepReadonly<{
id: ChartThemeId;
label: string;
colorScheme: "dark" | "light";
line: {
appearance: DeepPartial<LineAppearanceOptions>;
series: DeepPartial<SeriesAppearanceOptions>[];
};
}>StockThemePreset
对一个递归冻结的公共主题预设的只读库存视图。
type StockThemePreset = DeepReadonly<{
id: ChartThemeId;
label: string;
colorScheme: "dark" | "light";
stock: {
appearance: DeepPartial<StockAppearanceOptions>;
};
}>