diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/components/app/results/PortfolioResultsComponent.js | 2 | ||||
| -rw-r--r-- | frontend/src/components/modals/custom-components/NewScenarioModalComponent.js | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/frontend/src/components/app/results/PortfolioResultsComponent.js b/frontend/src/components/app/results/PortfolioResultsComponent.js index 90325b2b..35dba603 100644 --- a/frontend/src/components/app/results/PortfolioResultsComponent.js +++ b/frontend/src/components/app/results/PortfolioResultsComponent.js @@ -54,7 +54,7 @@ const PortfolioResultsComponent = ({ portfolio, scenarios }) => { <div className="col-6 mb-2" key={metric}> <h4>{METRIC_NAMES[metric]}</h4> <ResponsiveContainer aspect={16 / 9} width="100%"> - <ComposedChart data={dataPerMetric[metric]} margin={{ left: 20, bottom: 15 }} layout="vertical"> + <ComposedChart data={dataPerMetric[metric]} margin={{ left: 35, bottom: 15 }} layout="vertical"> <CartesianGrid strokeDasharray="3 3" /> <XAxis tickFormatter={(tick) => approx(tick)} diff --git a/frontend/src/components/modals/custom-components/NewScenarioModalComponent.js b/frontend/src/components/modals/custom-components/NewScenarioModalComponent.js index 51116f59..d7d99982 100644 --- a/frontend/src/components/modals/custom-components/NewScenarioModalComponent.js +++ b/frontend/src/components/modals/custom-components/NewScenarioModalComponent.js @@ -19,7 +19,11 @@ class NewScenarioModalComponent extends React.Component { } componentDidUpdate() { - this.textInput.value = this.props.currentPortfolioScenarioIds.length === 0 ? 'Base scenario' : '' + if (this.props.currentPortfolioScenarioIds.length === 0) { + this.textInput.value = 'Base scenario' + } else if (this.textInput.value === 'Base scenario') { + this.textInput.value = '' + } } reset() { |
