I have such pie chart
which has data labels with values ["", 20, 1, 3, "", "", "", "", 4, 6, 6],
it shows all values without any problem, except that it doesn't show value 1.
How can i fix it or is it jqPlot bug?
My code is:
function getPieChart(res) {
var data = [];
$.each(res, function (ind, resData) {
data.push([resData.Stage, resData.Count]);
});
var dataLbl = [];
for (var i = 0; i < data.length; i++) {
if (data[i][1] != 0) {
dataLbl.push(data[i][1]);
}
else {
dataLbl.push('');
}
}
var piePlot = jQuery.jqplot('pie-chart', [data],
{
seriesDefaults: {
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true,
dataLabels: dataLbl,
diameter: 250,
dataLabelPositionFactor: 0.5,
sliceMargin: 3,
color: '#DCDCDC'
},
shadow: false
}
}
);
}