I can\'t figure out how to get flot.pie to change the data shown in the labels from a percentage of the \"raw data\" to the actual data. In my example i\'ve created a pie chart
I found the answer to the question. The data object is a multi-dimensional array. To get the acual data use the following code:
$(function () {
$.plot($("#placeholder"), data,
{
series: {
pie: {
show: true,
radius: 1,
label: {
show: true,
radius: 2 / 3,
formatter: function (label, series) {
return '' + label + '
' + series.data[0][1] + '';
},
threshold: 0.1
}
}
},
legend: {
show: false
}
});
});
Notice the code " series.data[0][1] " to extract the data.