jquery orgChart with multiple roots -


i using plugin https://github.com/caprica/jquery-orgchart display users activedidrectory. problem structure not correct. need display tree(s) able fix later. need display multiple trees on page.

$("#chart").orgchart({                 data: $.post(json server)                 }); 

this gives me following error

typeerror: rootnodes[0] undefined $container.empty().append(rootnodes[0].render(opts));

any ideas useful , appreciated. thanks

p.s. data retrieve comes in proper format, tested minified version of it. problem comes when there r multiple root="0"

see jquery.post() async request not wait results, why seems create issue.

i guess need way:

$.post("your/url/here", {data:"to send here"}, function(data){     $("#chart").orgchart({ data:data }); }); 

initialize chart when have data create chart.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -