From a24c17e8ac5aaed17cbc767dab3fd4fe83c26bf2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 28 Apr 2017 20:36:25 +0000 Subject: [PATCH] 98_SVG.pm: fix captionPos bug (by andre, Forum #70082) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14130 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_SVG.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/98_SVG.pm b/FHEM/98_SVG.pm index 1a2e5d073..e317b6464 100755 --- a/FHEM/98_SVG.pm +++ b/FHEM/98_SVG.pm @@ -2129,7 +2129,7 @@ SVG_render($$$$$$$$$$) my $caption_anchor = "end"; if( $caption_pos eq 'auto' ) { my $a = $conf{lAxis}[$i]; - my $axis = 1; $axis = $1 if( $a =~ m/x\d+y(\d+)/ ); + my $axis = 1; $axis = $1 if( $a && $a =~ m/x\d+y(\d+)/ ); if( $axis <= $nr_left_axis ) { $caption_anchor = "beginning"; } else { @@ -2148,10 +2148,10 @@ SVG_render($$$$$$$$$$) next if( !$t ); my $txtoff2; if( $caption_anchor eq 'beginning' ) { - $txtoff2 = $off2 + $th/1.3 + $th * $li; + $txtoff2 = $y + 3 + $th/1.3 + $th * $li; ++$li; } else { - $txtoff2 = $off2 + $th/1.3 + $th * $ri; + $txtoff2 = $y + 3 + $th/1.3 + $th * $ri; ++$ri; }