1

I have created the following Gantt-chart:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage{pgfgantt}

\title{Sample title}
\author{Anonymous}
\institute{Overleaf}
\date{2019}

\begin{document}

    \begin{frame}{Gant-Chart}
        \begin{ganttchart}[vgrid, hgrid, 
                           bar/.append style={fill=blue!80},
                           milestone/.append style={fill=green},
                           bar label node/.append style={align=left}]{1}{26}
            \gantttitle{2019}{26} \\
            \gantttitle{February}{4}
            \gantttitle{March}{4}
            \gantttitle{April}{4}
            \gantttitle{May}{5}
            \gantttitle{June}{4}
            \gantttitle{July}{5} \\
            \gantttitlelist{1,...,26}{1} \\
            \ganttbar{Start of Project}{2}{2}  \\
            \ganttbar{Task 1}{3}{3} \\
            \ganttbar{Task 2}{4}{4} \\
            \ganttmilestone{Milestone}{7} \ganttnewline
            \ganttbar{Continuous Task}{1}{24}
        \end{ganttchart}
    \end{frame}

\end{document}

I have three issues with it:

  1. Although I have added the line bar label node/.append style={align=left} the labels are not left-aligned.
  2. The chart does not fit on my Beamer-frame. Is there a way to fix this?
  3. This would be a nice add-on but is no must-have: Is there a way to let the third row represent calendar weeks ? Because these would actually overlap with the months, i.e. month can end in the middle of a week.
Luk
  • 509
  • 1
    As for 1, the texts are left aligned but within their text width. If you use bar label node/.append style={align=left, text width={width("Continuous Task")} }, they will be aligned more visibly. Yes, you can make the gantt chart to be as wides as the path, you could use expand chart=\textwidth for that. This reveals that your chart is too wide. –  Feb 18 '19 at 03:37
  • What is the difference to https://tex.stackexchange.com/questions/474990/how-to-create-a-gant-chart-in-latex-beamer? – Johannes_B Feb 18 '19 at 06:23
  • @user503842 Atop @marmot's suggestion, I have added an answer to your past question which is closely related to #2-#3. – Raaja_is_at_topanswers.xyz Feb 18 '19 at 08:25

0 Answers0