tweak yaxis for chart data
This commit is contained in:
parent
f6042033e4
commit
0974463f00
|
@ -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]
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue