| | |
| | | constructor(private http: _HttpClient, public msg: NzMessageService) {} |
| | | |
| | | ngOnInit() { |
| | | zip( |
| | | this.http.get('/chart'), |
| | | this.http.get('/chart/tags') |
| | | ).subscribe(([ res, tags ]) => { |
| | | this.data = res; |
| | | tags['list'][Math.floor(Math.random() * tags['list'].length) + 1].value = 1000; |
| | | this.tags = tags['list']; |
| | | this.loading = false; |
| | | }); |
| | | // zip( |
| | | // this.http.get('/chart'), |
| | | // this.http.get('/chart/tags') |
| | | // ).subscribe(([ res, tags ]) => { |
| | | // this.data = res; |
| | | // tags['list'][Math.floor(Math.random() * tags['list'].length) + 1].value = 1000; |
| | | // this.tags = tags['list']; |
| | | // this.loading = false; |
| | | // }); |
| | | |
| | | // active chart |
| | | this.genActiveData(); |
| | | this.activeTime$ = setInterval(() => this.genActiveData(), 1000); |
| | | // // active chart |
| | | // this.genActiveData(); |
| | | // this.activeTime$ = setInterval(() => this.genActiveData(), 1000); |
| | | } |
| | | |
| | | // region: active chart |