feat: add custom config for graphs

This commit is contained in:
Qiuxia Fan
2022-01-12 23:04:31 +08:00
parent 8435beda35
commit 8d0acfa1e0
16 changed files with 303 additions and 77 deletions

View File

@@ -47,7 +47,7 @@ export interface StandardConfig {
seconds?: string;
}
export type GraphConfig = BarConfig | LineConfig;
export type GraphConfig = BarConfig | LineConfig | CardConfig | TableConfig;
export interface BarConfig {
type?: string;
showBackground?: boolean;
@@ -63,3 +63,21 @@ export interface AreaConfig {
type?: string;
opacity?: number;
}
export interface CardConfig {
type?: string;
fontSize?: number;
showUint: boolean;
}
export interface TableConfig {
type?: string;
showTableValues: boolean;
tableHeaderCol1: string;
tableHeaderCol2: string;
}
export interface TopListConfig {
type?: string;
topN: number;
}