Actually I am facing with a problem. d3.json, d3.csv all of them send asynchronous request. So I am facing problem with a case in my visualization. I need to send synchronous request using d3.js so that it waits till data is loaded and can be used by following few lines of codes. If i can't do that following few lines are going to get null pointer exception. Do you have any idea how can i do this using d3.js? In ajax from jquery probably it was enough to keep a callback function. How can i do this in d3.js?
Asked
Active
Viewed 356 times
2
-
You can also use jQuery within D3.js and do a callback – Brian Nezhad Jun 10 '15 at 16:06
-
1Any idea how can i do that so that following few lines of code after d3.csv(); doesn't get executed till data loading is done? – Jun 10 '15 at 16:08
-
1See the second answer and see how the function is being called http://stackoverflow.com/questions/15261313/how-do-i-load-json-data-synchronously-with-d3-js – Brian Nezhad Jun 10 '15 at 16:09
-
1Thanks. I got an idea. Let me have a try – Jun 10 '15 at 16:14
-
Let me know if it worked :) – Brian Nezhad Jun 10 '15 at 16:17