Command Palette

Search for a command to run...

Hectal
Phase 5: D3 Core: Selections and the Data Join
Data Visualization · Exercise 1 of 5Next
Beginner

Bars from an array

values holds five numbers. Draw one <rect> per value in the SVG: x = i * 50, width 40, height = d * 15, standing on the line y = 150.

The starter draws a single bar by hand. Replace it with a join.

What Check tests

  1. There are 5 bars
  2. The tallest bar is 135 high and holds the value 9
  3. Every bar stands on y = 150
  4. No attribute holds NaN

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.