diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts index ceabab34..9ae422cd 100644 --- a/src/types/dashboard.d.ts +++ b/src/types/dashboard.d.ts @@ -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; +}; diff --git a/src/views/dashboard/configuration/widget/graph-styles/Line.vue b/src/views/dashboard/configuration/widget/graph-styles/Line.vue index 9b131250..65f1b973 100644 --- a/src/views/dashboard/configuration/widget/graph-styles/Line.vue +++ b/src/views/dashboard/configuration/widget/graph-styles/Line.vue @@ -44,7 +44,7 @@ limitations under the License. --> class="inputs" size="small" placeholder="Please input the width" - @change="updateLegendConfig({ toTheRight: legend.width })" + @change="updateLegendConfig({ width: legend.width })" />