tweak yaxis for chart data

This commit is contained in:
tjs 2023-02-10 13:50:32 -05:00
parent f6042033e4
commit 0974463f00
2 changed files with 4 additions and 4 deletions

View File

@ -371,9 +371,9 @@ const DetailedAreaChart: FunctionComponent<DetailedAreaChartProps> = ({
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]
}

View File

@ -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]
}