diff options
Diffstat (limited to 'modern/src/reports')
-rw-r--r-- | modern/src/reports/ChartReportPage.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js index 977c5158..00edf7b6 100644 --- a/modern/src/reports/ChartReportPage.js +++ b/modern/src/reports/ChartReportPage.js @@ -13,7 +13,9 @@ import ReportsMenu from './components/ReportsMenu'; import usePositionAttributes from '../common/attributes/usePositionAttributes'; import { useCatch } from '../reactHelper'; import { useAttributePreference } from '../common/util/preferences'; -import { distanceFromMeters, speedFromKnots, volumeFromLiters } from '../common/util/converter'; +import { + altitudeFromMeters, distanceFromMeters, speedFromKnots, volumeFromLiters, +} from '../common/util/converter'; import useReportStyles from './common/useReportStyles'; const ChartReportPage = () => { @@ -23,6 +25,7 @@ const ChartReportPage = () => { const positionAttributes = usePositionAttributes(t); const distanceUnit = useAttributePreference('distanceUnit'); + const altitudeUnit = useAttributePreference('altitudeUnit'); const speedUnit = useAttributePreference('speedUnit'); const volumeUnit = useAttributePreference('volumeUnit'); @@ -51,6 +54,9 @@ const ChartReportPage = () => { case 'speed': formatted[key] = speedFromKnots(value, speedUnit).toFixed(2); break; + case 'altitude': + formatted[key] = altitudeFromMeters(value, altitudeUnit).toFixed(2); + break; case 'distance': formatted[key] = distanceFromMeters(value, distanceUnit).toFixed(2); break; |