[Tex/LaTex] How to move an inline labels up in pgfgantt

pgfgantt

Let's look at one of the example Gantt charts from the documentation:

\documentclass{standalone}
\usepackage{pgfgantt}

\begin{document}
\begin{ganttchart}[vgrid, hgrid, inline]{12}
\gantttitle{Title}{12} \\
\ganttbar{Task 1}{1}{3}
\ganttbar[bar label inline anchor/.style=above]{Task 2}{5}{10} \\
\ganttbar[bar label shape anchor=left,%
bar label inline anchor/.style=right]{Task 3}{2}{7}
\ganttbar[inline=false]{Final task}{11}{12}
\end{ganttchart}
\end{document}

Which looks like this:
enter image description here

How can I move the label of Task 2 a bit up?

Best Answer

Based on the commands listed in the manual -- pgfgantt Package Wolfgang Skala, v4.0, 2013/06/01, on page 25. There are two commands for label locations.

bar inline label anchor =<anchor>      --- east, west, north, south
bar inline label node/.style=<options> --- above, below, right, left, or = xxpt

x bar label shape anchor=left, -- this causes error in this latest version.

enter image description here

Code

\documentclass[border=10pt]{standalone}

\usepackage{pgfgantt}
%\usetikzlibrary{positioning}
\begin{document}
\begin{ganttchart}[vgrid, hgrid, inline,]{1}{12}
\gantttitle{2014}{12} \\
\ganttbar{Task 1}{1}{3}
\ganttbar[bar inline label node/.style={above=3pt}, %< -- adjust the 3pt 
]{Task 2}{5}{10} \\
\ganttbar[
bar inline label node/.style={left}]{Task 3}{2}{7}
\ganttbar[inline=false]{Final task}{11}{12}
\end{ganttchart}
\end{document}