projects
/
weathermon.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Visual enhancements
[weathermon.git]
/
web
/
image.php
diff --git
a/web/image.php
b/web/image.php
index eaa6fda004255c79172a12f139a50ff52755ef20..0e513a1e2fe2ff39f73a28b1b8e7fc2929911e74 100644
(file)
--- a/
web/image.php
+++ b/
web/image.php
@@
-93,7
+93,7
@@
if ($type and $param) {
if ($curr>$to) {
if ($curr>$to) {
- $cachefilename='meteo.'.$sensor.'.'.$param.'.'.$from.'-'.$to.'.'.$img_format;
+ $cachefilename='meteo.'.$sensor.'.'.$param.'.'.$
to_unit.'.'.$
from.'-'.$to.'.'.$img_format;
}
}
@@
-135,7
+135,7
@@
if ($type and $param) {
$total_weight=0;
$sum=0;
$total_weight=0;
$sum=0;
- $maxdelta =
9
00;
+ $maxdelta =
18
00;
for ($j = $i; $j < count($xdata); ++$j) {
for ($j = $i; $j < count($xdata); ++$j) {
@@
-167,13
+167,14
@@
if ($type and $param) {
// Create the graph
$g->graph_theme = null;
// Create the graph
$g->graph_theme = null;
-
//
$g->img->SetAntiAliasing();
+ $g->img->SetAntiAliasing();
- // We need a
lin
lin scale since we provide both
- // x and y coordinates for the data points.
+ // We need a
dat
lin scale since we provide both
+ // x and y coordinates for the data points
, but x is unix timestamp
.
$g->SetScale('datlin');
$g->xaxis->SetLabelAngle(90);
$g->xaxis->SetPos("min");
$g->SetScale('datlin');
$g->xaxis->SetLabelAngle(90);
$g->xaxis->SetPos("min");
+ $g->xaxis->scale->SetTimeAlign( HOURADJ_1 );
// We use a scatterplot to illustrate the original
// contro points.
// We use a scatterplot to illustrate the original
// contro points.
@@
-196,6
+197,11
@@
if ($type and $param) {
$g->title->SetFont(FF_DV_SANSSERIF,FS_BOLD,12);
$g->SetMarginColor('silver');
$g->title->SetFont(FF_DV_SANSSERIF,FS_BOLD,12);
$g->SetMarginColor('silver');
+ $g->xgrid->Show();
+ $g->xgrid->SetLineStyle('dotted');
+ $g->ygrid->Show();
+ $g->ygrid->SetLineStyle('dotted');
+
// Add the plots to the graph and stroke
$g->Stroke();
// Add the plots to the graph and stroke
$g->Stroke();