cytoscape.js

Adding image as a label on edge in cytoscape.js


Created a graph using cytoscape.js. Need to add image as a label on edge.


Solution

  • After examination of

    it seems that image label on edge is not supported right now.

    One candidate where this feature might be added seems to be the CanvasRenderer.drawEdgeText function. The implementation might examine the text contained in the edge's content and if it looks like reference to an image (e.g. url) then draw it as image...

    https://github.com/cytoscape/cytoscape.js/blob/v2.3.8/README.md

    Contributing to Cytoscape.js

    Cytoscape.js is an open source project, and anyone interested is encouraged to contribute to Cytoscape.js. We gladly accept pull requests. If you are interested in regular contributions to Cytoscape.js, then we can arrange granting you permission to the repository by contacting us.

    If your pull request is a bugfix, please make changes to the master branch. Otherwise, please make changes to the next version's branch (i.e. unstable).