# Gantt chart

> Two phases of a project over twelve weeks, with a dependency and a release milestone. A pgfgantt example with its LaTeX source.

A pgfgantt example in the TeXeR TikZ library: https://texer.org/library/pgfgantt/gantt-chart

Package: [pgfgantt](https://texer.org/library/pgfgantt.md), on CTAN at https://ctan.org/pkg/pgfgantt.

Tags: gantt, schedule, milestone

## Source

```latex
\usepackage{pgfgantt}

\begin{ganttchart}[
  hgrid, vgrid,
  x unit=6.5mm, y unit chart=6mm, y unit title=6mm, title height=1,
  title label font=\small, bar label font=\small,
  group label font=\small\bfseries, milestone label font=\small\itshape,
  bar/.append style={fill=blue!25},
  group/.append style={fill=blue!70!black},
  milestone/.append style={fill=orange!85!black},
  link/.style={-latex, thick, orange!85!black},
]{1}{12}
  \gantttitle{Weeks}{12} \\
  \gantttitlelist{1,...,12}{1} \\
  \ganttgroup{Research}{1}{5} \\
  \ganttbar{Literature review}{1}{3} \\
  \ganttbar[name=survey]{Survey design}{3}{5} \\
  \ganttgroup{Development}{5}{11} \\
  \ganttbar[name=proto]{Prototype}{6}{8} \\
  \ganttbar{Testing}{8}{11} \\
  \ganttmilestone{Release}{11}
  \ganttlink{survey}{proto}
\end{ganttchart}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{pgfgantt}

\begin{document}

\begin{ganttchart}[
  hgrid, vgrid,
  x unit=6.5mm, y unit chart=6mm, y unit title=6mm, title height=1,
  title label font=\small, bar label font=\small,
  group label font=\small\bfseries, milestone label font=\small\itshape,
  bar/.append style={fill=blue!25},
  group/.append style={fill=blue!70!black},
  milestone/.append style={fill=orange!85!black},
  link/.style={-latex, thick, orange!85!black},
]{1}{12}
  \gantttitle{Weeks}{12} \\
  \gantttitlelist{1,...,12}{1} \\
  \ganttgroup{Research}{1}{5} \\
  \ganttbar{Literature review}{1}{3} \\
  \ganttbar[name=survey]{Survey design}{3}{5} \\
  \ganttgroup{Development}{5}{11} \\
  \ganttbar[name=proto]{Prototype}{6}{8} \\
  \ganttbar{Testing}{8}{11} \\
  \ganttmilestone{Release}{11}
  \ganttlink{survey}{proto}
\end{ganttchart}
\end{document}
```
