Show values in legend

This commit is contained in:
Šesták Vít
2017-03-31 16:48:30 +02:00
parent 6e7d87796a
commit 248f7baaab

View File

@@ -26,6 +26,7 @@ $(document).ready(function(){
seriesDefaults: {
// Make this a pie chart.
renderer: jQuery.jqplot.PieRenderer,
pointLabels: true,
rendererOptions: {
// Put data labels on the pie slices.
// By default, labels show the percentage of the slice.
@@ -38,7 +39,13 @@ $(document).ready(function(){
}
}
},
legend: { show:true, location: 'e' }
legend: {
show:true,
location: 'e',
labels: $(data).map(function (i, item) {
return item[0]+" ("+item[1]+")";
})
}
});
});
</script>