Chart.js/doughnut.html
Nick Downie a9dcf88378 First commit. Version 0.1
Examples of the six charts that can be created, and the Chart.js
library.
2013-03-17 23:57:50 +00:00

47 lines
730 B
HTML

<!doctype html>
<html>
<head>
<title>Doughnut Chart</title>
<script src="Chart.js"></script>
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
<style>
canvas{
}
</style>
</head>
<body>
<canvas id="canvas" height="450" width="450"></canvas>
<script>
var doughnutData = [
{
value: 30,
color:"#F7464A"
},
{
value : 50,
color : "#46BFBD"
},
{
value : 100,
color : "#FDB45C"
},
{
value : 40,
color : "#949FB1"
},
{
value : 120,
color : "#4D5360"
}
];
var myDoughnut = new Chart(document.getElementById("canvas").getContext("2d")).Doughnut(doughnutData);
</script>
</body>
</html>