mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
.gplot editor fixes after more tests
git-svn-id: https://svn.fhem.de/fhem/trunk@3131 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8425d41508
commit
3944f351d5
@ -454,7 +454,10 @@ FW_answerCall($)
|
||||
#Returns undef if it already sent a HTTP header
|
||||
($FW_RETTYPE, $FW_RET) = &{$h->{FUNC}}($arg);
|
||||
use strict "refs";
|
||||
last if(!$FW_RET);
|
||||
if(!$FW_RET) {
|
||||
$FW_RETTYPE = "text/html; charset=$FW_encoding";
|
||||
last;
|
||||
}
|
||||
return defined($FW_RETTYPE) ? 0 : -1;
|
||||
}
|
||||
}
|
||||
|
@ -295,9 +295,10 @@ wl_PEdit($$$$)
|
||||
$ret .=" <td>Y-Axis,Plot-Type,Style</td></tr>";
|
||||
|
||||
my ($colnums, $colregs, $coldata) = wl_getRegFromFile($file);
|
||||
$colnums = join(",", 3..$colnums);
|
||||
$colnums = join(",", 4..$colnums);
|
||||
my $max = @{$conf{lAxis}}+1;
|
||||
$max = 7 if($max > 7);
|
||||
$max = 1 if(!$conf{lTitle}[0]);
|
||||
my $r = 0;
|
||||
for($r=0; $r < $max; $r++) {
|
||||
$ret .= "<tr class=\"".(($r&1)?"odd":"even")."\"><td>";
|
||||
@ -339,6 +340,12 @@ weblink_WriteGplot($)
|
||||
my ($arg) = @_;
|
||||
FW_digestCgi($arg);
|
||||
|
||||
my $hasTl;
|
||||
for(my $i=0; $i <= 8; $i++) {
|
||||
$hasTl = 1 if($FW_webArgs{"title_$i"});
|
||||
}
|
||||
return if(!$hasTl);
|
||||
|
||||
my $fName = $FW_webArgs{gplotName};
|
||||
return if(!$fName);
|
||||
if(!open(FH, ">$fName")) {
|
||||
@ -351,7 +358,7 @@ weblink_WriteGplot($)
|
||||
print FH "set xdata time\n";
|
||||
print FH "set timefmt \"%Y-%m-%d_%H:%M:%S\"\n";
|
||||
print FH "set xlabel \" \"\n";
|
||||
print FH "set title '<L1>'\n";
|
||||
print FH "set title '<TL>'\n";
|
||||
print FH "set ytics ".$FW_webArgs{ytics}."\n";
|
||||
print FH "set y2tics ".$FW_webArgs{y2tics}."\n";
|
||||
print FH "set grid".($FW_webArgs{gridy} ? " ytics" :"").
|
||||
|
@ -10,14 +10,12 @@ set timefmt "%Y-%m-%d_%H:%M:%S"
|
||||
set xlabel " "
|
||||
|
||||
set title '<TL>'
|
||||
set ylabel "Power (KW)"
|
||||
set y2label "Power (KW)"
|
||||
set ylabel "Humidity"
|
||||
set y2label "Temperature"
|
||||
set grid
|
||||
set ytics
|
||||
set y2tics
|
||||
set format y "%.1f"
|
||||
set format y2 "%.1f"
|
||||
|
||||
#FileLog 4::0:
|
||||
#FileLog 4:RegExp::
|
||||
|
||||
plot "<IN>" using 1:4 notitle with lines
|
||||
plot "<IN>" using 1:2 title 'Line 1' with lines
|
||||
|
Loading…
x
Reference in New Issue
Block a user