1

I would like to create a GANTT chart that covers 3 years and (this is the issue) where I can create work packages in daily resolution. Currently, I'm at this point:

\documentclass[%
       a4paper,%
       oneside,
       10pt,
       ]{article}

    \usepackage{lscape}
    \usepackage{xcolor,color,colortbl}

    % Tikz packages
    \usepackage{tikz}
    \usepackage{pgfplots}

    % GANTT plots
    \usepackage{pgfgantt}
    \usepackage{graphicx}
    \ganttset{group/.append style={blue},
    milestone/.append style={red},
    progress label node anchor/.append style={text=red},
    bar/.append style={fill=white!40!black!20,draw=blue}}


    \begin{document}

    \begin{landscape}
    %--------------------------------------------------------------------
    \subsection{GANTT chart}
    \label{cha:manage_planning_barchart}
    % -------------------------------------------------
     \begin{figure}[!htb]
     \centering
     \begin{tikzpicture}[scale=0.6, every node/.style={transform        shape}]
     \begin{ganttchart}[
            vgrid,
            hgrid,
            bar label anchor/.append style={align=left},
            bar/.style={fill=blue,draw=blue},
            bar incomplete/.append style={fill=blue!40!black!20},
            bar progress label font=\mdseries\footnotesize\color{black},
            group label anchor/.append style={align=left, text width=25em},
            y unit chart=0.65cm,
            %x unit=0.5cm,
            milestone label anchor/.append style={align=left, text width=10em},
            Mile1/.style={milestone/.append style={fill=red}},
            time slot format=isodate,
            today=\the\year-\the\month-\the\day,
            today offset = 0.5,
            today label=Today,
            today label node/.append style={anchor=north west},
            today label font=\itshape\color{red},
            today rule/.style={draw=red, thick, dashed}
          ]{2019-02-1}{2019-10-31}
      \gantttitle{My long project}{33}\\
      \gantttitle{2019}{11}
      \gantttitle{2020}{12}
      \gantttitle{2021}{10}\\
      \gantttitlelist{2,...,12}{1}
      \gantttitlelist{1,...,12}{1}
      \gantttitlelist{1,...,10}{1} \ganttnewline
      \ganttmilestone{START!}{2019-02-18} \ganttnewline
      \ganttgroup{First group}                         {2019-2-18}{2019-4-31} \ganttnewline
      \ganttbar[progress=10]{First task in first group}{2019-2-18}{2019-3-31} \ganttnewline
      \ganttbar[progress=0]{Second task in first group}{2019-3-31}{2019-4-31}

      \end{ganttchart}
     \end{tikzpicture}
     \caption{GANTT-Chart}
     \label{fig:GANTT}
     \end{figure}
     \end{landscape}
     \end{document}

This gives: GANTT over multiple years

Can anyone explain to me (1) why it cuts off at the very right and (2) how I get daily resolution over the 3 years?

Thanks much!!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.