Question: I know it's possible to put pie chart labels either inside or outside the pie by changing plotOptions.pie.dataLabels.distance. I am trying to figure out whether it's possible to change that on a point by point basis:

> 
> **if** slice is smaller than 15%, place labels inside the slice
> 
> 
> **else** place the label outside the slice
> 
> 
> 

Is this possible in Highcharts? Below is one of my attempts, which doesn't work; the plain jsfiddle is here: <http://jsfiddle.net/supertrue/q6bQP/>

```
plotOptions: {
    pie: {
        dataLabels: {
            distance: -30,
            color: 'white',
            formatter: function() {
                if (this.y < 15 ) {
                    this.point.dataLabels.color = 'red';
                    this.point.dataLabels.distance = 20;
                    return this.point.name;
                } else {
                    return this.point.name;
                }

        }
  },

```

Answer: 
This post can helps you to acomplish your work :

[Is it possible to position Highcharts dataLabels depending on the value?](https://stackoverflow.com/questions/7556473/is-it-possible-to-position-highcharts-datalabels-depending-on-the-value)

```
$.each(chart.series[0].data, function(i, point) {
    // using the value or calculating the percent        
    if(point.percentage < 30) {
        point.dataLabel.attr({y:20});
    }
});

```
This can be achieve using events as well.

Working fiddle : [Outside Fiddle](http://jsfiddle.net/9m6wu/686/)

Here if data point is less than five the show labels outside the charts.

```
  chart: {
  type: 'pie',
  events: {
    load: function() {
      var series = this.series[0];
      setTimeout(function(){
        (series.points).forEach(function(point, i){
          if (point.y < 5) {
            point.update({dataLabels:{distance: 2}});
          }
        });
      }, 200);
    }
  }
}

```