superset icon indicating copy to clipboard operation
superset copied to clipboard

Update to d3 v4 ?

Open shkr opened this issue 10 years ago • 6 comments

I have been trying to put together a histogram visualization for caravel. The d3.histogram is not available. d3 v3 is the one available in package.json. The upgrade can possibly also enable other fancy visualizations. Is upgrading the d3 version, in the roadmap ?

shkr avatar Jul 29 '16 04:07 shkr

Isn't it available under d3.layout.histogram on v3? Can v3/v4 cohabit? v4 is broken down into a bunch smaller chunks that can probably cohabit with v3 well.

We should upgrade though, I'm unclear which viz would be affected and how.

mistercrunch avatar Jul 29 '16 18:07 mistercrunch

I was just doing some research about version breaks in regards to D3. What I found is that Superset is using NVD3, which is a project that wraps and abstracts parts of D3. NVD3 is strongly tied to v3 of D3. See this issue discussion going back 2 years at the NVD3 project:

https://github.com/novus/nvd3/issues/1681

If I were guessing, I would guess that NVD3 will never jump to D3 v4. So I guess before Superset decides whether or not to jump from v3 to v4 (or v5) of D3, they would first need to decide if they are going to continue to use NVD3 or go for a straight implementation of D3.

mattmoehr avatar Apr 04 '18 21:04 mattmoehr

There have been conversations and work in the direction or using data-ui which is build on top of vx, for composable, stylable, React-first visualization. Both projects are out of folks at Airbnb.

In the meantime getting moving away from nvd3 represents a lot of work that is not on anyone's short term roadmap.

There's also work to do lazy imports of visualization-specific JS bundles, meaning it's possible we'd be using both v3 and v4 at once until nvd3 upgrades or until we remove our dependence on it.

mistercrunch avatar Apr 04 '18 22:04 mistercrunch

Has there been any recent discussions on this topic? Looks like D3 is on version 5 and NVD is still on version 3.

rpwils avatar Sep 13 '18 15:09 rpwils

https://github.com/novus/nvd3/issues/1681#issuecomment-401542870

mistercrunch avatar Sep 13 '18 17:09 mistercrunch

number and time formatting has been migrated to latest d3 micro packages. Many places in the code has also been updated. Only some old d3 v3 usage remains in the visualization code. The visualization code will soon be move into separated repos as plugins. Each visualization then can be upgraded to latest d3 independently.

kristw avatar Dec 24 '18 16:12 kristw