I want to add pictures triangle
in the series-> label -> formatter is set to add a picture, with the rich in order to achieve
{
name: '峰值',
type: 'bar',
stack: 'b',
yAxisIndex: 0,
barGap: '-100%',
barWidth: 15,
data: [100, 200],
label: {
normal: {
show: true,
position: 'right',
distance: 10,
rich: {
img1: {
backgroundColor: {
image: maxNum
}
}
},
formatter: function (param) {
var res = '';
res += param.value
+ '\n {img1|}'
return res;
},
textStyle: {
color: '#ccc',
fontSize: '16'
}
}
},
itemStyle: {
normal: {
color: '#fff'
}
},
z: 1
},
Pictures path, you can also write directly in the image: back
not only the rich can add a picture, if you want to modify the style can be added in the rich,