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

Loading…
Cancel
Save