From 2c78280c6be4f51712619e0f64fefe26130b215c Mon Sep 17 00:00:00 2001 From: elizielx Date: Sat, 2 Mar 2024 22:18:15 +0800 Subject: [PATCH] fix(app): resize chart label font sizes --- libs/components/src/charts/report-status.tsx | 24 +++++++++----------- libs/components/src/charts/total-report.tsx | 2 +- libs/components/src/charts/total-trash.tsx | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/libs/components/src/charts/report-status.tsx b/libs/components/src/charts/report-status.tsx index 3d90a03..cd503f0 100644 --- a/libs/components/src/charts/report-status.tsx +++ b/libs/components/src/charts/report-status.tsx @@ -84,7 +84,13 @@ const renderActiveShape = (props) => { /> - = 0 ? 1 : -1) * 12} y={ey} textAnchor={textAnchor} fill="#333">{`${name}`} + = 0 ? 1 : -1) * 12} + y={ey} + fontSize={10} + textAnchor={textAnchor} + fill="#333" + >{`${name}`} ); }; @@ -129,18 +135,9 @@ export function PieChartReportStatus() { console.log("chartData", chartData.data); return ( - - - + + + - + diff --git a/libs/components/src/charts/total-trash.tsx b/libs/components/src/charts/total-trash.tsx index 8060b8d..45d9007 100644 --- a/libs/components/src/charts/total-trash.tsx +++ b/libs/components/src/charts/total-trash.tsx @@ -32,7 +32,7 @@ export function AreaChartTotalTrash() { - +