16

The neo4j browser, which can be accessed through http://neo4j:7474 (where neo4j is the neo4j host), is really great in visualising query results.

As I understand, a javascript library is responsible for talking to the database backend at bolt://localhost:7687 as well as for rendering the results.

How can this javascript library be used to display query results in an embedded manner in our main web application?

  1. The web application should be responsible for composing the cypher query.
  2. I would prefer if the web application backend would be responsible to GET the result from the database backend and pass the result to the javascript library for security reasons.
  3. The javascript library should be responsible for rendering the result into a given <div></div>.
  4. The user should be able to drag the nodes around, but not be able to manipulate data or send other queries through the ui. Thus, only the red-boxed result area should be visible.

    screenshot

fiedl
  • 5,667
  • 4
  • 44
  • 57
  • Can [this link](https://github.com/neo4j/neo4j-browser) help you in some ways? Neo4j browser client application, NodeJS. – Sergio La Rosa Sep 06 '17 at 14:50
  • We're also interested in using Neo4j result visualizations outside of the browser. I opened a GitHub issue with this question at [`neo4j/neo4j-browser#921`](https://github.com/neo4j/neo4j-browser/issues/921 "Embedding Neo4j Browser query result frame in external webapp?"). – Daniel Himmelstein Apr 02 '19 at 15:21

2 Answers2

6

This is not possible since Neo4j Browser is not designed to work as an embedded graph visualization tool.

However, you can use a graph visualization library to embed the graph visualization into your web application. Some examples of JavaScript graph visualization libraries:

Alternatively, since Neo4j Browser is an Open-source tool you can checkout the project and modify it to achieve your goal.

Bruno Peres
  • 15,845
  • 5
  • 53
  • 89
3

According to the Neo4j documentation on visualization tools, there are 3 categories of visualization tools:

  1. Embeddable tools with built-in Neo4j connections
  2. Embeddable libraries without direct Neo4j connection
  3. Standalone product tools

It sounds like you are looking for the first option. And under this, there is: 1. Neovis.js - https://medium.com/neo4j/graph-visualization-with-neo4j-using-neovis-js-a2ecaaa7c379 2. Popoto.js - http://www.popotojs.com

I recommend checking out Popoto for both ease of integration and best visualizations.

Reference: https://neo4j.com/developer/tools-graph-visualization/

Peter P.
  • 3,221
  • 2
  • 25
  • 31