From 92b951df1d02e609907dc3f69703ac544fde692c Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 1 Nov 2020 22:08:04 +0100 Subject: Show full metric names This change updates the frontend such that metrics are now shown by their full name instead of a code. --- frontend/src/components/app/results/PortfolioResultsComponent.js | 4 ++-- .../components/modals/custom-components/NewPortfolioModalComponent.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/app/results/PortfolioResultsComponent.js b/frontend/src/components/app/results/PortfolioResultsComponent.js index 10b189a6..759acd57 100644 --- a/frontend/src/components/app/results/PortfolioResultsComponent.js +++ b/frontend/src/components/app/results/PortfolioResultsComponent.js @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { Bar, CartesianGrid, ComposedChart, ErrorBar, ResponsiveContainer, Scatter, XAxis, YAxis } from 'recharts' -import { AVAILABLE_METRICS, METRIC_NAMES, METRIC_UNITS } from '../../../util/available-metrics' +import { AVAILABLE_METRICS, METRIC_NAMES_SHORT, METRIC_UNITS } from '../../../util/available-metrics' import { mean, std } from 'mathjs' import Shapes from '../../../shapes/index' import approx from 'approximate-number' @@ -52,7 +52,7 @@ const PortfolioResultsComponent = ({ portfolio, scenarios }) => {
{AVAILABLE_METRICS.map((metric) => (
-

{METRIC_NAMES[metric]}

+

{METRIC_NAMES_SHORT[metric]}

{ const textInput = useRef(null) @@ -39,7 +39,7 @@ const NewPortfolioModalComponent = ({ show, callback }) => { type="checkbox" innerRef={(ref) => (metricCheckboxes.current[metric] = ref)} /> - {metric} + {METRIC_NAMES[metric]} ))} -- cgit v1.2.3