-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New example: d3/canvas to png #1514
Conversation
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
Co-authored-by: Philippe Rivière <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example looks good. Please add it to the list in the examples README.
examples/README.md
Outdated
@@ -54,6 +54,7 @@ | |||
|
|||
- [`loader-airtable`](https://observablehq.observablehq.cloud/framework-example-loader-airtable/) - Loading data from Airtable | |||
- [`loader-arrow`](https://observablehq.observablehq.cloud/framework-example-loader-arrow/) - Generating Apache Arrow IPC files | |||
- [`loader-canvas-to-png`](https://observablehq.observablehq.cloud/framework-example-loader-canvas-to-png/) - Generating a map server-side as a PNG file with node, canvas and D3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description can be shortened and better match the other descriptions. Some alternatives:
- Generating PNG from JavaScript
- Generating PNG from Node.js
- Generating PNG using node-canvas
- Generating PNG
I think my preference is (3) because most of our other data loader examples assume Node.js + JavaScript in the description, so it feels anomalous to call this one out, and it’s nice to reference the supporting library (node-canvas) explicitly.
(Also, it’s “Node.js” not “node”. Maybe “Node” is okay in some contexts, but I wouldn’t use “node” unless you are using node
to refer specifically to the command you run from the terminal.)
local copy of #1510 by @palewire
the example is deployed at https://observablehq.observablehq.cloud/framework-example-loader-canvas-to-png/