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="95CreatingaGanttChart.html"><LINK REL="Next" HREF="97Ganttbars.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="95CreatingaGanttChart.html">Previous</A><A HREF="97Ganttbars.html">Next</A><HR NOSHADE><H2><A NAME="9_6">9.6 Positioning objects in the Gantt plot</A></H2><P> Bars and Milestones need both a vertical position and a horizontalposition. The horizontal start position is specified as a date, e.g."2001-06-23", and the vertical positions are specified as a number[0,1,2,3,...]. This vertical number indicates the position from the topwhere the object should be placed. To understand this you might imaginea number of "invisible" horizontal bands with a certain height. If youspecify 0 as the vertical position the bar will be placed in the firstband, specify 3 and the bar will be placed in the fourth band and soon.</P><P> It is perfectly legal, and perhaps even desirable to leave "gaps"when laying out bands to group related activities. So, for example youcould have three activities/bars at positions 1,2,3 and then another 2bars at position 6,7 leaving band 0,4,5 empty.</P><P> All these "invisible bands" have the same height (equ-spaced). Theheight of each band is automatically determined and depends on both themethod of layout ( as specified by (GanttChart::SetLayout()) and theindividual heights of the individual bars and titles. The rules arequite simple:</P><UL><LI> If you use layout=GANTT_FROMTOP (the default and most common) theheight will equal the height (+ a margin) of the highest gantt bar. Theheight calculation of each bar takes into account both the actual bar,the title, and any left- right-marks (more about that later) that maybe present. The name "fromtop" refers to that when you have explicitlyspecified a height the bars will usually be added from band 0 andonwards and hence being added from the top. (This might leave emptyspace at the bottom of the plot area in the graph if the height of thegraph has been explicitly specified).</LI><LI> If you use layout=GANTT_EVEN the bars are evenly (hence the name)spread out over the available height in the gantt chart and noconsideration is taken of the individual bars heights. Note that if youuse automatic sizing you cant use even layout. It just doesn't makesense. Even layout is for those cases when you deliberately specify avery large image and want the bars evenly distributed using the fullheight.</LI></UL><P></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="95CreatingaGanttChart.html">Previous</A><A HREF="97Ganttbars.html">Next</A></BODY></HTML>