var color = ['red', 'blue', 'yellow', '#349ee7', '#349ee7', '#349ee7'];
color.push(new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#9a1111'
}, {
offset: 1,
color: 'rgba(203,47,47,.8)'
}]));
option = {
xAxis : [
{
type : 'category',
data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}
],
yAxis : [
{
type : 'value'
}
],
series: [{
type: 'bar',
data:[10, 52, 200, 334, 390, 330, 220],
itemStyle: {
normal: {
color: function(params) {
return color[params.dataIndex];
}
}
}
}]
};