How to create report using charts.js in cakephp

  1. First of all include the “chart.js” in the page where you want.
  2. after include the js.

var pieData1 = [{ value: 2,
color:”#F38630″,
label:”content course”
}];
var options = {
tooltips: {
fontSize: ‘75.4%’
}
};

var myChart = new Chart(document.getElementById(“canvas”).getContext(“2d”), options);
var myPie = myChart.Pie(pieData1, {
animationSteps: 100,
animationEasing: ‘easeOutBounce’
});

chartjs

3. create the tag <canvas id=”canvas” height=”232″ width=”225″></canvas>