No.420 · Analytics
Bubble Timeline
Seven years of where people went, played like a film: each destination a bubble — across by trip cost, up by rating, sized by trips — moving through the years with the year watermarked behind, faint trails showing each path, and one you pick followed year by year.
The prompt
Written for the variant you picked above: Light
Build an animated bubble chart (Gapminder-style) of 12 destinations over 2019–2025. Encoding: x = average trip cost on a log scale (ticks 50/100/200/400/800), y = guest rating (3.5–5), bubble area ∝ trips (radius = 4 + √(trips/max)·38, smaller on phones), colour = region with only three regions — the reference palette's first three slots are the ones validated for all-pairs use (scatter) in both modes. Bubbles have a 1.5px surface ring and 82% fill; bigger ones draw behind. A huge, 5% ink year watermark sits behind the plot. Time: t runs continuously from 0 to the last year; every value is interpolated between years, so play (≈1.4s per year in a rAF loop that stops at the end; pressing again replays) moves bubbles smoothly. A range scrubber (step 0.01, snapping to the nearest year on release; arrow keys jump whole years) with the years labelled beneath. Trails: each bubble's path so far as a faint polyline in its colour; the hovered or picked bubble's trail is solid with a dot and year label at each year. Hover picks the smallest bubble under the pointer (so small ones stay reachable): the others dim to 22%, and a tooltip gives name, region, year, trips, cost and rating. Click pins it. The four biggest bubbles are labelled directly (ink with a surface halo), placed biggest-first: a label that would collide moves below its bubble or is dropped. Header insight ("Trips abroad collapsed in 2020 — and close-to-home Oman never gave the ground back."), a region legend plus "Bubble area = trips", and a Chart ⇄ Table toggle (the current year, sorted by trips). Axis titles state the scale. Light and dark themes. Reduced motion: play jumps to the last year. Selected variant — Light (light): Palette for this theme (Light): --grid #e1e0d9; --ink #0b0b0b; --ink-2 #52514e; --ring rgba(11, 11, 11, 0.1); --s1 #2a78d6; --s2 #eb6834; --s3 #1baf7a; --surface #fcfcfb. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "light". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Press play, or drag the scrubber (arrow keys step whole years); point at a bubble to read it, click to follow its trail; Table for the current year. Motion: ≈1.4s per year with continuous interpolation; dimming 160ms. Accessibility: Summary on the SVG; the scrubber is a labelled range with the year as value text; the table gives every value for the selected year; regions are legended and the largest bubbles labelled. Responsive behavior: Width follows the container; bubble sizes and year labels scale down under 560px. Touch: Tap play or drag the scrubber; tap a bubble to follow it. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Press play, or drag the scrubber (arrow keys step whole years); point at a bubble to read it, click to follow its trail; Table for the current year.
- Motion
- ≈1.4s per year with continuous interpolation; dimming 160ms.
- Accessibility
- Summary on the SVG; the scrubber is a labelled range with the year as value text; the table gives every value for the selected year; regions are legended and the largest bubbles labelled.
- Responsive
- Width follows the container; bubble sizes and year labels scale down under 560px.
- On touch
- Tap play or drag the scrubber; tap a bubble to follow it.