This commit is contained in:
wangshiming
2022-04-13 15:10:35 +08:00
parent 4ec6d2b7ac
commit d75f859b50
2 changed files with 6 additions and 4 deletions

View File

@ -4,8 +4,8 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-04-06 17:57:07 * @Date : 2022-04-06 17:57:07
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-13 10:17:44 * @LastEditTime : 2022-04-13 14:30:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\map\\map.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\map\\map.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
<g2-custom div style="height: 680px; " delay="200" (render)="render($event)" ></g2-custom> <g2-custom #map div style="height: 680px; " delay="200" (render)="render($event)" ></g2-custom>

View File

@ -10,6 +10,8 @@ import { DataService } from 'src/app/routes/datatable/services/data.service';
export class DatatableCustomindexMapComponent implements OnInit, OnChanges, AfterViewInit { export class DatatableCustomindexMapComponent implements OnInit, OnChanges, AfterViewInit {
el: any; el: any;
@Input() chartData: any; @Input() chartData: any;
@ViewChild('auditModal', { static: false }) auditModal!: any;
@ViewChild('map',{static: false}) map!: any;
chart: any; chart: any;
mapData: any; mapData: any;
ds!: DataSet ; ds!: DataSet ;
@ -19,8 +21,8 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges, Afte
userData: any = []; userData: any = [];
constructor(private service: DataService, private ngZone: NgZone) {} constructor(private service: DataService, private ngZone: NgZone) {}
ngAfterViewInit(): void { ngAfterViewInit(): void {
throw new Error('Method not implemented.'); this.map.el.nativeElement.style.height = this.map.el.nativeElement.clientWidth + 'px'
this.chart.render();
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {