AlexandrosArmaos
AlexandrosArmaos

Reputation: 41

How can I export data and styles from cytoscape.js in one file to be imported into Cytoscape desktop

I am using cytoscape.js to build my nice networks. I would like to know if there is any way to export the styles and the elements of the network into one file so that users of my web-app to be able to load it into their own Cytoscape desktop for further exploration and modification.

I know I can get the elements with: cy.json().elements and styles with: cy.style().json().

But I can't figure out how these can be merged into a file that is recognisable from Cytoscape Desktop.

Upvotes: 1

Views: 299

Answers (1)

Scooter Morris
Scooter Morris

Reputation: 1388

I don't think that's directly possible. You can certainly import the elements, but I don't know of a way to import the styles from cytoscape.js into Cytoscape desktop.

You can do the other way by exporting to CX from the Desktop and then reading that into cytoscape.js, though. This might be worth posting a feature request, though. We're just going through the Cytoscape 3.10 planning process right now...

Upvotes: 1

Related Questions