Skip to content

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

Bugfix/issue in treemap chart component with empty holdings (#7213)

Thomas Kaul42ddd708b3d3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f7299820ec..cb3c75705b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Resolved an issue in the treemap chart component when the holdings list is empty
- Fixed the market condition of the benchmarks in the twitter bot service when values round to zero
## 3.19.1 - 2026-07-03
diff --git a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts
index 2a04ba6ba7..fd4e63f29d 100644
--- a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts
+++ b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts
@@ -207,6 +207,10 @@ export class GfTreemapChartComponent
datasets: [
{
backgroundColor: (context: GfTreemapScriptableContext) => {
+ if (!context.raw) {
+ return undefined;
+ }
+
let annualizedNetPerformancePercent =
getAnnualizedPerformancePercent({
daysInMarket: differenceInDays(
@@ -239,6 +243,10 @@ export class GfTreemapChartComponent
labels: {
align: 'left',
color: (context: GfTreemapScriptableContext) => {
+ if (!context.raw) {
+ return undefined;
+ }
+
let annualizedNetPerformancePercent =
getAnnualizedPerformancePercent({
daysInMarket: differenceInDays(