From 483cb1ed0ef099c566f99a56cea980f443298eac Mon Sep 17 00:00:00 2001 From: Damian <> Date: Fri, 16 Apr 2021 10:48:08 +0000 Subject: [PATCH] 98_DOIF.pm: svg card: color problem fixed git-svn-id: https://svn.fhem.de/fhem/trunk@24259 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_DOIF.pm | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/fhem/FHEM/98_DOIF.pm b/fhem/FHEM/98_DOIF.pm index b3bacb325..efafab8c5 100644 --- a/fhem/FHEM/98_DOIF.pm +++ b/fhem/FHEM/98_DOIF.pm @@ -4598,7 +4598,7 @@ sub card $out.= sprintf('',$bwidth-2,$bheight); if (defined $header) { - $out.= sprintf('%s',$header_style,$header_txt); + $out.= sprintf('%s',$header_style,$header_txt); if (defined $icon and $icon ne "" and $icon ne " ") { my $svg_icon=::FW_makeImage($ic); if(!($svg_icon =~ s/\sheight="[^"]*"/ height="22"/)) { @@ -4613,10 +4613,10 @@ sub card } $out.=''; } - $out.= sprintf('',$htrans); + $out.= sprintf('',$htrans); $out.=''; $out.= ''; - $out.= ''; + $out.= ''; my $points=""; my $first=1; @@ -4629,7 +4629,6 @@ sub card $points.="$i,".(50-int((${$a}[$i]*$m+$n)*10)/10)." "; } } - $out.= sprintf('',$xpos,$xpos); $out.=''; for (my $i=0;$i<=4;$i++) { @@ -4642,7 +4641,6 @@ sub card $out.= $points; $out.= sprintf('" style="fill:url(#gradplotLight_%s_%s_%s);stroke:url(#gradplot_%s_%s_%s);stroke-width:0.5" />',$topValColor,$bottomValColor,(defined $lr ? $lr:0),$topValColor,$bottomValColor,(defined $lr ? $lr:0)); - $out.=sprintf('',$maxValSlot,(50-int((${$a}[$maxValSlot]*$m+$n)*10)/10),color($maxValColor,$ln)) if (defined $maxVal and $maxValSlot != 59); $out.=sprintf(',',$minValSlot,(50-int((${$a}[$minValSlot]*$m+$n)*10)/10),color($minValColor,$ln)) if (defined $minVal and $minValSlot != 59); $out.=sprintf(' ',(50-int(($val*$m+$n)*10)/10),color($currColor,$ln)); @@ -4652,21 +4650,22 @@ sub card $out.= sprintf('%s',$xpos+3,color($nullColor,$lmm),"",0) if (defined $nullColor); - $out.=sprintf('%s',::strftime("%H:%M",localtime($time-$hours*3600))); - $out.=sprintf('%s',::strftime("%H:%M",localtime($time-$hours*1800))); - $out.=sprintf('%s',::strftime("%H:%M",localtime($time))); + $out.=sprintf('%s',::strftime("%H:%M",localtime($time-$hours*3600))); + $out.=sprintf('%s',::strftime("%H:%M",localtime($time-$hours*1800))); + $out.=sprintf('%s',::strftime("%H:%M",localtime($time))); $out.= ''; $out.= ''; + $out.=''; $out.= ui_Table::ring($val,$min,$max,$minColor,$maxColor,$unit,100,$func,$decfont,$model,$lightness,undef,(defined $header or !defined $icon) ? undef: $icon); - $out.=''; + if (defined $maxVal) { - $out.= sprintf('▲%s',::strftime("%H:%M",localtime($maxValTime))); + $out.= sprintf('▲%s',::strftime("%H:%M",localtime($maxValTime))); $out.= sprintf('%s',color($maxValColor,$lmm),"",sprintf($format,$maxVal)); } if (defined $minVal) { - $out.= sprintf('• ▼%s',::strftime("%H:%M",localtime($minValTime))); + $out.= sprintf('• ▼%s',::strftime("%H:%M",localtime($minValTime))); $out.= sprintf('%s',color($minValColor,$lmm),"",sprintf($format,$minVal)); } $out.='';