start a chart with a condition

15 views
Skip to first unread message

Sara AV

unread,
Jul 1, 2018, 9:20:11 AM7/1/18
to GAMA
Hi everyone,

How is possible to start plotting in a chart when one condition is true?

For example, I have the following case.

display "Charts_display"
{
chart "Amount of agents already safe at different times" type: series
{
data "Amount of people already evacuated" value: length(people_already_evacuated) style: line                                  color: # green;
}

Before I send the warning (condition warning = true) I do not want plot anything in the chart, because it is a straight line until the warning is sent. How is possible to start representing only when this condition is true? 
like... 

if warning = true { chart  "...

Thank you,

Have a nice evening!

Sara

Srirama Bhamidipati

unread,
Jul 1, 2018, 9:24:13 AM7/1/18
to GAMA
display "Charts_display" refresh:(warning = true) can be an option. It is better you use flood_warning instead of warning as a variable name to avoid conflict with in-built keywords.


Srirama

Sara Alonso Vicario

unread,
Jul 1, 2018, 9:29:45 AM7/1/18
to gama-p...@googlegroups.com
Thank you Srirama!Always helping!:)

--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platform+unsubscribe@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages