'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 cant figure out of how these can be merged into a file that is recognisable from cytoscape Desktop.
Any help? Thank you so much.
Solution 1:[1]
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 to 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...
-- scooter
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Scooter Morris |
