option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
smooth: true, //true 为平滑曲线,false为直线
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "red" },
{ offset: 0.5, color: "pink" },
{ offset: 1, color: "black" }
])
}
}, //填充区域样式
lineStyle: {
color: "#00b5ff",
width: 1
}, //线条的样式
itemStyle: {
color: "rgb(255, 70, 131)",
opacity: 0 //为0不会绘制图形拐点消失
} //拐点的样式
}],
};
echarts 折现改为圆滑曲线并加阴影
最新推荐文章于 2024-01-30 17:54:12 发布