目前用的markPoint 设置为图片,但是图片里面会显示 xaxis的值,如何可以不显示该值,见图片中的 数字 1 ;或者其他更好的实现方法也可以。
配置项如下
var i = -1;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '3%',
right: '3%',
bottom: '3%',
containLabel: true
},
xAxis: {
show:false,
type: 'value'
},
yAxis: {
show: true,
type: 'category',
data: ['AAA','BBB','CCC','DDD','EEE'],
axisLine:{
show:false
},
axisTick:{
show:false
},
axisLabel:{
margin:120,
textStyle:{
color:'#000000',
fontSize:20
}
}
},
series: [
{
name: '出库数量',
type: 'bar',
data: [19,42,64,75, 88],
label: {
normal: {
show: true,
position: 'right',
textStyle: {
color:'black',
fontSize: '30',
fontWeight: 'bold'
}
}
},
markPoint: {
data: [
{ name: '2', xAxis: 1, yAxis: 0, symbol: 'image:// http://localhost:61361/Content/images/yinshua_34.png', symbolSize: [80,100],symbolOffset:['-180%','0%'] },
{ name: '2', xAxis: 1, yAxis: 1, symbol: 'image:// http://localhost:61361/Content/images/yinshua_30.png', symbolSize: [80,100],symbolOffset:['-180%','0%'] },
{ name: '2', xAxis: 1, yAxis: 2, symbol: 'image:// http://localhost:61361/Content/images/yinshua_28.png', symbolSize: [80,100],symbolOffset:['-180%','0%'] },
{ name: '2', xAxis: 1, yAxis: 3, symbol: 'image:// http://localhost:61361/Content/images/yinshua_19.png', symbolSize: [80,100],symbolOffset:['-180%','0%'] },
{ name: '2', xAxis: 1, yAxis: 4, symbol: 'image:// http://localhost:61361/Content/images/yinshua_12.png', symbolSize: [80,100],symbolOffset:['-180%','0%'] }
]
},
itemStyle:{
normal:{
color:function(param){
i++;
var colorList = ['#FFDB0D','#40BFA4','#FFDB0D','#40BFA4','#FFDB0D','#40BFA4'];
return colorList[i]
}
}
}
}
]
};