我正在尝试创建欧盟所谓的“甘特图”,用于研究提案。为此,我需要在同一行中放置多个元素,其标签内联,同时在左侧放置一个标签。例如
Label: | |bar 1| |bar 2| |bar 3||
我如何使用 pgfgantt 实现它?
答案1
这是一个可能的解决方案
\documentclass[ ]{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[ inline ]{ 1 }{ 25 }
\ganttgroup[inline=false,group/.style={draw=none, fill=none}] { group 1}{ 2,0 }{ 25,0 }
\ganttbar { Task 1}{ 2,0 }{ 6,0 }
\ganttbar { Task 2}{ 8,0 }{ 10,0 }
\ganttbar { Task 3}{ 13,0 }{ 25,0 }\\
\ganttgroup[inline=false,group/.style={draw=none, fill=none}] { group 2}{ 2,0 }{ 25,0 }
\ganttbar { Task 1}{ 2,0 }{ 8,0 }
\ganttbar { Task 2}{ 10,0 }{ 15,0 }
\ganttbar { Task 3}{ 18,0 }{ 25,0 }
\end{ganttchart}
\end{document}