We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Custom API - dataloaded and loadingdata events are not triggering?

Answered
Henry asked on October 2, 2020

Hello,
We have integrated the Custom API with an Angular framework and we are looking into listening for the dataloaded and loadingdata events so we can apply some lifecycle behaviors. However, according to the respective documentations, it looks like these events are not triggered when the data source is the Custom API, is this correct?

  1. If not, we have tried listening to these events, but they did not seem to trigger when the Custom API started and finished loading the data.
  2. If so, are there similar events, but for the Custom API that we are perhaps missing from the list of events?
    • If not, are there plans to support such events in an upcoming release?

Kind regards,
Henry

4 answers

Public
Vera Didenko Vera Didenko Flexmonster October 5, 2020

Hello, Henry,
 
Thank you for writing to us. 
 
For the custom data source API, the equivalent events are olapstructureloaded and loadingolapstructure
Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/ku4Ln7bh/
 
Please let us know if this works. 
 
Kind regards, 
Vera

Public
Henry October 5, 2020

Hi, Vera,

  1. loadingolapstructure is working!
  2. olapstructureloaded, at least from our attempts, seems to get triggered as soon as the custom api makes the first fields/members request. Is this the correct behavior? We were looking for an event that gets triggered after the custom api has visualized the data, or at least finished all of its fields, members, and select requests to get the initial data. Is there an event with that sort of behavior?

Thanks again!
Henry

Public
Vera Didenko Vera Didenko Flexmonster October 5, 2020

Hello, Henry,
 
Thank you for your response. 
 
We are glad to hear that the loadingolapstructure event works fine for you.
 
Regarding the olapstructureloaded event:
You are right, this event is triggered once when the structure was loaded.
According to your description, it seems the reportcomplete event would suit your case. This event is triggered when all data was loaded successfully and the grid/chart was rendered.
We have prepared a JSFiddle showing when this event is triggered: https://jsfiddle.net/flexmonster/vnqpmae7/
 
Please let us know if this is what you are looking for.
Looking forward to your answer.
 
Kind regards,
Vera

Public
Henry October 5, 2020

reportcomplete was exactly what we needed, thank you so much!

Please login or Register to Submit Answer