| 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="1076Adjustingtheminimumdistancebetweenbars.html">
|
|
|
8 |
<LINK REL="Next" HREF="1081Minutescale.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="1076Adjustingtheminimumdistancebetweenbars.html">Previous</A>
|
|
|
26 |
<A HREF="1081Minutescale.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H2><A NAME="10_8">10.8 Formatting the scale headers</A></H2>
|
|
|
29 |
<P> The scale headers allow you to view up to four different scales at
|
|
|
30 |
the same time. The four basic scales are:</P>
|
|
|
31 |
<UL>
|
|
|
32 |
<LI> Day scale</LI>
|
|
|
33 |
<LI> Week scale</LI>
|
|
|
34 |
<LI> Month scale</LI>
|
|
|
35 |
<LI> Year scale</LI>
|
|
|
36 |
</UL>
|
|
|
37 |
<P> You can choose what scale to include and exclude by using the
|
|
|
38 |
SetScale() method. For example, for a detailed gantt you might choose
|
|
|
39 |
to display days and weeks by specifying<DIV class="phpscript"><CODE><FONT
|
|
|
40 |
color="#000000"> <FONT color="#0000BB"> $graph</FONT><FONT color="#007700">
|
|
|
41 |
-></FONT><FONT color="#0000BB">ShowHeaders</FONT><FONT color="#007700">
|
|
|
42 |
( </FONT><FONT color="#0000BB">GANTT_HWEEK </FONT><FONT color="#007700">
|
|
|
43 |
| </FONT><FONT color="#0000BB">GANTT_DAY </FONT><FONT color="#007700">);</FONT><FONT
|
|
|
44 |
color="#0000BB"></FONT></FONT></CODE></DIV></P>
|
|
|
45 |
<P> If you instead wanted "the big picture" it might be enough to show
|
|
|
46 |
year and months by specifying<DIV class="phpscript"><CODE><FONT color="#000000">
|
|
|
47 |
<FONT color="#0000BB"> $graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
48 |
color="#0000BB">ShowHeaders</FONT><FONT color="#007700">( </FONT><FONT color="#0000BB">
|
|
|
49 |
GANTT_YEAR </FONT><FONT color="#007700">| </FONT><FONT color="#0000BB">
|
|
|
50 |
GANTT_MONTH </FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
|
|
|
51 |
</FONT></CODE></DIV></P>
|
|
|
52 |
<P> You can choose freely the combination of scales that you want, but a
|
|
|
53 |
chart must at least have one scale of course.</P>
|
|
|
54 |
<P> Once you have decided what level of details you need you can then
|
|
|
55 |
fine tune the exact layout/formatting of each of the enabled scales as
|
|
|
56 |
described below.</P>
|
|
|
57 |
<P> These scale header are all accessed through the graph instance
|
|
|
58 |
variables 'scale' as in<DIV class="phpscript"><CODE><FONT color="#000000">
|
|
|
59 |
<FONT color="#0000BB"> $graph</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
60 |
color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
61 |
week</FONT></FONT></CODE></DIV></P>
|
|
|
62 |
<P> or<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
63 |
$graph</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">scale</FONT><FONT
|
|
|
64 |
color="#007700">-></FONT><FONT color="#0000BB">day</FONT></FONT></CODE></DIV>
|
|
|
65 |
</P>
|
|
|
66 |
<P>. All these headers share the following properties.</P>
|
|
|
67 |
<UL>
|
|
|
68 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
69 |
Show</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT></FONT>
|
|
|
70 |
</CODE></DIV>
|
|
|
71 |
<P> Determine if the scale should be shown or not</P>
|
|
|
72 |
</LI>
|
|
|
73 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
74 |
SetFont</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT>
|
|
|
75 |
</FONT></CODE></DIV>
|
|
|
76 |
<P>Font for text in header</P>
|
|
|
77 |
</LI>
|
|
|
78 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
79 |
SetFontColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
|
|
|
80 |
</FONT></FONT></CODE></DIV>
|
|
|
81 |
<P> Specify the color of the header text</P>
|
|
|
82 |
</LI>
|
|
|
83 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
84 |
SetStyle</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB"></FONT>
|
|
|
85 |
</FONT></CODE></DIV>
|
|
|
86 |
<P>Specify what date format should be used, for example in the week
|
|
|
87 |
scale it is possible to show either week number, the start date of the
|
|
|
88 |
week and so on.</P>
|
|
|
89 |
</LI>
|
|
|
90 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
91 |
SetBackgroundColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
|
|
|
92 |
</FONT></FONT></CODE></DIV>
|
|
|
93 |
<P>As it says, the background color for the header</P>
|
|
|
94 |
</LI>
|
|
|
95 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
96 |
SetFrameWeight</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
|
|
|
97 |
</FONT></FONT></CODE></DIV>
|
|
|
98 |
<P>The line weight of the box around the scale</P>
|
|
|
99 |
</LI>
|
|
|
100 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
101 |
SetFrameColor</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
|
|
|
102 |
</FONT></FONT></CODE></DIV>
|
|
|
103 |
<P>The line color for the frame</P>
|
|
|
104 |
</LI>
|
|
|
105 |
<LI><DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
106 |
SetTitleVertMargin</FONT><FONT color="#007700">()</FONT><FONT color="#0000BB">
|
|
|
107 |
</FONT></FONT></CODE></DIV>
|
|
|
108 |
<P>The margin, in percent, below and above the title text</P>
|
|
|
109 |
</LI>
|
|
|
110 |
</UL>
|
|
|
111 |
<P> In addition to these methods each scale also has the property 'grid'
|
|
|
112 |
which determines the appearance of grid lines for that specific scale.
|
|
|
113 |
You may modify the appearance of grid lines by the "normal" line
|
|
|
114 |
methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for
|
|
|
115 |
example to set the week grid line red you would use<DIV class="phpscript">
|
|
|
116 |
<CODE><FONT color="#000000"> <FONT color="#0000BB"> $graph</FONT><FONT color="#007700">
|
|
|
117 |
-></FONT><FONT color="#0000BB">scale</FONT><FONT color="#007700">-></FONT><FONT
|
|
|
118 |
color="#0000BB">week</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">
|
|
|
119 |
grid</FONT><FONT color="#007700">-></FONT><FONT color="#0000BB">SetColor</FONT><FONT
|
|
|
120 |
color="#007700">(</FONT><FONT color="#DD0000">"red"</FONT><FONT color="#007700">
|
|
|
121 |
);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P>
|
|
|
122 |
<P> Each of the scales also have some specific formatting possibilities
|
|
|
123 |
as described below.</P>
|
|
|
124 |
<HR NOSHADE>
|
|
|
125 |
<A HREF="toc.html">Contents</A>
|
|
|
126 |
<A HREF="1076Adjustingtheminimumdistancebetweenbars.html">Previous</A>
|
|
|
127 |
<A HREF="1081Minutescale.html">Next</A>
|
|
|
128 |
</BODY>
|
|
|
129 |
</HTML>
|