如果在X轴固定显示2,4,8,16,32,64,65
而不是自动生成的10,20,30,40...
配置项如下
option = {
title: {
text: 'Awesome Chart'
},
tooltip: {
trigger: 'axis'
},
legend:{
data:['上限']
},
xAxis: {
type:'value'
},
yAxis: {},
series: [{
name:"上限",
type: 'line',
lineStyle:{
normal:{
color:'#99FF99',
width:6
}
},
data:[[2,220], [4,182], [8,191], [16,234], [32,290], [64,330], [65,310]]
},
{
name:'2017-01-01',
type: 'line',
data:[[2,231], [4,193], [8,291], [16,244], [32,310], [64,340], [65,330]]
} ]
};