The data specified in the element above is specified by the getLevels(d, t) function, where d is the range number 2-4, and t is the number obtained from the current time.
It only ever returns an array of arrays. Since the array is already of type Object , the calling object () in the array returns the original array. Therefore, from what I see, the author simply uses Object as a kind of identification function, similar to:
var identity = function(d){ return d; } var circle = interpolation.selectAll("circle") .data(identity); circle.enter().append("circle") .attr("r", 4) .attr("fill","yellow"); circle .attr("cx", function y(d) { console.log(d.attr("class")); return dx; }) .attr("cy", function(d) { return dy; });
source share