Command Palette

Search for a command to run...

Hectal
Phase 14: Charts in React
Data Visualization · Exercise 1 of 5Next
Beginner

One rect per day

Bars draws an empty <svg>. Make it draw one <rect> for each day of week, with width={x(d.rides)}, a height of 18 and a y of 24 times its position.

Give each rect a key from the data (the day's name), not the position.

What Check tests

  1. There are 7 bars
  2. The busiest day is 340 wide and Monday is about 253.7
  3. The bars are 24 apart
  4. No key warning in the console
  5. 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.