mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
98_SVG.pm/01_FHEMWEB.pm: plotWeekStartDay Attribut (Forum #37942)
git-svn-id: https://svn.fhem.de/fhem/trunk@9354 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8dbbeaac6d
commit
e38aa22d3b
@ -159,6 +159,7 @@ FHEMWEB_Initialize($)
|
|||||||
plotmode:gnuplot,gnuplot-scroll,SVG
|
plotmode:gnuplot,gnuplot-scroll,SVG
|
||||||
plotEmbed:0,1
|
plotEmbed:0,1
|
||||||
plotsize
|
plotsize
|
||||||
|
plotWeekStartDay:0,1,2,3,4,5,6
|
||||||
nrAxis
|
nrAxis
|
||||||
redirectCmds:0,1
|
redirectCmds:0,1
|
||||||
refresh
|
refresh
|
||||||
@ -2885,8 +2886,8 @@ FW_widgetOverride($$)
|
|||||||
<a name="endPlotToday"></a>
|
<a name="endPlotToday"></a>
|
||||||
<li>endPlotToday<br>
|
<li>endPlotToday<br>
|
||||||
If this FHEMWEB attribute is set to 1, then week and month plots will
|
If this FHEMWEB attribute is set to 1, then week and month plots will
|
||||||
end today. Else the current week (starting at Sunday) or the current
|
end today. Else the current week or the current month will be shown.
|
||||||
month will be shown.<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="endPlotNow"></a>
|
<a name="endPlotNow"></a>
|
||||||
@ -2926,6 +2927,11 @@ FW_widgetOverride($$)
|
|||||||
makes the plotfork attribute meaningless.<br>
|
makes the plotfork attribute meaningless.<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="plotWeekStartDay"></a>
|
||||||
|
<li>plotWeekStartDay<br>
|
||||||
|
Start the week-zoom of the SVG plots with this day.
|
||||||
|
0 is Sunday, 1 is Monday, etc.<br>
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="basicAuth"></a>
|
<a name="basicAuth"></a>
|
||||||
<li>basicAuth, basicAuthMsg<br>
|
<li>basicAuth, basicAuthMsg<br>
|
||||||
@ -3613,6 +3619,11 @@ FW_widgetOverride($$)
|
|||||||
wirkungslos macht.
|
wirkungslos macht.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
<a name="plotWeekStartDay"></a>
|
||||||
|
<li>plotWeekStartDay<br>
|
||||||
|
Starte das Plot in der Wochen-Ansicht mit diesem Tag.
|
||||||
|
0 ist Sonntag, 1 ist Montag, usw.
|
||||||
|
</li><br>
|
||||||
|
|
||||||
<a name="basicAuth"></a>
|
<a name="basicAuth"></a>
|
||||||
<li>basicAuth, basicAuthMsg<br>
|
<li>basicAuth, basicAuthMsg<br>
|
||||||
|
@ -56,9 +56,23 @@ SVG_Initialize($)
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
$hash->{DefFn} = "SVG_Define";
|
$hash->{DefFn} = "SVG_Define";
|
||||||
$hash->{AttrList} = "fixedoffset fixedrange startDate plotsize nrAxis ".
|
no warnings 'qw';
|
||||||
"endPlotNow endPlotToday ".
|
my @attrList = qw(
|
||||||
"label title plotfunction captionLeft:1,0";
|
captionLeft:1,0"
|
||||||
|
endPlotNow
|
||||||
|
endPlotToday
|
||||||
|
fixedoffset
|
||||||
|
fixedrange
|
||||||
|
label
|
||||||
|
nrAxis
|
||||||
|
plotWeekStartDay:0,1,2,3,4,5,6
|
||||||
|
plotfunction
|
||||||
|
plotsize
|
||||||
|
startDate
|
||||||
|
title
|
||||||
|
);
|
||||||
|
use warnings 'qw';
|
||||||
|
$hash->{AttrList} = join(" ", @attrList);
|
||||||
$hash->{SetFn} = "SVG_Set";
|
$hash->{SetFn} = "SVG_Set";
|
||||||
$hash->{FW_summaryFn} = "SVG_FwFn";
|
$hash->{FW_summaryFn} = "SVG_FwFn";
|
||||||
$hash->{FW_detailFn} = "SVG_FwFn";
|
$hash->{FW_detailFn} = "SVG_FwFn";
|
||||||
@ -913,7 +927,9 @@ SVG_calcOffsets($$)
|
|||||||
|
|
||||||
} elsif($zoom eq "week") {
|
} elsif($zoom eq "week") {
|
||||||
my @l = localtime($now);
|
my @l = localtime($now);
|
||||||
my $start = (SVG_Attr($FW_wname, $wl, "endPlotToday", undef) ? 6 : $l[6]);
|
my $start = (SVG_Attr($FW_wname, $wl, "endPlotToday", undef) ?
|
||||||
|
6 : $l[6] - SVG_Attr($FW_wname, $wl, "plotWeekStartDay", 0));
|
||||||
|
$start += 7 if($start < 0);
|
||||||
my $t = $now - ($start*86400) + ($off*86400)*7;
|
my $t = $now - ($start*86400) + ($off*86400)*7;
|
||||||
@l = localtime($t);
|
@l = localtime($t);
|
||||||
$SVG_devs{$d}{from} = SVG_tspec(3,0,@l);
|
$SVG_devs{$d}{from} = SVG_tspec(3,0,@l);
|
||||||
@ -2322,8 +2338,11 @@ plotAsPng(@)
|
|||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><a href="#plotsize">plotsize</a></li><br>
|
<li><a href="#plotsize">plotsize</a></li><br>
|
||||||
|
|
||||||
<li><a href="#plotmode">plotmode</a></li><br>
|
<li><a href="#plotmode">plotmode</a></li><br>
|
||||||
|
<li><a href="#endPlotNow">endPlotNow</a></li><br>
|
||||||
|
<li><a href="#endPlotToday">endPlotToday</a></li><br>
|
||||||
|
<li><a href="#plotWeekStartDay">plotWeekStartDay</a></li><br>
|
||||||
|
|
||||||
|
|
||||||
<a name="label"></a>
|
<a name="label"></a>
|
||||||
<li>label<br>
|
<li>label<br>
|
||||||
@ -2519,10 +2538,10 @@ plotAsPng(@)
|
|||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><a href="#plotsize">plotsize</a></li><br>
|
<li><a href="#plotsize">plotsize</a></li><br>
|
||||||
|
|
||||||
<li><a href="#plotmode">plotmode</a></li><br>
|
<li><a href="#plotmode">plotmode</a></li><br>
|
||||||
<li><a href="#endPlotNow">endPlotNow</a></li><br>
|
<li><a href="#endPlotNow">endPlotNow</a></li><br>
|
||||||
<li><a href="#endPlotToday">endPlotToday</a></li><br>
|
<li><a href="#endPlotToday">endPlotToday</a></li><br>
|
||||||
|
<li><a href="#plotWeekStartDay">plotWeekStartDay</a></li><br>
|
||||||
|
|
||||||
<a name="label"></a>
|
<a name="label"></a>
|
||||||
<li>label<br>
|
<li>label<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user