Let’s Make a Bar Chart, Part 2 | D3 | Observable
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Author
Mike Bostock
@mbostock
Visualization toolmaker. Founder
@observablehq
. Creator
@d3
. Former
@nytgraphics
. Pronounced BOSS-tock.
Comments (5)
Nicolas Embleton
Sep 19, 2020
Small typo at `look it`, should be "look *like* it".
Mike Bostock
Sep 19, 2020
Fixed, thanks!
Reply
Ruben Rizzi
Mar 6, 2021
In the code above, shouldn't it be .attr("y", (y.bandwidth() - 1) / 2) to match the static example?
Mike Bostock
Mar 6, 2021
Yes, thank you! Fixed.
leeminuck
Nov 22, 2021
oh! good!
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
33
Follow
Follow
Let’s Make a Bar Chart, Part 2 | D3 | Observable