diff --git a/nezha-fronted/src/components/charts/chart-single-stat.vue b/nezha-fronted/src/components/charts/chart-single-stat.vue index f0cd7103e..05d984dc4 100644 --- a/nezha-fronted/src/components/charts/chart-single-stat.vue +++ b/nezha-fronted/src/components/charts/chart-single-stat.vue @@ -395,7 +395,6 @@ export default { this.isError = false; this.errorContent = ''; } - console.log('seriesItem','' == 0) if(seriesItem||(typeof seriesItem == 'number'&&seriesItem == 0) ||(typeof seriesItem=='string'&& seriesItem !='')){ //0 为false this.noData=false; }else{ diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 09a66cfe1..f22c10b73 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -443,13 +443,20 @@ toolbox:{ show:false, top:'0', - showTitle:false, + showTitle:true, feature:{ dataZoom:{ - yAxisIndex:false + yAxisIndex:false, + title:{ + zoom:self.$t('overall.toolBox.zoom'), + back:self.$t('overall.toolBox.back'), + } }, magicType:{ type:['stack'], + title:{ + stack:self.$t('overall.toolBox.stack') + }, iconStyle:{ borderColor:stackIconBorderColor, }, @@ -752,17 +759,30 @@ window.addEventListener('resize', function () { self.echartStore.resize(); }); - this.echartStore.on('magictypechanged', function (params) { self.isStackArea = !self.isStackArea; if(self.isStackArea){ this.setOption({ toolbox:{ feature:{ + dataZoom:{ + yAxisIndex:false, + title:{ + zoom:self.$t('overall.toolBox.zoom'), + back:self.$t('overall.toolBox.back'), + } + }, magicType:{ + type:['stack'], + title:{ + stack:self.$t('overall.toolBox.stack') + }, iconStyle:{ borderColor:'#7e7e7e', }, + emphasis:{ + borderColor:stackIconChooseBorderColor, + } }, } }, @@ -877,12 +897,27 @@ this.setOption({ toolbox:{ feature:{ + dataZoom:{ + yAxisIndex:false, + title:{ + zoom:self.$t('overall.toolBox.zoom'), + back:self.$t('overall.toolBox.back'), + } + }, magicType:{ + type:['stack'], + title:{ + stack:self.$t('overall.toolBox.stack') + }, iconStyle:{ borderColor:'#7e7e7e', }, + emphasis:{ + borderColor:stackIconChooseBorderColor, + } }, } + }, tooltip: { formatter:function(params){