1

I have created a Gantt chart using pgfgantt. Here's the complete code :

\documentclass{article}
%\usepackage[pdftex,active,tightpage]{preview}
%\setlength\PreviewBorder{2mm}
\usepackage[frenchb]{translator}
\usepackage[frenchb]{babel}
\usepackage{pgfgantt}
\usetikzlibrary{shadows}
\usepackage{lscape}
\definecolor{barblue}{RGB}{153,204,254}
\definecolor{groupblue}{RGB}{51,102,254}
\definecolor{linkred}{RGB}{165,0,33}
\sffamily

\setganttlinklabel{s-s}{Début \`a d\'ebut (DD)}
\setganttlinklabel{f-s}{Fin \`a d\'ebut (FD)}

\begin{document}
\begin{landscape}
\begin{tikzpicture} % optional
   \begin{ganttchart}[x unit=1.8mm, 
                      y unit chart=0.87cm, 
                      time slot format=isodate, 
                      %compress calendar,
                      vgrid=*{5}{dotted},
                      today=2014-04-27,
                      today label=aujourd'hui,
                      today label font=\scshape,
                      newline shortcut=true,
                      title/.append style={fill=blue!20, drop shadow},
                      title label font=\sffamily\bfseries\color{white},
                      title label node/.append style={below=-1.6ex},
                      title left shift=.05,
                      title right shift=-.05,
                      title height=1,
                      bar/.append style={draw=none, fill=black!63},
                      bar label node/.append style={align=center, font=\tiny},
                      bar incomplete/.append style={fill=barblue},
                      bar height=.4,
                      bar label font=\normalsize\color{black!50},
                      link/.style={-latex, draw=red, fill=red},
                      progress label text = {\pgfmathprintnumber[precision=0, verbatim]{#1}\% fait},
                     ]
                      {2014-04-14}{2014-07-11}
   \gantttitlecalendar{month=name} \\ 

    \ganttbar[progress=100]{Mise en place\ganttalignnewline de environnement\ganttalignnewline du travail}{2014-04-14}{2014-04-15} \\

    \ganttbar[progress=100]{Spécifications}{2014-04-15}{2014-04-17} \\

    \ganttbar[progress=70]{Comprendre et\ganttalignnewline analyser le\ganttalignnewline code existant}{2014-04-18}{2014-05-03} \\

    \ganttbar[progress=60]{Analyse des \ganttalignnewline besoins de la\ganttalignnewline plate-forme MEANS}{2014-04-18}{2014-05-07} \\

    \ganttbar[progress=30]{Conception des \ganttalignnewline services web}{2014-04-21}{2014-05-24} \\

    \ganttbar[progress=80]{Conception de \ganttalignnewline l'API Java}{2014-04-25}{2014-05-07} \\

    \ganttbar[progress=0]{Implémentation des\ganttalignnewline services web}{2014-05-26}{2014-06-15} \\

    \ganttbar[progress=0]{Tests des\ganttalignnewline services web}{2014-05-26}{2014-06-17} \\

    \ganttbar[progress=0]{Implémentation de\ganttalignnewline l'API Java}{2014-06-03}{2014-06-20}\\

    \ganttbar[progress=0]{Tests de\ganttalignnewline l'API Java}{2014-06-03}{2014-06-21} \\

    \ganttbar[progress=0]{Rédaction de\ganttalignnewline la documentation}{2014-06-22}{2014-06-25} \\

    %\ganttbar[]{Maintenance}{2014-06-26}{2014-07-11}

    \ganttlink[link type=f-s]{elem4}{elem6}
    \ganttlink[link type=f-s]{elem1}{elem2}
     \ganttlink[link type=s-s]{elem6}{elem7}
      \ganttlink[link type=s-s]{elem8}{elem9}


   \end{ganttchart}
\end{tikzpicture}
\end{landscape}

\end{document}

What I want now to draw vertical lines I can custimze (color, size ...etc.) like the one for today. For example I want to draw a red line on 2014-05-17 and put validation as label.

My question is like this, but in my case I use isodate as slot time format and I don't know how to add a label text. Someone has an idea on how to do it?

  • I think today is not easily replicable but, may be, package author can help you. You can find his email address in package documentation. – Ignasi Apr 30 '14 at 10:27
  • @GonzaloMedina Do you an idea how to do it? – Hunsu May 4 '14 at 20:48
  • Should the code you posted compile without problems? – MatoBehr May 8 '14 at 16:36
  • Yes, I have found a solution to it. Look at my question here tex.stackexchange.com/questions/175918/how-newif-command-works – Hunsu May 8 '14 at 16:39

Browse other questions tagged or ask your own question.