fix bug
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { Component, ElementRef, Input, NgZone, OnChanges, OnInit, SimpleChanges, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { Chart } from '@antv/g2';
|
||||
import DataSet from '@antv/data-set';
|
||||
import { DataService } from 'src/app/routes/datatable/services/data.service';
|
||||
@ -7,7 +7,7 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
|
||||
templateUrl: './map.component.html',
|
||||
styleUrls: ['./map.component.less']
|
||||
})
|
||||
export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
export class DatatableCustomindexMapComponent implements OnInit, OnChanges, AfterViewInit {
|
||||
el: any;
|
||||
@Input() chartData: any;
|
||||
chart: any;
|
||||
@ -18,6 +18,10 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
userDv: any;
|
||||
userData: any = [];
|
||||
constructor(private service: DataService, private ngZone: NgZone) {}
|
||||
ngAfterViewInit(): void {
|
||||
throw new Error('Method not implemented.');
|
||||
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (this.chartData) {
|
||||
@ -26,7 +30,7 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
// }, 1000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {}
|
||||
reRender() {
|
||||
console.log('5454545');
|
||||
@ -84,18 +88,6 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
|
||||
stroke: '#ccc',
|
||||
lineWidth: 1
|
||||
});
|
||||
|
||||
// 可视化用户数据
|
||||
// this.userData = [
|
||||
// { name: '山东', value: 21 },
|
||||
// { name: '山东', value: 22},
|
||||
// { name: '广东', value: 20, },
|
||||
// { name: '广东', value: 20 },
|
||||
// { name: '四川', value: 120 },
|
||||
// { name: '湖南', value: 200 },
|
||||
// { name: '河北', value: 30 },
|
||||
|
||||
// ];
|
||||
let value: any = []
|
||||
this.service.request(this.service.$api_getTransactionDistribution).subscribe((res: any) => {
|
||||
if(res) {
|
||||
|
||||
Reference in New Issue
Block a user