Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. d3.csv("file0.csv").then((data0) => {
  2. console.log(data0);
  3. d3.csv("file1.csv").then((data1) => {
  4. console.log(data1);
  5. d3.csv("file2.csv").then((data2) => {
  6. console.log(data2);
  7. })
  8. })
  9. }).catch(function(error) {
  10. // handle any error that may occur from three calls.
  11. });
  12.  
  13.  
  14. // Alternatively you can use await.
  15. const data0 = await d3.csv("file0.csv");
  16. const data1 = await d3.csv("file1.csv");
  17. const data2 = await d3.csv("file2.csv");
  18. console.log(data0);
  19. console.log(data1);
  20. console.log(data2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement