1,需求一,在坐标轴上插入图片展示:利用formatter与rich富文本实现
yAxis: [{
axisLabel: {
formatter: function(value, index) {
return `{img${index}|}`;
},
rich: {
value: {
fontsize: 20
},
img0: {
height: 32,
backgroundColor: {
image: require("@/assets/images/newpic/dutyA.png")
}
},
img1: {
height: 32,
backgroundColor: {
image: require("@/assets/images/newpic/dutyA.png")
}
},
img2: {
height: 32,
backgroundColor: {
image: require("@/assets/images/newpic/dutyA.png")
}
},
}
},
axisTick: {
show: false
},
axisLine: {
show: true,
lineStyle: {
color: '#BCC2CA'
}
},
splitLine: {
show: false,
}
}],
需求二,在series插入图片展示:同理也是利用formatter与rich富文本实现