How to use HTML5 Canvas: Part One | Duncan Geere | Observable
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Author
Duncan Geere
@duncangeere
Information designer. Environment, science, tech & culture. Carbon-neutral. "Move quietly and plant things."
Comments (4)
Harry Biddle
Oct 12, 2020
This is broken for me on load. I think the problem is that it falsely assumes that the HTML element exists before the code in the cell gets executed: if I force it to re-execute after the page has loaded then it will work.
Duncan Geere
Oct 12, 2020
Yeah, it's looking broken on load for me too. Open to pull requests if you have a fix!
Duncan Geere
Oct 27, 2020
Thanks for your pull request! Looks like it worked a treat :)
Reply
Dan S. Reznik
May 7, 2021
I have a question: I tried to use canvas.strokeText() and canvas.fillText() but they don't seem to be available.
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
8
Follow
Follow
How to use HTML5 Canvas: Part One | Duncan Geere | Observable