-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpressuredata.html
70 lines (59 loc) · 1.44 KB
/
pressuredata.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
70
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Pressure Chart</title>
<style type="text/css">
#container {
min-width: 310px;
max-width: 800px;
height: 400px;
margin: 0 auto
}
</style>
</head>
<body>
<script src="../../BalloonData/code/highcharts.js"></script>
<script src="../../BalloonData/modules/exporting.js"></script>
<div id="container"></div>
<script src="/BalloonData/wibwub/d3.v3.min.js"></script>
<script type="text/javascript">
d3.text("/BalloonData/SenseHat.csv", function(data) {
parsedCSV = d3.csv.parseRows(data);
var parsedData = [];
for (var i = 1946; i >= 1; i -=1){
parsedData.push(Number(parsedCSV[i][9]));
}
console.log(parsedData);
Highcharts.chart('container', {
title: {
text: 'Pressure(Pa) vs. Time(Sec)'
},
subtitle: {
text: 'Allen Comp Sci 3'
},
yAxis: {
title: {
text: 'Pressure(Pa)'
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle'
},
plotOptions:{
series:{
pointStart: 0,
turboThreshold:5000//set it to a larger threshold, it is by default to 1000
}
},
series: [{
name: 'Pressure',
data: parsedData
}]
});
});
</script>
</body>
</html>