Command Palette

Search for a command to run...

Hectal
Phase 2: Seeing Data: Choosing the Right Chart
Data Visualization · Exercise 4 of 4 Previous
Intermediate

The stations box, with an empty state

show(rows) should draw the stations running low into #low: at most 5, below 40% full, emptiest first, one rect per station with data-name, width share × 240.

When no station qualifies, the box must say No station is below 40% full (as text in the box) instead of staying empty. Finish show so both cases work.

What Check tests

  1. Five bars are drawn for the nine stations
  2. The order is Clock Tower, Rope Walk, West Gate, Station Road, Hill
  3. Widths are 48, 84, 84, 88, 88
  4. Chapel (41.7% full) is not drawn
  5. With no stations the box says No station is below 40% full
  6. A station with 0 docks does not break the chart

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.