d3 automatically sorts by value for pie charts. Luckily, disabling sorting is quite easy, just use the sort(null)
method on thedonut
function, i.e.:
var donut = d3.layout.pie().value(function(d){
return d.itemValue;
}).sort(null);
Here's a fiddle.