98_DOIF.pm: svg card: fixed automatic scaling min/max problem

git-svn-id: https://svn.fhem.de/fhem/trunk@24274 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Damian
2021-04-18 16:40:42 +00:00
parent 74a4ebab60
commit c34f11247d

View File

@@ -4540,8 +4540,8 @@ sub card
## if (defined $plot and $plot eq "autoscale" and $minVal ne $maxVal) {
if (!defined $plot and $minVal ne $maxVal) {
$minPlot=$minVal;
$maxPlot=$maxVal;
$minPlot=($val < $minVal ? $val : $minVal);
$maxPlot=($val > $maxVal ? $val : $maxVal);
} else {
$minPlot=($min < 0 and $minVal > 0) ? 0:$min;
$maxPlot=($max > 0 and $maxVal < 0) ? 0:$max;