series: [{
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
itemStyle: {
normal:{
color: function (params){
var colorList = ['#ff4844','#9ac3e5','#66ac52','#ffc032','#549bd3','#f47e39'];
return colorList[params.dataIndex];
}
},
},
}]
echarts给柱形图的每个柱子设置不同颜色
最新推荐文章于 2024-05-30 23:16:00 发布