From 2db2a471147598b1e583264284e04268530a3fc9 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Tue, 29 Sep 2026 20:51:37 +0200
Subject: [PATCH] Bugfix/color scheme of investment chart (#7972)
* Fix color scheme of investment chart component
* Update changelog
---
CHANGELOG.md | 1 +
.../account-detail-dialog.html | 1 +
.../investment-chart.component.ts | 24 ++++++++++++-------
.../portfolio/analysis/analysis-page.html | 3 +++
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 998d9fe239..7c55df458c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Fixed the colors of the investment chart component (dark mode)
- Fixed the value column of the top holdings on the allocations page in the _Presenter View_
- Fixed the projected sustainable retirement income on the _FIRE_ page for a projected total amount of zero (experimental)
- Fixed the emergency fund in the portfolio summary for redacted values
diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
index a87179ecb9..5a86e4aa9b 100644
--- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
+++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
@@ -23,6 +23,7 @@
(
this.chartCanvas().nativeElement,
{
data: chartData,
options: {
animation: false,
- elements: getChartElementsOptions(this.colorScheme),
+ elements: getChartElementsOptions(colorScheme),
interaction: { intersect: false, mode: 'index' },
maintainAspectRatio: true,
plugins: {
@@ -204,7 +210,7 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy {
value: this.savingsRate
}
: undefined,
- yAxis: getZeroLineAnnotation(this.colorScheme)
+ yAxis: getZeroLineAnnotation(colorScheme)
}
},
legend: {
@@ -212,18 +218,18 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy {
},
tooltip: this.getTooltipPluginConfiguration(),
verticalHoverLine: {
- color: getChartBorderColor(this.colorScheme)
+ color: getChartBorderColor(colorScheme)
}
},
responsive: true,
scales: {
x: getTimeAxisOptions({
+ colorScheme,
borderWidth: this.groupBy ? 0 : 1,
- colorScheme: this.colorScheme,
locale: this.locale
}),
y: getValueAxisOptions({
- colorScheme: this.colorScheme,
+ colorScheme,
display: !this.isInPercentage,
tickCallback: (tickValue) => {
return transformTickToAbbreviation(Number(tickValue));
@@ -232,7 +238,7 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy {
}
},
plugins: [
- getVerticalHoverLinePlugin(this.chartCanvas(), this.colorScheme)
+ getVerticalHoverLinePlugin(this.chartCanvas(), colorScheme)
],
type: this.groupBy ? 'bar' : 'line'
}
@@ -245,7 +251,7 @@ export class GfInvestmentChartComponent implements OnChanges, OnDestroy {
TooltipOptions<'bar' | 'line'>
> {
return getTimeSeriesTooltipOptions<'bar' | 'line'>({
- colorScheme: this.colorScheme,
+ colorScheme: this.colorScheme ?? DEFAULT_COLOR_SCHEME,
currency: this.isInPercentage ? undefined : this.currency,
groupBy: this.groupBy,
locale: this.isInPercentage ? undefined : this.locale,
diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html
index 47cee7af6e..2756076b7a 100644
--- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html
+++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html
@@ -443,6 +443,7 @@
class="h-100"
[benchmarkDataItems]="investments"
[benchmarkDataLabel]="portfolioEvolutionDataLabel"
+ [colorScheme]="user?.settings?.colorScheme"
[currency]="user?.settings?.baseCurrency"
[historicalDataItems]="performanceDataItems"
[isInPercentage]="showValuesInPercentage()"
@@ -499,6 +500,7 @@
class="h-100"
[benchmarkDataItems]="investmentsByGroup"
[benchmarkDataLabel]="investmentTimelineDataLabel"
+ [colorScheme]="user?.settings?.colorScheme"
[currency]="user?.settings?.baseCurrency"
[groupBy]="mode()"
[isInPercentage]="showValuesInPercentage()"
@@ -534,6 +536,7 @@
class="h-100"
[benchmarkDataItems]="dividendsByGroup"
[benchmarkDataLabel]="dividendTimelineDataLabel"
+ [colorScheme]="user?.settings?.colorScheme"
[currency]="user?.settings?.baseCurrency"
[groupBy]="mode()"
[isInPercentage]="showValuesInPercentage()"