Defining Shaders
Shaders let you visually highlight functions and component in your model based on their properties.
There are 2 types of shaders.
- Property shader – allows you to apply a specific colour for a given key/value pair, e.g. Domain=Ordering should be green, and Domain=Finance should be blue.
- Gradient shader (or Heatmap shaders) – are based on numeric properties, and allow you define the start and end colour for a numeric property. All you need to do is define colours to be used along a range from 0 to 1, and AIM will do an interpolation to use the correct colour to use.
Gradient Shader example
A gradient shader take a list of decimals between 0 and 1, each with an associated colour, and interpolates a colour to apply to each model element.
This type of shader is useful for heatmapping your model.
In this example below the shader is based on the ‘OPEX’ property.
- Ship Supplies has a value of 100
- Receive Supplies has a value of 130
- Create Purchase Request has a value of 300
Since Ship Supplies has the lowest value it gets assigned green.
Since Create Purchase Request has the highest value is gets assigned red.
Receive Supplies gets a colour calculated from the gradient. Since 130 is closer to 100 than 300, it gets assigned a slightly darker green.
You can have any number of decimals from 0 to 1 inclusive in the gradient definition.