This repository has been archived by the owner on Oct 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbarometer.php
99 lines (77 loc) · 2.33 KB
/
barometer.php
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
include_once('livedata.php');?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<div class="updatedtime"><span>Updated</span> <?php
$date = new DateTime('now', new DateTimeZone($TZ));
echo $date->format('H:i:s');
?> </div>
<div class="average"><span></span>
<?php echo "";
if ($meteobridge[18]<0) {echo "- $meteobridge[18]"; }
else if ($meteobridge[18]>0) {
echo "+ $meteobridge[18]";
}
?>
</div>
<body>
<div id="circularGaugeContainer" style="height:160px;"></div>
<div class="barometertrend">
<span style='font-size:0px;'>
<?php echo "${meteobridge[18]} </span>\n";
if ($meteobridge[18]<0) {
echo "<falling>falling</falling><span style='color:#607d8b;'>
<i class='wi wi-wind towards-225-deg'></i>
steadily</span>";
}
elseif ($meteobridge[18]>0) {
echo "<rising>rising</rising><span style='color:#607d8b;'>
<i class='wi wi-wind towards-45-deg'></i>
steadily</span>";
}
else echo "<span style='color:#607d8b;'>trend
<i class='wi wi-wind towards-90-deg'></i></span>
<steady>steady</steady>";
?></div>
<div class="h2mbvalue"><?php echo "${meteobridge[10]} <supunit>${pressureunit}</supunit>\n";?>
</body>
<script>
$("#circularGaugeContainer").dxCircularGauge({
rangeContainer: {
width: 8,
offset: -2,
ranges: [
//{ startValue: 960, endValue: 965, color: 'rgba(233, 235, 241, 1)'},
{ startValue: 960, endValue: <?php print "${meteobridge[10]}\n";?>, color: 'rgba(223,130,107,0.9)'},
{ startValue: <?php print "${meteobridge[10]}\n";?>, endValue: 1050, color: 'rgba(0,0,0,0.5)'},
//{ startValue: 1045, endValue: 1050, color: 'rgba(233, 235, 241, 1)'}
]
},
scale: {
startValue: 960, endValue: 1050,
majorTick: { tickInterval: 10, visible: true, color: 'rgba(255,255,0,0.1)'},
minorTick: {color: 'rgba(102,161,168,0.4)',visible: true,minorTickInterval: 5,},
label: {
format: '',
font:{size:10},
}
},
valueIndicator: {
type: 'TriangleNeedle',
color:'#999',
secondColor:'#df826b',
width:5,
offset:-10,
//secondFraction:15
},
value: <?php print "${meteobridge[10]}"?>,
subvalues: <?php print "${meteobridge[34]}"?>,
subvalueIndicator: {
type: 'triangleMarker',
color: 'rgba(255,255,255,0.5)',
space:0,length:14,width:10,offset:2,
},
});
</script>
</html>