Browse Source

Hide the average buy price if no holding

pull/2133/head
Thomas 2 years ago
parent
commit
2cb0fee0fc
  1. 5
      libs/ui/src/lib/line-chart/line-chart.component.ts

5
libs/ui/src/lib/line-chart/line-chart.component.ts

@ -123,7 +123,7 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
const marketPrices = []; const marketPrices = [];
this.historicalDataItems?.forEach((historicalDataItem, index) => { this.historicalDataItems?.forEach((historicalDataItem, index) => {
benchmarkPrices.push(this.benchmarkDataItems?.[index]?.value); benchmarkPrices.push(this.benchmarkDataItems?.[index]?.value || null);
labels.push(historicalDataItem.date); labels.push(historicalDataItem.date);
marketPrices.push(historicalDataItem.value); marketPrices.push(historicalDataItem.value);
}); });
@ -154,7 +154,8 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
data: benchmarkPrices, data: benchmarkPrices,
fill: false, fill: false,
label: this.benchmarkLabel, label: this.benchmarkLabel,
pointRadius: 0 pointRadius: 0,
spanGaps: false
}, },
{ {
backgroundColor: gradient, backgroundColor: gradient,

Loading…
Cancel
Save