mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
a9dcf88378
Examples of the six charts that can be created, and the Chart.js library.
45 lines
792 B
HTML
Executable File
45 lines
792 B
HTML
Executable File
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>Polar Area Chart</title>
|
|
<script src="Chart.js"></script>
|
|
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
|
|
<style>
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="canvas" height="400" width="400"></canvas>
|
|
|
|
|
|
<script>
|
|
var chartData = [
|
|
{
|
|
value : Math.random(),
|
|
color: "#D97041"
|
|
},
|
|
{
|
|
value : Math.random(),
|
|
color: "#C7604C"
|
|
},
|
|
{
|
|
value : Math.random(),
|
|
color: "#21323D"
|
|
},
|
|
{
|
|
value : Math.random(),
|
|
color: "#9D9B7F"
|
|
},
|
|
{
|
|
value : Math.random(),
|
|
color: "#7D4F6D"
|
|
},
|
|
{
|
|
value : Math.random(),
|
|
color: "#584A5E"
|
|
}
|
|
];
|
|
var myPolarArea = new Chart(document.getElementById("canvas").getContext("2d")).PolarArea(chartData);
|
|
</script>
|
|
</body>
|
|
</html>
|