Command Palette

Search for a command to run...

Hectal
Phase 6: Scales and Axes
Data Visualization · Exercise 1 of 4Next
Intermediate

Size a bar with a scale

Thursday 5 June had 3,742 rides, and the busiest day of the year had 4,380. The bar #thu should be as long as a linear scale gives for 3,742 when 0 to 4,380 rides map to 0 to 500 pixels.

Replace the guessed width with d3.scaleLinear().

What Check tests

  1. The bar is 427.2 pixels wide
  2. The code uses scaleLinear

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.