1 d3.round = function(x, n) {
2 return n
3 ? Math.round(x * Math.pow(10, n)) * Math.pow(10, -n)
4 : Math.round(x);
5 };