Within Ext JS 4, I need to load D3 API. I am using the below code
loadScript: function(callback, scope) { console.log('5) loadScript called'); Ext.Loader.injectScriptElement('http://d3js.org/d3.v3.js', onLoad, onError); console.log('D3 script loaded '); }, onError : function() { console.log('On Error'); }, onLoad : function() { console.log('On Load'); d3.select('body').append('div').style('position', 'absolute').style('padding', '0 10px').style('background', 'red').style('opacity', 0); }, However, in browser console, I get the below error -
Uncaught ReferenceError: onLoad is not defined
Can someone please help me rectify the above code?
Thank you.