A common request is how to configure Orgvue so that the nodes in a tree are coloured with specific colours to reflect a property value. Say the Node's Department, so that the end result is this:
This worked example explains how to assign a specific colour to the Nodes in a tree view to indicate the Node's Department value.
1. Create a Spreadsheet
Create a new spreadsheet listing the Department values and the colour you assign to each. The spreadsheet should have only two columns, and they must be 'id' and 'color' (both are case sensitive) : -
Note that you can use either hex codes or the name of the colour. (Click here to see the full list of available named colours.)
2. Create a new dataset and set it to be a lookup
- From the Orgvue Homescreen select 'Settings' from the left menu panel - a new browser window will open
- From Settings select the datasets icon top left and then click on the '+ Dataset' button at top right : -
- Upload the data you created in Step 1 above
- Enter the name of the new dataset (eg 'Department' in this illustration)
- Set the Dataset Type to be 'Lookup'
- Ensure the 'ID' field is set to "id", the Label field is set to "color" and that the 'Node Relationship' is flat.
- Validate that the content shown in the two thirds of the screen to the right matches what you expect.
- Click the 'Next' button bottom right of the screen.
- At Step 3 ensure that the 'id' property has a type of text and then click the ''Upload' button at bottom right of the screen : -
- You should see this to confirm that you have been successful. Click 'Back to Datasets' : -
3. Set the 'Department' Property to point at the new Lookup Dataset
- Select the Dataset you wish to apply this lookup to and then click on the three dots to the right of 'Edit' and finally 'Manage properties' : -
- In the Manage Properties window select the 'Department' property, then the Values tab, select 'Provide users with a set of values', and in the Input options section select 'Provide values from a Lookup Dataset (Manual)' and finally select the dataset you created earlier
- In the 'Property' tab ensure that the 'Type' is set to 'Text :
-
Finally, click the 'Save' button bottom right
4. Select the Colour by Property in the Homescreen
- Return to the Homescreen's browser tab and select the relevant Dataset and Pack, open the Colour control and select 'Property', set the 'Color by property' to 'Department' and finally select any colour palette and then 'Apply' : -
- This should result in the nodes being coloured according to the relationships established in the spreadsheet you started with, and by clicking on the 'Legend' button top right you can display the Colour > Department relationship :
NOTE: It is not possible to use a single property to both run a Gizmo expression to calculate a value, and then have that same property referring to a lookup dataset to retrieve a colour based on the calculated value. Instead you should configure one property with the required gizmo expression which uses the setValue command to populate the calculated value into a second property, and then have the second property refer to the lookup dataset to retrieve the colour based upon the value that has been 'set' in the second property.
Comments
0 comments
Please sign in to leave a comment.