title: Creating series/group titles in legend in Highcharts JavaScript pie chart
body: <p>I have a set of data that I'm representing as a pie chart using HighCharts.</p>
  
  <p>I am trying to break out the labels in the legend into two distinct groups, and give them headers. Just for legend display purposes, no change to the chart itself. </p>
  
  <p>I tried to use <code>labelFormatter</code> to insert the group titles, but without success. I also tried the <code>linkedTo</code> property which does not seem to do what I want.</p>
  
  <p>I have a function that I run on chart load, in which I am able to manipulate placement of the legend items, to create separation between the two groups. But I've not been able to add headers.</p>
  
  <p>Has anyone come upon this before with HighCharts and managed a solution? </p>
  
  <p><strong>Here is a fiddle</strong> showing what I've been able to accomplish (separation of the two groups, but without titles): <a href="http://jsfiddle.net/EacF5/1/" rel="nofollow">http://jsfiddle.net/EacF5/1/</a></p>
  
  <p>Here is the function I wrote to manually manipulate the legend on chart load:</p>
  
  <pre><code>load: function(){
      var $hc_start = -1;
      $(".highcharts-legend-item").each( function(){
          var t = $(this).find("tspan").text().split( ':' );
          switch ( t[0] ){
              case 'Group 2 Title 1':
              case 'Group 2 Title 2':
                  var t = $(this).attr( 'transform' ).split( ',' );
                  t[1] = parseInt( t[1].replace( ')', '' ) );
                  t[1] = sum(t[1])(15);
                  $(this).attr( 'transform', t[0] + ',' + t[1]  + ')' );
  
                  $hc_start = 1;
                  break;
              default:
          }
      });
  }
  </code></pre>
  
  <p>Please let me know what further information I can provide to you :) Thanks!</p>