2

I want to remove the blank line between 'years' and 'months' in a pgfgantt chart.

What's the easiest way to do this?

This MWE shows the blank line that I want to remove:

\documentclass[tikz]{standalone}
\usepackage{pgfgantt}

\begin{document}

\begin{ganttchart}[
  time slot format=isodate-yearmonth,
  time slot unit=month
]{2019-01}{2020-09}
\gantttitlecalendar{year, month=letter} \\
  \ganttgroup[]{foo}{2019-07}{2020-03} \\  
  \ganttgroup[]{bar}{2020-01}{2020-07} \\
\end{ganttchart}

\end{document}
0

1 Answer 1

4

As explained in the manual, there is the key y unit title that controls the height of these elements, and title height, which determines the fraction to which they fill that "rule". If you set title height=1, there won't be an empty line, but the size may be too generous so you may want to reduce it a bit by saying y unit title=5mm.

\documentclass[tikz]{standalone}
\usepackage{pgfgantt}

\begin{document}

\begin{ganttchart}[title height=1,y unit title=5mm,
  time slot format=isodate-yearmonth,
  time slot unit=month
]{2019-01}{2020-09}
\gantttitlecalendar{year, month=letter} \\
  \ganttgroup[]{foo}{2019-07}{2020-03} \\  
  \ganttgroup[]{bar}{2020-01}{2020-07} \\
\end{ganttchart}

\end{document}

enter image description here

1

You must log in to answer this question.

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