mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@358 61d68cd4-352d-0410-923a-c4978735b2b8
519 lines
32 KiB
HTML
519 lines
32 KiB
HTML
<style type="text/css">
|
|
<!--
|
|
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
|
|
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
|
|
th {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
|
|
//-->
|
|
</style><hr><a name="_C_LEGEND"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>Legend</b></div>
|
|
<i>(Defined in: jpgraph.php : 5147)</i><table border=1><tr><td> <a href="Legend.html" style="font-family:arial;font-weight:bold;color:darkblue;">Legend</a> </td></tr><tr><td valign=top> <a href="Legend.html#_LEGEND_HIDE">Hide()</a> <br>
|
|
<a href="Legend.html#_LEGEND_POS">Pos()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETABSPOS">SetAbsPos()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETCOLOR">SetColor()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETCOLUMNS">SetColumns()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETFILLCOLOR">SetFillColor()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETFONT">SetFont()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETFRAMEWEIGHT">SetFrameWeight()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETHCOLMARGIN">SetHColMargin()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETLAYOUT">SetLayout()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETLEFTMARGIN">SetLeftMargin()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETLINESPACING">SetLineSpacing()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETLINEWEIGHT">SetLineWeight()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETMARKABSHSIZE">SetMarkAbsHSize()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETMARKABSSIZE">SetMarkAbsSize()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETMARKABSVSIZE">SetMarkAbsVSize()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETPOS">SetPos()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETREVERSE">SetReverse()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETSHADOW">SetShadow()</a> <br>
|
|
<a href="Legend.html#_LEGEND_SETVCOLMARGIN">SetVColMargin()</a> <br>
|
|
</td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>This class is responsible for drawing a legend at the specified position in the graph. Individual data series are added by calling it's Add() method.
|
|
<p>
|
|
This is all handled by the framework. Legend is instantiated in the graph as instance variable legend. When stroking individual plots this instance variable is used by the individual Legend() methods in the plot classes to add whatever the individual plots need to add.
|
|
<p>
|
|
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_HIDE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function Hide($aHide)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Hide legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aHide</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
true</font>
|
|
</td><td>True = hide</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Hides the legend. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->Hide();</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_POS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function Pos($aX,$aY,$aHAlign,$aVAlign)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify the position for the legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aX</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>X coordinate</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aY</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Y coordinate</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aHAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"right"</font>
|
|
</td><td>Horizontal alignment</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aVAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"top"</font>
|
|
</td><td>Vertical alignment</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set the position of the legend box on the Graph. The alignment arguments determine how the position of the legend box should be interpretated, i.e from what position on the Graph should the fraction be counted. ('right' uses the right side and positoins the legend with its left side according to the specified fraction and so on). Possible alignemts are:
|
|
<p>
|
|
Horizontal: 'left','right','center'<br>
|
|
Vertical: 'bottom','top','center'
|
|
<p>
|
|
Please note that the X and Y positions should be give as fractions , i.e Pos(0.1,0.1)
|
|
<p>
|
|
If the alignment is not given the the default is 'right','top' <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->Pos(0.05,0.1);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETABSPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetAbsPos($aX,$aY,$aHAlign,$aVAlign)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify X and Y coordinate for the legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aX</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>x Coordinate</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aY</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>y Coordinate</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aHAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"right"</font>
|
|
</td><td>Horizontal anchor point</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aVAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"top"</font>
|
|
</td><td>Vertical Anchor point</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify X and Y coordinate for the legend box <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
// 10x10 pixels from the upper right corner
|
|
<br />$graph->legend->SetAbsPos(10,10,'right','top')</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetColor($aFontColor,$aColor)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Set color on frame around box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aFontColor</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Font coor</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aColor</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
'black'</font>
|
|
</td><td>Frame color</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the color for both the frame around the legend box as well as the font color used for the legend texts. Please note that this does not affect the fill color of the legend box. <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Legend.html#_LEGEND_SETFILLCOLOR">Legend::SetFillColor</a>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetColor('blue');</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETCOLUMNS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetColumns($aCols)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify the number of text columns to use</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aCols</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Number of columns</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the number of text columns to use in the legend text box. For graphs which have a large number of plots it might be necessary to specify 2 or more columns to avois that the legend box become to large.
|
|
<p>
|
|
By default i column us used. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetColumns(2);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETFILLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetFillColor($aColor)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify fill color for legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aColor</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Fill color</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the background color for the legend box. The properties for the legend is noramlly accessed through the graph instance variable '$legend' <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Legend.html#_LEGEND_SETCOLOR">Legend::SetColor</a>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetFillColor('lightblue');</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetFont($aFamily,$aStyle,$aSize)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Set font for texts in legend box.</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aFamily</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Font family</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aStyle</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
FS_NORMAL</font>
|
|
</td><td>Font style</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSize</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
10</font>
|
|
</td><td>Font size</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set font for texts in legend box. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetFont(FF_FONT2,FS_NORMAL);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETFRAMEWEIGHT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetFrameWeight($aWeight)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify the width of the frame around the Legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aWeight</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Width in pixels</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the width of the frame around the Legend box <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetFrameWeight(2);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETHCOLMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetHColMargin($aXMarg)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify margin between columns in te legend</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aXMarg</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>No description available</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify margin between columns in te legend <br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETLAYOUT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetLayout($aDirection)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify vertical or horizontal legend layout</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aDirection</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
LEGEND_VERT</font>
|
|
</td><td>Layout for legend box</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>The legend box can either have the legend stacke vertically or horizontally. The default is vertically stacked legends.
|
|
<p>
|
|
Allowed arguments: LEGEND_VERT,LEGEND_HOR
|
|
<p>
|
|
Please note that horizontal layout is only suitable for a few legends since it makes use of quite a lot of horizontal space. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
// Put a horizontal legend box at the bottom of the graph
|
|
<br />$graph->legend->Pos(0.5,0.0.5,'left','bottom');
|
|
<br />$graph->legend->SetLayout(LEGEND_HOR);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETLEFTMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetLeftMargin($aXMarg)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify marging between the left edge and the first column</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aXMarg</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>No description available</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify marging between the left edge and the first column <br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETLINESPACING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetLineSpacing($aSpacing)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Extra vertical spacing (in pixels) between rows</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSpacing</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Extra margin (in pixels)</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Extra vertical spacing (in pixels) between rows <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
// Add 5 pixels extra margin between each legend row
|
|
<br />$graph->legend->SetLineSpacing(5);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETLINEWEIGHT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetLineWeight($aWeight)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Set the line width for the indicators.</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aWeight</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Line weight in pixels</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the line width for the color boxes that are used as indicators. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetLineWeight(2);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETMARKABSHSIZE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetMarkAbsHSize($aSize)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i></i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSize</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>No description available</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>No description available.<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETMARKABSSIZE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetMarkAbsSize($aSize)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify the size of the marker in pixels</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSize</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Size in pixels</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the size of the marker in pixels to be used in the legend. This is used for the plot marks, for example squares or circles, when you want to control what the size used in the legend should be.
|
|
<p>
|
|
It is often desirable to use a smaller size for the marks in the legend than in the graph itself. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetMarkAbsSize(6);</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETMARKABSVSIZE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetMarkAbsVSize($aSize)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i></i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSize</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>No description available</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>No description available.<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetPos($aX,$aY,$aHAlign,$aVAlign)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Alias for Pos. Specify Position for Legend</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aX</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>X position</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aY</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Y position</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aHAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"right"</font>
|
|
</td><td>Horizontal anchor point</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aVAlign</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
"top"</font>
|
|
</td><td>Vertical anchor point</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>See Legend::Pos() <br>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Legend.html#_LEGEND_POS">Legend::Pos</a>
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetPos(0.05,0.5,'right','center');</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETREVERSE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetReverse($f)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Print the legend in reverse order</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$f</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
true</font>
|
|
</td><td>TRUE=In reverse order</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Print the legend in reverse order <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
$graph->legend->SetReverse();</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETSHADOW"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetShadow($aShow,$aWidth)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Add a drop shadow to the legend box</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aShow</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
'gray'</font>
|
|
</td><td>True = show drop shadow</td></tr>
|
|
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aWidth</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
2</font>
|
|
</td><td>Width of drop shadow in pixels</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Add a drop down shadow for the legend box. <br>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
|
|
// Use a shadow width default width
|
|
<br />$graph->legend->SetShadow();</font>
|
|
</span><br>
|
|
<p>
|
|
<p> <p> <span style='font-size:110%;'><a name="_LEGEND_SETVCOLMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
|
|
function SetVColMargin($aSpacing)</font>
|
|
</b></div></a></span>
|
|
|
|
<span style='font-family:arial;font-size:90%;'><i>Specify the margin between rows in the legend</i></span><p>
|
|
|
|
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
|
|
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
|
|
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
|
|
$aSpacing</font>
|
|
|
|
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>No description available</td></tr>
|
|
</table>
|
|
|
|
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the margin between rows in the legend <br>
|
|
<p> <hr> <p> |