Browse Source

Clean up code

pull/83/head
Thomas 4 years ago
parent
commit
f5f045d0de
  1. 4
      apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

4
apps/client/src/app/components/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

@ -59,7 +59,7 @@ export class PortfolioProportionChartComponent
private initialize() { private initialize() {
this.isLoading = true; this.isLoading = true;
const chartData: { const chartData: {
[symbol: string]: { color: string; value: number }; [symbol: string]: { color?: string; value: number };
} = {}; } = {};
Object.keys(this.positions).forEach((symbol) => { Object.keys(this.positions).forEach((symbol) => {
@ -70,7 +70,6 @@ export class PortfolioProportionChartComponent
].value; ].value;
} else { } else {
chartData[this.positions[symbol][this.key]] = { chartData[this.positions[symbol][this.key]] = {
color: 'red',
value: this.positions[symbol].value value: this.positions[symbol].value
}; };
} }
@ -79,7 +78,6 @@ export class PortfolioProportionChartComponent
chartData['Other'].value += this.positions[symbol].value; chartData['Other'].value += this.positions[symbol].value;
} else { } else {
chartData['Other'] = { chartData['Other'] = {
color: 'red',
value: this.positions[symbol].value value: this.positions[symbol].value
}; };
} }

Loading…
Cancel
Save