| 1 |
lars |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
|
2 |
<HTML>
|
|
|
3 |
<HEAD>
|
|
|
4 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
|
|
5 |
<LINK REL="Start" HREF="index.html">
|
|
|
6 |
<LINK REL="Contents" HREF="toc.html">
|
|
|
7 |
<LINK REL="Prev" HREF="108Formattingthescaleheaders.html">
|
|
|
8 |
<LINK REL="Next" HREF="1082Hourscale.html">
|
|
|
9 |
<STYLE TYPE="text/css"><!--
|
|
|
10 |
BODY { font-family: serif }
|
|
|
11 |
H1 { font-family: sans-serif }
|
|
|
12 |
H2 { font-family: sans-serif }
|
|
|
13 |
H3 { font-family: sans-serif }
|
|
|
14 |
H4 { font-family: sans-serif }
|
|
|
15 |
H5 { font-family: sans-serif }
|
|
|
16 |
H6 { font-family: sans-serif }
|
|
|
17 |
SUB { font-size: smaller }
|
|
|
18 |
SUP { font-size: smaller }
|
|
|
19 |
PRE { font-family: monospace }
|
|
|
20 |
A { text-decoration: none }
|
|
|
21 |
--></STYLE>
|
|
|
22 |
</HEAD>
|
|
|
23 |
<BODY>
|
|
|
24 |
<A HREF="toc.html">Contents</A>
|
|
|
25 |
<A HREF="108Formattingthescaleheaders.html">Previous</A>
|
|
|
26 |
<A HREF="1082Hourscale.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H3><A NAME="10_8_1">10.8.1 Minute scale</A></H3>
|
|
|
29 |
<P> Minute scale is the lowest resolution you can use. It is often
|
|
|
30 |
convenient to use Minute scale with "GanttScale::SetINtervall()" since
|
|
|
31 |
by default the increment will be 1 minute. The style of minute scale
|
|
|
32 |
can be further adjusted by the use<I> style</I> parameters which can be
|
|
|
33 |
one of</P>
|
|
|
34 |
<OL>
|
|
|
35 |
<LI> "MINUTESTYLE_MM", This will display minutes as a two digit number
|
|
|
36 |
with a leading zero if necessary</LI>
|
|
|
37 |
<LI> "MINUTESTYLE_CUSTOM", This will let you specify you own custom
|
|
|
38 |
minute style by making a call to<I> HeaderProperty:: SetFormatString()</I>
|
|
|
39 |
</LI>
|
|
|
40 |
</OL>
|
|
|
41 |
<P> Minute scale is enabled by adding the GANTT_HMIN in the
|
|
|
42 |
GanttGraph::ShowHeaders() call. For example as in<DIV class="phpscript">
|
|
|
43 |
<CODE><FONT color="#000000"> <FONT color="#0000BB"> $graph</FONT><FONT color="#007700">
|
|
|
44 |
-></FONT><FONT color="#0000BB">ShowHeaders</FONT><FONT color="#007700">(</FONT><FONT
|
|
|
45 |
color="#0000BB">GANTT_HDAY </FONT><FONT color="#007700">| </FONT><FONT color="#0000BB">
|
|
|
46 |
GANTT_HHOUR </FONT><FONT color="#007700">| </FONT><FONT color="#0000BB">
|
|
|
47 |
GANTT_HMIN</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
|
|
|
48 |
</FONT></CODE></DIV></P>
|
|
|
49 |
<P> The code snippet below shows how to set up a minute scale with 30
|
|
|
50 |
min interval and some custom colors.<DIV class="phpscript"><CODE><FONT color="#000000">
|
|
|
51 |
<FONT color="#0000BB"> $graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
52 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
53 |
minute</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
54 |
SetIntervall</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">
|
|
|
55 |
30</FONT><FONT color="#007700">);
|
|
|
56 |
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
57 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
58 |
minute</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
59 |
SetBackgroundColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">
|
|
|
60 |
'lightyellow:1.5'</FONT><FONT color="#007700">);
|
|
|
61 |
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
62 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
63 |
minute</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
64 |
SetFont</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">
|
|
|
65 |
FF_FONT0</FONT><FONT color="#007700">);
|
|
|
66 |
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
67 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
68 |
minute</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
69 |
SetStyle</FONT><FONT color="#007700">(</FONT><FONT color="#0000BB">
|
|
|
70 |
MINUTESTYLE_MM</FONT><FONT color="#007700">);
|
|
|
71 |
<BR></FONT><FONT color="#0000BB">$graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
72 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
73 |
minute</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">grid</FONT><FONT
|
|
|
74 |
color="#007700">-></FONT><FONT color="#0000BB">SetColor</FONT><FONT color="#007700">
|
|
|
75 |
(</FONT><FONT color="#DD0000">'lightgray'</FONT><FONT color="#007700">);</FONT><FONT
|
|
|
76 |
color="#0000BB"></FONT></FONT></CODE></DIV></P>
|
|
|
77 |
<P></P>
|
|
|
78 |
<HR NOSHADE>
|
|
|
79 |
<A HREF="toc.html">Contents</A>
|
|
|
80 |
<A HREF="108Formattingthescaleheaders.html">Previous</A>
|
|
|
81 |
<A HREF="1082Hourscale.html">Next</A>
|
|
|
82 |
</BODY>
|
|
|
83 |
</HTML>
|