Using a lookup dataset allows you to define the colour of each node in a lookup and reference them in other datasets
When following this article, the most common error is the spelling of the colour property in the Lookup table - ensure it is spelled color (case sensitive).
Generic Colour By Passthrough
- Create a Lookup table with the same name as the property in the main dataset that you wish to colour by, e.g. Role,
- set Label and ID properties identical for each node
- set the color property's values as required (hexadecimal format is used here; there are other options)
- In the main dataset, set the property by which you wish to colour like this : -
- In the Side Panel, set the Colour to the name of the appropriate property, and ensure the 'Passthrough' option is selected. Click Apply and the colour will be set to the values set in the corresponding Lookup
Colour Pills Method
- To colour using a lookup dataset, create a dataset either in the Lookup tab, or with the tag lookup, and give it the same name as the property you want to colour (in this case Gender)
- Create one node per value in the property Gender (e.g. Male; Female): label and ID should be the same value
- Create a property called color to store the colour you want to apply to each value. This can be done using plain English e.g. blue; single letter abbreviation e.g. b; or hexadecimal format e.g. #4169E1
- Ensure that the property in the main dataset has a type of 'Auto'
Now, when you Colour By ... that property in a dataset, the lookup-defined colours will be used automatically.
Make sure that both the main dataset and the lookup dataset are saved and then, in the main dataset, to get the colour pills working you will need to reload and then refresh the data.
The lookup-derived colour [here, for Gender] will also display as a "pill" on summary cards even when another property has been set for Colour By ... e.g. Department.
Alternate Colour Pill: RAG Status
- Create a dataset either in the Lookup tab, or with the tag lookup, and give it the same name as the property you want to colour (in this case rag_status)
- Create a property called color (case sensitive) to store the colour you want to apply to each value
- Now, when you colour by that property in a dataset, the lookup-defined colours will be used automatically