Skip to content

Instantly share code, notes, and snippets.

@maxkfranz
maxkfranz / tokyo-railways-style.cycss
Last active August 29, 2015 14:08
tokyo-railways-style.cycss
node {
background-color: white;
border-color: black;
content: data(station_name);
width: 20;
height: 20;
min-zoomed-font-size: 12;
color: #fff;
font-size: 16;
}
@maxkfranz
maxkfranz / code.js
Last active August 29, 2015 14:08
GeneMANIA export
$(function(){ // on dom ready
var cy = cytoscape({
container: document.getElementById('cy'),
style: cytoscape.stylesheet()
.selector('node')
.css({
'font-size': 10,
'content': 'data(gene_name)',
@maxkfranz
maxkfranz / japan-railways.json
Last active August 29, 2015 14:08
japan-railways.json
This file has been truncated, but you can view the full file.
{
"format_version" : "1.0",
"generated_by" : "cytoscape-3.1.1",
"target_cytoscapejs_version" : "~2.1",
"data" : {
"selected" : true,
"__Annotations" : [ "" ],
"shared_name" : "graph_final.csv",
"SUID" : 62,
"name" : "main_islands_japan"
@maxkfranz
maxkfranz / code.js
Last active August 29, 2015 14:08
Cytoscape.js architecture
var cy;
$(function(){ // on dom ready
cy = cytoscape({
container: document.getElementById('cy'),
style: cytoscape.stylesheet()
.selector('node')
.css({
'content': 'data(name)',
core {
active-bg-color: #fff;
active-bg-opacity: 0.333;
}
edge {
curve-style: haystack;
haystack-radius: 0;
opacity: 0.333;
width: 2;
@maxkfranz
maxkfranz / index.html
Last active October 21, 2015 17:20
concentric demo
<!DOCTYPE>
<html>
<head>
<title>Concentric demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
@maxkfranz
maxkfranz / index.html
Last active October 21, 2015 17:21
grid demo
<!DOCTYPE>
<html>
<head>
<title>Grid demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
@maxkfranz
maxkfranz / code.js
Last active October 21, 2015 17:31
Linkouts
$(function(){ // on dom ready
var cy = cytoscape({
container: $('#cy')[0],
boxSelectionEnabled: false,
autounselectify: true,
style: cytoscape.stylesheet()
.selector('node')
@maxkfranz
maxkfranz / index.html
Created October 26, 2015 20:19
labels
<!DOCTYPE>
<html>
<head>
<title>Labels demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js"></script>
@maxkfranz
maxkfranz / index.html
Last active October 27, 2015 15:24
edge types
<!DOCTYPE>
<html>
<head>
<title>Edge types demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://cytoscape.github.io/cytoscape.js/api/cytoscape.js-latest/cytoscape.min.js"></script>