This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
// these options hide parts of the graph during interaction | |
//hideEdgesOnViewport: true, | |
//hideLabelsOnViewport: true, | |
// this is an alternative that uses a bitmap during interaction | |
// textureOnViewport: true, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var elesJson = { | |
nodes: [ | |
{ data: { id: 'a', foo: 3, bar: 5, baz: 7 } }, | |
{ data: { id: 'b', foo: 7, bar: 1, baz: 3 } }, | |
{ data: { id: 'c', foo: 2, bar: 7, baz: 6 } }, | |
{ data: { id: 'd', foo: 9, bar: 5, baz: 2 } }, | |
{ data: { id: 'e', foo: 2, bar: 4, baz: 5 } } | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
style: cytoscape.stylesheet() | |
.selector('node') | |
.css({ | |
'width': '60px', | |
'height': '60px', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
boxSelectionEnabled: false, | |
autounselectify: true, | |
minZoom: 0.5, | |
maxZoom: 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
// photos from flickr with creative commons license | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
boxSelectionEnabled: false, | |
autounselectify: true, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
style: cytoscape.stylesheet() | |
.selector('node') | |
.css({ | |
'font-size': 10, | |
'content': 'data(gene_name)', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
boxSelectionEnabled: false, | |
autounselectify: true, | |
style: cytoscape.stylesheet() | |
.selector('node') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
boxSelectionEnabled: false, | |
autounselectify: true, | |
style: [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: $('#cy')[0], | |
boxSelectionEnabled: false, | |
autounselectify: true, | |
style: cytoscape.stylesheet() | |
.selector('node') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ // on dom ready | |
var cy = cytoscape({ | |
container: document.getElementById('cy'), | |
layout: { | |
name: 'cose', | |
padding: 10, | |
randomize: true | |
}, |