Fixing X or Y coordinates#24
Conversation
… "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.
|
Great! Thank you very much. I did not expect it would be so easy! |
|
My pleasure. Up to about 500 in each dimension works well - I haven't looked at negatives. |
|
I have modified your contribution by adding a variable node_position_x and node_position_y that can be set in the conf file graphConf.js. Then users can define their own variable for the position and do not have to modify the graph to create the entries graphexpx and graphexpy. Could you test if it still works, I do not have a graph with coordinates at hand. Thanks |
|
Confirmed - that still works 👍 |
|
Excellent! Thanks! |
Change to graphioGremlin.js extract_infov3 so that if vertex 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. Adding some jitter in the y values on a single hierarchical level makes it easier for nodes to pass each other laterally during the force simulation, leading to cleaner layouts. Beware of adding excessive values in either dimension, which will push nodes out of the default area for visualisation.