diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm
index e7282b39a..0f3928b95 100755
--- a/fhem/FHEM/01_FHEMWEB.pm
+++ b/fhem/FHEM/01_FHEMWEB.pm
@@ -159,6 +159,7 @@ FHEMWEB_Initialize($)
plotmode:gnuplot,gnuplot-scroll,SVG
plotEmbed:0,1
plotsize
+ plotWeekStartDay:0,1,2,3,4,5,6
nrAxis
redirectCmds:0,1
refresh
@@ -2885,8 +2886,8 @@ FW_widgetOverride($$)
endPlotToday
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
- month will be shown.
+ end today. Else the current week or the current month will be shown.
+
@@ -2926,6 +2927,11 @@ FW_widgetOverride($$)
makes the plotfork attribute meaningless.
+
+ plotWeekStartDay
+ Start the week-zoom of the SVG plots with this day.
+ 0 is Sunday, 1 is Monday, etc.
+
basicAuth, basicAuthMsg
@@ -3613,6 +3619,11 @@ FW_widgetOverride($$)
wirkungslos macht.
+
+ plotWeekStartDay
+ Starte das Plot in der Wochen-Ansicht mit diesem Tag.
+ 0 ist Sonntag, 1 ist Montag, usw.
+
basicAuth, basicAuthMsg
diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm
index 528e317ec..1382d1a32 100755
--- a/fhem/FHEM/98_SVG.pm
+++ b/fhem/FHEM/98_SVG.pm
@@ -56,9 +56,23 @@ SVG_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "SVG_Define";
- $hash->{AttrList} = "fixedoffset fixedrange startDate plotsize nrAxis ".
- "endPlotNow endPlotToday ".
- "label title plotfunction captionLeft:1,0";
+ no warnings 'qw';
+ my @attrList = qw(
+ 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->{FW_summaryFn} = "SVG_FwFn";
$hash->{FW_detailFn} = "SVG_FwFn";
@@ -913,7 +927,9 @@ SVG_calcOffsets($$)
} elsif($zoom eq "week") {
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;
@l = localtime($t);
$SVG_devs{$d}{from} = SVG_tspec(3,0,@l);
@@ -2322,8 +2338,11 @@ plotAsPng(@)
plotsize
-
plotmode
+ endPlotNow
+ endPlotToday
+ plotWeekStartDay
+
label
@@ -2519,10 +2538,10 @@ plotAsPng(@)
plotsize
-
plotmode
endPlotNow
endPlotToday
+ plotWeekStartDay
label