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)