Virtual properties

Virtual properties in visualization can be created or modified on Detail tab. Virtual properties are little javascript functions (called formulas) which can be used to create properties based on values stored on element or on elements in its neighborhood. This formula has to return a single value (string or number) which represents value of this virtual property for particular element.

images/download/attachments/12058677/virtualProp.jpg

1.Create or unhide virtual property

With this menu you can create new virtual property which will be created on every element (nodes, relationships or merged relationships) or you can unhide hidden virtual properties.

2.Edit, hide or delete virtual property

With this menu you can

  • edit virtual property (change title or formula) or

  • hide virtual property (it will be not shown in Virtual properties list but you can unhide it anytime) or

  • delete virtual property (it will be no longer available and you can't restore it)

Create virtual property

Virtual property is created for every element in a group. Group are nodes, relationships or merged relationships. So when you create virtual property on Detail tab of a node, this property is added to every node in visualization.

images/download/attachments/12058677/image2016-10-7_11_23_21.png

When creating a virtual property:

  • define title for property (mandatory)

  • define formula (mandatory). Only valid formulas can be created - you can test your formula with Test formula button. You can write your own formula or you can insert one of build-in formula templates and change it for you purpose.

Context of virtual property

Every group of elements has different context when creating virtual property. Context is set of variables available in formula by default.

  • Virtual property on a node can use these variables:

    • node : object with node's data

      • When you want use a particular DB property of a node in formula, use node.data.name_of_property.

    • edges : array of objects with data of node's relationships (all relationship in node's neigborhood)

      • When you want use a particular DB property of the first relationship in formula, use edges[0].data.name_of_property.

  • Virtual property on a relationship can use these variables:

    • edge : object with relationship's data

      • When you want use a particular DB property of a relationship in formula, use edge.data.name_of_property.

  • Virtual property on a merged relationship can use these variables:

    • edges : array of objects with data of relationships which are merged to a particular merged relationship

      • When you want use a particular DB property of the first relationship in formula, use edges[0].data.name_of_property.