-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
62 lines (56 loc) · 1.35 KB
/
test.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<canvas id="myChart" style="width:50px;max-width: 800px"></canvas>
<script>
const data = {
labels: ["Jan", "Feb", "Mar", "April", "May", "June"],
datasets: [{
label: 'My First Dataset',
data: [65, 59, 80, 81, 56, 55, 40],
}]
};
var lineChart = new Chart("myChart", {
type: "line",
data: data
})
// var xyValues = [
// {x:50, y:7},
// {x:60, y:8},
// {x:70, y:8},
// {x:80, y:9},
// {x:90, y:9},
// {x:100, y:9},
// {x:110, y:10},
// {x:120, y:11},
// {x:130, y:14},
// {x:140, y:14},
// {x:150, y:15}
// ];
// new Chart("myChart", {
// type: "scatter",
// data: {
// datasets: [{
// pointRadius: 4,
// pointBackgroundColor: "rgb(0,0,255)",
// data: xyValues
// }]
// },
// options: {
// legend: {display: false},
// scales: {
// xAxes: [{ticks: {min: 40, max:160}}],
// yAxes: [{ticks: {min: 6, max:16}}],
// }
// }
// });
</script>
</body>
</html>