Can I create a single ganttbar of a different height

barpgfgantt

In a ganttchart environment I can set height of all bars with:

\begin{ganttchart}[
        bar height=0.7,
        ]{1}{3}
\end{ganttchart}

Can I do something similar for a single ganttbar ?

What I am trying to do is something like:

\ganttbar[bar/.append style={height=20},inline]{My label}{1}{2}

Best Answer

(This is not a great answer.)

Add bar height directly do the options of the ganttbar, not inside the bar style, then it does affect the bar height. However, the size of the canvas (the outer frame of the diagram) is not affected. I'd guess pgfgantt assumes all bars have the same default height, and sets the size of that frame according to the number of bars.

You can scale and shift the frame as seen in the example below, but the values used will depend on the specifics of the diagram.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
        bar height=0.7,
        canvas/.append style={yscale=1.8, yshift=-0.5cm}
        ]{1}{3}
\ganttbar[inline]{Foo}{1}{2} \\
\ganttbar[bar height=2,inline]{Bar}{2}{3} 
\end{ganttchart}
\end{document}