Cytoscape - Right click to perform an action

One more thing:


I designed the above interactive interface in Matlab using jgraphx. I can add components, right click to perform an action on the component (to copy, delete etc.). I would like to implement this in Dash-cystoscape.

I was able to show multiline fonts - with the name of the components in bold and the description of the component as the second line with a smaller font. I tried but could not get this implemented in the cytoscape package. Any ideas?

Thanks again.

Dash Cytoscape inherits from cytoscape.js, which does not have explicit support for line breaks, as discussed in this issue. However, you can use text wrapping to break lines over a certain pixel length; you can experiment wrapping with the playground, specfically the “Text Wrapping” section.

Thanks @xhlu. So formatting a portion of the text also wont be possible isn’t it? Like making a portion of it bold and bigger font-size


I don’t think so, at the moment. A workaround would be to render your text into an image, and serve the URL/base64 to the bodyy of the node. Check out the playground for examples!

That is an interesting solution of using an image instead!!! I shall test and see how it renders the font. Thanks again @xhlu