echarts 柱状图上显示数字代
let option = {
dataset: {
source: data.reverse()
},
grid: {containLabel: true},
xAxis: {name: ''},
yAxis: {type: 'category'},
color: '#73d13d',
series: [
{
type: 'bar',
encode: {
x: 'value',
y: 'name'
},
label: {
normal: {
show: true,
position: 'right'
},
formatter: '{@value}'
}
}
]
};