forio / contour

Apache License 2.0
120 stars 21 forks source link

Figure out if migrating to d3 v4 is worth it #235

Open narenranjit opened 8 years ago

narenranjit commented 8 years ago

https://github.com/d3/d3/releases/tag/v4.0.0

"D3 is now modular, composed of many small libraries that you can also use independently. Each library has its own repo and release cycle for faster development. The modular approach also improves the process for custom bundles and plugins."

narenranjit commented 8 years ago

Also need to think about if it's worth just bundling all the smaller components directly into contour (likewise with lodash) / have a separate 'contour dependencies' bundle/ leave as-is

drosen0 commented 8 years ago

Importing the independent D3 and Lodash modules is a good idea, as it would simplify the dependencies. This would avoid issues like #217.

drosen0 commented 8 years ago

Upgrading looks like a big job. Many things have been moved and renamed (not sure why the namespace was flattened), some things that were referenced by string identifiers are now symbols or functions, and some defaults have changed.

New low-level d3.ticks API. [NRN: revisit 'nicing' to see if it helps make it less confusing]

Yes, this piece of Contour has caused much grief.

Shapes (e.g., lines, areas, arcs) can now render to Canvas. [NRN: revisit the 'export chart' functionality]

As cool as this sounds, part of the difficulty of rendering SVG to Canvas was in applying CSS. I'm assuming CSS wouldn't be applied, and it appears that only shapes and paths can be rendered to Canvas, but hopefully I'm wrong.