From bbccdeab388aba3fe41fc0ace634065ef7809afe Mon Sep 17 00:00:00 2001 From: songjie Date: Sat, 31 Jan 2026 09:21:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=A5=BC=E5=9B=BE=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=EF=BC=9B=E5=8A=A0=E5=85=A5=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/PlatformData/UserLoginStats.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/views/PlatformData/UserLoginStats.vue b/src/views/PlatformData/UserLoginStats.vue index c9242b0..1ff1b31 100644 --- a/src/views/PlatformData/UserLoginStats.vue +++ b/src/views/PlatformData/UserLoginStats.vue @@ -801,6 +801,7 @@ const updateRegionBarChart = (list) => { const option = { tooltip: { trigger: 'item' }, // 之前需求:取消十字线显示,改为item + formatter: '{b}: {c}', // 柱状图不需要显示百分比 legend: { data: legendData, top: 'top' }, xAxis: { type: 'category', @@ -874,8 +875,8 @@ const updatePieChart = (chartRef, chartInstance, data) => { const option = { color: regionColors, - tooltip: { trigger: 'item' }, - legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } }, + tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' }, + legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 14, fontWeight: 'bold' } }, series: [ { type: 'pie', @@ -990,7 +991,7 @@ const initCharts = () => { if (chartRegionBarRef.value) { const chart = echarts.init(chartRegionBarRef.value); chart.setOption({ - tooltip: { trigger: 'item' }, + tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' }, legend: { data: ['日活跃用户', '周活跃用户', '月活跃用户'], top: 'top' }, xAxis: { type: 'category', @@ -1010,8 +1011,8 @@ const initCharts = () => { const chart = echarts.init(chartRegionPieRef.value); chart.setOption({ color: regionColors, - tooltip: { trigger: 'item' }, - legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } }, + tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' }, + legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 14, fontWeight: 'bold' } }, series: [ { type: 'pie', @@ -1041,8 +1042,8 @@ const initCharts = () => { const chart = echarts.init(chartRegionMemberPieRef.value); chart.setOption({ color: regionColors, - tooltip: { trigger: 'item' }, - legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } }, + tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' }, + legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 14, fontWeight: 'bold' } }, series: [ { type: 'pie', @@ -1067,8 +1068,8 @@ const initCharts = () => { const chart = echarts.init(chartRegionNonMemberPieRef.value); chart.setOption({ color: regionColors, - tooltip: { trigger: 'item' }, - legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 10 } }, + tooltip: { trigger: 'item', formatter: '{b}: {c} ({d}%)' }, + legend: { orient: 'vertical', right: '15%', top: 'center', itemWidth: 10, itemHeight: 10, textStyle: { fontSize: 14, fontWeight: 'bold' } }, series: [ { type: 'pie',