I am trying to do a selection in the graph when the graph component (angular) first loads. Just for some context, there is a graph & a table, and when there is new data, the graph reloads with the new data, hence we need to provide new data for the selection to keep it in-sync with the table.
For this, I have used diagram.select method, and I call this method. The issue is that, it doesn’t work for the very first time, but works at later times when the event is manually triggered by the user. I suspected that the issue might be caused by the diagram being initialised later on, but the method being called first, which meant that the diagram never existed in the first place, hence the method would have definitely failed, or did nothing.
To check this, I added some logs, and I learnt that the diagram was initialised before. Now, I went through the transaction docs, didn’t really understand the significance of the boolean returned by commitTransaction method, but what I found was the value returned was true for selection events manually triggered by the user (which worked), and also true for the selection event on initialisation (which failed). So, I am not really sure what is happening wrong here, and how to fix this in the first place.