From 50e8e3e2342e23dfab23c7bd01d79d62a789a81f Mon Sep 17 00:00:00 2001 From: wangxi <123456> Date: Wed, 16 Mar 2022 18:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../history/analysis/components/TrainCard.tsx | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/admin/src/pages/history/analysis/components/TrainCard.tsx b/admin/src/pages/history/analysis/components/TrainCard.tsx index 3a848bc..c8324ac 100644 --- a/admin/src/pages/history/analysis/components/TrainCard.tsx +++ b/admin/src/pages/history/analysis/components/TrainCard.tsx @@ -32,7 +32,7 @@ const SalesCard = () => { data.push({ city: e.city_name, count: e.count, - credential_rate: e.credential_rate + credential_rate: e.credential_rate?e.credential_rate:0 }) }) @@ -48,7 +48,40 @@ const SalesCard = () => { title: { text: '证书比例', }, + label: { + formatter: (val) => `${val}%`, + }, }], + tooltip: { + customContent: (title, items) => { + return ( + <> +
{title}
+ + + ); + }, + }, geometryOptions: [ { geometry: 'column', @@ -81,7 +114,7 @@ const SalesCard = () => { -
+