diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue index 5d85108ea..e47f87841 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue @@ -446,7 +446,10 @@ right: 25, icon: "circle", }; - this.assetData.typeStat && this.$refs.assetTypePie.setSeries(series, legend, legendData); + if(typeSeriesData.length===0 || !vm.assetData.typeStat || vm.assetData.typeStat.length == 0) { + legend.show=false; + } + this.assetData.typeStat && this.assetData.typeStat.length === 0 && this.$refs.assetTypePie.setSeries(series, legend, legendData); this.$refs.assetTypePie.endLoading(); } resolve()