Comments (6)
Is there any movement on this?
Also #55 is a duplicate
from pyvis.
Sorry for my english....
I reviewed for source files and here is what i can guess.
If you are use in at least one node's title any content with "href" text pyvis do following:
- hide original vis.js tooltip for this node because original popup tooltip is moving with mouse cursor and you're can't click on link in your title!
- but pyvis hide original tooltip not only for this one, it hide ALL original tooltips for ALL elements of network (even it not contain "href" tag)
- because original tooltip hided, pyvis insert custom popup algorithm in html page. New custom tooltip position is fixed and you are able to click on href tag. But unfortunately it correctly works ONLY for NODES, not for edges (some javascript errors occurs on edges popup title handling, you can see them in browser console)
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.
from pyvis.
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?
from pyvis.
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 👍
/* position absolute is important and the container has to be relative or absolute as well. */
div.popup {
position:absolute;
top:0px;
left:0px;
display:none;
background-color:#f5f4ed;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #808074;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}
/* hide the original tooltip */
.vis-network-tooltip {
display:none;
}
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.
from pyvis.
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.
from pyvis.
@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.
from pyvis.
Related Issues (20)
- Clustering nodes with same labels?
- Filtering Nodes HOT 1
- Arrows are not displayed on the graph HOT 1
- highlightActive is not defined: Causes wierd jump of graph
- AttributeError: 'NoneType' object has no attribute 'render' HOT 4
- How do you change the fonts of the labels on the nodes?
- Be able to set the color of an edge independently of the source node
- Left to Right Orientation?
- Interactive Node in in Output HOT 1
- Use palette to color nodes and add colorbar
- Edge titles does not work? HOT 6
- Pyvis HTML Output does not use 100% of the page HOT 2
- Save as json
- Problem with labels, trying integration with pandas, Latex and Networkx
- No display of node labels if node is numeric HOT 1
- Change node size when label is inside
- Numeric string node ID silently cast from `str` to `int` in in `add_nodes` but not `add_edges`, raises `AssertionError`
- `write_html` opens browser to relative rather than absolute path, doesn't handle absolute paths as name
- Network not handling objects: assert isinstance(n_id, str) or isinstance(n_id, int) HOT 1
- Customizing Filter Menu Attribute Names in pyvis
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvis.