个性化选中突出单独柱子上的数字的样式
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
label: {
show: true,
position: 'top',
formatter: function(param){
if(param.name=='Sun'){
return '{a|'+param.value+'}'
}else{
return
}
},
rich: {
a: {
fontSize: 18,
fontFamily: 'Microsoft YaHei',
color: 'black',
borderRadius: 4
}
}
},
}]
};