How do I ensure D3 finishes loading several CSVs before javascript runs?

前端 未结 2 659
旧时难觅i
旧时难觅i 2021-02-01 08:01

I\'m loading a CSV of a list of other CSV files into javascript using D3.

When I run the following code, the employees array is still empty by the time it gets

2条回答
  •  被撕碎了的回忆
    2021-02-01 08:25

    Your code seems fine. It's just that you're logging employees before the data is ready. But if you console.log it on the last line of parseList you should have it.

提交回复
热议问题