Skip to content

Node configuration

Zack edited this page May 3, 2018 · 9 revisions

With Popoto you can customize the display of each specific node.

The node providers defines all the functions and properties used to generate nodes on graph or viewers. This provider must contain an entry for each node labels and can be overridden to customize node rendering.

 popoto.provider.node.Provider = {}

If some functions or properties are not set in popoto.provider.node.Provider, the rendering used the default node configuration.

To add configuration you must first define the target type of the configuration, to apply the configuration for all node of that type.

To do that, wrap your configuration into an javascript object with as name the label of the desired type.

For example if we want to customize all Person nodes write:

popoto.provider.node.Provider = {
    "Person": {}
}

Now we can add all the desired configuration for the Person Node

All configuration are listed below:

Label specific parameters

These attributes are specific to a node label and will be used for every node having this label.

Is searchable

Defines whether this label can be used as root element of the graph query builder.

This property is also used to determine whether the label can be displayed in the taxonomy filter.

The default value is true.

"isSearchable": true

Auto expand relations

Defines whether this label will automatically expend its relations when displayed on graph.

If set to true, once displayed additional request will be sent on the database to retrieve its relations.

The default value is false.

"autoExpandRelations": false

Is auto load value

Defines whether this label will automatically load its available data displayed on graph.

If set to true, once displayed additional request will be sent on the database to retrieve its possible values.

The default value is false.

"isAutoLoadValue": false

Return attributes

Defines the list of attribute to return for node of this label. All the attributes listed here will be added in generated cypher queries and available in result list and in node provider's functions.

The default value contains only the Neo4j internal id. This id is used by default because it is a convenient way to identify a node when nothing is known about its attributes.

But you should really consider using your application attributes instead, it is a bad practice to rely on this attribute.

"returnAttributes": [query.NEO4J_INTERNAL_ID]

Value order by attribute

Defines the attribute used to order the value displayed on node.

Default value is "count" attribute.

"valueOrderByAttribute": "count"

Is value order ascending

Defines whether the value query order by is ascending, if false order by will be descending.

Default value is false (descending)

"isValueOrderAscending": false

Result order by attribute

Defines the attribute used to order the results.

Default value is "null" to disable order by.

"resultOrderByAttribute": null