Get Free Trial

Callback function from getData never executes

Javier Sanz Lopez asked on July 8, 2020

Good morning.
My question is regarding the getData() function, which I use to retrieve information to create charts around my pivot table.
The code of the methods performing this actions is the following:

public createChart(result: FlexmonsterCreateModel, dataSource: DataSourceModel) {
      (data, error) => this.drawChart(data,, dataSource, error),
      (data, error) => this.redrawChart(data,, dataSource, error),

public drawChart(data: any, result: CreateChartModel, dataSource: DataSourceModel, error: any) {
    console.log(‘dr’, data);
    console.log(‘err’, error);
    if (!this.realChartData.find(chart => === {
      this.form.addControl(`chart-${}`, new FormControl(true));
      this.realChartData.push(this.kpiReportsService.mapChartData(data, result, dataSource));
    this.loading = false;

As you can see in the attached picture, the flexmonster instance is loaded with data, as I can see the result of the query, but then the callback method drawChart is never executed.

Best regards.


1 answer

Mykhailo Halaida Mykhailo Halaida Flexmonster July 9, 2020

Hi Javier,
Thank you for posting your question and our apologies for the slightly delayed response.
We’ve taken a look at the provided code snippets & compared this with our samples – so far it is not exactly clear to us why the callback handler of the getData() API call is not executed.
In order for us to investigate this further, do you think you could provide us with a sample project where the issue is reproducible? This will help us get closer to the core of the issue and provide you with a solution much faster.
Looking forward to your response! 
Best regards,

Please login or Register to Submit Answer