98_SVG.pm: bars, second change (Forum #35022)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8220 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-03-15 11:56:04 +00:00
parent a78fd65bca
commit 9758b60237

View File

@@ -1811,7 +1811,12 @@ SVG_render($$$$$$$$$$)
foreach my $i (0..int(@{$dxp})-1) {
my ($x1, $y1) = ( $x + $dxp->[$i] - $bw,
$y +$h-($dyp->[$i]-$min)*$hmul);
my ($x2, $y2) = ($bw, ($dyp->[$i]-$min)*$hmul);
my $curBw = $bw;
if($x1 < $x) {
$curBw -= $x - $x1;
$x1 = $x;
}
my ($x2, $y2) = ($curBw, ($dyp->[$i]-$min)*$hmul);
SVG_pO "<rect $attributes $lStyle x=\"$x1\" y=\"$y1\" ".
"width=\"$x2\" height=\"$y2\"/>";
}