Using a lookup dataset allows you to define the colour of each node in a lookup and reference them in other datasets.
Generic Colour By Passthrough
- Create a Lookup dataset with exactly the same name as the property key in the main dataset that you wish to colour by, e.g. Department.
- Prepare the list of Departmental names and the colour you want to be associated with each in Excel : -
- Note that you can use three ways to denote the colour.
- Paste this data into the new lookup dataset, setting the Paste options like this : -
- The result in Worksheet view should look like this : -
- Save the lookup dataset.
- In the main dataset, set the property by which you wish to colour like this : -
- In the Side panel, click on the pencil icon in the Colour section : -
- Set the Colour options so that Column is set to the property you wish to colour by (in this example that's 'Department'), and ensure the 'Passthrough' option is selected. Click Apply and the colour of the node icons will be set to the values set in the corresponding Lookup. (You may need to click the Refresh button at this point.)
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