关于echarts中的饼状图的label文字显示过长的问题

label: {
                    normal: {
                        fontSize: 14,
                        formatter(v) {
                            let text = v.name
                            let count = text.indexOf('¥')
                            console.log()
                            return text.length < count
                                ? text 
                                : `${text.slice(0,count)}\n${text.slice(count)}`
                        }
                    }
                },

 

posted @ 2019-08-29 17:51  来亦何哀  阅读(3289)  评论(0编辑  收藏  举报