Colorizing a graph according to the values of a given data property - nfigay/ArchiCG GitHub Wiki
Introduction
After selecting Tools>ColoredMap, a new toolbar is proposed on the left pan. It allows to enter the name of a node property, and then, to click on.
The button “Paint Value types”
As a result
- A legend is automatically created with an automated assignment of a color for each JSON data type of the value in the list (Boolean, integer, string or float). This allows to ensure that the property value is homogeneously typed. It may occur when importing external data sources where it was not enforced. Using this button allows to check it.
- All the nodes and arcs will be colored according to the value type for the property, and left blank if the property is not provided to the model element.
The button “Paint Property values”.
As a result:
- A legend is automatically created with an automated assignment of a colour for each value of the property
- All the nodes and arcs will be coloured according to their value for the property, and left blank if the property is not provided to the model element
The goal is to perform some analysis of a compound model graph in a visual and easy way (visual mining). Two parameters can be provided:
- Opacity (value between 0 and 1): it allows to change the opacity of the applied colours for the nodes
- Arrow Width: it allows to change the width of the arrows in order to visualize better their color.
These parameters can be changed and applied by clicking again on the button “Colors for property value”.
It is possible to reset (button “Reset”) the graph, which remove the background colors for nodes, put the edge colour to black and the edge width to 1. So it is possible to visually explore a graph according some properties of the nodes and of the edges. In the initial dataset coming with ArchiMateCG, the property securityLevel is added to some elements of the graph. The provided figure illustrates what happens when selecting this property for coloured map: a legend is created with a dedicated color per existing value (automatically), and the nodes and edges are colors, taking into consideration the edge width and opacity parameters.
Note: the legend is mainly relevant for text value with a limited number of values, or for numeric values with a limited number of values, without continuity for the considered property. It is planned in future version to support scrolling when many value to be displayed in the legend. It is also planned to propose Color(s) gradients appropriate legend for properties with continuous value (e.g. age when we don’t want one color per age given in the properties but a gradient reflecting the age is little or great).