-
Notifications
You must be signed in to change notification settings - Fork 31
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
how to add text to nodes and edges? #12
Comments
Hi!!! I would like to ask for the same feature as well. I am really a newbie to js and have been trying for days.. I would like to display the node name by default if its value is over some threshold, and meanwhile keep the hovering function. Originally I want to change the onNodeHover function in js, but it did not work out :-( Could u please explain more explicitly on how to achieve the feature? |
Thanks! I'm not planning on adding built-in node labels in the near future, because there are multiple ways to do so and the "right" way depends on use case. This documentation is a good overview. You've been following the jgraph example that edits the DOM, which only has one label (shown on hover). If you want multiple labels, you'll need to create a div for each label you want to show and then position the div over the node or edge. Hope this helps! |
Hi, How would you add names to nodes using the python jgraph package? |
Unfortunately, there's no clean API for that right now, and I haven't been maintaining this project. If you're feeling ambitious, however, it's probably not hard to implement. I'd look at this code to see the node drawing part, then reference three.js' text manual to either add webGL text or make HTML overlays. |
I'm working on a project about social network, so I'm wondering is there any way to add text to the nodes and edges?
The text was updated successfully, but these errors were encountered: