A common request is how to configure orgvue so that the Nodes in a tree view are coloured with specific colours to reflect a property of that Node, say the Node's Department so that the end result is this : -
This worked example will explain 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 on this sentence 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 three line menu top left - 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 and click the 'Next' button bottom right of the screen when it has loaded :
- For Step 2, the worksheet name defaults into the 'Dataset Name' field (you can change this to what you want).
- Check the 'Worksheet' field to ensure it refers to the correct worksheet in your source file.
- Set the 'Dataset Type' field to 'Lookups'.
- 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
- Identify 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' : -
- Select the 'Department' property and then click 'Edit', top right. This will open the Edit Properties window:
- On the Edit Properties window, check in the 'Property' tab that the 'Property Type' is set to 'Text :
- Next, select the
Valuestab on the Edit Property window
- Then select
Provide users with a list of set valuescheckbox
Provide values from a Lookup Dataset (Manual)checkbox
- Select the lookup dataset you created in step 2 above from the drop down list
Saveto complete the Lookup
- Then select
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 will colour the nodes in a categorical manner using the colour palette you selected. You should then click on the 'Reload Datasets' button top right of the screen to produce the desired results:
- 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.
Please sign in to leave a comment.