I'm not sure if it is a good idea to add another HTML content on top of Cytoscape.js div
. I also don't know if you have one or two Cytoscape.js instances (one for each graph).
In any case, you have the following options: add a dummy node and make its style transparent so that it is not visible. Then place it on the side of the article and add an edge from order-by-length
to this dummy node. You can lock this node and make it un-grabbable so that users won't be able to interact with it.
One main problem with this approach is that, some layouts do not respect lock
state, so the dummy nodes will move around on layout. But you can bring them back when layout stops.
Another option is to add another canvas on top of Cytoscape.js canvas, and draw the edges yourself.