thsc-datav-standard-chart
Version:
标准范式组件
25 lines (24 loc) • 654 B
TypeScript
import type StandardChart from './StandardChart';
import { type Theme } from './theme';
import type { Option } from './option';
export type ThemeConfig = Theme['name'] | (Omit<Theme, 'name'> & {
name?: Theme['name'];
});
/**
* 配置项管理
*/
export default class Model {
protected _option: Option;
protected _theme: Exclude<ThemeConfig, Theme['name']>;
constructor(theme?: ThemeConfig);
private __preprocess;
private __parseTheme;
private __parse;
/**
* 预解析配置项
*/
prepare(chart: StandardChart): void;
getThemeName(): string;
getOption(): Option;
update(option: Option): void;
}