Hello,
How would you make heat maps in Aris? ( Aris Architect 10.0.x)
Let's say I have an IE model with "cluster/ data models" elements.
Each element has an attribute, say "personal data" with possible values "no", "yes", "yes, sensible" (or 0, 1,2)
Now I'd like to automatically build a model with elements symbosl background colors depending on the "personal data" attribute value.
What are the possible ways to get this?
Thanks for your ideas.
M
You can do this with a macro or report which sets the background color of objects based on the attribute value.
The upcoming 10.0 SR8 release will contain a report in the folder "Content/ArchiMate 3.0/BCM showcase" on the installation medium which does something like this for capability maps based on the maturity of capabilities.
WYSIWYG won't do, unfortunately. But perhaps it would be a nice project to start with scripting? ;-)
Here's what I can quickly come up with as a starting point for you:
const RED = new java.awt.Color(1, .2, .2).getRGB(); // 255, 51, 51
const ORANGE = new java.awt.Color(.99, .7, .42).getRGB(); // 253, 179, 106
const YELLOW = new java.awt.Color(1, .95, .5).getRGB(); // 255, 242, 127
const LIGHTGREEN = new java.awt.Color(.67, .88, .43).getRGB(); // 171, 224, 110
const GREEN = new java.awt.Color(.12, .71, .3).getRGB(); // 31, 181, 78
var g_nLoc = Context.getSelectedLanguage();
var g_aoModels = ArisData.getSelectedModels();
function main() {
for (var i in g_aoModels) {
var oModel = g_aoModels[i];
var aoOccs = oModel.ObjOccList();
for (var j in aoOccs) {
var oOcc = aoOccs[j];
var nCriticality = oOcc.ObjDef().Attribute(Constants.AT_CRITICALITY, g_nLoc).MeasureUnitTypeNum();
switch (nCriticality) {
case Constants.AVT_VERY_LOW_1:
oOcc.setFillColor(GREEN);
break;
case Constants.AVT_LOW_3:
oOcc.setFillColor(LIGHTGREEN);
break;
case Constants.AVT_AVG_1:
oOcc.setFillColor(YELLOW);
break;
case Constants.AVT_HIGH_1:
oOcc.setFillColor(ORANGE);
break;
case Constants.AVT_VERY_HIGH_1:
oOcc.setFillColor(RED);
break;
}
}
}
}
main();
This uses the Attribute 'Criticality' of Application System Type objects for setting the color. So if you want to test it, create an Application System Type Diagram, put some Application System Type objects in it and set their 'Criticality' attributes. Save and close the model.
For the report, open the Administration in ARIS Architect. Create a new report category with a name of your choice. Then create a new report with a name of your choice in it. In the script wizard, provide a name on the first page and check the 'Model' check box on the second page. Deselect 'Generate output file' on the third page and the click on 'Finish'. In the document which opens, insert the above code. Save it and close it.
Now select the model in the Explorer and select 'Start report' from the 'Evaluate' tool bar. In the dialog select your report category and then your report and run it. Once done you can open the model again and if you are lucky, the objects got some fresh new colors.
If you want to use this script with your own attribute type, you need to change the 'Constants.AT_CRITICALITY' part. You will find the API name (i.e. the AT_... part) in the ARIS method tables in the Administration. In case of a user-defined attribute you'll need its type number instead of the 'Constants.AT...' stuff.
You will also have to adapt the AVT_... values. You will find those when you double-click on a value-type attribute in the attribute types table and select "Values and symbols" in the dialog that opens.
Hi,
the "classical" way might be to assign some colored mini-symbols to the values "no", "yes", "yes, sensible" and place them on or around the symbols in the model (via template). However if you don't want them permanently in your model, you might take a look at the "Highlighting" feature in the Connect Portal. @Ralf, do you reckon a user interested in the sensitivity of objects could highlight them based on the attribute value?
Regards,
M. Zschuckelt
Yes, the highlighting feature would be a good idea as well for temporarily showing attribute values with color coding. In fact, it is available out of the box for the Criticality attribute of application systems I used for the code example.
Michel, you can test this with an Application System Type Diagram that contains some systems with maintained Criticality values. Open the diagram in the ARIS Connect portal and then click on the 'Highlighting' button in the tool bar. The side bar.should then offer the attribute for highlighting.