From f417d2b25b9c31fb930b2bab7fe73c86d52600f9 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 16 Feb 2025 15:25:27 +0000 Subject: [PATCH] 98_SVG.pm: add axis_width Attribute (Forum #140769) git-svn-id: https://svn.fhem.de/fhem/trunk@29659 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_SVG.pm | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm index d3b773f65..c08b352e3 100644 --- a/fhem/FHEM/98_SVG.pm +++ b/fhem/FHEM/98_SVG.pm @@ -69,6 +69,7 @@ SVG_Initialize($) $hash->{DefFn} = "SVG_Define"; no warnings 'qw'; my @attrList = qw( + axis_width captionLeft:1,0" captionPos:right,left,auto endPlotNow:1,0 @@ -1444,7 +1445,7 @@ SVG_render($$$$$$$$$$) $use_right_axis = $nr_right_axis if( !defined($use_right_axis) ); my $th = 16; # "Font" height - my $axis_width = ($SVG_ss ? 2 : 3)*$th; + my $axis_width = AttrVal($name, "axis_width", ($SVG_ss ? 2 : 3)*$th); my ($x, $y) = ($axis_width*$nr_left_axis, 1.2*$th); # Rect offset ###################### @@ -2621,6 +2622,27 @@ plotAsPng(@) Attributes