Difference between revisions of "Gantt Charts"
Line 37: | Line 37: | ||
Here we have the start and end times for each task segment. For example task segment 6 starts on day 7 and ends on day 9. | Here we have the start and end times for each task segment. For example task segment 6 starts on day 7 and ends on day 9. | ||
+ | |||
+ | From the graphing perspective, here is the important thing to observe about this data. We want each of the rows shown in this table to serve a separate role in the graph we are about to create. The start should determine the left-edge of the bar (the bar-origin role), and the end should determine the right-edge of the bar when each bar is plotted. We can view each column of this table as providing a ''graphing coordinate'' -- two numbers specifying (or partially specifying) how a data point (in this case a bar segment is the data point) is to be displayed on the graph. We will call the index, Start_End, a ''coordinate index'', since it indexes each graphing coordinate vector. | ||
4. Close that window and show the result table for Seg_to_task. | 4. Close that window and show the result table for Seg_to_task. | ||
Line 43: | Line 45: | ||
Here you can see how each task segment is mapped to its task. I've used the letters 'A' through 'H' as task names. | Here you can see how each task segment is mapped to its task. I've used the letters 'A' through 'H' as task names. | ||
+ | |||
+ | The task here ('A' through 'H') will serve as one additional component of the graphing coordinate, in this case determining where along the Y-axis the bar should be displayed. | ||
5. Close this result window. | 5. Close this result window. | ||
+ | |||
+ | = Selecting Graphing Dimension Data = | ||
To create the Gantt chart, we are going to use the data contained in both these variables in a single graph. We'll use the columns of Task_Segment_Duration, and bring Seg_to_task in as an external graphing dimension. | To create the Gantt chart, we are going to use the data contained in both these variables in a single graph. We'll use the columns of Task_Segment_Duration, and bring Seg_to_task in as an external graphing dimension. | ||
Line 54: | Line 60: | ||
7. Next, bring in the Task_to_seg result as an external variable. To do this, click on the [[image:XYbutton.jpg]] at the top right of the result window. If you don't see this button, you are in browse mode and must first click the [[image:Edit Mode Toolbar Button.jpg]] toolbar button to enter edit mode. | 7. Next, bring in the Task_to_seg result as an external variable. To do this, click on the [[image:XYbutton.jpg]] at the top right of the result window. If you don't see this button, you are in browse mode and must first click the [[image:Edit Mode Toolbar Button.jpg]] toolbar button to enter edit mode. | ||
− | 8. In the ''XY coordinate sources'' dialog, check ''Use another variable or expression'', then press [[image:addButton.jpg]] and select ''Seg_to_task''. | + | 8. In the ''XY coordinate sources'' dialog, check both checks, ''Use coordinate index'' and ''Use another variable or expression'', then press [[image:addButton.jpg]] and select ''Seg_to_task''. |
[[image:Gantt Tutorial Add Seg to Task.jpg]] | [[image:Gantt Tutorial Add Seg to Task.jpg]] | ||
+ | |||
+ | We are using a coordinate index here because we want to treat the two rows of Task_segment_duration as separate graphing dimensions. One of these rows will be used for the left edge of the bar (the bar origin), and the other row will be used for the right edge of the bar (the y-axis role). Hence, we have checked ''Use coordinate index''. | ||
+ | |||
+ | We have also brought in one external graphing dimension, ''Seg_to_task''. This contains the task for each segment. The task for each segment will determine which row along the vertical axis the corresponding bar is plotted in. | ||
+ | |||
+ | 9. Press [[image:OKbutton.jpg]] twice to close the dialogs. | ||
+ | |||
+ | Notice that a '''Coordinate Index''' pulldown has appeared above the graph. Since we want the Start_End index to be our coordinate index (see comments at Step 3), select Start_End in that pulldown. | ||
+ | |||
+ | [[image:Gantt Tutorial First Graph.jpg]] | ||
+ | |||
+ | = Using the Bar Origin role = |
Revision as of 19:22, 27 February 2007
This mini-tutorial illustrates the use of the Bar Origin graphing role in a creative fashion to create a rudimentary Gantt chart. A Gantt chart displays a time line showing when various tasks occur in a product schedule. The use of graphing roles, and assigning graphing dimensions to graphing roles, presented by Analyica 4.0 provides a very flexible graphing framework, mastery of which allows you to present an extremely wide variety of data presentations. This tutorial provides one example that may help you develop a further mastery of graphing roles.
Components of a Gantt Chart
A Gantt chart is composed of task segments, each segment composed of three pieces of information:
- The task that the segment belongs to.
- The start time for the task segment
- The end time for the task segment.
In the graph above, The task segment at the top left is part of task h, starts at 1 and ends at 2.
There are several ways that this data can be organized in your model. For example:
- You could have three separate variables, each indexed by Task_Seg
- You could have one two-dimensional table containing the start and end times of each task-segment, and a separate variable mapping task segment to task.
- You could have a single two-dimensional table containing three columns.
In this tutorial, we use the second arrangement, and leave the other two cases as exercises.
Arrange the Data
To save time, I've gathered and arranged the data for you already to provide a starting point.
Steps: 1. Download this starting model: Gantt tutorial.ana. To download, right-click on the link and select "Save Target As...". 2. Start Analytica 4.0, and load the model you just saved.
This model contains the data that we will use for graphing. If this were a real modeling application, the data here would probably be computed based on various modeling assumptions and projections. Since this mini-tutorial focuses on graphing concepts, I've provided pre-canned data to work with.
3. Show the result table for Task_Segment_Duration.
Here we have the start and end times for each task segment. For example task segment 6 starts on day 7 and ends on day 9.
From the graphing perspective, here is the important thing to observe about this data. We want each of the rows shown in this table to serve a separate role in the graph we are about to create. The start should determine the left-edge of the bar (the bar-origin role), and the end should determine the right-edge of the bar when each bar is plotted. We can view each column of this table as providing a graphing coordinate -- two numbers specifying (or partially specifying) how a data point (in this case a bar segment is the data point) is to be displayed on the graph. We will call the index, Start_End, a coordinate index, since it indexes each graphing coordinate vector.
4. Close that window and show the result table for Seg_to_task.
Here you can see how each task segment is mapped to its task. I've used the letters 'A' through 'H' as task names.
The task here ('A' through 'H') will serve as one additional component of the graphing coordinate, in this case determining where along the Y-axis the bar should be displayed.
5. Close this result window.
Selecting Graphing Dimension Data
To create the Gantt chart, we are going to use the data contained in both these variables in a single graph. We'll use the columns of Task_Segment_Duration, and bring Seg_to_task in as an external graphing dimension.
6. Show the result for Task_Segment_Duration (again), and switch to graph mode. Initially the graph displays as:
7. Next, bring in the Task_to_seg result as an external variable. To do this, click on the at the top right of the result window. If you don't see this button, you are in browse mode and must first click the
toolbar button to enter edit mode.
8. In the XY coordinate sources dialog, check both checks, Use coordinate index and Use another variable or expression, then press and select Seg_to_task.
We are using a coordinate index here because we want to treat the two rows of Task_segment_duration as separate graphing dimensions. One of these rows will be used for the left edge of the bar (the bar origin), and the other row will be used for the right edge of the bar (the y-axis role). Hence, we have checked Use coordinate index.
We have also brought in one external graphing dimension, Seg_to_task. This contains the task for each segment. The task for each segment will determine which row along the vertical axis the corresponding bar is plotted in.
9. Press twice to close the dialogs.
Notice that a Coordinate Index pulldown has appeared above the graph. Since we want the Start_End index to be our coordinate index (see comments at Step 3), select Start_End in that pulldown.
Enable comment auto-refresher