Intermediate
Click a bar to see its station
Clicking a bar should write the station's name and rides into #info, like Lantern: 7,260 rides. Use .on("click", (event, d) => ...).
Keep draw safe to call again: it runs twice at the start, and one click must still run the handler once.
What Check tests
- Clicking the first bar shows Lantern: 7,260 rides
- Clicking the third bar shows Library: 6,390 rides
- One click runs the handler once, even after two draws
- The old d3.event is not used
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.