UPDATED QUESTION I\'ve updated this to be a little more succinct..:
In this fiddle: http://jsfiddle.net/pX2Xb/4/ I have some raphael code that draws
I don't know why, but D3.js is more efficient when animating a large number of elements at once. You can make them both work seamlessly by creating a Raphael function that receives a set and returns the html objects you want to animate:
Raphael.st.nodes = function() {
var elements = [];
this.forEach(function (i) {
elements.push(i.node);
});
return elements;
}
And then you let d3 take it from there
//circleholder is a Raphael set
elements = circleholder.nodes()
d3.selectAll(elements)
.transition()
.attr("fill", function(d,i){return colours[randomNum(14)]})
.duration(ANIMATION_DELAY)
Here is the jsfiddle: http://jsfiddle.net/mFecs/