diff options
| author | Koen Teuwen <32361020+Koen1999@users.noreply.github.com> | 2021-10-21 13:43:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-21 13:43:36 +0200 |
| commit | eb0e0a3bc557c05a70eead388797ab850ea87366 (patch) | |
| tree | 52b250bd8127f45ba562fe67a4ea7aed1208dab9 /opendc-web/opendc-web-ui/src | |
| parent | 06c6ce9790ce2426cc91703ce5b1d03bfb4506d7 (diff) | |
feat(ui): Add tooltip to graphs in portfolio results
This change adds a tooltip to the graphs in the portfolio results, in order to
make it easier to read exact values from the graphs.
Diffstat (limited to 'opendc-web/opendc-web-ui/src')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/components/app/results/PortfolioResultsComponent.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/app/results/PortfolioResultsComponent.js b/opendc-web/opendc-web-ui/src/components/app/results/PortfolioResultsComponent.js index 759acd57..c0b16fee 100644 --- a/opendc-web/opendc-web-ui/src/components/app/results/PortfolioResultsComponent.js +++ b/opendc-web/opendc-web-ui/src/components/app/results/PortfolioResultsComponent.js @@ -1,6 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' -import { Bar, CartesianGrid, ComposedChart, ErrorBar, ResponsiveContainer, Scatter, XAxis, YAxis } from 'recharts' +import { Bar, CartesianGrid, ComposedChart, ErrorBar, ResponsiveContainer, Scatter, Tooltip, XAxis, YAxis } from 'recharts' import { AVAILABLE_METRICS, METRIC_NAMES_SHORT, METRIC_UNITS } from '../../../util/available-metrics' import { mean, std } from 'mathjs' import Shapes from '../../../shapes/index' @@ -76,6 +76,7 @@ const PortfolioResultsComponent = ({ portfolio, scenarios }) => { direction="x" /> </Scatter> + <Tooltip/> </ComposedChart> </ResponsiveContainer> </div> |
