修改前:
修改后:
关键代码:
设置一个背景并使之透明,否则宽度不生效,配合formatter使用
formatter: '{a|{name}}',
rich:{
a: {
width: 48,
fontSize: 12,
backgroundColor: "rgba(11, 39, 52, 0)" // 关键代码,设置一个背景并使之透明,否则宽度不生效,配合formatter使用
},
}
}
全部代码
option = {
xAxis: {
type: 'value',
show: false,
splitLine: {
show: false,
// lineStyle: {
// type: 'dashed', // 设置为虚线
// color: '#ccc' // 虚线颜色
// }
}
},
yAxis: {
zlevel:10,
type: 'category',
data: