在setOption()方法中的series配置中加上itemStyle配置
如下:
series: [{ name: \'人数\', type: \'bar\', data: [], //x轴对应列的值 itemStyle: { //上方显示数值 normal: { label: { show: true, //开启显示 position: \'top\', //在上方显示 textStyle: { //数值样式 color: \'black\', fontSize: 16 } } } } }]