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="981Minutescale.html"><LINK REL="Next" HREF="983Dayscale.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="981Minutescale.html">Previous</A><A HREF="983Dayscale.html">Next</A><HR NOSHADE><H3><A NAME="9_8_2">9.8.2 Hour scale</A></H3><P> The hour scale has more builtin formatting possibilities. Thefollowing formatting options are available</P><OL><LI> "HOURSTYLE_HM24", Will display the only the hour in military time0-24 , for example 13:00</LI><LI> "HOURSTYLE_H24", Will display the hour with both hour and minute inmilitary time 0-24, for example 13</LI><LI>"HOURSTYLE_HMAMPM", Will display the hour and minutes with asuitable am/pm postfix, for example 1:30pm</LI><LI> "HOURSTYLE_HAMPM", Will display only the hour with a suitable am/pmpostfix, for example 1pm</LI><LI>"HOURSTYLE_CUSTOM", Custom defined format as specified with a callto HeaderProperty::SetFormatString()</LI></OL><P> For hours it is possible to specify the interval in either of twoways. With an integer, e.g. 6, or as time interval, e.g. "1:30" whichmakes the interval one and a half hour. The only restriction is thatthe interval must be even dividable for 24 hours since one day is thesmallest possible interval to show. This means that it is allowed touse, for example 2,4,6,"1:30" or "0:45" as intervals but not 7, "2:45".</P><P> The code snippet below shows hot to set up a hour scale to with 45minutes interval and some custom colors<DIV class="phpscript"><CODE><FONTcolor="#000000"> <FONT color="#0000BB"> $graph</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">hour</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetBackgroundColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">'lightyellow:1.5'</FONT><FONT color="#007700">);<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">hour</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetFont</FONT><FONTcolor="#007700">(</FONT><FONT color="#0000BB">FF_FONT1</FONT><FONT color="#007700">);<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">hour</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetStyle</FONT><FONTcolor="#007700">(</FONT><FONT color="#0000BB">HOURSTYLE_HMAMPM</FONT><FONTcolor="#007700">);<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONTcolor="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">hour</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetIntervall</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">"0:45"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P> The example below shows a gantt chart with the day and hour scaleenabled<DIV class="example"><BR> <A href="exframes/frame_gantthourex1.html" target="blank"><IMG border="0"HEIGHT="173" src="img/img/img/img/img/img/gantthourex1.png" WIDTH="545"></A><BR><B>Figure 160:</B> Using hour scale in the Gantt chart <A href="exframes/frame_gantthourex1.html"target="blank">[src]</A> <P></P></DIV></P><P></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="981Minutescale.html">Previous</A><A HREF="983Dayscale.html">Next</A></BODY></HTML>