帮朋友看的时候有要求是线型要折线不要曲线,具体看图
而要求是:
关键的一句,就是
series: [{ //在series里面
name: '进港航班统计',
type: 'line',
symbolRotate:0,
// smooth: true, //如果你找的案例有这一句,请注释就可以了,具体作用可以去官网看看
lineStyle: {
normal: {
width: 1
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(137, 189, 27, 0.3)'
}, {
offset: 0.8,
color: 'rgba(137, 189, 27, 0)'
}], false),
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 10
}
},
itemStyle: {
normal: {
color: 'rgb(137,189,27)'
}
},
data: [96.3,96.4,97.5,95.6,98.1,94.8,89.6,94.1,80.1,52.4,75.8,94.7]
}]