Open jfsiii opened 8 years ago
@jfsiii Hi! So currently nvd3 does not support d3 v4, did I got it right?
@vovkvlad No it does not. I just tried it now it does not work.
Interesting. I think we'll need to make a d3v4 branch and get it working first to see how different it is. That'll tell us if a full major version change is needed or if we can support both v3 and v4 together.
Any updates to this? D3 is on V4.2.2 now.
Any news on D3 v4 support ❓
I haven't had time to really dig into this... if anyone wants to get a chart working with d3 v4 send a pull request and lets see how big the changes are :)
@liquidpele I'm willing to give this a shot. What's a good a) simple and b) medium or complex chart to convert?
simple chart would just be any of the examples that are not charts, but just the underlying graph... i.e. any of the examples that don't have 'Chart' in the name.
medium would probably just be the lineChart
complex would be multiChart as that includes multiple graph objects so it's basically everything.
This is kind of an epic size task. nvd3 has abstracted parts of the d3v3 API that are completely gone. The easy part is polyfilling rebind
and using the flatter api structure, harder parts are dealing with the brush
abstractions and other things that d3v4 has changed completely.
I'm currently trying to do it in my fork for just one type of chart, to see if it will fix a serious performance issue with an application consuming nvd3.
Isn't there a company (Novus partners) behind it? As far as I understood the webpage, the project is part of a framework they use commercially in the financial sector. So if the company's subteam has no plans of porting it for over a year, I'd be careful with one-man "epic size tasks". Plus 450 open issues for ~15 basic to intermediate chart types. Don't get me wrong, they look gorgeous and the interfaces are nice, but we're talking line, bubbles, bars here.
Sounds to me, main maintenance will stay on v3 and even if anyone ports it, who's gonna test and make sure it'll be merged and the main maintainer will adopt v4 - especially for commercial projects. d3v4 was a huge API breaker - no question!
Not telling anyone how to spend their free time though.
Well, it was mostly written by one guy at novus who isn't even employed there anymore. I forked and rewrote some of it and they added me to their org, but I mostly just accept pull requests at this point.
Perhaps a d3v4 branch is needed if it's this complicated.
@liquidpele I'd definitely say a branch and major version bump is appropriate... It's definitely going to break your API (and therefore, consuming packages like angular-nvd3
).
Having examined a handful of similar libraries recently, this stuff is hard to get right. "lines, bubbles, bars" is all fine and good until I'm staring at the Chromium profiler into the wee hours of the night with multiple different libs trying to figure out where everything went so wrong.
One secret I've learned is that Chrome in particular has a serious memory leak problem when it comes to SVG. This is true with the most recent version of nvd3 in an app with two graphs- the heap size for the page stays at a slim 30MB or so (per devtools), but the tab's footprint explodes to around the 2-3GB range over the course of an evening.
@liquidpele @scottmmjackson Completely agree that a branch and major bump is recommended. I didn't even knew that there are angular packages built on top of it.
I stumbled upon nvd3 because of the convincing examples and a good selection of diagrams you'd need first. but decided not to go for it, because v4 was out and I knew about the API breaker stuff. Would be a pity if community development and adoption declines because of such considerations.
Can you please check #2082 and see if anyone can spare some time on the migration to v4? Thanks in advance..
I created a branch to merge d3 v4 work into.
Will this be merged into master?
Hi gents. I've decided to make moving to d3 v4 a breaking change from the novus repo. I have no control under the novus org, and I'd like to have more help but can't add anyone! So, I've acquired the "nvd3" organization from another user and plan to use that for the d3 v4 break. If you'd like to help, let me know and I'll add you to the new organization :)
@liquidpele Is this repo the most current version of NVD3? What is happening with novus
and will features be developed there that would need to be ported over?
D3 is being broken up into smaller modules (e.g.
d3-scale
,d3-selection
, etc) and there are some API changes.Discuss version support & approach. Should nvd3 support d3 v3 and v4 or only one of them? One option to support both is a jQuery-style approach where 1.x supports v3 and 2.x supports v4.