mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 01:06:04 +00:00
98_SVG.pm: add needles (Forum #137386)
git-svn-id: https://svn.fhem.de/fhem/trunk@28617 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
23c7a3fdc0
commit
246c37c0f3
@ -492,7 +492,7 @@ SVG_PEdit($$$$)
|
|||||||
my $sel = ($v && $v eq "x1y1") ? "left" : "right";
|
my $sel = ($v && $v eq "x1y1") ? "left" : "right";
|
||||||
$o .= SVG_sel("axes_${idx}", "left,right,left log,right log", $sel );
|
$o .= SVG_sel("axes_${idx}", "left,right,left log,right log", $sel );
|
||||||
$o .= SVG_sel("type_${idx}",
|
$o .= SVG_sel("type_${idx}",
|
||||||
"lines,points,steps,fsteps,histeps,bars,ibars,".
|
"lines,points,steps,fsteps,histeps,bars,ibars,needles,".
|
||||||
"horizontalLineFrom,horizontalLineTo,".
|
"horizontalLineFrom,horizontalLineTo,".
|
||||||
"cubic,quadratic,quadraticSmooth",
|
"cubic,quadratic,quadraticSmooth",
|
||||||
$conf{lType}[$idx]);
|
$conf{lType}[$idx]);
|
||||||
@ -2055,8 +2055,8 @@ SVG_render($$$$$$$$$$)
|
|||||||
$ret .= sprintf(" %d,%d", $lx, $y+$hfill) if($isFill && $lx > -1);
|
$ret .= sprintf(" %d,%d", $lx, $y+$hfill) if($isFill && $lx > -1);
|
||||||
SVG_pO "<polyline $attributes $lStyle points=\"$ret\"/>";
|
SVG_pO "<polyline $attributes $lStyle points=\"$ret\"/>";
|
||||||
|
|
||||||
} elsif( $lType eq "bars" ) {
|
} elsif( $lType eq "bars" || $lType eq "needles" ) {
|
||||||
my $bw = $barwidth*$tmul;
|
my $bw = ($lType eq "bars" ? $barwidth*$tmul : 1); #137386
|
||||||
# bars are all of equal width (see far above !),
|
# bars are all of equal width (see far above !),
|
||||||
# position rounded to integer multiples of bar width
|
# position rounded to integer multiples of bar width
|
||||||
foreach my $i (0..int(@{$dxp})-1) {
|
foreach my $i (0..int(@{$dxp})-1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user