question

Nathan S7 avatar image
0 Likes"
Nathan S7 asked Jeanette F commented

How do I get multiple tracked variables on a single graph?

I have multiple tracked variables tracking the content of that variable, and can create graphs through the pinning to a dashboard function. However, I am encountering issues when combining the relevant statistics collectors to create a graph of both variables simultaneously.

FlexSim 21.2.4
tracked variablesgraphsstatisctis collector
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Nathan S7, was Jordan Johnson's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

In version 2021 Update 2, you should make a custom statistics collector.

  • Listen to the OnChange of all the tracked variables you want on the chart
  • Add three columns:
    • Time - set the Row Add Value to Model.time
    • Value - set the Row Add Value to current.value. Set the storage type to int, if you are storing whole numbers. Leave it on Double for decimal values.
    • TV - set the Row Add Value to current.name, and set the storage type to string.
  • Set the chart to Split by the TV column (color, axis, or both)

In version 2022 or later, you can just pin the tracked variable, and then use the chart's UI to add additional tracked variables.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.