Skip to content

Add colormap legends with units to the raster layers#19

Merged
johncarmack1984 merged 1 commit into
mainfrom
audit/raster-legends
Jun 27, 2026
Merged

Add colormap legends with units to the raster layers#19
johncarmack1984 merged 1 commit into
mainfrom
audit/raster-legends

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

From the audit (ui-taste lane — "color-only raster layers have no legend scale/units").

The wind / precip-forecast / storm-potential overlays were color-only, so their values were unreadable. Lift the colormap stops into shared JS (rasterShared) and generate both the GLSL ramp and a panel legend from them — the bar always matches the map (one source). Each visible raster layer now shows a gradient legend with low/mid/high ticks and units:

  • wind — 0 / 14 / 28 m/s
  • precipitation (forecast mode only — live radar uses its own palette) — 15 / 40 / 65 dBZ
  • storm potential — 500 / 2500 / 4500 J/kg

Verified headless: all three legends render and the regenerated GLSL ramps paint identically. (The per-cursor value tooltip the audit also suggested is intentionally deferred — it needs a CPU-side grid, which conflicts with the upcoming perf fix that drops the getImageData roundtrip.)

tsc, biome, build pass.

Docs & attribution

  • N/A — UI addition, no new source.

The wind / precip-forecast / storm-potential overlays were color-only with no
scale, so their values were unreadable. Lift the colormap stops into shared JS
(rasterShared) and generate BOTH the GLSL ramp and a panel legend from them, so
the bar always matches the map. Each visible raster layer now shows a gradient
legend with low/mid/high ticks and units: wind m/s, precip dBZ, CAPE J/kg. The
precip legend appears only in forecast mode (live radar uses its own palette).
@johncarmack1984 johncarmack1984 merged commit fa75b6c into main Jun 27, 2026
7 checks passed
@johncarmack1984 johncarmack1984 deleted the audit/raster-legends branch June 27, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant