解决冲突

This commit is contained in:
wangshiming
2022-04-07 19:51:54 +08:00
parent df9fda1057
commit f0cfb3b874
4 changed files with 28 additions and 20 deletions

View File

@ -116,27 +116,32 @@ export class DatatableCustomindexMapComponent implements OnInit, OnChanges {
}).transform({
type: 'map',
callback: (obj: { trend: string; value: number }) => {
obj.trend = obj.value > 100 ? '蓝色地区' : '灰色地区';
if(obj.value < 500) {
obj.trend = '500以下';
} else if(obj.value >= 500 && obj.value < 1200){
obj.trend = '500-1000';
} else if(obj.value >= 1200 ){
obj.trend = '>1000';
}
return obj;
}
});
this.userView = this.chart.createView();
this.userView.data(this.userDv.rows);
// this.userView.scale({
// trend: {
// alias: '蓝色地区数量'
// }
// });
this.userView.scale({
trend: {
alias: '蓝色地区数量'
}
});
console.log(this.userView);
console.log('45545');
this.userView.polygon().position('longitude*latitude').color('trend', ['#c7daf3', '#1779f3']).tooltip('').style({fillOpacity: 0.85 })
// .animate({
// leave: {
// animation: 'fade-out'
// }
// });
this.userView.polygon().position('longitude*latitude').color('trend', ['#0a3f80', '#1b6aca', '#5d93d4']).tooltip('name*trend*value').style({fillOpacity: 0.85 })
.animate({
leave: {
animation: 'fade-out'
}
});
this.userView.interaction('element-active');
this.chart.render();