option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
// 两个主题,就是数组里有两个对象
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
label:{
show: true,
position: 'left',
}
},
{
data: [30, 40, 50, 60, 70, 80, 90],
type: 'bar',
label:{
show: true,
position: ['110%','0%'], //控制位置
padding:[2,10],
lineHeight:10,
fontSize:12,
borderColor:'red',
borderWidth:'1'
}
}
]
};
双柱状图-两个label记录
最新推荐文章于 2023-10-10 16:48:47 发布