简体   繁体   中英

Overlapping vertex labels in JUNG

First of all, I am new to JUNG. I am trying to visualize trees in JUNG using the TreeLayout, but I am always faced with the issue of overlapping vertex labels. More so when the number of nodes and paths are many. Any ideas as to how to go about preventing such an overlap ?

I am aware of the vertex label renderer, but I did not get far with this either.

Here are a couple of options:

(1) Increase distx (the distance between adjacent tree leaves). This is an optional constructor argument.

(2) Use a Transformer for the rendered label that uses a substring of the label, or a shortened representation. Then separately set hover text to show the entire label.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM