add legend types

This commit is contained in:
Fine
2022-11-02 17:27:03 +08:00
parent b147428d8e
commit 1ca01d1ec7
2 changed files with 28 additions and 5 deletions

View File

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