My question is about the d3.json()-call from d3.js. The context is a hierarchical edge bundling diagram (you can view the source-code on blocks.org but I can't link to it because I'm not allowed to post more than 2 links because of my reputation). I'm currently using for my project. As I wanted to modify it a little bit and write a documentation about it, I wanted to fully understand it. That's the point I'm struggling with:
in my source code, the line
d3.json('http://localhost:1337/xyz', function(error, data){
\\process data
});
sends a get request to my rest-service. The REST response is this JSON-string. So basically what I would expect if I insert console.log(data);
as the first line in the callback function, would be those two objects seen in the JSON-string. When I go into the developer tool and look what's actually logged in the console it shows both objects, but I don't have a clue where the attributes "depth, key, parent, x, and y" are coming from. Is the d3.json-function computing something by itself? Or is the data somehow computed before the console.log-line although it's the first line in the callback-function? Where do those attributes come from? Are methods from somewhere else in the source-code executed on the JSON-array before the console.log-line is executed? I'm totally confused.