PDA

View Full Version : Ext JS 4.2 - Delay in D3 script loading



kayasa
7 May 2015, 8:55 PM
I am using D3 within Ext JS 4.2.

In order to use D3, the D3 script needs to be injected. I have a feeling that there is some delay in script loading, at times.

Most of the times, everything works fine. However, intermittently the Ext JS widget (that uses D3) does not load. It shows an error in the console stating

52350

52351

Once I refresh the page, everything works fine.

Attached is the complete code. Could this problem be because D3 code gets executed even before the script is injected?

Thank you

tristan.lee
11 May 2015, 4:53 AM
Do you get any other errors or logging to the console, such as an error trying to load in the script? I assume both connections are always http? I'm also not sure what all D3 processes once the script is loaded. You might try putting your onLoad code in a setTimeout(function () { ... }, 0) just to see if there's a conflict with the event timing between your code and D3's layout being defined.