bptrgx 2 years ago
parent
commit
0ed0e53d88
  1. 12
      apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts

12
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts

@ -113,17 +113,13 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
this.grossPerformancePercent = grossPerformancePercent; this.grossPerformancePercent = grossPerformancePercent;
this.historicalDataItems = historicalData.map( this.historicalDataItems = historicalData.map(
(historicalDataItem) => { (historicalDataItem) => {
if (historicalDataItem.averagePrice) {
this.benchmarkDataItems.push({ this.benchmarkDataItems.push({
date: historicalDataItem.date, date: historicalDataItem.date,
value: historicalDataItem.averagePrice value:
historicalDataItem.averagePrice > 0
? historicalDataItem.averagePrice
: null
}); });
} else {
this.benchmarkDataItems.push({
date: historicalDataItem.date,
value: null
});
}
return { return {
date: historicalDataItem.date, date: historicalDataItem.date,

Loading…
Cancel
Save