money scenarios: forecast horizon 1–100y (?horizon=), today’s-euro view, scaling gridlines, career paths with job hops and plateaus, crash cycles per portfolio, retirement at 68 with withdrawals, salary path table
All checks were successful
Deploy production / deploy (push) Successful in 2m49s

This commit is contained in:
2026-10-24 15:13:20 +00:00
parent c4689adda4
commit 61ae72e50b
8 changed files with 642 additions and 129 deletions

View File

@@ -12,7 +12,7 @@
title: string;
unit?: string;
marker?: { date: string; label: string };
/** Vertical gridlines: every month (1 January drawn stronger) or every year. */
/** Vertical gridlines: every month (1 January drawn stronger), every year, or every decade. */
grid?: GridMode;
} = $props();
let clientWidth = $state(800);
@@ -33,7 +33,7 @@
grid && values.length ? timeGrid(isoDate(from), isoDate(until), grid) : []
);
let axisTicks = $derived(
grid === 'years'
grid === 'years' || grid === 'decades'
? yearLabels(gridLines, Math.max(2, Math.floor((width - plot.left - plot.right) / 44)))
: ticks()
);
@@ -123,7 +123,7 @@
return result;
}
function tickLabel(date: string) {
return grid === 'years' ? date.slice(0, 4) : dateLabel(date);
return grid === 'years' || grid === 'decades' ? date.slice(0, 4) : dateLabel(date);
}
function dateLabel(date: string, withDay = false) {
return new Date(time(date)).toLocaleDateString('en-NL', {