Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/fix max items attribute (#698)

Thomas Kaul20356f69316e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 887afd333c..a5bd00d3ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the mobile layout of the position detail dialog (countries and sectors charts)
+### Fixed
+
+- Fixed the `maxItems` attribute of the portfolio proportion chart component
+
## 1.115.0 - 13.02.2022
### Added
diff --git a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
index 470d135c22..ca0475d665 100644
--- a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
+++ b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
@@ -150,11 +150,11 @@ export class PortfolioProportionChartComponent
});
if (!unknownItem) {
- const index = chartDataSorted.push([
+ chartDataSorted.push([
UNKNOWN_KEY,
{ name: UNKNOWN_KEY, subCategory: {}, value: 0 }
]);
- unknownItem = chartDataSorted[index];
+ unknownItem = chartDataSorted[chartDataSorted.length - 1];
}
rest.forEach((restItem) => {