Add charts to your PHP application

Home page:
http://www.chartjs.org/

Documentation:
http://www.chartjs.org/docs/

Download:
https://github.com/nnnick/Chart.js

Example:

var data = [
	{
		value: 10,
		color:"#4F9B1F",
		highlight: "#4F9B1F",
		label: "Online"
	},
	{
		value: 5,
		color: "#D11717",
		highlight: "#D11717",
		label: "Offline"
	},
	{
		value: 3,
		color: "#7A7A7A",
		highlight: "#7A7A7A",
		label: "Dead"
	}
]
 
Chart.defaults.global.responsive = true;
 
window.onload = function(){
	var ctx = document.getElementById("chartarea").getContext("2d");
	window.myPie = new Chart(ctx).Pie(data);
};
<div id="chartContainer">
    <canvas id="chartarea"/>
</div>
%d bloggers like this: