Chart: an optional y axis title

The unit stays on the ticks; `yLabel` names the axis. It is part of the
chart's rebuild identity, so editing the title takes effect at once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTsT1isxUjw5gtkJk8WhuA
This commit is contained in:
2026-08-20 08:36:36 +02:00
co-authored by Claude Opus 5
parent cac37bca6b
commit 010e0c7e9b
2 changed files with 11 additions and 3 deletions
@@ -67,6 +67,7 @@ function presentation(cfg: Record<string, unknown>) {
const high = Number(cfg.y_max)
return {
unit: cfg.unit ? String(cfg.unit) : undefined,
yLabel: cfg.y_label ? String(cfg.y_label) : undefined,
yRange:
Number.isFinite(low) && Number.isFinite(high) && low < high
? ([low, high] as [number, number])