# Charting architecture ## Decision: one chart engine for all live metrics **Engine:** `github.com/go-analyze/charts` (pure Go, no CGO, SVG output) **Theme:** `grafana` (dark background, coloured lines) All live metrics charts in the web UI are server-side SVG images served by Go and polled by the browser every 2 seconds via ``. There is no client-side canvas or JS chart library. ### Why go-analyze/charts - Pure Go, no CGO — builds cleanly inside the live-build container - SVG output — crisp at any display resolution, full-width without pixelation - Grafana theme matches the dark web UI colour scheme - Active fork of the archived wcharczuk/go-chart ### SAT stress-test charts The `drawGPUChartSVG` function in `platform/gpu_metrics.go` is a separate self-contained SVG renderer used **only** for completed SAT run reports (HTML export, burn-in summaries). It is not used for live metrics. ### Live metrics chart endpoints | Path | Content | |------|---------| | `GET /api/metrics/chart/server.svg` | CPU temp, CPU load %, mem load %, power W, fan RPMs | | `GET /api/metrics/chart/gpu/{idx}.svg` | GPU temp °C, load %, mem %, power W | Charts are 1400 × 280 px SVG. The page renders them at `width: 100%` in a single-column layout so they always fill the viewport width. ### Ring buffers Each metric is stored in a 120-sample ring buffer (2 minutes of history at 1 Hz). Buffers are per-server or per-GPU and grow dynamically as new GPUs appear.