There is an example in neo4j.com/developer/guide-data-visualization
On Mon, Oct 3, 2016 at 9:54 PM, Abhijit Gupta <[email protected]>
wrote:
> Bit of more detail on this,
>
> Java Query to get the JSON data :
> ----------------------------------
> String *relationship *= "MATCH (o)-[r:orgEntity_Portfolio]->(p)
> RETURN o.orgEntityId,p.portfolioId";
> String *node *= "MATCH (n:portfolios) Return n.portfolioId as
> portfolioId,n.shortName as shortName";
>
> ExecutionResult rs = (ExecutionResult )graphDb.execute(*node*);
>
> Object object = rs.iterator();
> String foo = JsonHelper.createJsonFrom(object);
> -----------------------------------
>
> When passing *node *or *relationship *parameter in execute, I am getting
> JSON data as below:
>
> JSON for Node:
>
> { "innerJavaIterator$1" : [ { "portfolioId" : 1, "shortName" :
> "Single Customer View" }, { "portfolioId" : 2, "shortName" : "BAU"
> }] }
>
> JSON for Relationship
>
> { "innerJavaIterator$1" : [ { "p.portfolioId" : 1, "o.orgEntityId"
> : 2 } ] }
>
> But problem is I am using d3.js (force-directed graph) which requires
> Nodes and Links for preparing the chart. Can any one provide some pointer
> on how to get exact JSON from neo4j so can directly use to prepare the same
> graph chart in our application.
>
> Thanks in Advance.
>
>
> On Tuesday, October 4, 2016 at 1:02:47 AM UTC+5:30, Abhijit Gupta wrote:
>>
>> Hi All,
>>
>> I am using Neo4J 3.0.6
>>
>> I want to get the Neo4J Graph Visualization in my application fetching
>> nodes and relationship from Neo4J using Java API as JSON.
>>
>> I tried with d3.js (force-directed graph) but the JSON what I am
>> retrieving is not how d3 requires. Could you please give some pointer on
>> this and which way will be better to get the same kind of visualization.
>>
>> Warm Regards,
>> Abhijit
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.