Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to embed neo4j browser result visualisation in web application

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

like image 861
fiedl Avatar asked Sep 06 '17 14:09

fiedl


People also ask

How do I connect my Neo4j Browser?

Neo4j Browser is the easiest way to access a Neo4j database. To establish a connection, you enter the DBMS URL, the name of the database you want to connect, and the user credentials. You can also use the :server command to manage the connection to Neo4j.

How do I visualize data in Neo4j?

Keylines. KeyLines lets you visualize your Neo4j graph database, to see and understand sub-sets and dynamics of the graph. Use KeyLines' Cypher connector code to query the underlying data in a visual way – calling new data from the database by interacting with the chart.

Does Neo4j have a GUI?

There are at least 3 GUI tools for neo4j that allow editing: neoclipse. Gephi. linkurious.


2 Answers

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/

like image 113
Peter P. Avatar answered Oct 18 '22 07:10

Peter P.


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:

  • D3.js
  • VivaGraphJS
  • Sigma
  • KeyLines
  • Alchemy.js

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

like image 37
Bruno Peres Avatar answered Oct 18 '22 07:10

Bruno Peres