Based on a previous approach from Gonzalo Medina, I want to modify a simple gantt-chart to add the responsibilities of project workers to the belonging \ganttbar.
Screenshot of the current state:
The challenge
Depending on the length of the inserted text, the bar can look very ugly (e.g. in case of "Sandra, Michael, Thomas"). Now my idea is to provide additional positioning options to specify the position of those "extra labels" above or below their belonging bar.
Due to the available progress-option of regular bars, it would be very nice to combine all options together in one command. The dream result could look like that:
\textganttbar[progress=00, name=test1]{Text in outside label}{Text in bar}{3}{8}
How could I get such a behaviour?
A different option from Qrrbrbirlbel unfortunately doesn't provide the necessary indepencence from the progress-label.
Minimum Working Example (MWE):
\documentclass{standalone}
\usepackage{pgfgantt}
\newcommand\textganttbar[4]{%
\ganttbar{#1}{#3}{#4}
\ganttbar[inline,bar label font=\footnotesize]
{#2}{#3}{#4}
}
\begin{document}
\begin{ganttchart}{1}{12}
\gantttitle{2011}{12} \\
\gantttitlelist{1,...,12}{1} \\
\textganttbar{Task 1}{Lisa, Harry}{1}{5} \\
\textganttbar{Task 2}{Jenny, George}{2}{6} \\
\textganttbar{Task 3}{Lindy, Rob}{8}{12}\\
\textganttbar{Task 4}{Sandra, Michael, Thomas}{7}{10}\\
\ganttbar[progress=40]{Task 4}{3}{8}\\
% Dream solution:
% \textganttbar[progress=00, name=element1]{Task 4}{Worker names}{3}{8}
\end{ganttchart}
\end{document}


yshiftit is easily possible to adjust the names to the bar - nice! – Dave Nov 27 '17 at 02:17