title: Grouping Legends in Pie Chart with Highcharts
body: <p>I have a pie chart that has a single series with all the data it shows, this data has objects of two types, source and destiny. By default the legends that appear are of each object name, but I need that the legends group the objects by type, source objects between them and destiny objects between them. I saw something similar in this post: <a href="https://stackoverflow.com/questions/15926516/grouping-legends-in-highcharts">Grouping Legends in Highcharts</a> but it does not work for pie charts, I need that same thing but it works with pie charts. I'm using <strong>highcharts 4.2.6</strong> .</p>
  
  <p><a href="https://i.stack.imgur.com/Dh2o3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dh2o3.png" alt=""></a>
  Here is my pie chart with all its legends, I need show only two legends, one for blue section and the other one for light-blue section.</p>
  
  <p>There is an example of my series object:</p>
  
  <pre><code>{
    "id": "Group11App36",
    "data": [
      {
        "name": "apple.com",
        "y": 2158959,
        "origin": "destiny",
        "color": "#195580"
      },
      {
        "name": "machtv.info",
        "y": 46442,
        "origin": "destiny",
        "color": "#195580"
      },
      {
        "name": "10.10.10.151",
        "y": 462724,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.11.213",
        "y": 133774,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.8.120",
        "y": 111039,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.13.99",
        "y": 69530,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.8.9",
        "y": 66338,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.12.36",
        "y": 64559,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.8.251",
        "y": 57293,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.11.196",
        "y": 53450,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.12.191",
        "y": 44372,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.10.119",
        "y": 43556,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.12.149",
        "y": 36618,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.11.139",
        "y": 35831,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.12.42",
        "y": 35316,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.10.17",
        "y": 34151,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.10.125",
        "y": 33135,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.10.117",
        "y": 32885,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.11.93",
        "y": 31926,
        "origin": "source",
        "color": "#8fbbda"
      },
      {
        "name": "10.10.12.102",
        "y": 31816,
        "origin": "source",
        "color": "#8fbbda"
      }
    ]
  }
  </code></pre>
  
  <p>Thanks in advance!</p>