1

enter image description hereenter image description here It took me a while to first of all get the spacing right on the gantt chart- easier if I could have found a way to shift the entire chart left but I could not find a way, I tried, flushleft but this does not work..see first attachment

Anyway as soon as I insert the gantt bar labels, it totally messes up, see attachments- I have tried both inline=true and inline=false.

I just want to position them either to the left, or on top of the bars I don't mind, but just with keeping the spacing of the entire Gantt chart in tact.

Many thanks.

enter image description here

enter image description here

enter image description here

(Code used below).

\documentclass{article}
% Uncomment the following line to allow the usage of graphics (.png, .jpg)
%\usepackage[pdftex]{graphicx}
% Comment the following line to NOT allow the usage of umlauts
\usepackage{pgfgantt}
\usepackage{graphicx}


% Start the document

\usepackage{xcolor}
\usetikzlibrary{positioning}

\begin{document}

\begin{figure}

     \begin{ganttchart}[
     y unit title=0.5cm,
     y unit chart=0.7cm,
     vgrid,hgrid,
     title height=1,
     title/.style={fill=none},
     title label font=\bfseries\footnotesize,
     bar/.style={fill=cyan},
     bar height=0.7,
   progress label text={},
     group right shift=0,
     group top shift=0.7,
     group height=.3,
     group peaks width={0.2},
     inline]{1}{29}
    %labels

 % title 1
    \gantttitle{2020}{3}
 \gantttitle{2021}{9}        
 \gantttitle{2022}{9}                         % title 2
    \gantttitle{2023}{9} \\              
    \gantttitle{Q4}{2}                      % title 3
  
 \gantttitle{Q1}{3}                      % title 3
    \gantttitle{Q2}{3}
\gantttitle{Q3}{3}
 \gantttitle{Q1}{3}                      % title 3
    \gantttitle{Q2}{3}
\gantttitle{Q3}{3}
 \gantttitle{Q1}{3}                      % title 3
    \gantttitle{Q2}{3}
\gantttitle{Q3}{3}\\
    % Setting group if any
 
    \ganttbar[progress=100,inline=false]{Background monitoring of the literature}{1}{4}\\
 \ganttbar[progress=100,inline=false]{Carry out and complete literature review on sessile droplet dynamics}{1}{4}\\
  


    \ganttbar[progress=100,inline=false]{Incorporation of moving contact line into WIBL model}{1}{9} \\

    \ganttbar[progress=100,inline=false]{{Modelling and validation of inertial sliding \\ droplet impacts on solid surfaces}}{2}{6} \\
  

  
    \ganttbar[progress=100,inline=false]{Derivation of higher order (3rd and 4th) WIBL models}{2}{6}\\ 
    \ganttbar[progress=100,inline=false]{Development of efficient time integration scheme test against problems of solitary waves on falling films}{2}{6} \\ 
\ganttbar[progress=100,inline=false]{Modelling and validation of droplet impacts on solid surfaces}{8}{10} \\ 
\ganttbar[progress=100,inline=false]{Development of efficient time-integration scheme}{8}{10} \\ 
\ganttbar[progress=100,inline=false]{Paper preperation and submission}{8}{10} \\ 
\ganttbar[progress=100,inline=false]{Modelling and validation of intertial sliding droplets on solid surfaces}{1}{4} \\ 
\ganttbar[progress=100,inline=false]{Paper preparation and submission}{1}{4} \\
\ganttbar[progress=100,inline=false]{Thesis writing and submission}{8}{10}\\
\ganttbar[progress=100,inline=false]{Oral exam}{1}{4}\\


  
\end{ganttchart}
    \caption{Gantt chart showing PhD activity time lines over four month intervals beyond the progression review.}


\end{figure}
\end{document}

1 Answer 1

0

Here are three different versions:

enter image description here

enter image description here

enter image description here

\documentclass{article}

\usepackage{pgfgantt}
\usepackage{graphicx}
\usepackage{pdflscape}



% Start the document

\usepackage{xcolor}
\usetikzlibrary{positioning}

\usepackage{enumitem}

\begin{document}

