+
{{item.alias?item.alias:item.name}}
-
@@ -131,17 +130,25 @@
}
},
resize:function(){
- if(this.chart){
- let height=this.$el.clientHeight;
- let width=this.$el.clientWidth;
- if(this.chartTitle){
- height = height - 20;
+ this.$nextTick(() => {
+ if(this.chart){
+ //let height=this.$el.clientHeight;
+ //console.info(this.$el.clientHeight)
+ let height = this.$el.clientHeight-document.querySelector("#legendArea").offsetHeight;
+ //console.info(document.querySelector("#legendArea").offsetHeight)
+ /*for (let i in document.querySelector("#legendArea")) {
+ console.info(i, document.querySelector("#legendArea")[i])
+ }*/
+ let width=this.$el.clientWidth;
+ /*if(this.chartTitle){
+ height = height - 20;
+ }
+ if(this.legend && this.legend.length>0){
+ height = height - 80;
+ }*/
+ this.chart.resize({width:width,height:height});
}
- if(this.legend && this.legend.length>0){
- height = height - 80;
- }
- this.chart.resize({width:width,height:height});
- }
+ });
},
mouseEnterChart(){
if (this.chart&&this.showToolbox) {
@@ -321,7 +328,9 @@
}
}
-
+