柱状图不同颜色实现
series: [
{
name: '',
type: 'bar',
// color:'#50cfe4',
//data: [987342,524214,504344,325424,245324,242102]
itemStyle: {
normal: {
color: function(params) {//柱状图不同颜色实现
// build a color map as your need.
let colorList = [
'#ed6974',
'#efa832',
'#3398dc',
'#36d497',
'#50cfed',
"#8181ff"
];
return colorList[params.dataIndex]
},
}