\begin{figure}

\begin{ganttchart}[
     y unit title=0.5cm,
     y unit chart=0.7cm,
     x unit=0.4cm,
     vgrid,hgrid,
     title height=1,
     title/.style={fill=none},
     title label font=\bfseries\footnotesize,
     bar/.style={fill=cyan},
     bar height=0.7,
     progress label text={},
     group right shift=0,
     group top shift=0.7,
     group height=.3,
     group peaks width={0.2},
     inline]{1}{29}

  \gantttitle{2020}{3}
  \gantttitle{2021}{9}        
  \gantttitle{2022}{9}                        
  \gantttitle{2023}{9} \\
              
  \gantttitle{Q4}{2}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}\\
 
  \ganttbar[progress=100,inline=false]{1)}{1}{4}   \\
  \ganttbar[progress=100,inline=false]{2)}{1}{4}   \\
  \ganttbar[progress=100,inline=false]{3)}{1}{9}   \\
  \ganttbar[progress=100,inline=false]{4)}{2}{6}   \\
  \ganttbar[progress=100,inline=false]{5)}{2}{6}   \\ 
  \ganttbar[progress=100,inline=false]{6)}{2}{6}   \\ 
  \ganttbar[progress=100,inline=false]{7)}{8}{10}  \\ 
  \ganttbar[progress=100,inline=false]{8)}{8}{10}  \\ 
  \ganttbar[progress=100,inline=false]{9)}{8}{10}  \\ 
  \ganttbar[progress=100,inline=false]{10)}{1}{4}  \\ 
  \ganttbar[progress=100,inline=false]{11)}{1}{4}  \\
  \ganttbar[progress=100,inline=false]{12)}{8}{10} \\
  \ganttbar[progress=100,inline=false]{13)}{1}{4}
 
\end{ganttchart}

\begin{enumerate}[nosep, label=\arabic*)]
  \item Background monitoring of the literature
  \item Carry out and complete literature review on sessile droplet dynamics
  \item Incorporation of moving contact line into WIBL model
  \item Modelling and validation of inertial sliding droplet impacts on solid surfaces
  \item Derivation of higher order (3rd and 4th) WIBL models
  \item Development of efficient time integration scheme test against problems of solitary waves on falling films
  \item Modelling and validation of droplet impacts on solid surfaces
  \item Development of efficient time-integration scheme
  \item Paper preperation and submission
  \item Modelling and validation of intertial sliding droplets on solid surfaces
  \item Paper preparation and submission
  \item Thesis writing and submission
  \item Oral exam
\end{enumerate}

\caption{Gantt chart showing PhD activity time lines over four month intervals beyond the progression review.}

\end{figure}



\begin{figure}

     \begin{ganttchart}[
     y unit title=0.5cm,
     y unit chart=1.25cm,
     x unit =0.25cm,
     vgrid,hgrid,
     title height=1,
     title/.style={fill=none},
     title label font=\bfseries\footnotesize,
     bar/.style={fill=cyan},
     bar height=0.7,
     progress label text={},
     group right shift=0,
     group top shift=0.7,
     group height=.3,
     group peaks width={0.2},
     inline, 
     bar label node/.style={text width=4.25cm,
                            align=right,
                            anchor=east,
                            font=\footnotesize\raggedleft}
    ]{1}{29}

  \gantttitle{2020}{3}
  \gantttitle{2021}{9}        
  \gantttitle{2022}{9}                        
  \gantttitle{2023}{9} \\
              
  \gantttitle{Q4}{2}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}\\
 
  \ganttbar[progress=100,inline=false]{Background monitoring of the literature}{1}{4}\\
  \ganttbar[progress=100,inline=false]{Carry out and complete literature review on sessile droplet dynamics}{1}{4}\\
  \ganttbar[progress=100,inline=false]{Incorporation of moving contact line into WIBL model}{1}{9} \\
  \ganttbar[progress=100,inline=false]{{Modelling and validation of inertial sliding \\ droplet impacts on solid surfaces}}{2}{6} \\
  \ganttbar[progress=100,inline=false]{Derivation of higher order (3rd and 4th) WIBL models}{2}{6}\\ 
  \ganttbar[progress=100,inline=false]{Development of efficient time integration scheme test against problems of solitary waves on falling films}{2}{6} \\ 
  \ganttbar[progress=100,inline=false]{Modelling and validation of droplet impacts on solid surfaces}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Development of efficient time-integration scheme}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Paper preperation and submission}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Modelling and validation of intertial sliding droplets on solid surfaces}{1}{4} \\ 
  \ganttbar[progress=100,inline=false]{Paper preparation and submission}{1}{4} \\
  \ganttbar[progress=100,inline=false]{Thesis writing and submission}{8}{10}\\
  \ganttbar[progress=100,inline=false]{Oral exam}{1}{4}

