From 0974463f00c04d360a27fbbab47e3c88c980e812 Mon Sep 17 00:00:00 2001 From: tjs Date: Fri, 10 Feb 2023 13:50:32 -0500 Subject: [PATCH] tweak yaxis for chart data --- components/shared/DetailedAreaChart.tsx | 4 ++-- components/shared/SimpleAreaChart.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/shared/DetailedAreaChart.tsx b/components/shared/DetailedAreaChart.tsx index ed0277dd..d34255de 100644 --- a/components/shared/DetailedAreaChart.tsx +++ b/components/shared/DetailedAreaChart.tsx @@ -371,9 +371,9 @@ const DetailedAreaChart: FunctionComponent = ({ if (difference < 0.1) { return [dataMin - 0.01, dataMax + 0.01] } else if (difference < 1) { - return [dataMin - 1, dataMax + 1] + return [dataMin - 0.1, dataMax + 0.1] } else if (difference < 10) { - return [dataMin - 10, dataMax + 10] + return [dataMin - 1, dataMax + 1] } else { return [dataMin, dataMax] } diff --git a/components/shared/SimpleAreaChart.tsx b/components/shared/SimpleAreaChart.tsx index 2c2ca4c1..206c58bb 100644 --- a/components/shared/SimpleAreaChart.tsx +++ b/components/shared/SimpleAreaChart.tsx @@ -47,9 +47,9 @@ const SimpleAreaChart = ({ if (difference < 0.1) { return [dataMin - 0.01, dataMax + 0.01] } else if (difference < 1) { - return [dataMin - 1, dataMax + 1] + return [dataMin - 0.1, dataMax + 0.11] } else if (difference < 10) { - return [dataMin - 10, dataMax + 10] + return [dataMin - 1, dataMax + 1] } else { return [dataMin, dataMax] }