[Tex/LaTex] pgfgantt – \ganttilelist that accepts a list of strings

macrospgfgantt

I am trying to generate a gantt chart that shows names of the months rather than numbers which starts from July 2017 and ends at March 2017. My first attempt without month names:

% uses pgfgantt package
\begin{ganttchart}{1}{24}
\gantttitle[]{2017}{12} 
\gantttitle[]{2018}{12} \\
\gantttitlelist{1,...,12}{1} 
\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}
\ganttlink{elem2}{elem3}
\ganttlink{elem3}{elem4}
\end{ganttchart}

However when I try writing ganttitlelist with a string list as:

\ganttitlelist{July, August, September, October, December}{5}

It fails with: Undefined control sequence. \ganttitlelist

I am guessing this functionality is not implemented in pgfgantt. If so, how can one implement this? Otherwise, what is the way to give a string list to this macro?

Version of pgfgantt that I am using:

\ProvidesPackage{pgfgantt}[2013/06/01 v4.0 Draw Gantt diagrams with TikZ]

Best Answer

It seems like I was looking into the examples of older versions of pgfgrantt. After reading the current documentation, this solved my problem:

\begin{ganttchart}[
    hgrid,
    x unit=0.6mm,
    time slot format=isodate
    ]{2017-07-1}{2018-03-30}

    \gantttitlecalendar{year, month=name} \\
    \ganttgroup{}{2017-07-25}{2017-11-15} \\
    \ganttbar{}{2017-07-1}{2018-03-30}
\end{ganttchart}
Related Question