option = { title: { text: '柱形图' }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, grid: { left: '0', bottom: '3%', right: '12%', containLabel: true }, xAxis: [{ type: 'category', data: ['北京', '上海', '广州', '深圳', '武汉', '西安'], axisTick: { alignWithLabel: true }, axisLabel: {}, }], yAxis: [{ show: true, type: 'value', splitLine: { show: true, lineStyle: { type: 'dashed' } }, axisTick: { show: false }, axisLabel: { show: false }, axisLine: { show: false }, }], series: [{ name: '出差支出', type: 'bar', barWidth: '30%', data: [600, 420, 330, 320, 280, 200], label: { normal: { show: true, position: 'top', color: '#000000', formatter: function(val) { //让series 中label文字转换 var { data } = val return '¥' + data } } }, itemStyle: { normal: { color: "#3398DB" } } }] };