Code Monkey home page Code Monkey logo

Comments (6)

rthill91 avatar rthill91 commented on May 24, 2024 1

Is there any movement on this?

Also #55 is a duplicate

from pyvis.

MaxDXDX avatar MaxDXDX commented on May 24, 2024 1

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.

boludo00 avatar boludo00 commented on May 24, 2024

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.

ivantam4 avatar ivantam4 commented on May 24, 2024

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.

boludo00 avatar boludo00 commented on May 24, 2024

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.

image

This will be included in the next release.

from pyvis.

kk-hiraskar avatar kk-hiraskar commented on May 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.