0

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.

caiman
  • 405
  • 4
  • 10
  • It seems I see inconsistent behaviour, after reloading the browser some of the colors change but it still is not what I expect, so I would like to make sure what the correct syntax is, from there conclude if it is a bug or my mistake. – caiman Nov 30 '17 at 09:36

1 Answers1

1

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] 
Graphileon
  • 5,275
  • 3
  • 17
  • 31