| 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="105CreatingaGanttChart.html">
|
|
|
8 |
<LINK REL="Next" HREF="107Ganttbars.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="105CreatingaGanttChart.html">Previous</A>
|
|
|
26 |
<A HREF="107Ganttbars.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H2><A NAME="10_6">10.6 Positioning objects in the Gantt plot</A></H2>
|
|
|
29 |
<P> Bars and Milestones need both a vertical position and a horizontal
|
|
|
30 |
position. The horizontal start position is specified as a date, e.g.
|
|
|
31 |
"2001-06-23", and the vertical positions are specified as a number
|
|
|
32 |
[0,1,2,3,...]. This vertical number indicates the position from the top
|
|
|
33 |
where the object should be placed. To understand this you might imagine
|
|
|
34 |
a number of "invisible" horizontal bands with a certain height. If you
|
|
|
35 |
specify 0 as the vertical position the bar will be placed in the first
|
|
|
36 |
band, specify 3 and the bar will be placed in the fourth band and so
|
|
|
37 |
on.</P>
|
|
|
38 |
<P> It is perfectly legal, and perhaps even desirable to leave "gaps"
|
|
|
39 |
when laying out bands to group related activities. So, for example you
|
|
|
40 |
could have three activities/bars at positions 1,2,3 and then another 2
|
|
|
41 |
bars at position 6,7 leaving band 0,4,5 empty.</P>
|
|
|
42 |
<P> All these "invisible bands" have the same height (equ-spaced). The
|
|
|
43 |
height of each band is automatically determined and depends on both the
|
|
|
44 |
method of layout ( as specified by (GanttChart::SetLayout()) and the
|
|
|
45 |
individual heights of the individual bars and titles. The rules are
|
|
|
46 |
quite simple:</P>
|
|
|
47 |
<UL>
|
|
|
48 |
<LI> If you use layout=GANTT_FROMTOP (the default and most common) the
|
|
|
49 |
height will equal the height (+ a margin) of the highest gantt bar. The
|
|
|
50 |
height calculation of each bar takes into account both the actual bar,
|
|
|
51 |
the title, and any left- right-marks (more about that later) that may
|
|
|
52 |
be present. The name "fromtop" refers to that when you have explicitly
|
|
|
53 |
specified a height the bars will usually be added from band 0 and
|
|
|
54 |
onwards and hence being added from the top. (This might leave empty
|
|
|
55 |
space at the bottom of the plot area in the graph if the height of the
|
|
|
56 |
graph has been explicitly specified).</LI>
|
|
|
57 |
<LI> If you use layout=GANTT_EVEN the bars are evenly (hence the name)
|
|
|
58 |
spread out over the available height in the gantt chart and no
|
|
|
59 |
consideration is taken of the individual bars heights. Note that if you
|
|
|
60 |
use automatic sizing you cant use even layout. It just doesn't make
|
|
|
61 |
sense. Even layout is for those cases when you deliberately specify a
|
|
|
62 |
very large image and want the bars evenly distributed using the full
|
|
|
63 |
height.</LI>
|
|
|
64 |
</UL>
|
|
|
65 |
<P></P>
|
|
|
66 |
<HR NOSHADE>
|
|
|
67 |
<A HREF="toc.html">Contents</A>
|
|
|
68 |
<A HREF="105CreatingaGanttChart.html">Previous</A>
|
|
|
69 |
<A HREF="107Ganttbars.html">Next</A>
|
|
|
70 |
</BODY>
|
|
|
71 |
</HTML>
|