Skip to content

Commit

Permalink
Add possibility to fix node position from the DB (#24)
Browse files Browse the repository at this point in the history
Change to graphioGremlin.js extract_infov3 so that if node properties "graphexpx" or "graphexpy" are found in Gremlin DB (they should have numerical values) then these are used to constrain the x or y coordinates of the nodes in the visualisation. Any dimension which is not constrained, as well as any nodes which are not constrained in either dimension, are subject to the force simulation. Thus, adding only "graphexpy" properties can be used to display hierarchies, whether local or global, that may exist in your data. I recommend multiplying each desired hierarchical level by 50-100 in the first case in order to work well with the default graphexp visualisation settings. (#24)
  • Loading branch information
simbamford authored and bricaud committed Apr 18, 2018
1 parent c1236ff commit 43ed2c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/graphioGremlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ var graphioGremlin = (function(){
}
//property = property.toString();
data_dic.properties[key] = property;
if (key == 'graphexpx') {
data_dic.fx = prop_dic['graphexpx']['0']['value'];
}
if (key == 'graphexpy') {
data_dic.fy = prop_dic['graphexpy']['0']['value'];
}
}
}
if (data.type=="edge"){
Expand Down

0 comments on commit 43ed2c2

Please sign in to comment.