Skip to content

Instantly share code, notes, and snippets.

@dvas0004
Last active October 17, 2017 10:23
Show Gist options
  • Select an option

  • Save dvas0004/5a3f9cbfde63c332a4256239e46fe75a to your computer and use it in GitHub Desktop.

Select an option

Save dvas0004/5a3f9cbfde63c332a4256239e46fe75a to your computer and use it in GitHub Desktop.
var cy = cytoscape({
container: document.getElementById('graphNetwork'), // container to render in
elements: cytoscape_elements, // list of graph elements
style: [ // the stylesheet for the graph
{
selector: 'node',
style: {
'background-color': 'data(confidence)',
'label': 'data(label)',
'text-opacity': 0.5,
'font-size': "0.5em",
'font-weight': "bold"
}
},
{
selector: 'node[backgroundColor = "src"]',
style: {
'background-color': '#58cdfc',
'label': 'data(label)',
'text-opacity': 0.5,
'font-size': "1em"
}
},
{
selector: 'edge',
style: {
'width': 3,
'line-color': '#ccc',
'target-arrow-color': '#ccc',
'target-arrow-shape': 'triangle'
}
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment