I have a almost 5000 nodes of Recipes
and 5 nodes of Meal_Types
in neo4j database. Right now there is no relationship between them. I am running CQL below:
MATCH (n) RETURN n LIMIT 100000
This is running fine, but it is returning node related to Recipes
only. There may be something hidden, I mean there might be nodes related to Meal_Types
but as they are in same color it is very hard to differentiate them.
So is there a way to bring all nodes to dispaly with different colors respectively?
Since you write about "display" and "colors", I assume you're writing about the Neo4j browser.
Your query might limit its results to the first 100000, but the browser will actually display much less nodes, with a default number of 300. You can change that value using the following command in the browser:
:config initialNodeDisplay: 1000
or through the settings pane on the bottom left (see the "Graph Visualization" section).
Since you only have 5 Meal_Types
nodes, vs 5000 Repices
, it's unlikely they'll be part of any partial result. You can bias the result by ordering on the label, since Meal_Type
will sort alphabetically before Recipes
:
MATCH (n)
RETURN n
ORDER BY head(labels(n))
LIMIT 300
That way, you don't need to display more nodes (since you can't zoom out, it's pretty useless anyway) and you'll always get your 5 Meal_Types
.
You can change the styling of the output in the neo4j browser as described here:
https://neo4j.com/developer/guide-neo4j-browser/#_styling_neo4j_browser_visualization
However, there is a limit for the number of nodes/relationships that can be displayed. So you will likely not see all 5000 Recipe
nodes and all 5 Meal_Type
nodes but rather the first N nodes returned from your query.
Rendering of large graphs is really difficult :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With