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_GANTTBAR"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>GanttBar</b> EXTENDS <a href="GanttPlotObject .html#_C_GANTTPLOTOBJECT " style="font-face:arial;font-weight:bold;">GanttPlotObject </a></div><i>(Defined in: jpgraph_gantt.php : 3140)</i><table border=1><tr><td> <a href="GanttBar.html" style="font-family:arial;font-weight:bold;color:darkblue;">GanttBar</a> </td><td> <a href="GanttPlotObject .html" style="font-family:arial;font-weight:bold;color:darkblue;">GanttPlotObject </a> </td></tr><tr><td valign=top> <a href="GanttBar.html#_GANTTBAR_GANTTBAR">GanttBar()</a> <br> <a href="GanttBar.html#_GANTTBAR_SETCOLOR">SetColor()</a> <br> <a href="GanttBar.html#_GANTTBAR_SETFILLCOLOR">SetFillColor()</a> <br> <a href="GanttBar.html#_GANTTBAR_SETHEIGHT">SetHeight()</a> <br> <a href="GanttBar.html#_GANTTBAR_SETPATTERN">SetPattern()</a> <br> <a href="GanttBar.html#_GANTTBAR_SETSHADOW">SetShadow()</a> <br></td><td valign=top> </td></tr></table> <p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>This class represents each activity bar. The activity bars can then be added to a GanttChart vi the GanttGraph::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="_GANTTBAR_GANTTBAR"><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 GanttBar($aPos,$aLabel,$aStart,$aEnd,$aCaption,$aHeightFactor)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Create a new activity bar.</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">$aPos</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Vertical position (row)</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aLabel</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Text label</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aStart</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Start date</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aEnd</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>End date</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aCaption</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">""</font></td><td>Caption string for bar</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aHeightFactor</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">0.6</font></td><td>Height factor</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new activity bar. An activity bar is created by specifyin :<ol><li> The row in gentt chart to draw the activity bar in<li> Specify a label(titel) for the activity.<li> A start date<li> An end date<li> A caption which is a string that gets stroked to the right of the activity bar.<li> Height as either an asbolute value or as a fraction of the available row height.</ol> <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">$bar = new GanttBar(4,"Group 2", "2001-11-30","2001-12-22","[5%]",10);</font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GANTTBAR_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($aColor)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Specify frame color for the activity bar</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>Color for gantt bar</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify frame color for the activity bar. <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">$bar->SetColor('orange'); <br /></font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GANTTBAR_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 activity bar.</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 fill color for activity bar.<p><b>Note:</b> It is perfectly possible to use both a background color as weel as a pattern. <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">$bar->SetPattern(BAND_RDIAG,"yellow"); <br />$bar->SetFillColor("red"); <br /></font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GANTTBAR_SETHEIGHT"><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 SetHeight($aHeight)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Set height for the bar.</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">$aHeight</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Height specification for bars</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify height of the activity bar. The height can be specified as either as fraction (0.0 to 1.0) or as an absolute value (1 to 200). In the first case the height is interpreted as the fraction of the row height and in the second case as an absolute height in pixels. <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">$bar->SetHeight(0.6); <br /></font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GANTTBAR_SETPATTERN"><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 SetPattern($aPattern,$aColor,$aDensity)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Specify what pattern to use for the activity bars.</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">$aPattern</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'> </td><td>Pattern specification</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">"blue"</font></td><td>Pattern color</td></tr><tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">$aDensity</font></td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">95</font></td><td>Density</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>The following patterns are currently implemented:<ol><li>GANTT_RDIAG, Right diagonal lines<li>GANTT_LDIAG, Left diagonal lines<li>GANTT_SOLID, Solid one color<li>GANTT_LVERT, Vertical lines<li>GANTT_LHOR, Horizontal lines<li>GANTT_VLINE, Vertical lines<li>GANTT_HLINE, Horizontal lines<li>GANTT_3DPLANE, A 3D plane<li>GANTT_HVCROSS, Crosses<li>GANTT_DIAGCROSS, Diagonal crosses</ol> <br> <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="Progress.html#_PROGRESS_SETPATTERN">Progress::SetPattern</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">$bar->SetPattern(BAND_RDIAG,"yellow"); <br />$bar->SetFillColor("red");</font></span><br><p><p> <p> <span style='font-size:110%;'><a name="_GANTTBAR_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($aShadow,$aColor)</font></b></div></a></span><span style='font-family:arial;font-size:90%;'><i>Add a drop shadow to the bar.</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">$aShadow</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=Add drop shadow to bars</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">"gray"</font></td><td>Colro fo shadow</td></tr></table><div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Add a drop shadow to the bar. <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">$bar->SetShadow();</font></span><br><p> <hr> <p>