VivaGraphJS icon indicating copy to clipboard operation
VivaGraphJS copied to clipboard

Label adjustment

Open arikan opened this issue 11 years ago • 4 comments
trafficstars

Relatively complex graphs have the issue of labels overlapping and making certain areas unreadable.

google chromescreensnapz006

A labelAdjust() function would be useful, like in Gephi. I guess the way to implement it is get the SVG text x, y, width, height and for each node check if its label overlaps, if true, adjust the node's position.

arikan avatar Dec 13 '13 17:12 arikan

Agreed, that should be part of the library. I'm thinking this could be handled on a quad tree level, but it would require a major rewrite. Currently quad tree treats each node as a geometrical point (without size)

anvaka avatar Dec 14 '13 07:12 anvaka

BTW is it posible to discard nodes overlaping?

mpashkovskiy avatar Jan 27 '15 08:01 mpashkovskiy

@mpashkovskiy unfortunately - no. Not with current force directed algorithm. I know ForceAtlas2 supports that, but it's not part of the library.

anvaka avatar Jan 27 '15 10:01 anvaka

@anvaka thanks Andrei will try sigma.js

mpashkovskiy avatar Jan 27 '15 12:01 mpashkovskiy