# How can I move a ganttbar label to the right of the bar?

I have a label for a ganttbar that is longer than the bar itself, and need to move it outside the bar to its right. Sketch of desired output:

----
|  |  My label here
----


I tried to use the (sparse!) suggestion given in the manual (p.25) and wrote something like:

\ganttbar[inline label node/.append style={right=5mm}]{0.1,0.2}{2}{2}


but the result is actually the opposite of what I need. I get something like:

              ----
My label here |  |
----


Moreover, no matter how I play with the parameter of the style option (e..g right, left, different mm values, etc), I always get the same result, with the label on the left. I am obviously missing something important about the syntax of the ganttbar options.

Here is a MWE showing the wrong behavior:

\documentclass[a4paper,10pt]{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart} {1}{10}
\ganttbar{Deliverable}{2}{2}
\ganttbar[inline label node/.append style={right=5mm}]{0.1,0.2}{2}{2}
\end{ganttchart}
\end{document}

• Hi, it is usually good practice to add a minimal working example (MWE) to your questions. In this case you could add the code for the gantt chart made of only one bar. – Pier Paolo Sep 7 '14 at 16:49
• @PierPaolo: you're right. Added – stefano Sep 7 '14 at 16:58
• Possible related: tex.stackexchange.com/a/199854/34618. You need bar inline label node/.append style. The bar is missing – Jesse Sep 7 '14 at 17:30

Thanks to @Jesse, the problem is solved! By comparing my MWE with the answer he linked to I found out what was wrong. In addition to the missing "bar" in the \ganttbar options, I was actually missing the "inline" option in the \ganttchart original declaration. Here is a corrected version of the MWE I originally gave:

\documentclass[a4paper,10pt]{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[inline]{1}{10}
\ganttbar[inline=false]{Deliverable}{2}{2}
\ganttbar[bar inline label node/.style={right=2mm}]{0.1,0.2}{2}{2}
\end{ganttchart}
\end{document}