Blame | Letzte Änderung | Log anzeigen | RSS feed
<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_GRID"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>Grid</b></div><i>(Defined in: jpgraph.php : 3331)</i><table border=1><tr><td> <a href="Grid.html" style="font-family:arial;font-weight:bold;color:darkblue;">Grid</a> </td></tr><tr><td valign=top> <a href="Grid.html#_GRID_SETCOLOR">SetColor()</a> <br> <a href="Grid.html#_GRID_SETFILL">SetFill()</a> <br> <a href="Grid.html#_GRID_SETLINESTYLE">SetLineStyle()</a> <br> <a href="Grid.html#_GRID_SETWEIGHT">SetWeight()</a> <br> <a href="Grid.html#_GRID_SHOW">Show()</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 used to hold all properties of the gridline for a specific axis. The grid setting is accessed through the xgrid and ygrid properties of graph.By default JpGraph has grid lines for Y-lines turned on and gridlines for X-axis turned off.<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="_GRID_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($aMajColor,$aMinColor)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Set color of grid lines</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">$aMajColor</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Major color</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aMinColor</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">false</font></td><td>Minor color</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set color of grid lines <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->xgrid->SetColor('lightblue');</font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GRID_SETFILL"><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 SetFill($aFlg,$aColor1,$aColor2)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Specify fill style for grid</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">$aFlg</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>Flag, True=enable fill</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aColor1</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">'lightgray'</font></td><td>Fill color 1</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aColor2</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">'lightblue'</font></td><td>Fill color 2</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>The area between the gridline can be filled with two alternating colors. This method specifies this style. See 'filledgridex1.php' for an example of this. By using this feature with alpha-blending you can achieve very nice layouts. <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 50% blending <br />$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); <br />$graph->ygrid->Show(); <br />$graph->xgrid->Show(); <br /></font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GRID_SETLINESTYLE"><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 SetLineStyle($aType)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Specify if grid line should be dashed, dotted or solid</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">$aType</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>String to specify line type</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify if grid should be dashed, dotted or solid. The type is specified with a string which can be either "solid", "dashed" or "dotted". <br> <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Image.html#_IMAGE_SETLINESTYLE">Image::SetLineStyle</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->ygrid->SetLineStyle('dashed');</font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GRID_SETWEIGHT"><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 SetWeight($aWeight)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Set line weight for grid 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: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 width in pixels</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set line weight for grid line <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->xgrid->SetWeight(2);</font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GRID_SHOW"><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 Show($aShowMajor,$aShowMinor)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Specify if both major and minor grid should be displayed</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">$aShowMajor</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=Show major grid lines</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aShowMinor</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">false</font></td><td>True=Show minor grid lines</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify if both major and minor grid should be displayed <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->ygrid->Show(); <br /></font></span><br><p> <hr> <p>