ryanmr / d3-on-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate chards in the cloud

Or otherwise known as, how can you render charts outside a browser?

Tech

  • Node 14+
  • d3 v6
  • jsdom
  • node-canvas
  • express (unused)

How it works

This roughly follows the work from the gregjopa/d3-server-side-demo repo.

In addition, it adds:

  • svg image url painted onto a node canvas
  • a node canvas exported into an png file

TODO

Todos and other ommissions:

  • the jsdom is never cleaned up, so it will eventually consume a ton of memory
  • the svg image url is loaded async, but we have this running in an sync method..
  • getting this to pass through code verification could be tricky, depending on what jsdom and node-canvas require on the system level to run (fwiw, it does run already on an m1 big sur mac / 2021)
  • downgraded from d3 v7 to d3 v6 because of module issues; could be solved with a transpiler?

URLS

URLs used while researching this topic:

About


Languages

Language:JavaScript 100.0%