Command Palette

Search for a command to run...

Hectal
Phase 6: Scales and Axes
Data Visualization · Exercise 2 of 4 PreviousNext
Intermediate

Place bars with a band scale

Draw one bar per station in #chart for Quay, Lantern and Library over 300 pixels, with a paddingInner of 0.2.

Each bar's x and width must come from the band scale (band(name) and band.bandwidth()).

What Check tests

  1. There are three bars
  2. Each bar is 85.7 pixels wide
  3. The bars start at 0, 107.1 and 214.3

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.