angular5使用echart渐变色功能
1.import echarts from 'echarts';
2.
options = {
backgroundColor: '#fff',
xAxis: {
type: 'category',
boundaryGap: false,
data: xValue,
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line',
itemStyle: {
color: '#00CD9F'
},
areaStyle: {
color: new (<any>echarts).graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(0,205,159,0.2)'
}, {
offset: 1,
color: 'rgba(0,232,205,0)'
}])
}
}]
};

浙公网安备 33010602011771号