找了好多技术文档都不适合,后来研究一个下午终于找到好办法了 上码
label: {
normal: {
show: true,
formatter: function(data) {
if (max[data.dataIndex] == null || max[data.dataIndex] == '') {
return "";
} else {
if(cur[data.dataIndex] <= min[data.dataIndex]){
return '{a|' + wickDesc[data.dataIndex] + '}';
}
return '{b|' + wickDesc[data.dataIndex] + '}';
}
},
rich: {
a: {
color: '#ff0000',
fontFamily: 'Microsoft YaHei',
fontSize: 13
},
b: {
color: '#005c98',
fontFamily: 'Microsoft YaHei',
fontSize: 13
}
}
做成了2个版本的style 就可以方便判断了