Import or export the graph in GraphML format.
npm install cytoscape-graphmlcytoscape-graphml
================================================================================
A Cytoscape.js extension to import from a graph in GraphML format or to export the current Cytsocape.js graph to GraphML format, distributed under The MIT License. (demo)
cy.graphml()
Export the graph as GraphML.
cy.graphml( cyGraphML )
Import the graph as GraphML.
cy.graphml( optionsObj )
Updates the specified options of extension.
``js`
{
node: {
css: false,
data: true,
position: true,
discludeds: []
},
edge: {
css: false,
data: true,
discludeds: []
},
layoutBy: "cose" // string of layout name or layout function
}
* Cytoscape.js ^3.2.0
* jQuery ^1.7 || ^2.0 || ^3.0
Download the library:
* via npm: npm install cytoscape-graphml,bower install cytoscape-graphml
* via bower: , or
* via direct download in the repository (probably from a tag).
require() the library as appropriate for your project:
CommonJS:
`js
var cytoscape = require('cytoscape');
var jquery = require('jquery');
var graphml = require('cytoscape-graphml');
graphml( cytoscape, jquery ); // register extension
`
AMD:
`js`
require(['cytoscape', 'cytoscape-graphml'], function( cytoscape, graphml ){
graphml( cytoscape ); // register extension
});
Plain HTML/JS has the extension registered for you automatically, because no require() is needed.
This project is set up to automatically be published to npm and bower. To publish:
1. Set the version number environment variable: export VERSION=1.2.3gulp publish
1. Publish: bower register cytoscape-graphml https://github.com/iVis-at-Bilkent/cytoscape.js-graphml.git`
1. If publishing to bower for the first time, you'll need to run
* Selim Firat Yilmaz, Metin Can Siper of i-Vis at Bilkent University