mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
SVG: avoid exit for wrong data
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@4081 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
88410ea6d4
commit
338be25e0f
@ -1033,7 +1033,6 @@ SVG_render($$$$$$$$$)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
($d, $v) = split(" ", $l);
|
($d, $v) = split(" ", $l);
|
||||||
|
|
||||||
$d = ($tmul ? int((SVG_time_to_sec($d)-$fromsec)*$tmul) : $d);
|
$d = ($tmul ? int((SVG_time_to_sec($d)-$fromsec)*$tmul) : $d);
|
||||||
if($ld ne $d || $lv ne $v) { # Saves a lot on year zoomlevel
|
if($ld ne $d || $lv ne $v) { # Saves a lot on year zoomlevel
|
||||||
$ld = $d; $lv = $v;
|
$ld = $d; $lv = $v;
|
||||||
@ -1047,11 +1046,11 @@ SVG_render($$$$$$$$$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$dxp = $hdx[0];
|
$dxp = $hdx[0];
|
||||||
if($dxp && int(@{$dxp}) < 2 && !$tosec) { # not enough data and no range...
|
if(($dxp && int(@{$dxp}) < 2 && !$tosec) || # not enough data and no range...
|
||||||
|
(!$tmul && !$dxp)) {
|
||||||
SVG_pO "</svg>";
|
SVG_pO "</svg>";
|
||||||
return $SVG_RET;
|
return $SVG_RET;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$tmul) { # recompute the x data if no range sepcified
|
if(!$tmul) { # recompute the x data if no range sepcified
|
||||||
$fromsec = SVG_time_to_sec($dxp->[0]) if(!$fromsec);
|
$fromsec = SVG_time_to_sec($dxp->[0]) if(!$fromsec);
|
||||||
$tosec = SVG_time_to_sec($dxp->[int(@{$dxp})-1]) if(!$tosec);
|
$tosec = SVG_time_to_sec($dxp->[int(@{$dxp})-1]) if(!$tosec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user