-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchart.html
More file actions
45 lines (44 loc) · 1020 Bytes
/
chart.html
File metadata and controls
45 lines (44 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE HTML>
<html>
<head>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script type="text/javascript">
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
title:{
text: "อุณหภูมิเฉลี่ย"
},
data: [
{
// Change type to "doughnut", "line", "splineArea", etc.
type: "column",
dataPoints: [
{ label: "วันที่ 1", y: 24 },
{ label: "วันที่ 2", y: 23 },
{ label: "วันที่ 3", y: 25 },
{ label: "วันที่ 4", y: 30 },
{ label: "วันที่ 5", y: 28 },
{ label: "วันที่ 6", y: 27 },
{ label: "วันที่ 7", y: 28 }
]
}
]
});
chart.render();
}
</script>
<style>
#chartContainer{
padding-top: 100px;
}
body{
background-color: rgb(218, 166, 97);
}
</style>
</head>
<body>
<center>
<div id="chartContainer" style="height: 500px; width: 70%;"></div>
</center>
</body>
</html>