Chapter 5
Diagrams and Charts Commands
From the project data you can produce several kinds of charts and diagrams:
- tree diagrams representing the project structure;
- pert charts visualizing the dependencies between the project items;
- effort charts visualizing the resources and the efforts for the project items;
- schedule charts visualizing your project schedule.
Each of these diagrams and charts is created by a single primitive in the \Draw...\EndDraw
environment of (Al)DraTex. You get the default style (layout and output). The style can be
changed by using the style commands or by using DraTex commands.
5.1 Tree Diagrams
\treediagram(tag,depth)
- depth: : taken to be infinite, if omitted.
\treestyle(m_command, p_command, t_command, e_command, width)
- m_command: : command to generate milestone nodes;
- p_command: : command to generate project nodes;
- t_command: : command to generate task nodes;
- e_command: : command to generate edges;
- width: : required width of node, if 0 then the width is determined by the
content.
Default: \treestyle(\VRectNode, \RectNode, \SRectNode,\TreeEdge, 70)
\treenodestyle{style}
- This instruction determines how content of nodes should be typeset with a
mapping from #1 (a tag) to style.
Default: \treenodestyle{\name{#1}}
5.2 Pert Diagrams
\pertdiagram(tag)
- The command draws a diagram which takes into account both predecessors and
time constraints.
- A start ‘*’ following the control sequence asks for diagrams which take into
account only predecessors constraints.
\pertstyle(option,h_space,v_space,m_command,p_command,t_command,width)
- option: : H (horizontal trees)
- h-space, v_space: : amount of space between nodes;
- m_command: : command to generate milestone nodes;
- p_command: : command to generate project nodes;
- t_command: : command to generate task nodes;
- width: : required width of node, if 0 then the width is determined by the
content.
Default: \pertstyle(,30,20,\RectNode,\VRectNode,\SRectNode,70)
\pertlimits(rows, columns, boundary-mark, code)
- rows, columns: : integer numbers requesting the decomposition of the
diagrams into subdiagrams, when the estimated number of rows or columns
is greater than the given limits. (The numbers are estimates, because rows
and columns are only vaguely defined in, respectively, vertical and horizontal
diagrams.)
- boundary-mark: : a command for typesetting nodes referenced out of the
subdiagrams; it is given a parenthesized tag for an argument. Two variants,
named \ExtNode and \PutNode, are predefined in the package.
- code: : a contribution to be inserted between the subdiagrams of a decomposed
diagram.
- empty arguments ask to preserve the status quo.
Default: \pertlimits(,,\ExtNode,\par)
\adjustpert(tag_1,distance_1 & ... & tag_n,distance_n )
- This command allows for user adjustments to the positions of specified nodes.
The adjustments assume point units of measurements, and they are perpendicular
to the direction of the diagram: a negative value to move to the left (top), and a
positive value to move to the right (bottom).
\pertnodestyle(style)
- Determines how content of nodes should be typeset, with a mapping from #1 (a
tag) to style.
Default: \pertnodestyle{\name{#1}}.
5.3 Effort Charts
\effortchart(tag, start date, end date, excluded items, depth)
Cutoff parameters:
- excluded items: : can be any combination of M (milestones), P (projects), T
(tasks);
- start date, end date, excluded items, depth may be omitted;
- depth: : 0 (root level), 1 (children level; default), 2 (grandchildren level), etc.
- trailing commas may be omitted.
\effortstyle(options, from, to, color, width)
- options: : can be any combination of the following requests: A (default axes),
T (names within bars), E (efforts within bars), 3 (3 dimensional bars);
- from, to: : location of bar in its slot: 0 <= from < to <= 10 ;
- color: : color of bars: 0 (white), 1 (black), 3 (lines);
- width: : of names, if 0 then the width is determined by the content
Default: \effortstyle(A,2.5,7.5,1,70)
\effortlimits(limit,code)
- limit: : an integer number requesting the decomposition of the chart into
subcharts, when the number of bars is greater than the given limit.
- code: : an optional contribution to be inserted between the subcharts of a
decomposed chart.
Default: \effortlimits(,\par)
5.4 Schedule Charts
\schedulechart(tag, start date, end date, excluded items, depth)
Cutoff parameters:
- excluded items: : any combination of: M (milestones), P (projects), T
(tasks);
- start date, end date, excluded items, depth: : may be omitted
- trailing commas may be omitted.
\schedulestyle(options, from, to, p_color, t_color, symbol, width)
- options: : can be any combination of the following requests: A (default axes),
T (names within bars), 3 (3 dimensional bars);
- from, to: : location of bar in its slot: 0 <= from < to <= 10 ;
- p_color, t_color: : colors of project and task bars: 0 (white), 1 (black), 3
(lines);
- symbol: : for representing milestones;
- width: : of names, if 0 then the width is determined by the content.
Default: \schedulestyle(A,2.5,7.5,3,0,$\otimes$,70)
\schedulelimits(limit, code)
- limit: : an integer number requesting the decomposition of the chart into
subcharts, when the number of bars is greater than the given limit.
- code: : an optional contribution to be inserted between the subcharts of a
decomposed chart.
Default: \schedulelimits(,\par)
5.5 User-Defined Axes
- \datesaxis(loc_1,loc_2)(style) ;
- \effortaxis(loc_1,loc_2)(style) ;
- \namesaxis(loc_1,loc_2)(style) ;
- \nonamesaxis(loc_1,loc_2)(style) .
Variants of the \Axis command of AlDraTeX which get their labels from \schedulechart
and \effortchart
5.6 (Al)DraTeX Commands of Immediate Interest
- \Draw ... \EndDraw: : sets a drawing environment;
- \TreeAlign(H,-1,0)(0,0,0): : asks for horizontal trees;
- \TreeSpace(style, h_space, v_space): : style: : C (compact
trees);
- \ArrowHeads(1): : asks for arrow heads on edges of diagrams.
- \Scale(h_scale, v_scale): : asks for scaled effort and schedule charts.