0

I'm running the following query using apoc.gephi.add to display data from Neo4j in Gephi.

MATCH path = (pr1:Person)-[*0..2]->(pr2:Person)
WHERE pr1.id={id1} AND pr2.id={id2}  AND pr1.id<>pr2.id
CALL apoc.gephi.add ('http://localhost:8091', 'workspace', path)
YIELD nodes, relationships ,properties
RETURN *

In Gephi I'm able to see the Type of the nodes and relationships, but I'm not able to see the properties of the nodes or properties in Gephi (looking in the Data laboratory).

Any ideas?

skibee
  • 1,279
  • 1
  • 17
  • 37

1 Answers1

0

apoc.gephi.add procedure has 2 others optional parameters : weight property and properties.

The one you want is properties : it's a list of all the properties you want to give to gephi. Basically, apoc gives nothing. you can use 'add' like this : CALL apoc.gephi.add ('http://localhost:8091', 'workspace', path, ['prop1','prop2'...])

More details here.

And if you want to learn more about neo4j with gephi, this is a good tutorial, which could in addition learn you how to use weight property, a very cool feature to make relevant graphs.

aboks
  • 11
  • 4