do not convert "count" into km/h while converting speeds.

This commit is contained in:
gluap 2022-03-08 22:21:37 +01:00
parent 51f75fcf61
commit 0c43e49bb4

View file

@ -40,7 +40,7 @@ function RoadStatsTable({data}) {
<Table.Row key={prop}> <Table.Row key={prop}>
<Table.Cell>{LABELS[prop]}</Table.Cell> <Table.Cell>{LABELS[prop]}</Table.Cell>
{['count', 'min', 'median', 'max', 'mean'].map((stat) => ( {['count', 'min', 'median', 'max', 'mean'].map((stat) => (
<Table.Cell key={stat}>{((data[prop]?.statistics?.[stat]) * (prop === `speed` ? 3.6 : 1)).toFixed(stat === 'count' ? 0 : 2)}</Table.Cell> <Table.Cell key={stat}>{((data[prop]?.statistics?.[stat]) * ((prop === `speed` && stat != 'count') ? 3.6 : 1)).toFixed(stat === 'count' ? 0 : 2)}</Table.Cell>
))} ))}
<Table.Cell>{UNITS[prop]}</Table.Cell> <Table.Cell>{UNITS[prop]}</Table.Cell>
</Table.Row> </Table.Row>