The pgfgantt package

Draws Gantt charts for project plans: \ganttbar, \ganttgroup and \ganttmilestone inside a ganttchart environment.

Loading the package

\usepackage{pgfgantt}

The two arguments of \begin{ganttchart}{1}{12} are the first and the last time slot. Each element takes a label, a start slot and an end slot. \\ moves to the next row; without it, the next element is drawn in the same row.

Time slots are numbers by default. With the option time slot format=isodate they are dates such as 2026-01-05, and \gantttitlecalendar prints years, months or weeks as the title rows. The package draws with tikz.

Main commands

\begin{ganttchart}[hgrid, vgrid]{1}{12}Chart with 12 time slots and grid lines in both directions.
\gantttitle{Project plan}{12}Title cell that spans 12 slots.
\gantttitlelist{1,...,12}{1}Row of title cells, one slot wide each.
\ganttbar{Literature}{1}{3}Task from slot 1 to slot 3.
\ganttlinkedbar{Experiments}{4}{8}Task with an arrow from the element before it.
\ganttgroup{Thesis}{1}{12}Bracket above a group of tasks.
\ganttmilestone{Submission}{12}Diamond that marks a milestone at slot 12.
\ganttbar[progress=40]{Writing}{7}{11}Fills 40 % of the bar and prints "40% complete" next to it.

Complete example

\documentclass{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[hgrid, vgrid, x unit=0.7cm]{1}{12}
  \gantttitle{Project plan (weeks)}{12} \\
  \gantttitlelist{1,...,12}{1} \\
  \ganttgroup{Thesis}{1}{12} \\
  \ganttbar{Literature}{1}{3} \\
  \ganttlinkedbar{Experiments}{4}{8} \\
  \ganttbar[progress=40]{Writing}{7}{11} \\
  \ganttmilestone{Submission}{12}
\end{ganttchart}
\end{document}
Result
The compiled example

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023.

Pitfalls

Related pages