[Tex/LaTex] Increase size and font size of a Gantt-chart in LaTeX-Beamer

beamergantt

I have created a Gantt-chart in a beamer presentation (with the help of this forum btw). But I want to make it a little bigger – it seems it could be a little bigger and still fit on the slight, however, I have already set its width to \textwidth. Also, I want to increase the fontsize a little bit. Is this possible?

\documentclass{beamer}
\usetheme{Metropolis}
\usepackage{pgfgantt}
\usepackage{adjustbox}

\begin{document}
    \begin{frame}{Gantt-Chart}
    \begin{adjustbox}{max totalsize={\textwidth}{.7\textheight},center}
        \begin{ganttchart}[
            hgrid,
            vgrid={*{6}{draw=none},{dotted}},
            vrule/.style={very thick, red},
            x unit=0.125cm,
            time slot format=isodate,
            time slot unit=day,
            calendar week text = {W\currentweek{}},
            bar height = 0.6, %necessary to make it fit the height
            bar top shift = 0.2, %to move it inside the grid space ;)
            bar label node/.append style={align=left,text width={width("This is my longest task")}},
            bar incomplete/.append style={fill=cyan},
            progress label text = \relax
            ]{2019-02-11}{2019-07-21}
            \gantttitlecalendar{year, month=name, week} \\
            \ganttbar[bar/.append style={fill=cyan}]{Task1}{2019-02-11}{2019-02-17}\\
            \ganttbar[bar/.append style={fill=cyan}]{Task2}{2019-03-14}{2019-03-14}\\
            \ganttbar[bar/.append style={fill=blue}]{Task3}{2019-04-01}{2019-04-14}\\
            \ganttbar[bar/.append style={fill=cyan}]{Task4}{2019-04-15}{2019-04-15}\\
            \ganttbar[bar/.append style={fill=blue}]{Task5}{2019-04-15}{2019-04-21}\\
            \ganttbar[bar/.append style={fill=blue}, progress = 20]{Task6}{2019-04-22}{2019-05-26}\\
            \ganttbar[bar/.append style={fill=blue}]{Task7}{2019-05-27}{2019-06-09}\\
            \ganttbar[bar/.append style={fill=blue}]{Task8}{2019-06-10}{2019-06-30}\\
            \ganttbar[bar/.append style={fill=blue}]{Task9}{2019-04-01}{2019-07-15}
            \ganttvrule{2019-07-15}{2019-07-15}
        \end{ganttchart}
    \end{adjustbox}
\end{frame}

Best Answer

Your are scaling down your diagram to fill the whole available textwidth, there is no room to make it larger unless you either make the margins smaller or safe space within the diagram, for example by adjusting the position of the bar labels:

\documentclass{beamer}
\usetheme{metropolis}
\usepackage{pgfgantt}
\usepackage{adjustbox}

\begin{document}
    \begin{frame}{Gantt-Chart}
    \begin{adjustbox}{max totalsize={\textwidth}{.8\textheight},center}
        \begin{ganttchart}[
            hgrid,
            vgrid={*{6}{draw=none},{dotted}},
            vrule/.style={very thick, red},
            x unit=0.125cm,
            time slot format=isodate,
            time slot unit=day,
            calendar week text = {W\currentweek{}},
            bar height = 0.6, %necessary to make it fit the height
            bar top shift = 0.2, %to move it inside the grid space ;)
            bar label node/.append style={align=left,text width={width("Task1 ")}},
            bar incomplete/.append style={fill=cyan},
            progress label text = \relax
            ]{2019-02-11}{2019-07-21}
            \gantttitlecalendar{year, month=name, week} \\
            \ganttbar[bar/.append style={fill=cyan}]{Task1}{2019-02-11}{2019-02-17}\\
            \ganttbar[bar/.append style={fill=cyan}]{Task2}{2019-03-14}{2019-03-14}\\
            \ganttbar[bar/.append style={fill=blue}]{Task3}{2019-04-01}{2019-04-14}\\
            \ganttbar[bar/.append style={fill=cyan}]{Task4}{2019-04-15}{2019-04-15}\\
            \ganttbar[bar/.append style={fill=blue}]{Task5}{2019-04-15}{2019-04-21}\\
            \ganttbar[bar/.append style={fill=blue}, progress = 20]{Task6}{2019-04-22}{2019-05-26}\\
            \ganttbar[bar/.append style={fill=blue}]{Task7}{2019-05-27}{2019-06-09}\\
            \ganttbar[bar/.append style={fill=blue}]{Task8}{2019-06-10}{2019-06-30}\\
            \ganttbar[bar/.append style={fill=blue}]{Task9}{2019-04-01}{2019-07-15}
            \ganttvrule{2019-07-15}{2019-07-15}
        \end{ganttchart}
    \end{adjustbox}
\end{frame}
\end{document}

enter image description here

Related Question