This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/includes/jpgraph/docs/classref/PlotLine.html

244 lines
20 KiB
HTML
Raw Normal View History

2011-05-28 09:51:52 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><style type="text/css">
<!--
A:link {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:visited {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: none; color: #000000}
A:hover {font-family: helvetica, arial, geneva, sans-serif; font-size: small; text-decoration: underline; color: #FF0000}
A.no:link {font-family:inherit; font-size: inhreit;text-decoration: none; color: #000000}
A.no:visited {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
A.no:hover {font-family:inherit; font-size: inherit;text-decoration: none; color: #000000}
th {font-family: helvetica, arial; color : black; font-size:90%; background : #b7c8b7; border-right:black solid 1pt; border-bottom:black solid 1pt;}
td {font-family: helvetica, arial; color : black; font-size:90%; background : white; border-right:black solid 1pt; border-bottom:black solid 1pt;}
//-->
</style></HEAD><hr><div style="padding-left:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;background-color:#deaa87;font-family:courier new;font-size:16pt;">Class <a class="no" name="_C_PLOTLINE"><b>PlotLine</b></a></div>
<i>(Defined in: jpgraph_plotline.php : 17)</i><br>&nbsp;<br><table cellspaceing=0 cellpadding=4 style="border:solid #303030 1px;"><tr><td align="center" style="background:lightgray;" >&nbsp;<a href="PlotLine.html" style="font-family:arial;font-weight:bold;color:darkblue;">PlotLine</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="PlotLine.html#_PLOTLINE_HIDELEGEND">HideLegend()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETCOLOR">SetColor()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETDIRECTION">SetDirection()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETLEGEND">SetLegend()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETLINESTYLE">SetLineStyle()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETPOSITION">SetPosition()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE_SETWEIGHT">SetWeight()</a>&nbsp;<br>
&nbsp;<a href="PlotLine.html#_PLOTLINE___CONSTRUCT">__construct()</a>&nbsp;<br>
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>A plot line represents a horizontal or vertical line in the plot at an arbitrary position. A plot line can be added to all X-Y types of plots/graphs. <p> &nbsp;
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Graph.html">Graph</a> <p> &nbsp;<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_HIDELEGEND"><span style="color:#555555;">PlotLine ::</span><br><b>HideLegend</b>($f)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Hide 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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$f</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">true</span>
</span>
</td><td>True/False</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Hide legend&nbsp;<br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETCOLOR"><span style="color:#555555;">PlotLine ::</span><br><b>SetColor</b>($aColor)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify color of line</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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>Color</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set color for line.
Note. Colors can also be set in the creation of a PlotLine
&nbsp;<br>
&nbsp; <div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="PlotLine.html#_PLOTLINE___CONSTRUCT">PlotLine::__construct()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">); <br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETDIRECTION"><span style="color:#555555;">PlotLine ::</span><br><b>SetDirection</b>($aDir)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify direction of line</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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDir</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>Direction, horizontal or vertical line</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify direction of line. Valid arguments are:
<ul>
<li> VERTICAL
<li> HORIZONTAL
</ul>
Note: Direction can also be specified in the creation of a plot line.
&nbsp;<br>
&nbsp; <div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="PlotLine.html#_PLOTLINE___CONSTRUCT">PlotLine::__construct()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetDirection</span><span style="color: #007700">(</span><span style="color: #0000BB">VERTICAL</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">AddLine</span><span style="color: #007700">(</span><span style="color: #0000BB">$plotline</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETLEGEND"><span style="color:#555555;">PlotLine ::</span><br><b>SetLegend</b>($aLegend, $aCSIM, $aCSIMAlt, $aCSIMWinTarget)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Set legend text</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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aLegend</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>Legend text</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCSIM</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>CSIM target</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCSIMAlt</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>CSIM Alt text</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aCSIMWinTarget</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">''</span><span style="color: #0000BB"></span>
</span>
</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Set legend text&nbsp;<br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETLINESTYLE"><span style="color:#555555;">PlotLine ::</span><br><b>SetLineStyle</b>($aStyle)</a></div>
<span style='font-family:arial;font-size:95%;'><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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aStyle</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>No description available</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>No description available.<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETPOSITION"><span style="color:#555555;">PlotLine ::</span><br><b>SetPosition</b>($aScalePosition)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify position for plot line</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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aScalePosition</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>Scale position</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify position for plot line. If the line is vertical the position is interpretated as the x-coordinate and if it is horizontal then the positoin is interpretatedas the Y-coordinate.
Note: Position can also be specified in the creation of the line.&nbsp;<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetDirection</span><span style="color: #007700">(</span><span style="color: #0000BB">HORIZONTAL</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetPosition</span><span style="color: #007700">(</span><span style="color: #0000BB">25</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">AddLine</span><span style="color: #007700">(</span><span style="color: #0000BB">$plotline</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE_SETWEIGHT"><span style="color:#555555;">PlotLine ::</span><br><b>SetWeight</b>($aWeight)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Specify line weight </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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aWeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'>&nbsp;</td><td>Line weight in pixels</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Specify line weight.
Note. Line weight can also be specified in the creation of the line.
&nbsp;<br>
&nbsp; <div style="font-weight:bold;font-family:arial;font-size:90%;">See also:</div><ul><li><a href="PlotLine.html#_PLOTLINE___CONSTRUCT">PlotLine::__construct()</a></ul>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetColor</span><span style="color: #007700">(</span><span style="color: #DD0000">'red'</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetDirection</span><span style="color: #007700">(</span><span style="color: #0000BB">VERTICAL</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetPosition</span><span style="color: #007700">(</span><span style="color: #0000BB">35</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$plotline</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SetWeight</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">); <br /> <br /></span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p>
<p> &nbsp; <div style='font-family: helvetica, arial, geneva, sans-serif;margin-bottom:4px;border-left:solid black 1px;border-top:solid black 1px;border-bottom:solid black 2px;border-right:solid black 2px;font-size:120%;background:#dde9af;padding:4px;'><a class="no" name="_PLOTLINE___CONSTRUCT"><span style="color:#555555;">PlotLine ::</span><br><b>__construct</b>($aDir, $aPos, $aColor, $aWeight)</a></div>
<span style='font-family:arial;font-size:95%;'><i>Construct a new plot line</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:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aDir</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">HORIZONTAL</span>
</span>
</td><td>Direction, HORIZONTAL or VERTICAL</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aPos</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">0</span>
</span>
</td><td>Position</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aColor</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #DD0000">'black'</span><span style="color: #0000BB"></span>
</span>
</td><td>Color</td></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">$aWeight</span>
</span>
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:100%;font-weight:bold;'><span style="color: #000000">
<span style="color: #0000BB">1</span>
</span>
</td><td>Line weight</td></tr>
</table>
<div style="font-weight:bold;font-family:arial;font-size:90%;">Description:</div>Create a new horizontal or vertical line in the graph at a specific position.
The graph can the be added to the graph with a call to the AddLine&nbsp;<br>
<div style="font-weight:bold;font-family:arial;font-size:90%;"><p>Example:</div><div style="padding:5px;border:dashed gray 1px;background-color:#f3f3f3;font-family:courier new;font-size:90%;font-weight:bold;"><b><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">//&nbsp;Add&nbsp;mark&nbsp;graph&nbsp;with&nbsp;static&nbsp;lines <br /></span><span style="color: #0000BB">$line&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PlotLine</span><span style="color: #007700">(</span><span style="color: #0000BB">HORIZONTAL</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"black"</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">); <br /></span><span style="color: #0000BB">$graph</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">AddLine</span><span style="color: #007700">(</span><span style="color: #0000BB">$line</span><span style="color: #007700">);</span><span style="color: #0000BB"></span>
</span>
</b></div><br>
<p> <hr> <p></html>