Align the title of a pgfgantt on the left

pgfgantt

I would like align the titles of my gantt-chart on the left.

For the moment I have something like this:
enter image description here

but I would like the numbers (0, 0.2, 0.4, etc.) to be place on the left, not in the middle.

Does someone know how to do it? Or is there a better way to do it than using pgfgantt?

My code lookes like that:

\begin{ganttchart}[ 
expand chart=\textwidth,
]{1}{20} 
[vgrid={draw=none, dotted}]{1}{20}
\gantttitle{0} {2} 
\gantttitle{0.2}{2}
\gantttitle{0.4}{2}
\gantttitle{0.6}{2}
\gantttitle{0.8}{2}
\gantttitle{1.0}{2}
\gantttitle{1.2}{2}
\gantttitle{1.4}{2}
\gantttitle{1.6}{2}
\gantttitle{1.8}{2} \\

\ganttbar{Process 1}{4}{7} \\ 
\ganttbar{Process 2}{3}{6} \\ 
\end{ganttchart}

Thanks in advance!

Best Answer

With 0 transformed into 0.0 as I am assuming that you want the same distance from the left.

\documentclass{article}
\usepackage{pgfgantt}


\begin{document}

\begin{ganttchart}[ 
title label node/.append style={anchor=east,xshift=1mm},
expand chart=\textwidth,
]{1}{20} 
[vgrid={draw=none, dotted}]{1}{20}
%\gantttitle{0} {2} 
\gantttitle{0.0} {2} 
\gantttitle{0.2}{2}
\gantttitle{0.4}{2}
\gantttitle{0.6}{2}
\gantttitle{0.8}{2}
\gantttitle{1.0}{2}
\gantttitle{1.2}{2}
\gantttitle{1.4}{2}
\gantttitle{1.6}{2}
\gantttitle{1.8}{2} \\

\ganttbar{Process 1}{4}{7} \\ 
\ganttbar{Process 2}{3}{6} \\ 
\end{ganttchart}

\end{document}

enter image description here

Related Question