-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpruebaGraficos.html
69 lines (57 loc) · 1.99 KB
/
pruebaGraficos.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
63
64
65
66
67
68
69
<!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=ISO-8859-1">
<link href="css/blueprint/screen.css" type="text/css" rel="stylesheet">
<link href="css/general.css" type="text/css" rel="stylesheet">
<link href="js/jquery-ui/css/blitzer/jquery-ui-1.8.5.custom.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-ui/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/js/jquery-ui-1.8.5.custom.min.js"></script>
<!--[if IE]><script language="javascript" type="text/javascript" src="js/jquery-ui/js/excanvas.js"></script><![endif]-->
<script type="text/javascript" src="js/jquery-ui/js/jquery.flot.js"></script>
<script type="text/javascript" src="js/jquery-ui/js/jquery.flot.pie.js"></script>
<title>JHO - Administracion interna</title>
</head>
<body>
<div class="container">
<div id="placeholder" style="width:800px;height:350px"></div>
</div>
<script language="javascript" type="text/javascript">
$(function () {
$.post("adminReports.php", {action: "accidentesInfo"}, function(e){
var dataInfo = [];
for(var i=0; i <e.length ; i++){
var serie = e[i].resultset;
var label = e[i].label;
var result = []
for(var j=0; j < serie.length; j++){
var elem = serie[j];
result.push([ elem.label , elem.valueof ]);
}
dataInfo.push([label,result]);
}
$.plot($("#placeholder"), [
{
label: dataInfo[0][0],
data: dataInfo[0][1],
lines: {show: true}
},
{
label: dataInfo[1][0],
data: dataInfo[1][1],
lines: { show: true }
}
],{
lines: { show: true },
points: { show: true },
xaxis: {
mode: "time"
//tickDecimals: 0,
//tickSize: 1
}
});
}, "json");
})
</script>
</body>
</html>