From 4198783ccfb8722fc8558f0c2af74b7d7a38b226 Mon Sep 17 00:00:00 2001 From: zhaoxiao Date: Sun, 26 Sep 2021 15:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/Analysis.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue index 808c9f0..755cbb7 100644 --- a/src/views/dashboard/Analysis.vue +++ b/src/views/dashboard/Analysis.vue @@ -150,9 +150,12 @@ export default { bottom: 20, itemGap: 30, // 图例间距 itemWidth: 13, - data: ['Search Engine', 'Direct', 'Email', 'Union Ads', 'Video Ads', 'Search Engine1', 'Direct1', 'Email1', 'Union Ads1', 'Video Ads1'], + data: [], formatter: function (name) { return name.length > 7 ? name.substr(0, 7) + '...' : name + }, + tooltip: { + show: true } }, tooltip: { @@ -167,7 +170,10 @@ export default { width: '50%', label: { show: false, - position: 'center' + position: 'center', + formatter: function (params) { + return params.name.length > 8 ? params.name.substr(0, 8) + '...' : params.name + }, }, emphasis: { label: {