Intermediate
No NaN, ever
Bars crashes into NaN widths when a day has no reading, and draws an empty frame for an empty list. Fix it: leave out rows whose value is not a finite number, and show the sentence No data to draw. when nothing is left.
The scale must not divide by zero when every value is 0.
What Check tests
- The row with a null is left out: 2 bars
- An empty list says No data to draw.
- All zeros draw zero-width bars, not NaN
- 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.