各位老哥们,如何判断柱子中的数值大小,如果太小,让数值显示到柱子顶部,其余的继续显示在柱子内部
配置项如下
option = {
color: ['#3398DB'],
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
xAxis : [
{
type : 'category',
data : ['adasd', 'asdasd', 'asdasd', 'qweqwe', 'zxczx', 'hfgfgh', 'ryrtyrt'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
type:'bar',
barWidth: '60%',
itemStyle:{
normal:{
label:{
show:true,
position:'insideTop',
textStyle:{
fontSize:20,
fontWeight:'bolder',
}
}
}
},
data:[1, 50, 100, 150, 200, 250, 300]
}
]
};