Echarts设置不同柱子颜色
程序员文章站
2022-07-13 14:25:07
...
{
series: [
{
itemStyle: {
normal: {
//每根柱子颜色设置
color: function(params) {
let colorList = [
"#c23531",
"#2f4554",
"#61a0a8",
"#546570"
];
return colorList[params.dataIndex];
}
}
},
}
]
}