Command Palette

Search for a command to run...

Hectal
Phase 0: Start Here: A Chart Is Just Shapes
Data Visualization · Exercise 5 of 5 Previous
Beginner

The week in seven bars

Draw the dashboard's week chart. Monday's bar is already there. Add the other six days as <rect>s, using the build's rule:

height = rides ÷ 3,992 × 160 (one decimal place), y = 180 − height, x = 30 + 50 × the day's position (Monday is 0), width 40. Rides: Tue 3,992, Wed 3,759, Thu 3,742, Fri 3,648, Sat 3,013, Sun 3,451.

Keep every bar standing on the baseline at y = 180.

What Check tests

  1. There are seven bars
  2. Each bar is 40 wide and placed at x = 30, 80, … 330
  3. Every bar stands on the baseline (y + height = 180)
  4. The heights follow the rule
  5. No bar has a negative or missing size

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.