Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature/make link in node label clickable#12

Merged
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
May 24, 2018
Merged

Feature/make link in node label clickable#12
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

@boludo00
Copy link
Collaborator

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...

@boludo00 boludo00 merged commit 2f64dd3 into master May 24, 2018
@Keramatfar
Copy link

Thanks, not possible to add links to labels?

@loiveli
Copy link

loiveli commented Oct 13, 2021

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

@bobabooth
Copy link

I am having the same issue of the edge titles being disabled, has anyone figured a way around it?

@felixschndr
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make link in label clickable

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.