aboutsummaryrefslogtreecommitdiff
path: root/templates/cytoscape.html
diff options
context:
space:
mode:
authorHao Chen2019-05-08 06:01:49 -0500
committerHao Chen2019-05-08 06:01:49 -0500
commit30a9a40ae3170f0a13efd394ac12e297d3eda03d (patch)
treeae07d1b41181c2c1027adf99b1c422e8a55f1362 /templates/cytoscape.html
parentefaf3a4abe2f6ae5b67578182085d18d05f25c5f (diff)
downloadgenecup-30a9a40ae3170f0a13efd394ac12e297d3eda03d.tar.gz
rename to ratspub
Diffstat (limited to 'templates/cytoscape.html')
-rw-r--r--templates/cytoscape.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/templates/cytoscape.html b/templates/cytoscape.html
new file mode 100644
index 0000000..24c18c1
--- /dev/null
+++ b/templates/cytoscape.html
@@ -0,0 +1,46 @@
+{% extends "layout.html" %}
+{% block content %}
+
+<script type="text/javascript" src="{{ url_for('static', filename='cytoscape.min.js') }}"></script>
+
+
+ <div id="cy"></div>
+ <script>
+ var cy = cytoscape({
+ container: document.getElementById('cy'),
+
+ style: [
+ { selector: 'node',
+ css: {
+ 'content': 'data(id)',
+ 'text-valign': 'center',
+ 'text-halign': 'center',
+ 'background-color': 'data(nodecolor)',
+ 'font-weight': 'data(fontweight)'
+ }
+ },
+
+ { selector: 'edge',
+ css: {
+ 'content': 'data(sentCnt)',
+ 'curve-style': 'bezier',
+ "opacity": "0.4",
+ }
+ }
+ ],
+ elements:[ {{ elements | safe }} ],
+
+ layout: {
+ name: 'concentric',
+ concentric: function( node ){
+ return node.degree();
+ },
+ levelWidth: function( nodes ){
+ return 2;
+ }
+ },
+
+ });
+ </script>
+
+{% endblock %}