I would like to draw Gantt chart, where:

is generated by:





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

    \ganttgroup{Group 1}{1}{7} \\
    \ganttbar{Task 1}{1}{2} \\
    \ganttlinkedbar{Task 2}{3}{7} \ganttnewline
    \ganttmilestone{Milestone}{7} \ganttnewline
    \ganttbar{Final Task}{8}{12}



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.

enter image description here

  • 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
  • 1
    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
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.