本文主要是介绍echarts 折现改为圆滑曲线并加阴影,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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 折现改为圆滑曲线并加阴影的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!