Feature/hide average buy price in position detail chart if no holding (#2133)
* Hide the average buy price if no holding * Update changelog
This commit is contained in:
parent
2d23c566f1
commit
c434b730a8
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Hid the average buy price in the position detail chart if there is no holding
|
||||||
- Improved the language localization for French (`fr`)
|
- Improved the language localization for French (`fr`)
|
||||||
- Refactored the blog articles to standalone components
|
- Refactored the blog articles to standalone components
|
||||||
|
|
||||||
|
@ -215,6 +215,15 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
|
|||||||
this.benchmarkDataItems[0].value = this.averagePrice;
|
this.benchmarkDataItems[0].value = this.averagePrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.benchmarkDataItems = this.benchmarkDataItems.map(
|
||||||
|
({ date, value }) => {
|
||||||
|
return {
|
||||||
|
date,
|
||||||
|
value: value === 0 ? null : value
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (Number.isInteger(this.quantity)) {
|
if (Number.isInteger(this.quantity)) {
|
||||||
this.quantityPrecision = 0;
|
this.quantityPrecision = 0;
|
||||||
} else if (this.SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') {
|
} else if (this.SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') {
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user