samizdatco / arbor

a graph visualization library using web workers and jQuery
http://arborjs.org
2.66k stars 633 forks source link

energy() always returns NaN for all its values #38

Open kjyv opened 11 years ago

kjyv commented 11 years ago

Apart from the number of nodes, all values are NaN at all times. It would be nice to have this measure to i.e. stop the display updates until the graph is changed again.

Curtisdhi commented 9 years ago

I was also having this issue. While investigating this problem, I noticed the version that is used on the examples on arborjs.org, that the energy returns the correct values, and the graph automatically stops when the energy goes below a threshold. So something between that version and the current must have changed how the calculations are made and causing them to be NaN.