From a1e7198b28edd18afdaeabefab27f55c8d60a694 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Tue, 21 Jul 2020 11:43:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:panel=E5=9B=BE=E8=A1=A8=E8=A1=A5=E5=85=85to?= =?UTF-8?q?olbox=20=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/charts/chart-single-stat.vue | 1 - .../components/charts/line-chart-block.vue | 41 +++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) 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){