'how can i get properties of clicked node with neovis

I am using the neo4j graph database and I am using neovis.js to visualize my graph.I visualized the graph but I can't get the info of the clicked node. How can I get properties of a clicked node with neovis.js?



Solution 1:[1]

You can view the properties of a node by hovering your cursor over the node.
Clicking of any sort in neovis is used to modify the visualization. Hover node for Node details

Solution 2:[2]

you can do like this,add a click event(https://github.com/neo4j-contrib/neovis.js/issues/16)

viz = new NeoVis.default(config);
viz.render();

viz.registerOnEvent("completed", (e)=>{
    viz["_network"].on("click", (event)=>{
        console.log($('.vis-tooltip').text()); //get node properties
    });
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Thennan
Solution 2 lanny8588