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,