pull/187/head
Thomas 4 years ago
parent 03facd03c3
commit c87a284c97

@ -20,7 +20,6 @@ import {
getMonth,
getYear,
isAfter,
isBefore,
isSameDay,
parse,
parseISO,
@ -28,7 +27,6 @@ import {
setMonth,
sub
} from 'date-fns';
import { port } from 'envalid';
import { isEmpty } from 'lodash';
import * as roundTo from 'round-to';

@ -220,7 +220,6 @@ export class Portfolio implements PortfolioInterface {
}
return cloneDeep(this.portfolioItems);
// return [];
}
public getCommittedFunds() {

@ -89,12 +89,12 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy, OnInit {
return position.investment;
}),
segment: {
borderColor: (ctx) =>
borderColor: (context: unknown) =>
this.isInFuture(
ctx,
context,
`rgba(${primaryColorRgb.r}, ${primaryColorRgb.g}, ${primaryColorRgb.b}, 0.5)`
),
borderDash: (ctx) => this.isInFuture(ctx, [2, 2])
borderDash: (context: unknown) => this.isInFuture(context, [2, 2])
},
stepped: true
}
@ -154,9 +154,9 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy, OnInit {
}
}
private isInFuture(ctx, value) {
return isAfter(new Date(ctx?.p0?.parsed?.x), new Date())
? value
private isInFuture(aContext: any, aValue: any) {
return isAfter(new Date(aContext?.p0?.parsed?.x), new Date())
? aValue
: undefined;
}
}

Loading…
Cancel
Save