score:1

Accepted answer

It occurs because you placed the showInLegend inside of the dataLabels configuration object, instead of pie. Please just cut/paste it directly to plotOptions.pie object, and everything will works as you expecting.

  data: {
    table: document.getElementById('datatable')
  },
  chart: {
    type: 'pie',
    plotBackgroundColor: null,
    plotBorderWidth: null,
    plotShadow: false
  },
  legend: {
    //align: 'center',
    //verticalAlign: 'top'
  },
  title: {
    text: 'Subject Breakdown'
  },
  tooltip: {
    pointFormat: '{point.name}: <b>{point.y}</b>',
    percentageDecimals: 1
  },
  plotOptions: {
    pie: {
      allowPointSelect: true,
      cursor: 'pointer',
      dataLabels: {
        enabled: false,
        color: '#000000',
        connectorColor: '#000000',
        formatter: function() {
          return '<b>' + this.point.name + '</b>: ' + this.y;
        },

      },
      showInLegend: true
    }
  }

Live example: http://jsfiddle.net/qw5y4nvm/

API Reference: https://api.highcharts.com/highcharts/plotOptions.pie.showInLegend


Related Query

More Query from same tag