is there a way to break the label of a \gantgroup
?
It works for \gantbar
, but it seems not in \ganttgroup
. Any suggestion?
IT WORKS:
\begin{ganttchart}[
hgrid,
vgrid,
newline shortcut=true,
bar label node/.append style=%
{align=left}
]{1}{6}
\gantttitle{Title}{6} \\
\ganttgroup{Group 1 test}{1}{4}\\
\ganttbar{%
This is a\ganttalignnewline
multi-line text.%
}{1}{3}
\end{ganttchart}
IT DOESN'T:
\begin{ganttchart}[
hgrid,
vgrid,
newline shortcut=true,
bar label node/.append style=%
{align=left}
]{1}{6}
\gantttitle{Title}{6} \\
\ganttgroup{Group 1\ganttalignnewline test}{1}{4}\\
\ganttbar{%
This is a\ganttalignnewline
multi-line text.%
}{1}{3}
\end{ganttchart}
Best Answer
I can confirm that
\ganttgroup
cannot split strings, although I, just like the author of the original post, tried:\ganttalignnewline
like this:\newline
or\\
UPDATE:
A temporal solution is this:
where you can adjust
0.03\textwidth
at your taste. Ugly hack, but it works.UPDATE 2: From the email of the author of ganttchart (Wolfgang):
the trick is to enable line breaking in the group label, e.g. by specifying group label
node/.append style={align=right}
as optional argument to \ganttgroup. Consider the following example: