Skip to content

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

Feature/minor improvements in chart components (#1353)

Thomas Kaulccb8c8659625
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b262503f20..29a6a5205b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Respected the current date in the _FIRE_ calculator
- Simplified the settings management in the admin control panel
- Renamed the data source type `RAKUTEN` to `RAPID_API`
diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
index 8ef10eca24..91822e6ebf 100644
--- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
+++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
@@ -51,8 +51,6 @@ export class FireCalculatorComponent
@ViewChild('chartCanvas') chartCanvas;
- private readonly CONTRIBUTION_PERIOD = 12;
-
public calculatorForm = this.formBuilder.group({
annualInterestRate: new FormControl<number>(undefined),
paymentPerPeriod: new FormControl<number>(undefined),
@@ -63,6 +61,7 @@ export class FireCalculatorComponent
public isLoading = true;
public projectedTotalAmount: number;
+ private readonly CONTRIBUTION_PERIOD = 12;
private unsubscribeSubject = new Subject<void>();
public constructor(
@@ -235,6 +234,7 @@ export class FireCalculatorComponent
grid: {
display: false
},
+ position: 'right',
stacked: true,
ticks: {
callback: (value: number) => {
diff --git a/libs/ui/src/lib/line-chart/line-chart.component.ts b/libs/ui/src/lib/line-chart/line-chart.component.ts
index 087f961b22..aadfde80d1 100644
--- a/libs/ui/src/lib/line-chart/line-chart.component.ts
+++ b/libs/ui/src/lib/line-chart/line-chart.component.ts
@@ -231,8 +231,8 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
},
max: this.yMax,
min: this.yMin,
+ position: 'right',
ticks: {
- display: this.showYAxis,
callback: (tickValue, index, ticks) => {
if (index === 0 || index === ticks.length - 1) {
// Only print last and first legend entry
@@ -254,6 +254,7 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
return '';
},
+ display: this.showYAxis,
mirror: true,
z: 1
},