diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts index d021e48d..5ddb9130 100644 --- a/src/types/dashboard.d.ts +++ b/src/types/dashboard.d.ts @@ -112,7 +112,6 @@ export interface LineConfig extends AreaConfig { smallTips?: boolean; showlabels?: boolean; noTooltips?: boolean; - showLegend?: boolean; } export interface AreaConfig { diff --git a/src/views/dashboard/graphs/Line.vue b/src/views/dashboard/graphs/Line.vue index d91b31c2..30a3c6da 100644 --- a/src/views/dashboard/graphs/Line.vue +++ b/src/views/dashboard/graphs/Line.vue @@ -61,7 +61,6 @@ limitations under the License. --> smallTips: false, showlabels: true, noTooltips: false, - showLegend: true, }), }, }); @@ -130,7 +129,7 @@ limitations under the License. --> tooltip: props.config.smallTips ? tips : tooltip, legend: { type: "scroll", - show: props.config.showLegend ? showEchartsLegend(keys) : false, + show: showEchartsLegend(keys), icon: "circle", top: 0, left: 0, @@ -138,6 +137,16 @@ limitations under the License. --> textStyle: { color: appStore.theme === Themes.Dark ? "#fff" : "#333", }, + selector: [ + { + type: "all", + title: "All", + }, + { + type: "inverse", + title: "Inverse", + }, + ], }, grid: { top: showEchartsLegend(keys) ? 35 : 10,