ECharts 应用-平滑折线(曲线)、渐变折线

作者:vkvi 来源:ITPOW(原创) 日期:2020-12-5

ECharts 应用-平滑折线、渐变折线

option.series.push({
	name: "序列1",
	type: "line",
	data: [10, 20, 10],
	smooth: true,
	lineStyle: {
		color: {
			colorStops: [{
				offset: 0, color: '#f00'
			}, {
				offset: 1, color: '#0f0'
			}]
		}
	}
});

如上:smooth 为 true 表示平滑;lineStyle 表示线条样式,默认是线性渐变,更多参数,请参考:Documentation - Apache ECharts(incubating)

相关文章