例一:

series[j].itemStyle={
                 normal: {
                     color: function(params) {                    
                       if(params.series.data[params.dataIndex] != null && params.series.data[params.dataIndex].color != undefined)
                       {
                          return params.series.data[params.dataIndex].color;
                       }else
                       {
                         return params.series.color;
                       }
                     }
                   }
               }

例二:

itemStyle: {
                normal: {
                    color: function(params) {
                        // build a color map as your need.
                        var colorList = [
                          '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
                           '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                           '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
                        ];
                        return colorList[params.dataIndex]
                    },
                    label: {
                        show: true,
                        position: 'top',
                        formatter: '{b}\n{c}'
                    }
                }
            },

DEMO:http://echarts.baidu.com/echarts2/doc/example/bar14.html

欢迎留言