Step 5. Adding Charts
You can study the dynamics of the investigated process using AnyLogic charts. We will create a chart to show how populations of product adopters and potential adopters change with time.
We have created data sets that can be displayed on charts. Now it's time to add charts.
- Drag the Time Plot element from the Analysis page of the Palette view into the graphical editor.
- Resize it to look as in the figure below.
- Go to the General page of the Properties view.
- Set Time Window: 8.
- Specify data items to be displayed on the time plot.
- Сlick the Add Data Set button and define settings for the data item in the property section above.
people.potentialAdopters()in the Expression field. Here we tell the chart to display the result returned by potentialAdopters statistics function of the replicated object people.
You can use code assistant while typing code in this edit box.
- Set Potential adopters as the Title of the data set. It will be displayed in the legend for this data item.
- Choose the first option from the Point Style drop-down list to turn off indicating data set values with a marker.
- In the same way, add another data item on the chart, displaying people.adopters(). Set Adopters as the Title of this data item and modify its visual properties in the same way.