Visulaization on web interface in ArangoDb not working as expected -
i testing arangodb using graph features provided framework.
i trying create simple graph below, similar java driver example provided here, https://github.com/arangodb/arangodb-java-driver/
list<edgedefinitionentity> edgedefinitions = new arraylist<edgedefinitionentity>(); edgedefinitionentity edgedefinition = new edgedefinitionentity(); edgedefinition.setcollection("myedgecollection"); list<string> = new arraylist<string>(); from.add("mycollection1"); edgedefinition.setfrom(from); list<string> = new arraylist<string>(); to.add("mycollection2"); edgedefinition.setto(to); edgedefinitions.add(edgedefinition); graphentity graph = arangodriver.creategraph("mygraph", edgedefinitions, null, true); user myobject1 = new user("homer", 38); user myobject2 = new user("bart", 36); user myobject3 = new user("marge", 39); user myobject4 = new user("lisa", 40); documententity<user> vertexfrom1 = arangodriver.graphcreatevertex( "mygraph", "mycollection1", myobject1, true); documententity<user> vertexfrom2 = arangodriver.graphcreatevertex( "mygraph", "mycollection1", myobject2, true); documententity<user> vertexto1 = arangodriver.graphcreatevertex( "mygraph", "mycollection2", myobject3, true); documententity<user> vertexto2 = arangodriver.graphcreatevertex( "mygraph", "mycollection2", myobject4, true); edgeentity<?> edge1 = arangodriver.graphcreateedge("mygraph", "myedgecollection", null, vertexfrom1.getdocumenthandle(), vertexto1.getdocumenthandle(), null, null); edgeentity<?> edge2 = arangodriver.graphcreateedge("mygraph", "myedgecollection", null, vertexfrom2.getdocumenthandle(), vertexto2.getdocumenthandle(), null, null); the edge collection seems have right mapping,
{"_from":"mycollection1/1544266710","_to":"mycollection2/1544987606"} {"_from":"mycollection1/1544528854","_to":"mycollection2/1545249750"} i trying visualise graph in web interface. graph visualization showing weird behaviour not understand. in above setup, expect 4 nodes in graph edges between "homer" -- "marge" , "bart" -- "lisa" see 2 nodes , 1 edge, i.e. homer -- marge.
visulaization view shows there no nodes , on revisit same page nodes appear.
the graph viewer starts random vertex. means uses totally different start vertex whenever it's opened.
this because graph in general case can contain many vertices , displaying of them not option because may take long time render or crash browser. vertex put center of display @ start not easy determine because require graph viewer know vertex more important others or important users. doesn't know that, there random start vertex selection.
you can select different start/center vertex clicking on filter icon in top right of graph viewer. bring search input field can use select start vertex attribute (e.g. name == homer if vertices contain name attribute).
if such vertex exists, put center of screen, along directly connected vertices. note relationships/edges start vertex directly connected vertices shown. indirect connections not shown in graph viewer default. clicking on of vertices displayed expand (or contract) them , may bring further relationships.
again of done because may not possible display entire graph @ start (imagine graph few million nodes). question indicates, current solution may not intuitive.
Comments
Post a Comment