一、效果图
二、代码
{
title: {
text: '单位: 种',
textStyle: {
color: '#dbdddf',
fontSize: 10
}
},
grid: {
top: '15%',
bottom: '25',
left: '40',
right: '15'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: [
{
type: 'category',
boundaryGap: false,
axisTick: {
show: false
},
data: ['E190', 'AJ27', 'B38M', 'B737', 'A319', 'A21N', 'A20N'],
axisLabel: {
fontSize: 10,
color: '#8b9299'
}
}
],
yAxis: [
{
type: 'value',
min: 0,
max: 1000,
interval: 200,
axisLabel: {
fontSize: 10,
color: '#8b9299'
},
splitLine: {
show: false
},
splitArea: {
show: true,
areaStyle: {
color: ['#162f45', '', '#162f45', '', '#162f45']
}
},
axisLine: { show: true, lineStyle: { color: '#425769' } }
}
],
series: [
{
data: [700, 780, 720, 600, 630, 670, 820],
type: 'line',
symbolSize: 4,
smooth: true,
lineStyle: {
width: '1px'
},
itemStyle: {
normal: {
color: '#1cc697',
lineStyle: {
color: '#1cc697',
type: 'solid'
}
}
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(31, 218, 163, 0.4)'
},
{
offset: 1,
color: 'rgba(31, 218, 163, 0)'
}
])
}
}
]
}