Styling Neo4j Server Visualization
Join the DZone community and get the full member experience.
Join For Freeto give you a head start when using neo4j-browser i wanted to share these quick tips for styling and querying.
first of all, you have to download , unzip and start neo4j. if you have a jdk (java7) installed and on the path it should look like this:
$ cd neo4j-community-2.1.1 $ bin/neo4j start using additional jvm arguments: .... starting neo4j server...warning: not changing user process [70299]... waiting for server to be ready...... ok. http://localhost:7474/ is ready.
as told, we open the url http://localhost:7474/ in our browser and can start working with neo4j and its query language cypher directly.
if you want to learn more first, click on any of the helpful links show after startup, these are quick slide shows that introduce the different concepts quickly.
-
intro – a guided tour :play intro
-
concepts – graphdb 101 :play concepts
-
cypher – query language :play cypher
-
the movie graph – a mini graph app :play movie graph
but we want to get going with the visualization. so let’s import some data, query it and start styling. to do that, we run :play movies, click on the huge cypher create … statement and
run it using the triangular run button in the command line editor.
after a few seconds the data is imported, but we’ll see only the lonely
matrix
node that’s returned. we want to see more and that’s why go to the favorites tab on the left, indicated by a star and
click on the
get some data
entry, preferably on the green round run-button besides the title. this should give us a graph visualization to play with.
but those nodes only show numbers! now click on any red node that has acted_in relationships pointing to it. these are movie nodes. in the popup you’ll see the node label “movie” on the top.
in the tab on the right, denoted with an “eye”, you can set the styling parameters and property chosen for the displayed title.
play a bit with the styling options and do the same for the other nodes (labeled person). the next step is styling relationships, just click on one (e.g. directed) and try it out.
the whole visualization is powered by a concept called
graph style sheet
or grass. you can access the style sheet with the link at the bottom of the styling popup.
the resulting style renderer allows you to look at the style-sheet, download it or update it via drag-and-drop. you can also reset all styling with the “fire extinguisher”.
if you rather watch me performing all these things, here is the screencasts that explains it all in detail. enjoy!
how to style the neo4j-browser visualization? from neo technology on vimeo .
Published at DZone with permission of , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
What Is mTLS? How To Implement It With Istio
-
Redefining DevOps: The Transformative Power of Containerization
-
Building A Log Analytics Solution 10 Times More Cost-Effective Than Elasticsearch
-
What Is Test Pyramid: Getting Started With Test Automation Pyramid
Comments