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