option = {
polar: {
angleAxis: {
type: 'category',
data: ['A', 'B', 'C', 'D', 'E'],
axisLabel: {
show: true,
distance: 5,
fontSize: 12,
color: '#333',
formatter: function (value, index) {
// 使用富文本格式化
return '{value|' + value + '}';
},
rich: {
value: {
fontSize: 16,
color: 'red',
fontWeight: 'bold',
fontFamily: 'Arial',
// 其他富文本样式配置...
},
},
},
// 其他配置...
},
// 其他配置...
},
// 其他配置...
};
在上述代码中,通过在 axisLabel.formatter 中使用富文本格式,然后在 rich 属性中定义富文本的样式,实现了对角度轴的类目标签的富文本样式设置。
转载请注明出处:http://www.zyzy.cn/article/detail/5269/ECharts