Feature/make link in node label clickable#12
Merged
boludo00 merged 3 commits intomasterWestHealth/pyvis:masterfrom May 24, 2018
feature/make-link-in-node-label-clickableWestHealth/pyvis:feature/make-link-in-node-label-clickableCopy head branch name to clipboard
Merged
Feature/make link in node label clickable#12boludo00 merged 3 commits intomasterWestHealth/pyvis:masterfrom feature/make-link-in-node-label-clickableWestHealth/pyvis:feature/make-link-in-node-label-clickableCopy head branch name to clipboard
boludo00 merged 3 commits intomasterWestHealth/pyvis:masterfrom
feature/make-link-in-node-label-clickableWestHealth/pyvis:feature/make-link-in-node-label-clickableCopy head branch name to clipboard
Conversation
|
Thanks, not possible to add links to labels? |
|
It looks like edge titles are disabled if you have any links in the node titles. Once I added a link to my nodes, all edge titles seem to disappear |
|
I am having the same issue of the edge titles being disabled, has anyone figured a way around it? |
Same issue here, did not figure out away around this. @boludo00 Do you have an idea why this might happen? If there is a title of a node with a clickable link the title of the edges aren't visible any more |
ceandrade
pushed a commit
to ceandrade/pyvis
that referenced
this pull request
Jul 10, 2025
…-node-label-clickable Feature/make link in node label clickable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #10
Attaching links to node metadata is desired, but was always possible to include in the title attribute of a node using href. However, these links were not clickable since the hover tooltip moved with the cursor. I have included a fix for this, which is basically just the workaround described in the visjs issue here visjs/vis#952
Thanks to @AlexDM0 for the clever solution! :)
How it works: currently there is a check done before rendering the HTML page that checks if there is an href anywhere in the title attribute of any node. The template is then modified if this is the case.
g.add_node("I am a node with a link", title=<a href=\'http://www.google.com\'>google</a>"This will not work within a jupyter notebook session by the way...