option = {
title: {
text: '交易金额(元)'
},
legend: {
// right: "right",
top: 'bottom',
padding: [1, 0, 0, 0],
// left: "550",
data: ['一','二','三'],// 类型集合
},
grid: {
left: 100
},
/*toolbox: {
show: true,
feature: {
saveAsImage: {}
}
},*/
xAxis: {
type: 'value',
name: '元',
axisLabel: {
formatter: '{value}'
}
},
yAxis: {
type: 'category',
inverse: true,
data: [''],
axisLabel: {
formatter: function (value) {
return '';
},
margin: 20,
}
},
series: [
{
name: '一',
type: 'bar',
data: [100],
label: {
show: true,
position: "right", // 数值显示在内部
fontSize: 12,
formatter: function (params) {
return params.value
}
},
},
{
name: '二',
type: 'bar',
data: [200],
label: {
show: true,
position: "right", // 数值显示在内部
fontSize: 12,
formatter: function (params) {
return params.value
}
},
},
{
name: '三',
type: 'bar',
data: [150],
label: {
show: true,
position: "right", // 数值显示在内部
fontSize: 12,
formatter: function (params) {
// 格式化金额
return params.value
}
},
},
]
};
09-11
1254
08-12
1010