想实现一个柱状图,表示范围的数值
以下是option的代码
option = {
color: ['#3398DB'],
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'category',
data : [ '10', '20', '30', '40', '50', '60'],
axisLabel:{
align:'left',
width:'100%'
},
offset:10,
axisTick:{
alignWithLabel:false
}
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'直接访问',
type:'bar',
barWidth: '60%',
data:[10, 52, 200, 334, 390, 330, 220],
barWidth:'100%'
}
]
};
效果如图所示
想将刻度的文字(10 20 30 。。 )移动到箭头所指的刻度正下方,该如何处理
设置
xAxis.axisTick.alignWithLabel
为true
就可以Echarts官网说明