score:7

Accepted answer

You are using a formatter already and you do not need to rely on D3 to remove the '-' sign, you can do it yourself:

var formatter = d3.format("0");

// ...

self.axis = d3.svg.axis()
    .scale(self.x)
    .orient("bottom")
    .tickFormat(function (d) { 
         if (d === 0) return ''; // No label for '0'
         else if (d < 0) d = -d; // No nagative labels
         return formatter(d);
    });

Related Query

More Query from same tag