|
|
@ -98,6 +98,10 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy { |
|
|
|
} |
|
|
|
|
|
|
|
private initialize() { |
|
|
|
const benchmarkAssetProfile = this.benchmarks.find(({ id }) => { |
|
|
|
return id === this.benchmark; |
|
|
|
}); |
|
|
|
|
|
|
|
const data: ChartData<'line'> = { |
|
|
|
datasets: [ |
|
|
|
{ |
|
|
@ -116,7 +120,7 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy { |
|
|
|
data: this.benchmarkDataItems.map(({ date, value }) => { |
|
|
|
return { x: parseDate(date).getTime(), y: value }; |
|
|
|
}), |
|
|
|
label: $localize`Benchmark` |
|
|
|
label: benchmarkAssetProfile?.name ?? $localize`Benchmark` |
|
|
|
} |
|
|
|
] |
|
|
|
}; |
|
|
|