mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 03:44:52 +00:00
98_SVG.pm: add axis_width Attribute (Forum #140769)
git-svn-id: https://svn.fhem.de/fhem/trunk@29659 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c0c6a0da76
commit
f417d2b25b
@ -69,6 +69,7 @@ SVG_Initialize($)
|
|||||||
$hash->{DefFn} = "SVG_Define";
|
$hash->{DefFn} = "SVG_Define";
|
||||||
no warnings 'qw';
|
no warnings 'qw';
|
||||||
my @attrList = qw(
|
my @attrList = qw(
|
||||||
|
axis_width
|
||||||
captionLeft:1,0"
|
captionLeft:1,0"
|
||||||
captionPos:right,left,auto
|
captionPos:right,left,auto
|
||||||
endPlotNow:1,0
|
endPlotNow:1,0
|
||||||
@ -1444,7 +1445,7 @@ SVG_render($$$$$$$$$$)
|
|||||||
$use_right_axis = $nr_right_axis if( !defined($use_right_axis) );
|
$use_right_axis = $nr_right_axis if( !defined($use_right_axis) );
|
||||||
|
|
||||||
my $th = 16; # "Font" height
|
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
|
my ($x, $y) = ($axis_width*$nr_left_axis, 1.2*$th); # Rect offset
|
||||||
|
|
||||||
######################
|
######################
|
||||||
@ -2621,6 +2622,27 @@ plotAsPng(@)
|
|||||||
<a id="SVG-attr"></a>
|
<a id="SVG-attr"></a>
|
||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<a id="SVG-attr-axis_width"></a>
|
||||||
|
<li>axis_width<br>
|
||||||
|
Distance left and right used for displaying the value range.
|
||||||
|
If not specified, it is 48 for desktop and 32 for smallscreen.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
<a id="SVG-attr-captionLeft"></a>
|
||||||
|
<li>captionLeft<br>
|
||||||
|
Show the legend on the left side (deprecated, will be autoconverted to
|
||||||
|
captionPos)
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
<a id="SVG-attr-captionPos"></a>
|
||||||
|
<li>captionPos<br>
|
||||||
|
right - Show the legend on the right side (default)<br>
|
||||||
|
left - Show the legend on the left side<br>
|
||||||
|
auto - Show the legend labels on the left or on the right side depending
|
||||||
|
on the axis it belongs to<br>
|
||||||
|
</li><br>
|
||||||
|
|
||||||
|
|
||||||
<a id="SVG-attr-endPlotNow"></a>
|
<a id="SVG-attr-endPlotNow"></a>
|
||||||
<li>endPlotNow<br>
|
<li>endPlotNow<br>
|
||||||
If this attribute is set to 1, then day and hour plots will
|
If this attribute is set to 1, then day and hour plots will
|
||||||
@ -2642,20 +2664,6 @@ plotAsPng(@)
|
|||||||
end today. Else the current week or the current month will be shown.
|
end today. Else the current week or the current month will be shown.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a id="SVG-attr-captionLeft"></a>
|
|
||||||
<li>captionLeft<br>
|
|
||||||
Show the legend on the left side (deprecated, will be autoconverted to
|
|
||||||
captionPos)
|
|
||||||
</li><br>
|
|
||||||
|
|
||||||
<a id="SVG-attr-captionPos"></a>
|
|
||||||
<li>captionPos<br>
|
|
||||||
right - Show the legend on the right side (default)<br>
|
|
||||||
left - Show the legend on the left side<br>
|
|
||||||
auto - Show the legend labels on the left or on the right side depending
|
|
||||||
on the axis it belongs to<br>
|
|
||||||
</li><br>
|
|
||||||
|
|
||||||
<a id="SVG-attr-fixedrange"></a>
|
<a id="SVG-attr-fixedrange"></a>
|
||||||
<li>fixedrange [offset]<br>
|
<li>fixedrange [offset]<br>
|
||||||
Contains two time specs in the form YYYY-MM-DD separated by a space.
|
Contains two time specs in the form YYYY-MM-DD separated by a space.
|
||||||
@ -2913,6 +2921,13 @@ plotAsPng(@)
|
|||||||
<a id="SVG-attr"></a>
|
<a id="SVG-attr"></a>
|
||||||
<b>Attribute</b>
|
<b>Attribute</b>
|
||||||
<ul>
|
<ul>
|
||||||
|
<a id="SVG-attr-axis_width"></a>
|
||||||
|
<li>axis_width<br>
|
||||||
|
Abstand reserviert für die Darstellung der Messgrößen.
|
||||||
|
Falls nicht gesetzt, wird 48 für Desktop und 32 für
|
||||||
|
smallscreen verwendet.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a id="SVG-attr-captionLeft"></a>
|
<a id="SVG-attr-captionLeft"></a>
|
||||||
<li>captionLeft<br>
|
<li>captionLeft<br>
|
||||||
Anzeigen der Legende auf der linken Seite. Überholt, wird
|
Anzeigen der Legende auf der linken Seite. Überholt, wird
|
||||||
|
Loading…
x
Reference in New Issue
Block a user