I'm trying to use the new responsive options in Highcharts to hide data labels on a pie chart when the charts width gets below 400px.
My responsive code is as follows:
responsive: {
rules: [{
condition: {
maxWidth: 300
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false,
format: '<b>{point.name}</b>:{point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
}
}]
}
and is meant to set the dataLabels enabled to false below 400px. I've attempted this here http://jsfiddle.net/chv4ux0z/ but to no avail, does anyone know what I'm doing wrong, I've followed the Highcharts examples but just cant seem to get this right?!