Doughnut chart tooltips work

This commit is contained in:
etimberg 2015-10-30 20:48:31 -04:00
parent 1017934dce
commit b8e57144cc

View File

@ -18,6 +18,16 @@
},
//The percentage of the chart that we cut out of the middle.
cutoutPercentage: 50,
// Need to override these to give a nice default
tooltips: {
callbacks: {
title: function() { return '' },
label: function(tooltipItem, data) {
return data.labels[tooltipItem.index] + ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
}
}
}
};
Chart.defaults.pie = helpers.clone(Chart.defaults.doughnut);