evOo-local/apps/web/src/lib/chart-viewport.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

13 lines
440 B
TypeScript

/** Size for the expanded chart modal: 88% of the viewport width capped at
* 1240px, and 66% of the viewport height. Pure so it can be unit-tested;
* callers recompute it when the window resizes. */
export function chartViewport(
windowWidth: number,
windowHeight: number,
): { width: number; height: number } {
return {
width: Math.min(1240, Math.floor(windowWidth * 0.88)),
height: Math.floor(windowHeight * 0.66),
};
}