From db1e3cfef06fe39008a3f7a097eb183909140c56 Mon Sep 17 00:00:00 2001 From: Darren Yu Date: Sat, 13 Sep 2025 16:48:31 +0800 Subject: [PATCH] fix(dashboard): y-axis truncated incorrectly in certain value --- src/component/Admin/Home/Home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/Admin/Home/Home.tsx b/src/component/Admin/Home/Home.tsx index 3be871c..54eafe1 100644 --- a/src/component/Admin/Home/Home.tsx +++ b/src/component/Admin/Home/Home.tsx @@ -150,7 +150,7 @@ const Home = () => { ...(summary?.metrics_summary?.files ?? []), ...(summary?.metrics_summary?.shares ?? []), ]; - const yAxisUpperLimit = yAxisValue.length ? Math.max(...yAxisValue) : 0; + const yAxisUpperLimit = yAxisValue.length ? Math.max(...yAxisValue) / 0.8 - 1 : 0; const yAxisDigits = yAxisUpperLimit > 0 ? Math.floor(Math.log10(yAxisUpperLimit)) + 1 : 1; return 3 + yAxisDigits * 9; })()}