feat: enhance the legend of metrics graph widget with the summary table (#181)

This commit is contained in:
Fine0830
2022-11-10 14:55:19 +08:00
committed by GitHub
parent fd46211a37
commit b37d65eaac
29 changed files with 595 additions and 92 deletions

View File

@@ -95,6 +95,7 @@ export type GraphConfig =
export interface BarConfig {
type?: string;
showBackground?: boolean;
legend?: LegendOptions;
}
export interface LineConfig extends AreaConfig {
type?: string;
@@ -110,6 +111,7 @@ export interface LineConfig extends AreaConfig {
export interface AreaConfig {
type?: string;
opacity?: number;
legend?: LegendOptions;
}
export interface CardConfig {
@@ -180,3 +182,13 @@ export type EventParams = {
value: number | number[];
color: string;
};
export type LegendOptions = {
show: boolean;
total: boolean;
min: boolean;
max: boolean;
mean: boolean;
asTable: boolean;
toTheRight: boolean;
width: number;
};