\end{ganttchart}
    \caption{Gantt chart showing PhD activity time lines over four month intervals beyond the progression review.}

\end{figure}


\begin{landscape}

\begin{figure}

     \begin{ganttchart}[
     y unit title=0.5cm,
     y unit chart=0.8cm,
     x unit =0.4cm,
     vgrid,hgrid,
     title height=1,
     title/.style={fill=none},
     title label font=\bfseries\footnotesize,
     bar/.style={fill=cyan},
     bar height=0.7,
     progress label text={},
     group right shift=0,
     group top shift=0.7,
     group height=.3,
     group peaks width={0.2},
     inline, 
     bar label node/.style={text width=7cm,
                            align=right,
                            anchor=east,
                            font=\footnotesize\raggedleft}
    ]{1}{29}

  \gantttitle{2020}{3}
  \gantttitle{2021}{9}        
  \gantttitle{2022}{9}                        
  \gantttitle{2023}{9} \\
              
  \gantttitle{Q4}{2}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}
  \gantttitle{Q1}{3}
  \gantttitle{Q2}{3}
  \gantttitle{Q3}{3}\\
 
  \ganttbar[progress=100,inline=false]{Background monitoring of the literature}{1}{4}\\
  \ganttbar[progress=100,inline=false]{Carry out and complete literature review on sessile droplet dynamics}{1}{4}\\
  \ganttbar[progress=100,inline=false]{Incorporation of moving contact line into WIBL model}{1}{9} \\
  \ganttbar[progress=100,inline=false]{{Modelling and validation of inertial sliding \\ droplet impacts on solid surfaces}}{2}{6} \\
  \ganttbar[progress=100,inline=false]{Derivation of higher order (3rd and 4th) WIBL models}{2}{6}\\ 
  \ganttbar[progress=100,inline=false]{Development of efficient time integration scheme test against problems of solitary waves on falling films}{2}{6} \\ 
  \ganttbar[progress=100,inline=false]{Modelling and validation of droplet impacts on solid surfaces}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Development of efficient time-integration scheme}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Paper preperation and submission}{8}{10} \\ 
  \ganttbar[progress=100,inline=false]{Modelling and validation of intertial sliding droplets on solid surfaces}{1}{4} \\ 
  \ganttbar[progress=100,inline=false]{Paper preparation and submission}{1}{4} \\
  \ganttbar[progress=100,inline=false]{Thesis writing and submission}{8}{10}\\
  \ganttbar[progress=100,inline=false]{Oral exam}{1}{4}
  
\end{ganttchart}
    \caption{Gantt chart showing PhD activity time lines over four month intervals beyond the progression review.}

\end{figure}

\end{landscape}


\end{document}
4
  • hi thanks unforutnuately 2nd and 3rd produced the following, and I'm not after the first one. thanks see attachemtns in reply below sorry, added to the original question even Nov 12, 2020 at 21:01
  • Did you use the exact same code from my answer to produce the output you show in your recently edited question? Aparently, you used different values for text widthand x/y unit. Is that corrent?
    – leandriis
    Nov 12, 2020 at 21:10
  • no i copied and pasted the code, i am using verbtex, don't know if that makes a difference? Nov 12, 2020 at 21:25
  • its work sorry ! i had to remove the landscape stuff before but re-added it adn it's worked. thanks alot !! Nov 12, 2020 at 21:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .