Gant chart plotting tool
The taskjuggler-utils is a tool that plots gantt charts generated by TaskJuggler from the command line. It generates the chart in PostScript, Encapsulated PostScript, or PDF format, either for stand-alone printing or for inclusion in other documents. The tool was written and is maintained by Gustavo Sverzut Barbieri, although I have contributed pretty substentially to its functionality. The latest development version can be got from the SVN repository at googlecode.
This page aims to provide an easily installable tarball of the latest version of the package, as well as some documentation on how to use it.
Download and Installation
Download all the files of the latest version of taskjuggler-utils from the SVN repository. In order to install the tool, copy the files in any directory in your system's PATH. Under linux, you can check which directories these are with
| echo $PATH |
You also need to have PyX installed. If you don't have it yet, you can either download it from the project's homepage or (most likely if you're using linux) install it with your system's package manager (apt, yum, ...)
Using the tool
Generating the XML description of the project
The plotting tool uses an XML description of your project. TaskJuggler will generate such a description from your normal project description if you instruct it to. In order to do so, include the following code in your TaskJuggler project:
| xmlreport "project1.tjx" { version 2 } |
This will create a file called project1.tjx in the
directory of your project, which contains a gzipped XML
description of the project.
Plotting the chart
Once the tjx file has been generated, you create a
chart by typing
| gantt.py project.tjx |
at the command prompt. This will generate a file
called test.eps which contains the Gantt chart. If
you want to give the output file another name, use:
| gantt.py project.tjx output.eps |
This would create a file called
"output.eps" instead. The extension of
the output file determines the file type. The recognised
extensions are ".eps" to generate
encapsulated PostScript, ".ps" to
generate standard PostScript and ".pdf"
to generate PDF files. Postscript and PDF files can be printed
on multiple pages which can be glued together to make large
posters.
Option summary
The default options should give acceptable results, but the layout and general aspect of the chart can be modified with command-line switches. The switches that the tool accepts are described below:
-
-h, --help - Gives a brief description of the possible options
-
-v, --no-vacation - Do not plot the vacations in the chart. This is mostly for backwards compatibility. If this option is not given, vacations will shown as greyed-out areas in the chart.
-
-y, --no-day - Normally, if the project is short enough (or the chart is large enough to contain so much detail), individual days are indicated. Specifying this option turns this off.
-
-r, --no-resources - Do not plot the associated resources of each task.
-
-d, --no-deps - Do not plot the dependency lines.
-
-t, --timeline-on-top - The chart contains two timelines. One timeline could plot the weeks and the other the months, for example. The default is to have one timeline at the top and the other at the bottom of the chart. This switch forces both timelines in the heading of the graph.
-
-a, --align-to-day - Normally tasks are aligned to the second, modulo the resolution of the graph. For projects spanning few days this can be important, but since most projects span at least multiple weeks, this results in the bars of the tasks not being aligned with day boundaries. Using this flag results in charts which are not quite exact but look neater.
-
-f, --timeline1 -
Specify what should be plotted in the top (first)
timeline. Recognised values are:
weeksPlot individual weeks. If the resolution allows, individual days are indicated too. monthsPlot individual months quartersPlot quarters. That is, 3-month periods. yearsPlot years. -
-s, --timeline2 -
Specify what time unit should be used in the bottom (second)
timeline. See
-ffor the accepted values. This timeline will either appear in the footer of the graph, or just below the top timeline if-tis specified. -
-c, --caption-width - Set the width of the captions. The caption space is the area at the left of the chart, containing the titles of the tasks. If the width of this area is zero (the default), no caption area is used and the task titles are positioned next to the task bars.
-
-W, --chart-width -
Set the width of the chart, in centimetres. The default is
40 cm. If the chart is wider than the width of the paper, it
can be spread over multiple pages by using
the
-pswitch (see below). -
-w, --paper-width -
Set the paper width in centimetres. If
-pis specified, this is the width that is used for individual pages. -
-p, --poster - Span the chart over multiple pages, in order to be able to construct a poster chart. This only works with the PostScript or PDF output formats, not with EPS.