Label inside scatter point

http://jugal.me

by J. Albert Bowden

HTML

<script src="https://code.highcharts.com/highcharts.src.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
  chart: {
    type: 'scatter'
  },
  plotOptions: {
    scatter: {
      dataLabels: {
        enabled: false,
        y: 12,
        formatter : function(){
        	return this.point.count;
        }
      },
      marker: {
        enabled: true,
        radius: 8
      }
    }
  },
  series: [{
    data: [{
      x: -2,
      y: 2
    }, {
      x: 2,
      y: 5
    }, {
      x: 4,
      y: 6,
      count: 2,
      marker: {
        radius: 15
      },
      dataLabels: {
        enabled: true
      }
    }, {
      x: 5,
      y: 10
    }]
  }]
});