Simulation with AnyLogic/Agent-Based Modeling/Step 5. Adding charts

''' 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.

Draw a time plot displaying adopter and potential adopter population dynamics

You can use code assistant while typing code in this edit box.
 * 1) Drag the Time Plot [[File:Step_5._Adding_charts1.gif]] element from the Analysis page of the Palette view into the graphical editor.
 * 2) Resize it to look as in the figure below. [[File:Step_5._Adding_charts2.png]]
 * 3) Go to the General page of the Properties view.
 * 4) Set Time Window: 8.
 * 5) Specify data items to be displayed on the time plot.
 * 6) Сlick the Add Data Set button and define settings for the data item in the property section above.
 * 7) Type  in the Expression field. Here we tell the chart to display the result returned by potentialAdopters statistics function of the replicated object people.
 * 1) Set Potential adopters as the Title of the data set. It will be displayed in the legend for this data item.
 * 2) Choose the first option from the Point Style drop-down list to turn off indicating data set values with a marker.
 * 3) 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. [[File:Step_5._Adding_charts3.png]]