-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.html
34 lines (29 loc) · 930 Bytes
/
index2.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
<!DOCTYPE html>
<head >
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<div class="wrapper">
<div id="chart"></div>
<script>
function getData() {
var arr = [];
for(let i=0;i<10;i++)
arr.push(Array(10).fill().map(() => Math.random()))
return arr;
}
var data = getData();
console.log(data);
Plotly.newPlot('chart', [{
z: data,
type: 'surface'
}]);
</script>
</div>
</body>
</html>