Im struggling to get my pie chart to show the correct label, rather than "undefined".

In my console log, the labels are there, and the amounts are being shown.

```
[ { label: "Opened", data: 5}, { label: "Qualified", data: 6}, { label: "Closed", data: 1}, { label: "Pending", data: 2},];

```

This is made from an $.each function that receives the data from an ajax query.

I have the below script creating the graph:

```
var dataOut = "[";
$.each(value, function(item2, val2){
    dataOut = dataOut + ' { label: "' + val2[0] + '", data: ' + val2[1] + '},';
});
dataOut = dataOut + "];";

var placeholder = $("#graph_myleads");

$.plot(placeholder, dataOut, {
    series: {
        pie: { 
            show: true,
            radius: 3/4,
            label: {
                show: true,
                radius: 3/4,
                formatter: _labelFormatter,
                background: {
                    opacity: 0.5,
                    color: '#000'
                }
            }
        }
    },
    legend: {
        show: false
    }
});

```

and the below formatter for the label:

```
var _labelFormatter = function(label, series) {
    return "<div style='font-size:8pt; text-align:center; padding:2px; color:white;'>" + series.label + "<br/>" + Math.round(series.percent) + "%</div>";
};

```

The code is currently outputting this:

![enter image description here](https://i.stack.imgur.com/LPnUy.png)

Any help on this one would be appreciated :)