extjs - Add data to Store from external Javascript -
i have chart store using extjs4 mvc structure , data online api via javascript file , want know if possible add data store externally load when call store.load().
the external js not extjs or part of mvc, runs on page behind chart. have transfer logic extjs controller? there way call extjs method external js? thanks.
there indeed ways call methods on extjs objects outside of extjs specific code, it's js after all.
you need expose method extjs code returns reference chart, along these lines (in extjs code):
function getchart() { return ext.getcmp('mychartid'); }
then in external js, can this:
var data = ...; // can external data var chart = getchart(); chart.load(data);
this depends on ability expose method extjs you'll need able reference.
it may easier try , call method retrieve data in extjs mvc app. providing external js file loaded, presumably return reference can call it's methods. in mind, call methods need inside extjs app alternative.
Comments
Post a Comment