score:55

Accepted answer

Have you tried using the formatter option for dataLabels? You should be able to access your data within that and decide what the label should look like. Here you can check for zero and just return null shown below.

dataLabels: {
    enabled: true,
    color: colors[0],
    style: {
        fontWeight: 'bold'
    },
    formatter: function() {
        if (this.y != 0) {
          return this.y +'%';
        } else {
          return null;
        }
    }
}

Additionally, if you are having trouble figuring out what part of your data to look at, use console.log(this) in the formatter function so you can see the object you are working with.

Check out this working jsfiddle example: http://jsfiddle.net/VLmKK/69/

Hope that helps!

Update: Return null instead of empty string to avoid creation of an invisible label as mentioned in the comments by Brett. Thanks.

You may also not return anything on zero values.


Related Query

More Query from same tag