第一种:定制显示
series: [ { type: 'bar', data: alertSizeArr, barWidth: '30%', //柱子宽度 // barGap: 1, //柱子之间间距 itemStyle: { normal: { color: function (params) { // 定制显示(按顺序) var colorList = ['#C33531','#EFE42A','#64BD3D','#EE9201','#29AAE3', '#B74AE5','#0AAF9F','#E89589','#16A085','#4A235A','#C39BD3 ','#F9E79F','#BA4A00','#ECF0F1','#616A6B','#EAF2F8','#4A235A','#3498DB' ]; return colorList[params.dataIndex] }, opacity: 1, barBorderRadius: 5, } } } ]