Changing Chart Appearance at Runtime

Alike presentation shapes charts also have a set of dynamic properties. Using dynamic properties, you can alter some graphical properties of a chart shape (size, position, visibility and replication) during simulation. This is the place where you can link the appearance of a shape to any data of the agent. The data may change and it will be reflected in the picture. In case the expression is empty, the property retains the default static value throughout the whole simulation.

 To set up a dynamic property of a chart
  1. Select the chart in the graphical editor or in the  Projects view. 
  2. Go to the Properties view.
  3. In the field of the dynamic property, type the expression that will return the property value.

Dynamic properties of the charts

All charts have the same set of dynamic properties:

Replication - The replication factor for the chart shape. Here you specify how many copies of the chart will be created. If you leave this field empty, only one chart will be created.

Visible - The boolean expression defining whether the chart shape is visible on the presentation.

X - The X-coordinate of the upper left corner of the chart shape.

Y - The Y-coordinate of the upper left corner of the chart shape.

Width - The width of the chart shape.

Height - The height of the chart shape.

On selection change - The code executed when the user selects some particular data item(s). This code is executed either when the user changes the selection by clicking items in the chart legend, and when the selection is changed programmatically via the function selectItem()

On item removal - The code executed when the user removes some particular data item(s) from the chart. This code is executed either when the user removes items from the context menu of the chart legend, and when data items are removed programmatically via functions remove() and removeAll()