Pie Chart Fiddle
HTML
<div class="pieDiv">
<div id="chartContainer"></div>
</div>
JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",
{
width:500px;
height: 300px;
title:{
text: "Result Statistics"
},
data: [
{
type: "pie",
dataPoints: [
{ y: 6, indexLabel: "Correct Questions" },
{ y: 2, indexLabel: "Incorrect Questions" },
{ y: 2, indexLabel: "Not Attempted Questions" }
]
}
]
});
chart.render();
}