-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwet.html
56 lines (47 loc) · 1.64 KB
/
twet.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
</head>
<body>
<div id="myfirstchart" style="height: 250px;"></div>
</body>
<script>
let arrayData = [];
const morris = new Morris.Line({
// ID of the element in which to draw the chart.
element: 'myfirstchart',
// Chart data records -- each entry in this array corresponds to a point on
// the chart.
data: [],
// The name of the data record attribute that contains x-values.
xkey: 'time',
// A list of names of data record attributes that contain y-values.
ykeys: ['value'],
// Labels for the ykeys -- will be displayed when you hover over the
// chart.
labels: ['Value']
});
console.log(arrayData);
// let arrayData = [];
setInterval(() => {
//console.log(arrayData);
morris.setData([{
time:"2022",
value: 10
}]);
}, 1000)
setInterval(() => {
console.log(12);
document.getElementById('heart_id').innerHTML = "15";
}]);
}, 1000)
</script>
</html>