Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-02-2019 06:48 AM
Hi!
I've been playing with Neovis.js but I was wondering, is there any documentation for the config options to add to the Labels and Relationships in the draw() function?
The few things I know are from some videos I watched, but I can't find any written documentation.
Thank you.
12-02-2019 07:51 AM
Hi
There are some examples in the github page but that is pretty much all you can find. What in particular are you looking for?
Each label in the labels
object has 4 properties: caption, size, sizeCypher, community
. Relationships have thickness
and captions
.
12-02-2019 01:42 PM
Thank you Shan, that's exactly what I was looking for.
So label has 4 properties, relationships have 2 properties, but what could be the values for each property? Where can I learn about that?
12-02-2019 02:46 PM
caption
is the name of the node property whose value will be shown in the fiinal drawing as the caption of every node.community
is the node property whose value is used for clustering nodes and coloring them in the final drawing.size
is the node property whose value is used to decide how big every node should be drawn. In an example, the author has used "pagerank" which shows he runs a pagerank algorithm to get a score for every node and then that is used to determine the size of every node.sizeCypher
is a cypher that will be executed for every node that needs to be drawn and it returns a number as the size of the node. Here is an example from the repo:MATCH (n) WHERE id(n) = {id} RETURN SIZE((n)--()) AS s
captions
for relationships is similar to caption for nodes.thickness
for relationships is a number that determines how thick an edges should be drawn.Take a look at this example too: https://github.com/neo4j-contrib/neovis.js/blob/0c55b188361d1665d7cef4148d8f6b215750b3ba/examples/ex...
All the sessions of the conference are now available online