4

I want to have weekdays in my gantt chart, using the pgfgantt package with the pgfcalendar package. However the fields for the weekdays are too small.

\documentclass{article}
\usepackage{pgfgantt}
\usepackage{pdflscape}
\usepackage{pgfcalendar}

\begin{document}
\begin{tikzpicture}[x=.5cm, y=1cm]
  \begin{ganttchart}{7}
    \gantttitle{Week 1}{7} \\
    \gantttitlelist[title list options={%
        var=\y, evaluate=\y as \x%
        using "\pgfcalendarweekdayshortname{\y}"%
        }]{0,...,6}{1} \\
\end{ganttchart}
\end{tikzpicture}
\end{document}

Output:

enter image description here

3

This seems to be caused by the value given for x in

\begin{tikzpicture}[x=.5cm, y=1cm]

Using x=0.7cm (or a larger value) fixes the problem.

  • As of now the solution does not work anymore. Any idea how to fix this? – Uwe Ziegenhagen Dec 18 '12 at 19:48
  • 1
    Try inserting [x unit = 0.8cm] immediately after \begin{ganttchart}. – Ian Thompson Dec 18 '12 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.