graphileon

Graphileon Interactor: how to set style for a node with a given string property


What is the right format to define a style selector for a node with a specific string property?

In Interactor one can define different styles for nodes and relationships based on their Labels and properties (doc). The example shows how to select nodes with label MyLabel and the value of property myParam larger than 5.

When trying to create a style for nodes that have a property 'kind' set to a given string 'Needle_Mover', the style is applied to all nodes with the same label, even if their property string is different.

For example:

:Program                        -> red
:Program[kind=='Needle_Mover']  -> blue

All nodes with label Program will show blue.

I suspect it is a syntax mistake on my side... I have tried with a single = as well.


Solution

  • The following style selectors should work

    for a style for a specific value of a property

    :Program[myProp=abc]      
    

    for a style to be applied when a property exists

    :Program[myProp]  
    

    for numeric properties we also have

    :Program[myNumericProp > 5]  
    :Program[myNumericProp = 5]  
    :Program[myNumericProp < 5]