[英]How to set x-axis ticks at the left of each bar with echarts library?
let xAxis = historyTheft.map(item => moment(item[0]).format('HH:mm'));
let series = historyTheft.map(item => item[1]);
....
option = {
color: ["#009C95","#21ba45"],
title : {
text: 'Fuel History',
textStyle: {
fontFamily: 'lato'
}
},
tooltip : {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: xAxis
},
yAxis : {
type: 'value'
},
series : [
{
name:'Fuel Theft',
type:'bar',
itemStyle: {normal: {areaStyle: {type: 'default'}}},
data: series
}
]
}
我希望,它会对你有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.