[Tex/LaTex] PGFGantt Compressed Calendar by week

pgfgantt

I'd like to use \gantttitlecalendar to generate a title with week as the smallest unit (i.e. one unit = one week). By default, each unit represents one calendar day:

\begin{ganttchart}[
  hgrid,
  vgrid,
  time slot format=isodate,
  ]{2015-09-01}{2016-04-01}
\gantttitlecalendar{year, month, week} \\
\ganttbar{Task 1}{2015-09-01}{2015-11-15} \\
\end{ganttchart}

However, for a chart spanning several months, this is ridiculously scaled:

Uncompressed

Using the compressed calendar option, I know I'm able to set each timeslot to correspond to a single month:

\begin{ganttchart}[
  hgrid,
  vgrid,
  time slot format=isodate-yearmonth,
  compressed calendar
  ]{2015-09}{2016-04}
\gantttitlecalendar{year, month} \\
\ganttbar{Task 1}{2015-09}{2015-11} \\
\end{ganttchart}

However, now I have the opposite problem. For a project that only lasts a couple of months, the produced chart is ridiculously small:

Compressed

I almost hate myself for asking – but is there any way I can have something in between these two extremes? (I.e. have a single time slot representing a single week)

Best Answer

Sorry for reviving an old question, but this is an easy fix.

You can set the width of the x units with x unit= in the options field of \begin{ganttchart}[ options ]{}{}. You can either use cm or mm.

For your example the following code:

\begin{document}
     \begin{ganttchart}[hgrid,
                        vgrid,
                        x unit=1.75cm,
                        time slot format={isodate-yearmonth},
                        compress calendar
                        ]{2015-09}{2016-04}
           \gantttitlecalendar{year, month} \\
           \ganttbar{Task 1}{2015-09}{2015-11} \\
           \ganttbar{Task 2}{2015-10}{2016-02} 
      \end{ganttchart}
\end{document}

Which produces the following: x unit width adjusted