question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Patrick Zweekhorst commented

Sorting stats collector for gantt chart does not work correctly

Hi,

When I make a statscollector to make my own gantt chart something goes wrong when I sort on the row values. It looks a bit like that the bars that are completely drawn are swapped correctly, but the ones which are currently active stay in the same row (the ones that currently have a state so to say).

I made an example model for this, that worked when I saved it, but it doesn't work anymore, but I think it will help you to get the idea of what I (our customer actually) wanted to do. I have some workaround for now, but it would be nice to be able to sort the row values.

Thanks for your time,

Patrick

NB there is an error msg now, which I cant find, but the model did also work with this error msg. This happens in 19.0 and 18.2

ganttchartexample.fsm

FlexSim (other - please specify)
FlexSim (other)
sortinggantt chartstats collector
5 |100000

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

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Patrick Zweekhorst commented

In order to draw faster, the Gantt Chart only looks for new rows when it draws. It assumes that the order of the rows will not change.

You can work around this in one of two way. The first way is to open the dashboard only after the model has run. In that case, the rows will stay in the correct order, so the chart will display correctly. The second way is to make a Calculated Table that simply copies the original table:

SELECT * FROM MyStatsCollector

When the Calculated Table runs the query, it destroys its result and re-makes it, forcing the chart to re-evaluate all the rows in the table.

Also, there is a bug with quotes in the charts. This is easy to do accidentally because of a bug in the Statistics Collector UI, where it adds quotes when you didn't want them. This bug has been fixed, and will go out in the next bug fix release. In the mean time, you will need to click the "custom code" button, and enter code in the code window. Entering text directly in the field value doesn't work.

Fixing the bug with quotes may prove more difficult, but I will make sure it is on the dev list.

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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Hi @jordan.johnson

Thanks for these possible solutions. This will work in the model

0 Likes 0 ·

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.