series: [ { name: '', type: 'bar', label: { show: true, position: 'top', // formatter: '失效片'+ '{c}', formatter: function(v) { //让series 中的文字进行换行 //文字中遇到空格就换行,让value换行可以先把value变成字符串再slice操作 let text = '失效片'+ "\n" + v.value return text; } }, barWidth: 40, emphasis: { focus: 'series' }, data: [320, 332, 301, 334, 390, 330, 320] }, ]

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/212997.html原文链接:https://javaforall.net
