RMI-PACTA / pacta.interactive.plot

A R package that can generate standard 2dii interactive (D3/JavaScript) plots
https://rmi-pacta.github.io/pacta.interactive.plot/
MIT License
2 stars 3 forks source link

convert interactive charts to D3v6 #10

Open cjyetman opened 3 years ago

cjyetman commented 3 years ago

Currently, the interactive charts are built on D3v4 plus some additional D3 libraries. r2d3 handles providing the default D3 libraries, but the additional D3 libraries need to be included in this repo/pkg, which is questionable whether we should actually be doing that and/or whether we need to include their licenses, credit their author/s, etc.

The reason for requiring the additional libraries is often because a certain D3 function was added to the micro library after D3v4 was built, and so it can't be accessed using the default library on its own, e.g. d3.rollup. In other cases, the micro library did not exist or was not included in D3v4, but was included in later versions of D3, e.g. d3-scale-chromatic.

If we depend on D3v6 instead, we will have access to all of the latest and greatest versions of the micro libraries and their functions. However, this may cause some problems with functions that have been deprecated, forcing us to update code that uses them to the current/modern way of doing things, e.g. d3.nest and d3.map