-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
58 lines (40 loc) · 1.01 KB
/
index.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
<head>
<!-- Plotly.js -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<div id="myDiv"><!-- Plotly chart will be drawn inside this DIV --></div>
<input id="clickMe" type="button" value="Simulate 10 Days" onclick="getNext();" />
<input id="clickMe" type="button" value="initial Week" onclick="getInitialWeek();" />
<script>
<!-- JAVASCRIPT CODE GOES HERE -->
var x1=10,x2=10,x3=10,y1=10,y2=10,y3=10,z1=10,z2=10,z3=10;
var data = [
{
z: [[x1,x2,x3], [y1,y2,y3], [z1,z2,z3]],
type: 'heatmap'
}
];
Plotly.plot('myDiv', data);
function getNext() {
console.log("In next");
data = [
{
z: [[10, 10,10], [20, 80, 20], [30, 20, 30],[40,40,40],[50,20,70],[80,20,80]],
type: 'heatmap'
}
];
Plotly.plot('myDiv', data);
}
function getInitialWeek() {
console.log("In next");
data = [
{
z: [[x1,x2,x3], [y1,y2,y3], [z1,z2,z3]],
type: 'heatmap'
}
];
Plotly.plot('myDiv', data);
}
</script>
</body>