option = {
xAxis: {
type: 'category',
boundaryGap: false,
data: [0,1,2,3,4,5,6,7,8,9,10,11,12],
axisLine:{
show: true,
lineStyle:{
color: '#aaa',
}
},
axisTick: {
show:false,
},
axisLabel:{
show: true,
}
},
tooltip:{
show:true,
trigger:'axis',
showContent: true,
formatter: '2020年{b}月<br />{c}人',
backgroundColor: '#fff',
borderColor: '#aaa',
padding: [5,10],
textStyle:{
color: '#000',
fortFamily: 'PingFang-SC-Medium' ,
extraCssText: 'border-bottom: 2px solid #CFE3F4',
},
axisPointer: {
type: 'cross',
snap: true,
}
},
yAxis: {
type: 'value',
minInterval:100,
},
series: [{
data: [0,50,200, 300,70,75,105,135,175,180,95,75,130],
type: 'line',
smooth: true,
symbolSize:8,
lineStyle: {
width:5,
},
itemStyle: {
color: '#7BB0FF'
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#7BB0FF'
}, {
offset: 1,
color: '#fff'
}])
},
}]
};