TeX - LaTeX Asked on August 18, 2021
In pgfgantt
, connecting multiple simultaneously-starting bars by start-to-start produces a vertical arrow. Does pgfgantt
support a three-segment arrow, i.e. left, down, right? (finish-to-start seems to go five-segment in other tools, too).
Just scrolling a bit in the manual, doesn't look like it's supported out of the box (unless I missed something). But you can define any type of link yourself with newganttlinktype
. Example below, more info in section 2.9 Links of the pgfgantt
manual.
documentclass{article}
usepackage{pgfgantt}
newganttlinktype{S-S}{
ganttsetstartanchor{west}
ganttsetendanchor{west}
draw [/pgfgantt/link] (xLeft,yUpper) -- ++(-ganttvalueof{link bulge},0) |- (xRight, yLower);
}
begin{document}
begin{ganttchart}{1}{12}
gantttitle{2011}{12}
gantttitlelist{1,...,12}{1}
ganttbar{Task 1}{3}{6}
ganttbar{Task 2}{3}{7}
ganttbar{Task 1b}{5}{6}
ganttbar{Task 2b}{6}{7}
ganttlink[link type=S-S]{elem0}{elem1}
ganttlink[link type=S-S, link bulge=1cm, link/.append style={red, dashed}]{elem2}{elem3}
end{ganttchart}
end{document}
Correct answer by Torbjørn T. on August 18, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP