Browse Source

[完善]echarts报错

tianjin
邵佳豪 2 years ago
parent
commit
5325bac67c
  1. 8
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

8
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -228,7 +228,9 @@ export class AddUnitTwoTimeComponent implements OnInit {
async dateChange() { async dateChange() {
this.tiaoshiPao = null; this.tiaoshiPao = null;
this.forArr.forEach((item) => { this.forArr.forEach((item) => {
item.echart.dispose(); if (item.echart) {
item.echart.dispose();
}
}); });
if (this.selectType == "year") { if (this.selectType == "year") {
@ -263,7 +265,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
this.dateNum2.push(this.tabledata[0][i].count); this.dateNum2.push(this.tabledata[0][i].count);
this.zongcount = this.zongcount + this.tabledata[0][i].count; this.zongcount = this.zongcount + this.tabledata[0][i].count;
//this.years.push(this.tabledata[0][i].year) //this.years.push(this.tabledata[0][i].year)
this.years = ["2020", "2021", "2022"]; this.years = ["2020", "2021", "2022", "2023", "2024"];
} }
//this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date) //this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.tiaoshiPao = this.serviceData.qipao( this.tiaoshiPao = this.serviceData.qipao(
@ -354,7 +356,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
//return tishiPao //return tishiPao
} }
thisYear = new Date().getFullYear(); thisYear = new Date().getFullYear();
date2 = ["2020", "2021", "2022"]; date2 = ["2020", "2021", "2022", "2023", "2024"];
dateNum2 = []; dateNum2 = [];
//新增数量统计 //新增数量统计

Loading…
Cancel
Save