我试图弄清楚是否有一种方法可以在 D3.js 中加载数据时调用函数。我的代码在下面,我不确定我是否走在正确的轨道上,看起来很简单,但我无法让它工作
d3.json("Country_data.json", mac.call(Country_data));
function mac(e) {
//I would like for this function to perform some operations.
//The data in the file Country_data is passed to this function
}
如果有人对我如何实现这一点有任何想法,我将不胜感激,谢谢。