I'm trying to show the chart's information on doughnut chart in % using Chart.js. In this chart it will always contain two parts on each section I need to show the % values. Here is my code
var ctx = document.getElementById("databaseAdded").getContext("2d"),
myChart = new Chart(ctx, {
type: 'doughnut',
data: {
datasets: [{
data: [$scope.graphData.databaseAdded.syspercent,
$scope.graphData.databaseAdded.apppercent],
backgroundColor: [
'#d0b000',
'#bb112e'
],
borderColor: [
'#d0b000',
'#bb112e'
],
borderWidth: 1
}]
},
options: {
showDatasetLabels : true,
cutoutPercentage: 41,
legend: {
display: true,
position:'bottom',
labels: {
fontFamily: "myriadpro-regular",
boxWidth: 15,
boxHeight: 2,
},
}
}
});
One more thing is Legend information is different and label information is different. Legend I can able to get, But I'm facing problem on getting Label Info. Below I upload image that how labels will look like. Please take a look.
Thanks for everything!