# pgfgantt spans width

I would like to draw Gantt chart, where:

is generated by:

\documentclass{article}

\usepackage{pgfgantt}

\begin{document}

\begin{ganttchart}{1}{12}

\gantttitle{2011}{12} \\
\gantttitlelist{1,...,12}{1} \\

\ganttgroup{Group 1}{1}{7} \\
\ganttmilestone{Milestone}{7} \ganttnewline

\end{ganttchart}

\end{document}


I would like it span all the width. So I played with \begin{ganttchart}[x unit=10mm]{1}{12} and got:

How to make pgfgantt span all i.e. \textwidth?

Using \usepackage[showframe]{geometry} to check the position helps, but is there a side effect? Looks like chart moves a bit to the top left.

• One option is to create a separate file, then include the PDF as graphics with \includegraphics[width=\textwidth]{...pdf} – pushpen.paul Jan 24 at 11:52
• I believe you meant span (not spam). Please edit your question.... – pushpen.paul Jan 24 at 11:53
• Also, do you mean \textwidth or something else? – pushpen.paul Jan 24 at 11:57
• It might be difficult to do it automatically, because you need to reserve some space for the labels and pgfgantt does not yet know the size of the labels when the title bar is generated. So it may be easier just to manually play around with the x unit value (for each of your charts if you have more than one). – Marijn Jan 24 at 15:24
• If you add \usepackage[showframe]{geometry} to the preamble of your document, you will realize that you are almost there. I would like to argue that a small distance at the right end is better than overshooting. – user121799 Jan 24 at 15:52