data.sort(function(x, y) { // console.log(x , y) ; return d3.ascending(x.name, y.name) ; }) ; // console.log(data)