# How do I add a legend to a gantt chart?

I'm using the pgfgantt package to draw a gantt chart and I am using different fill patterns for different task types (fill patterns for the task bars, that is). It works nicely! But I would like to add a legend to tell the reader which pattern stands for which kind of task.

I do believe that this is not possible from inside pgfgantt, but perhaps there are other ways of adding it?

-
Please add a minimal working example (MWE) that illustrates your problem. –  percusse Jul 26 '12 at 13:32

I think I don't understand the question but you can add what you want inside the gantt environment. Here I added a node but you need to use current bounding box to place an object around or inside the tikzpicture.

\documentclass{article}
\usepackage{pgfgantt}

\begin{document}

\begin{figure}[ftbp]
\begin{center}

\begin{ganttchart}[y unit title=0.4cm,
y unit chart=0.5cm,
vgrid,hgrid,
title label anchor/.style={below=-1.6ex},
title left shift=.05,
title right shift=-.05,
title height=1,
bar/.style={fill=gray!50},
incomplete/.style={fill=white},
progress label text={},
bar height=0.7,
group right shift=0,
group top shift=.6,
group height=.3,
group peaks={}{}{.2}]{24}
%labels
\gantttitle{Week}{24} \\
\gantttitle{Monday}{4}
\gantttitle{Tuesday}{4}
\gantttitle{Wednesday}{4}
\gantttitle{Thursday}{4}
\gantttitle{Friday}{4}
\gantttitle{Saturday}{4} \\

%relations