diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts
index 5a5710b..d4936b2 100644
--- a/src/app/statistic-analysis/state/page-one/page-one.component.ts
+++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts
@@ -47,14 +47,12 @@ export class PageOneComponent implements OnInit {
},
tooltip: {
trigger: 'item',
- formatter: (params)=>{
- //console.log(params)
+ formatter: (params)=>{
return this.biaogeTishi(params.name)
- } ,
+ } ,
backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
borderWidth:'1',
- borderRadius :'0'
-
+ borderRadius :'0'
},
legend: {
orient: 'vertical',
@@ -101,9 +99,7 @@ export class PageOneComponent implements OnInit {
]
};
indexBzt.on('click', (params) => {
- console.log(999)
this.router.navigateByUrl('/statisticanalysis/statePageTwo_time');
- // this.router.navigate(["/statisticanalysis/statePageTwo_time"])
});
indexBzt.setOption(options);
}
@@ -125,24 +121,24 @@ export class PageOneComponent implements OnInit {
shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]'
var jsonObj = JSON.parse(shuju);
var res = '
'+biaotou+'
'
- res+='
';
- res+='';
- res+='名称 | ';
- res+='数量 | '
- res+='总占比 | '
- res+='
'
- res+='';
- for(var i=0;i'
- res+=''+jsonObj[i].name+' | '
- res+=''+jsonObj[i].number+' | '
- res+=''+jsonObj[i].zhanbi+' | '
- }
-
- res+=''
- res+='总计 | 1356 | 19% | '
- res+='
'
- return res
+ res+='';
+ res+='';
+ res+='名称 | ';
+ res+='数量 | '
+ res+='总占比 | '
+ res+='
'
+ res+='';
+ for(var i=0;i'
+ res+=''+jsonObj[i].name+' | '
+ res+=''+jsonObj[i].number+' | '
+ res+=''+jsonObj[i].zhanbi+' | '
+ }
+
+ res+=''
+ res+='总计 | 1356 | 19% | '
+ res+='
'
+ return res
}
}
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
index 7f1e369..f318b3e 100644
--- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
+++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
@@ -274,27 +274,12 @@ export class PageTwoNameComponent implements OnInit {
},
tooltip: {
trigger: 'item',
- formatter: function (params){
- var res = '预案补充'
- res+='
';
- res+='';
- res+='名称 | ';
- res+='数量 | '
- res+='总占比 | '
- res+='
'
- res+='';
- // console.log(jsonObj)
- for(var i=0;i'
- res+=''+jsonObj[i].name+' | '
- res+=''+jsonObj[i].number+' | '
- res+=''+jsonObj[i].zhanbi+' | '
- }
- res+=''
- res+='
'
- return res
- }
-
+ formatter: (params)=>{
+ return this.tableTooltip(params.name)
+ } ,
+ backgroundColor:'rgba(255,255,255,1)',//通过设置rgba调节背景颜色与透明度
+ borderWidth:'1',
+ borderRadius :'0'
},
legend: {
orient: 'vertical',
@@ -335,4 +320,35 @@ export class PageTwoNameComponent implements OnInit {
}
passPlanEchart.setOption(option);
}
+
+ tableTooltip(biaotou:string){
+ var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄埔支队","number":"144","zhanbi":"2.8%"},'
+ shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'
+ shuju+='{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},'
+ shuju+='{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},'
+ shuju+='{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},'
+ shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'
+ shuju+='{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},'
+ shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]'
+ var jsonObj = JSON.parse(shuju);
+ var res = ''+biaotou+'
'
+ res+='
';
+ res+='';
+ res+='名称 | ';
+ res+='数量 | '
+ res+='总占比 | '
+ res+='
'
+ res+='';
+ for(var i=0;i'
+ res+=''+jsonObj[i].name+' | '
+ res+=''+jsonObj[i].number+' | '
+ res+=''+jsonObj[i].zhanbi+' | '
+ }
+
+ res+=''
+ res+='总计 | 1356 | 19% | '
+ res+='
'
+ return res
+ }
}