From e1869840df62923ff94c9d617b04cafbfc0bd4b8 Mon Sep 17 00:00:00 2001 From: Fine Date: Wed, 19 Feb 2025 10:40:27 +0800 Subject: [PATCH] add collapseTags --- src/components/SelectorLegend.vue | 2 ++ src/views/dashboard/graphs/Bar.vue | 2 +- src/views/dashboard/graphs/Line.vue | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/SelectorLegend.vue b/src/components/SelectorLegend.vue index aa96ba8f..cff585f8 100644 --- a/src/components/SelectorLegend.vue +++ b/src/components/SelectorLegend.vue @@ -21,6 +21,8 @@ limitations under the License. --> :options="Options" @change="changeLegend" filterable + collapseTags + collapseTagsTooltip v-if="show" /> diff --git a/src/views/dashboard/graphs/Bar.vue b/src/views/dashboard/graphs/Bar.vue index 7ece8ed3..537ae4a4 100644 --- a/src/views/dashboard/graphs/Bar.vue +++ b/src/views/dashboard/graphs/Bar.vue @@ -119,7 +119,7 @@ limitations under the License. --> ...legend, }, grid: { - top: keys.length === 1 ? 15 : 40, + top: showEchartsLegend(keys) ? 35 : 10, left: 0, right: 10, bottom: 5, diff --git a/src/views/dashboard/graphs/Line.vue b/src/views/dashboard/graphs/Line.vue index 59bfba35..af37a283 100644 --- a/src/views/dashboard/graphs/Line.vue +++ b/src/views/dashboard/graphs/Line.vue @@ -157,7 +157,7 @@ limitations under the License. --> ...legend, }, grid: { - top: showEchartsLegend(keys) || props.config?.legend?.asSelector ? 35 : 10, + top: showEchartsLegend(keys) ? 35 : 10, left: 0, right: 10, bottom: 5,