title: {
text: '',
left: 'center'
},
xAxis: {
type: 'category',
},
yAxis: {
type: 'value'
},
series: [{
type: 'line',
// 接下来三句是重点,将默认形状改为圆形
symbol: 'circle',
symbolSize: 10,
smooth: true,
animationDuration: 2000,
itemStyle: {
normal: {
color: 'red',
shadowBlur: 2,
shadowColor: "rgba(0, 0, 0, .12)",
shadowOffsetX: 2,
shadowOffsetY: 2
}
},
data: [10, 40, 74, 83, 120, 146, 180]
}]
};
echarts折线图改变symbol颜色,让圆球颜色和折线相同
最新推荐文章于 2024-05-29 11:15:29 发布