Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add tooltip on mouseover event on nodes in graph with cytoscape.js

I want to show node's details on mouseover event on all nodes in graph created with cytoscape.js. I have found a plug-in qtip, but this is not working. How can i achieve this? Is there some other way to show tooltip on nodes?

Thanks in advance.

like image 609
hp36 Avatar asked Jan 08 '14 10:01

hp36


1 Answers

This would be help you.

cy.on('mouseover', 'node', function(event) {
    var node = event.cyTarget;
    node.qtip({
         content: 'hello',
         show: {
            event: event.type,
            ready: true
         },
         hide: {
            event: 'mouseout unfocus'
         }
    }, event);
});

but it still remains show (not hide) sometime when there are many nodes.

like image 141
Jackel Tex Avatar answered Sep 30 '22 19:09

Jackel Tex