var optionBar = {
title: {
text: ''
},
tooltip: {},
legend: {
data:['一月销量','二月销量'],
right:'25%',
textStyle: {
fontSize: 8,
color: 'white'
},
formatter: function (name) {
console.log(name);
return name.slice(0,3)
}
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"],
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
},
yAxis: {},
series: [{
name: '一月销量',
type: 'bar',
stack:'业务',
data: [5, 20, 36, 10, 10, 20],
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
},
{
name: '二月销量',
type: 'bar',
stack:'业务',
data: [15, 25, 26, 20, 10, 20]
},
]
};