|
|
|
@ -14,7 +14,12 @@ export class BuildingTypeOneComponent implements OnInit {
|
|
|
|
|
constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
|
|
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){ |
|
|
|
|
this.padHw=true |
|
|
|
|
//this.padjt=
|
|
|
|
|
}else{ |
|
|
|
|
this.padHw=false |
|
|
|
|
} |
|
|
|
|
this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`) |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.initCharts() |
|
|
|
@ -26,6 +31,7 @@ export class BuildingTypeOneComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
/* 首页饼状图 */ |
|
|
|
|
indexBzt |
|
|
|
|
padHw |
|
|
|
|
lengthdata=[]//提示数据
|
|
|
|
|
count=0//总数
|
|
|
|
|
indexData=[]//所有数据
|
|
|
|
@ -65,8 +71,8 @@ export class BuildingTypeOneComponent implements OnInit {
|
|
|
|
|
}, |
|
|
|
|
legend: { |
|
|
|
|
orient: 'vertical', |
|
|
|
|
right: 150, |
|
|
|
|
top:80, |
|
|
|
|
right: this.padHw?150:250, |
|
|
|
|
top:60, |
|
|
|
|
textStyle:{ |
|
|
|
|
fontSize:18, |
|
|
|
|
color:"#000000" |
|
|
|
@ -75,7 +81,7 @@ export class BuildingTypeOneComponent implements OnInit {
|
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
//top:'15%',
|
|
|
|
|
top:this.padHw?'15%':'0', |
|
|
|
|
name: '访问来源', |
|
|
|
|
type: 'pie', |
|
|
|
|
radius: '60%', |
|
|
|
|