Closed jfsiii closed 8 years ago
Thanks for this @jfsiii, really appreciate you taking the time!
If you've got time, would you like to have a go at these changes yourself? If not, I'll try find time myself and work on this whenever I get a chance :)
I have a question. Does this version support the Tree graph? thanks
I can't tell you off the top of my head, but do have a look at the d3 releases - d3act
currently uses v3.5.5
of d3
:)
I created a pull request to fit this issue
Done as part of #26 - thanks @cdotta for working on this! 😄
As of v4, d3 has been broken up into many modules (e.g.
d3-scale
,d3-selection
, etc). There are also some API changes.Not only is it a good idea to stay on the current major version, but the final size would drop quite a bit if
d3act
only imports thed3
packages it needs.I've ported a few examples and projects from 3.x to 4.x and it's relatively simple. Changing
import d3 from "d3"
toimport * as d3 from 'd3'
then doing a search-and-replace for the new methods names (old:d3.scale.ordinal
new:d3.scaleOrdinal
, etc) will get you pretty far. Converting to statements likeimport { scaleLinear, scaleOrdinal } from 'd3-scale'
should be the ultimate goal, but I typically save that for a second pass after things are converted and working.The changes to selections are probably the most substantial but, in my experience, don't take much effort to convert.