Accepted answer

You can use .tickFormat() to suppress the labels for those particular values. As the thing you want to check isn't part of the data that's available to the scale, you'll need to find it in your entire data:

yAxis.tickFormat(function(d) {
    var val = 0;
    dataSet.forEach(function(item) {
        if(item.Date == d) val =;
    return val == 0 ? "" : d;

This will suppress the label (return "") if the total is 0 or the value can't be found in the data set. Complete demo here.

Related Query

More Query from same tag