Say what the data shows, and no more
A chart that looks fine and claims too much: "cost us 3,173 rides" is arithmetic against a normal day, not a measured effect of the outage. The two e-bike charts show the same data; only the second is steep, and its axis says where it starts.
Annotations are the narrator of a chart: a few words, placed beside the mark they talk about, that tell the eye where to look. The order of the steps (setting up, building, the reveal) decides whether the reader follows, and honest framing decides whether they should.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 6 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write fits(textBox, chartWidth, chartHeight) that returns true only when the box is entirely inside the chart. Test it with boxes that overflow right, overflow left, overflow the top, and fit exactly.
Draft the annotation for the busiest day (18 July, 4,380 rides). It must state the number and not claim a cause. Say why you left out "because of the sunshine".
Explain it without notes
Why compute an annotation's position from the data row instead of hard-coding pixels?
What goes wrong when a label is placed next to a point near the right edge, and how do you prevent it?
Name the four moves of the story structure used for Lina's page, and say what each does.
Why is "the outage cost us 3,173 rides" a risky sentence, and what do you write instead?
Preview
Console
Nothing logged yet.Expected console output
14 Aug: 439 rides, 12% of a normal August day (3612)
That day also had 8.6 mm of rain. Other rainy August days averaged 3067 rides (-15%)
Too strong : "The app outage cost us 3173 rides."
Honest : "14 Aug: 439 rides. The app was down, and it rained (8.6 mm)."
E-bike share: 28.3% in January, 37.7% in December
The rise fills 19% of the chart's height with a 0 baseline, 63% with a 25 baseline