feat: add custom config for Bar, Line, Area

This commit is contained in:
Qiuxia Fan
2022-01-12 14:30:45 +08:00
parent ad1e500c54
commit 16085bb56f
10 changed files with 121 additions and 73 deletions

View File

@@ -41,14 +41,20 @@ export interface StandardConfig {
min?: string;
}
export type GraphConfig = BarConfig | LineConfig;
interface BarConfig {
type GraphConfig = BarConfig | LineConfig;
export interface BarConfig {
type?: string;
showBackground?: boolean;
barWidth?: number;
}
interface LineConfig {
export interface LineConfig extends AreaConfig {
type?: string;
showBackground?: boolean;
barWidth?: number;
smooth?: boolean;
showSymbol?: boolean;
step?: boolean;
}
export interface AreaConfig {
type?: string;
opacity?: number;
}