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

后端 未结 2 1350
失恋的感觉
失恋的感觉 2020-12-11 06:04

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 t

2条回答
  •  天涯浪人
    2020-12-11 06:49

    You can still use QTip. Because cy.js doesn't have associated DOM elements per graph element, you'll need to either (1) create dummy HTML DOM elements to position the QTips or (2) use the QTip API to manually position the QTips to the nodes.

    Cy.js provides event binding APIs, so you can just bind to mouseover etc on that end: http://cytoscape.github.io/cytoscape.js/#core/events

提交回复
热议问题