// 指定颜色 itemStyle: { color: function (params) { var colorarrays = ["#990033", "#ff66cc", "#3300cc", "#ffcc00", "#339933", "#66cccc"] return colorarrays[params.dataIndex] }, },
// 指定颜色 itemStyle: { normal: { color: function () { return "#" + Math.floor(Math.random() * (256 * 256 * 256 - 1)).toString(16) } }, },
标签:颜色,color,colorarrays,指定,柱状图,随机,256,ECharts From: https://www.cnblogs.com/zhang-DaChong/p/16744030.html