From ebdf692ea30b649b6023151f9364f8c71717fadc Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Thu, 9 May 2019 16:51:45 -0500 Subject: layout algo --- templates/cytoscape.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/templates/cytoscape.html b/templates/cytoscape.html index c0c6bf6..05fc045 100644 --- a/templates/cytoscape.html +++ b/templates/cytoscape.html @@ -15,13 +15,14 @@ 'text-halign': 'center', 'background-color': 'data(nodecolor)', 'font-weight': 'data(fontweight)', - 'font-size': '20%' + 'font-size': '9%' } }, { selector: 'edge', css: { 'content': 'data(sentCnt)', 'curve-style': 'bezier', + 'line-cap': 'round', 'opacity': 'mapData(sentCnt, 1, 50, 0.2, 0.3)', } }, @@ -47,8 +48,16 @@ ], elements:[ {{ elements | safe }} ], layout: { - name: 'circle' + name: 'concentric', + concentric: function( node ){ + return node.degree(); + }, + levelWidth: function( nodes ){ + return 7; + } } + + }); cy.on('tap', 'edge', function(){ -- cgit v1.2.3