Command Palette

Search for a command to run...

Hectal
Phase 18: Interviews and Capstone
Data Visualization · Exercise 2 of 5 PreviousNext
Advanced

Timed: a tooltip on a line (15 minutes)

Interview-style task, about 15 minutes. The line shows seven days at x = 20, 80, 140, 200, 260, 320 and 380. When the pointer moves over the chart, #tip must show the nearest day and its rides, as Wed: 3,759.

A pointer left of the first point or right of the last must show the first or last day, with no error in the console.

What Check tests

  1. Pointing near Wednesday shows Wed: 3,759
  2. Pointing between Thu and Fri picks the nearer one
  3. Left of the first point shows Mon
  4. Right of the last point shows Sun, with no error

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.