var donut = new Morris.Donut({
element: 'sales-chart',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a", "#0CDE47", "#076ABE", "#998373", "#378238"],
data: [
{label: "Android", value: 12},
{label: "iPhone", value: 30},
{label: "Other", value: 20}
],
labelColor: '#303641',
hideHover: 'auto',
formatter: function (x) {
return x + ' % ';
}
}).on('click', function(i, row){
alert(row.label);
console.log(i, row);
});