Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="1091Addingcaptiontobars.html"><LINK REL="Next" HREF="1010Groupingactivities.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="1091Addingcaptiontobars.html">Previous</A><A HREF="1010Groupingactivities.html">Next</A><HR NOSHADE><H3><A NAME="10_9_2">10.9.2 Adding progress indicators to bars</A></H3><P> To indicate the progress of a specific activity it is also possibleto add a progress indicator to each bar. This progress indicatorconsists of a smaller bar within the bar. By default this progress baris black and 70% of the height of the bar. These parameter can (ofcourse) all be changed.</P><P> The properties for the progress indicator are accessed through the'progress' property and it's methods.</P><P> To set the progress for a specific activity you only specify thepercent as a fraction. As in<DIV class="phpscript"><CODE><FONT color="#000000"><FONT color="#0000BB"> $activity</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">progress</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">Set</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">0.4</FONT><FONTcolor="#007700">)</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P> In Figure 158 the previous example is modified to indicate theprogress of each activity by the default progress indicator. A solidbar. To make it clearer we have also modified the caption to reflectthe displayed progress. (At the same time we also modified the scaleheaders just to illustrate some more formatting options).<DIV class="example"><BR> <A href="exframes/frame_ganttex14.html" target="blank"><IMG border="0"HEIGHT="191" src="img/ganttex14.png" WIDTH="409"></A><BR><B>Figure 158:</B> Adding progress indicators. <A href="exframes/frame_ganttex14.html"target="blank">[src]</A> <P></P></DIV></P><P> To specify a different format for the progress you use theSetPattern() method as in<DIV class="phpscript"><CODE><FONT color="#000000"><FONT color="#0000BB"> $activity</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">progress</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetPattern</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">BAND_RDIAG</FONT><FONT color="#007700">,</FONT><FONT color="#DD0000">"blue"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P> In the reference section you can see the exact parameters and allavailable methods.<DIV class="example"><BR> <A href="exframes/frame_ganttex15.html" target="blank"><IMG border="0"HEIGHT="191" src="img/ganttex15.png" WIDTH="409"></A><BR><B>Figure 159:</B> Changing the style of the progress indicators. <A href="exframes/frame_ganttex15.html"target="blank">[src]</A> <P></P></DIV></P><P></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="1091Addingcaptiontobars.html">Previous</A><A HREF="1010Groupingactivities.html">Next</A></BODY></HTML>