echarts的柱状图的多个柱子的颜色设置

itemStyle:{

normal:{

color:function(params){

var color=['red','yellow','blue']

return color[params.dataIndex%color.length]

}

}

}

 

posted @ 2022-06-01 08:59  干饭吧  阅读(1073)  评论(0)    收藏  举报