From 64d73c93f062e593cae7e56d4560026914e6d81a Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 21 九月 2023 10:14:26 +0800 Subject: [PATCH] 优化统计图表页面饼图数据显示 --- src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue index eec09ae..c025553 100644 --- a/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue +++ b/src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue @@ -359,7 +359,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -456,7 +460,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { @@ -549,7 +557,11 @@ textStyle:{ color:'#000', }, - formatter:"鏃堕暱锛歿c}H" + // formatter:"鏃堕暱锛歿c}H", + formatter:params=>{ + const value=String(params.value) + return value.length==2&&value[0]==='0'?`鏃堕暱锛�${value.slice(1)}H`:`鏃堕暱锛�${value}H` + } }, itemStyle: { normal: { -- Gitblit v1.9.3