Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label orientation/position around node #365

Open
kmalyavina opened this issue Jan 20, 2020 · 3 comments · May be fixed by #373
Open

Label orientation/position around node #365

kmalyavina opened this issue Jan 20, 2020 · 3 comments · May be fixed by #373
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kmalyavina
Copy link
Contributor

I would like to be able to put the label to the right of a node. My use case is adding a legend to the graph. Label-centered-at-the-bottom gets quickly takes up a lot of vertical space and gets hard to follow when there are a lot of groups to show.

I've tried a number of ways with margin, font alignment, circle-physics-off-with-small-size but could not get the text to line up properly.

Idealy, you would be able to choose top/bottom/left/right for the position of the node label (in an attribute like "labelPosition")

Current -> Desired (example from OrientDB Studio)
Screen Shot 2020-01-20 at 8 25 19 AM

@Thomaash Thomaash added enhancement New feature or request help wanted Extra attention is needed labels Jan 20, 2020
@Thomaash
Copy link
Member

Hi @kmalyavina,

would you have the time to work on this?

@kmalyavina
Copy link
Contributor Author

Hi @kmalyavina,

would you have the time to work on this?

I'm not very familiar with the codebase, but I might be able to try implementing it if given some guidance.

@Thomaash
Copy link
Member

That would be great. Feel free to open a draft PR once you have anything even if it doesn't work (it's much easier to offer guidance while looking at the code).

The place to start are the files lib/network/modules/components/Node.js which invokes the label rendering and maintains info about it's shape and position and lib/network/modules/components/shared/Label.js which renders the label itself.

@kmalyavina kmalyavina linked a pull request Jan 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants