D3 Bar Charts, Lollipops, Nesting, Maps | Tim Oltman | Observable
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Author
Tim Oltman
@toltman
Comments (2)
Tim Oltman
Oct 3, 2020
Currently, the API is returning is a null value for some rocket.agencies. This causes your notebook to break. You can default the length to 0 with num_agencies: row.rocket.agencies?.length || 0
Cameron Yick
Oct 5, 2020
Great find! Wasn't sure if optional chaining was used widely, but it looks safe. Thanks for fixing this!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
0
Follow
Follow
D3 Bar Charts, Lollipops, Nesting, Maps | Tim Oltman | Observable