Neovis.js - draw() configuration

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.

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.

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?

  • 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
    This means the more edge a node has, the bigger it will be drawn.
  • 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: neovis.js/example-labels.html at 0c55b188361d1665d7cef4148d8f6b215750b3ba · neo4j-contrib/neovis.js · GitHub