Skip to content
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

Merged
merged 18 commits into from
Jul 11, 2024
Merged

New example: d3/canvas to png #1514

merged 18 commits into from
Jul 11, 2024

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Jul 11, 2024

@Fil Fil changed the title d3/canvas to png New example: d3/canvas to png Jul 11, 2024
Copy link
Member

@mbostock mbostock left a 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.

@Fil Fil enabled auto-merge (squash) July 11, 2024 12:47
@@ -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
Copy link
Member

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:

  1. Generating PNG from JavaScript
  2. Generating PNG from Node.js
  3. Generating PNG using node-canvas
  4. 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.)

@Fil Fil merged commit 661e0ff into main Jul 11, 2024
4 checks passed
@Fil Fil deleted the palewire/loader-d3-to-png branch July 11, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants