-
Notifications
You must be signed in to change notification settings - Fork 163
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
Using title in node and edge #54
Comments
Is the issue that the hover tooltip for the edge is not showing up at all? Or is it just a matter of not being able to click your hyperlink for the edge title since it moves along with your mouse? |
Thanks for getting back. The issue was that when hover the tooltip over the edge, the title is not shown if I use href in the node title. I checked the html code and found that when putting href structure in the node title, the following was added at the beginning of the html file 👍
I suspected that last setting where vis-network-tooltip {display:none} may be the reason. The above was not added in the html when I use iframe popup as part of title in the node At the end i search a bit of vis js and specify 'label' in add_edge call. Now the text is shown at the edge even when I use href in the node title but the font is not what I want. So i brute force amend the edge option in html file by inserting the "strokeWidth" and "color" setting from my program to generate the final html file.... So all in all, the text is shown on the edge now when href is used in the node. I just leave the tooltip display:none generated untouched. |
Is there any movement on this? Also #55 is a duplicate |
Hi, it had been a while since I visited this issue last. I have since upgraded visjs to version 9.0.4 and noticed their tooltip class name changed from vis-network-tooltip to vis-tooltip. Reflecting that change in the template.html seems to hide that tooltip and display the original one supporting the href. This will be included in the next release. |
@boludo00, in the last comments image I can see that a search bar kind of thing is present on top of the graph. I want to add this "select node" to my pyvis graphs also, can you suggest how this is done. |
Sorry for my english.... I reviewed for source files and here is what i can guess.
It would be great if the pyvis handle only "href"-contained titles without changing original vis.js tooltips for elements, that not contain "href" tags. |
This is regarding using title for both node and edge.
When using HTML a tag and href for a local pdf as title in add_node() in Pyvis, it works and allow me to down load and show the pdf in a separate tab, but the separate title that was specified in add_edge is no longer shown when the mouse move over the edge. Using iframe instead of a tag for node works and edge title was shown when the mouse move over it, but the pdf iframe disappear as soon as the mouse move and its hard to use the pdf in the iframe, I prefer to view the pdf, enlarge it and able to moving the mouse around. The generation of the node title html is as follow :
def create_pdf_download (pdf_title,pdf_link):
prefix = "<a target="_tab" href="
postfix = ">"+ pdf_title + ""
return prefix + pdf_link + postfix
I notice that the html code generated for G.html at the edge is a bit different in the two scenarios but I have very little html know-how
Thanks
The text was updated successfully, but these errors were encountered: