Same data, same engine, completely different feeling.
Our transit map is functionally complete. It has parallel lines, smooth curves, proper station markers, junction
handling, and a data pipeline from GTFS. But it looks like a technical diagram. It doesn't feel like
anything. In this chapter, we give it soul.
The transformation uses three techniques: SVG filters for glow effects, color
treatment for neon intensity, and CSS animation for living, breathing stations. The
data doesn't change. The rendering functions don't change. We only change how the output looks.
Before and After
Let's start with the impact. Toggle between "clean" and "neon" — it's the same map:
Live Editor — Same data, two aesthetics
← Toggle to compare
Same stations. Same lines. Same rendering logic. The only change is a theme object that controls
colors, filters, and animations. The toggle swaps themes — the entire visual identity changes without touching
the engine.
Technique 1: SVG Filters for Glow
The neon glow is an SVG filter — a post-processing effect applied to elements after they're drawn. The filter
blurs a copy of the element and composites it behind the original:
Applied via filter="url(#glow)" on any SVG element. The blur radiates the element's color outward,
creating the neon tube effect. Two blur passes at different radii give depth — a tight bright core and a wider
diffuse aura.
Performance
SVG filters are GPU-accelerated in modern browsers, but they're still the most expensive part of rendering.
Apply the filter to a group, not to individual elements. One
<g filter="url(#glow)"> containing 50 paths is far cheaper than 50 paths each with their
own filter. For our Metro Lumina map, we apply the filter per-path for simplicity, but in production you'd
group all lines and filter once.
Technique 2: Color for Neon
The "clean" theme uses muted, print-friendly colors (dark amber, deep pink). The "neon" theme uses the same hues
but brighter and more saturated. The difference:
Live Editor — Glow intensity tuning
4px
Drag the slider. At 0, no glow — flat colored lines. At 3-4, the sweet spot —
visible aura without overpowering the line. At 8+, the glow dominates and individual lines blur
together. At 12, it's a neon soup.
The right value depends on context. A dashboard showing real-time data benefits from more restraint (2-3px). A
showcase or hero image can go bigger (4-6px). An art print can go wild.
Technique 3: Station Pulse
A static map shows infrastructure. An animated map shows a living system. The simplest animation that
transforms perception: a pulsing ring around major stations.
Live Editor — Station pulse animation
Two concentric pulse rings per station, at slightly different speeds, create an organic "sonar ping" effect. The
key details: stagger the timing (dur) between stations so they don't pulse in lockstep —
synchronized pulsing looks mechanical, staggered pulsing looks alive.
These are native SVG <animate> elements — no JavaScript needed, no requestAnimationFrame. The
browser's SVG animation engine handles them natively, which means zero CPU overhead from our code.
Technique 4: The Grid
The subtle grid lines in the neon version aren't decoration — they add depth and context. They suggest a
coordinate system, a control room, a technical environment. Six lines of SVG, faded to near-invisibility:
opacity="0.06" — barely visible, but enough to create texture. Without the grid, the dark
background is a flat void. With it, there's a sense of space and structure.
Technique 5: Scanlines (Bonus)
For an even more retro-futuristic feel, CSS can overlay horizontal scanlines using a repeating gradient:
Live Editor — CRT scanline effect
Scanlines and a vignette (darkened edges). It's a CRT monitor effect — completely optional, arguably excessive,
but it demonstrates how far you can push SVG without leaving the format. The scanline is an SVG
<pattern> of tiny semi-transparent rectangles, tiled across the entire viewport. The vignette
is a radial gradient from transparent to the background color.
Restraint
Every technique in this chapter is additive. Glow, pulse, grid, scanlines — you can stack all of them, or use
none. The right choice depends on context. A real-time operations dashboard should be readable first,
beautiful second — use subtle glow and skip the scanlines. A portfolio showpiece or art installation can go
full neon.
The rendering engine doesn't care. It outputs the same SVG elements regardless. The visual treatment is a
theme, not a structural change.
What We've Learned
Data visualization is design. The same data, rendered with different treatments, communicates different things.
A clean map says "this is infrastructure." A neon map says "this is alive." Neither is objectively better — they
serve different purposes.
The techniques: SVG <filter> for glow (two Gaussian blurs merged with the original), neon
color palettes (same hues, higher saturation and brightness), SVG <animate> for station
pulses (staggered timing), background grid for depth, and optional scanline patterns for retro atmosphere.
All of it layered on top of the unchanged rendering engine. Next: we make the trains move.