I would like to create convex hulls around circles according to their type (color). Here is the jsfiddle with a simple motion chart:
http://jsfiddle.net/msm6qxoe/12/
There are six circles of two types ("Blue" and "Green"). As the result, two convex hulls should be drawn around both triplets during the whole animation.
I already group data according to type and create two paths, but I don't know how to input circle positions to d3.geom.hull function correctly to fill their d attribute.
hull.datum(d3.geom.hull(XXX)).attr("d", function(d) { return "M" + d.join("L") + "Z"; });
Thanks in advance for any guidance.