IN directivedForceGraph directive: almost done with function