上代码
if(this.canvasProps.showFalse){
// 是否展示异常
chart.point()
.position(colorList[1].name)
.size('abnormalBatteryCount', function(val) {
// console.log(val,'val1')
return val ? 3 : 0;
})
.style('abnormalBatteryCount', {
fill: function fill(val) {
console.log(val,'val2')
if (val) {
return 'red';
}
// else if (val === 'putongs') {
// return '#518DFE';
// }
},
stroke: '#fff',
lineWidth: 1
});
}