novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.14k forks source link

Missing parameter declarations #1819

Open ehartford opened 8 years ago

ehartford commented 8 years ago

in the force directed graph model, parameters getX and getY are not declared, will this not create global variables?

https://github.com/novus/nvd3/blob/master/src/models/forceDirectedGraph.js#L163

I would expect to see something here

https://github.com/novus/nvd3/blob/master/src/models/forceDirectedGraph.js#L27

like

,getX = d3.functor(0.0)
,getY = d3.functor(0.0)
liquidpele commented 8 years ago

Yea, that looks like a bug. That's a fairly new graph so it was probably an oversight by the author. Send us a pull request with the fix if you'd like :)