2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_SVG.pm: correct last bugfix (Forum #80966 vs. #81131)

git-svn-id: https://svn.fhem.de/fhem/trunk@15628 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-12-17 12:01:30 +00:00
parent 24d64acc38
commit 155d6a32fd
2 changed files with 1 additions and 5 deletions

View File

@ -913,7 +913,6 @@ RESCAN:
}
my $j = $i+1;
$j += $data{svgOffset} if($data{svgOffset});
$data{"min$j"} = $min[$i];
$data{"max$j"} = $max[$i];
$data{"avg$j"} = $cnt[$i] ? sprintf("%0.1f", $sum[$i]/$cnt[$i]) : 0;

View File

@ -1209,9 +1209,8 @@ SVG_getData($$$$$)
my ($d, $f,$t,$srcDesc,$showData) = @_;
my (@da, $ret, @vals);
my @keys = ("min","mindate","max","maxdate","currval","currdate",
"firstval","firstdate","avg","cnt","lastraw");
"firstval","firstdate","avg","cnt","lastraw","sum");
$data{svgOffset} = 0;
foreach my $src (@{$srcDesc->{order}}) {
my $s = $srcDesc->{src}{$src};
my $fname = ($src eq $defs{$d}{LOGDEVICE} ? $defs{$d}{LOGFILE} : "CURRENT");
@ -1230,10 +1229,8 @@ SVG_getData($$$$$)
}
push @vals, \%h;
}
$data{svgOffset} += ($s->{idx}+1);
}
}
delete($data{svgOffset});
# Reorder the $data{maxX} stuff
my ($min, $max) = (999999, -999999);