series下面的這個areaStyle
series: [ { data: count, type: "line", smooth: true, 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不會繪制圖形拐點消失 } //拐點的樣式 } ],
效果圖