-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdinamik.html
43 lines (36 loc) · 1.92 KB
/
dinamik.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>dinamik</title>
<link href="layout.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.flot.js"></script>
<script type="text/javascript">
$(function () {
var data = [], totalPoints = 300;
function getRandomData() {
var data = {
data: [[1, Math.floor(Math.random()*10)+1], [2, Math.floor(Math.random()*10)+1], [3, Math.floor(Math.random()*10)+1], [4, Math.floor(Math.random()*10)+1], [5, Math.floor(Math.random()*10)+1], [6, Math.floor(Math.random()*10)+1], [7, Math.floor(Math.random()*10)+1], [8, Math.floor(Math.random()*10)+1], [9, Math.floor(Math.random()*10)+1], [10, Math.floor(Math.random()*10)+1], [11, Math.floor(Math.random()*10)+1], [12, Math.floor(Math.random()*10)+1], [13, Math.floor(Math.random()*10)+1], [14, Math.floor(Math.random()*10)+1], [15, Math.floor(Math.random()*10)+1], [16, Math.floor(Math.random()*10)+1], [17, Math.floor(Math.random()*10)+1], [18, Math.floor(Math.random()*10)+1], [19, Math.floor(Math.random()*10)+1]]
};
var options = {
series: { shadowSize: 0 }, // drawing is faster without shadows
yaxis: { min: 0 },
xaxis: { tickDecimals: 0 }
};
$.plot($("#placeholder"), [ data ], options);
}
getRandomData();
$("#click").click(function () {
getRandomData();
});
});
</script>
</head>
<body>
<div id="placeholder" style="width:600px;height:300px;"></div>
<p><input id="click" type="button" value="Clear selection" />
</p>
</body>
</html>