Depends on what you mean by "overlapping".
* Overlapping edges may be mathematically impossible depending on the
topology of your graph. See http://en.wikipedia.org/wiki/Planar_graph
* Overlapping nodes depends on several factors, such as how strong the
forces are in your force layout, and how big your nodes are. Stronger
forces and smaller nodes will make overlap less likely, but are not
guaranteed. From the layout's perspective, nodes are infinitely-small
points; they repel each other but cannot collide. You can add
collision detection if you want to provide a stronger guarantee that
nodes do not overlap. For example:
http://mbostock.github.com/d3/talk/20110921/collision.html
* Overlapping labels are not typically part of the force simulation.
However, you can reduce the likelihood of label overlap by adding them
to the simulation: use dummy (invisible) nodes for each label,
connected to the associated node. http://bl.ocks.org/1377729
Mike
I got a bit carried away and made a version of the puzzle game
"Planarity":
http://www.jasondavies.com/planarity/
In theory it should even work with touch devices since it uses
d3.behavior.drag, but I haven't tested it.
Enjoy!
--
Jason Davies, http://www.jasondavies.com/