主题 类型

主题 标识符、外观 修补 和 目录 类型。

导入
import type { ChartTheme } from "@sixtyfold/themes";

使用上方所示的公开入口。仅类型导入不会保留在应用 JavaScript 中。

ChartThemeId

用于一种公共图表外观预设的稳定标识符。

导入 @sixtyfold/themes类型

type ChartThemeId = (typeof PUBLIC_THEME_IDS)[number]

ChartThemePreset

一个深度不可变、与内容无关的线条和股票外观预设。

导入 @sixtyfold/themes类型

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>;
    };
}>
成员定义描述
colorScheme"dark" | "light"推荐的页面周边配色方案。
id"default" | "mainframe" | "blueprint" | "porcelain" | "azulejo" | "arizona" | "neon" | "shibuya" | "arcology" | "riviera" | "bauhaus" | "washi" | "botanica" | "newsprint"稳定的目录标识符。
labelstring便于人阅读的英文显示名称。
lineComplex nested type — see the public signature above折线图外观以及每个系列重复的视觉补丁。
stockComplex nested type — see the public signature above股票图外观补丁。

LineThemePreset

对一个递归冻结的公共主题预设的仅线条视图。

导入 @sixtyfold/themes/line类型

type LineThemePreset = DeepReadonly<{
    id: ChartThemeId;
    label: string;
    colorScheme: "dark" | "light";
    line: {
        appearance: DeepPartial<LineAppearanceOptions>;
        series: DeepPartial<SeriesAppearanceOptions>[];
    };
}>
成员定义描述
colorScheme"dark" | "light"预设的阅读模式分类,供宿主界面协调浅色或深色周边界面使用。
id"default" | "mainframe" | "blueprint" | "porcelain" | "azulejo" | "arizona" | "neon" | "shibuya" | "arcology" | "riviera" | "bauhaus" | "washi" | "botanica" | "newsprint"此折线主题预设的唯一标识符。
labelstring折线主题预设标签。
lineComplex nested type — see the public signature above运行线。

StockThemePreset

对一个递归冻结的公共主题预设的只读库存视图。

导入 @sixtyfold/themes/stock类型

type StockThemePreset = DeepReadonly<{
    id: ChartThemeId;
    label: string;
    colorScheme: "dark" | "light";
    stock: {
        appearance: DeepPartial<StockAppearanceOptions>;
    };
}>
成员定义描述
colorScheme"dark" | "light"预设的阅读模式分类,主机界面用于协调浅色或深色周边界面。
id"default" | "mainframe" | "blueprint" | "porcelain" | "azulejo" | "arizona" | "neon" | "shibuya" | "arcology" | "riviera" | "bauhaus" | "washi" | "botanica" | "newsprint"此股票主题预设的唯一标识符。
labelstring股票主题预设标签。
stockComplex nested type — see the public signature above运行股票。