我正在使用 pgfgantt 包创建甘特图,但一些链接与甘特图的标题重叠。我该如何添加一些缩进以避免这种重叠?
\begin{ganttchart}[hgrid, vgrid, x unit=0.8cm, y unit chart=0.7cm, title/.style={fill=blue!50, draw=none},
title label font=\color{white}\bfseries]{1}{10}
\gantttitle{Cronograma de actividades semanales}{10} \\
\gantttitlelist{1,...,10}{1} \\
\ganttgroup{Objetivo 1}{1}{1} \\
\ganttbar{Actividad 1}{1}{1} \\
\ganttlinkedbar{Actividad 2}{1}{1}\\
\ganttlinkedbar{Actividad 3}{1}{1}\\
\ganttlinkedbar{Actividad 4}{1}{1}
\ganttnewline[thick, blue]
\end{ganttchart}
答案1
我以为箭头表示任务之间的依赖关系。但箭头向后指向时间似乎有点奇怪。
无论如何,我能想到两种防止标签重叠的方法:
选项 1:让任务在时间上连续
\begin{ganttchart}[
hgrid, vgrid, x unit=0.8cm, y unit chart=0.7cm,
title/.style={fill=blue!50, draw=none},
title label font=\color{white}\bfseries
]{1}{10}
\gantttitle{Cronograma de actividades semanales}{10} \\
\gantttitlelist{1,...,10}{1} \\
\ganttgroup{Objetivo 1}{1}{3} \\
\ganttbar{Actividad 1}{1}{1} \\
\ganttlinkedbar{Actividad 3}{2}{2}\\
\ganttlinkedbar{Actividad 4}{3}{3}
\ganttnewline[thick, blue]
\end{ganttchart}
选项 2:偏移标签
\begin{ganttchart}[
hgrid, vgrid, x unit=0.8cm, y unit chart=0.7cm,
title/.style={fill=blue!50, draw=none},
title label font=\color{white}\bfseries,
group label node/.append style={left=5mm},
bar label node/.append style={left=5mm},
]{1}{10}
\gantttitle{Cronograma de actividades semanales}{10} \\
\gantttitlelist{1,...,10}{1} \\
\ganttgroup{Objetivo 1}{1}{1} \\
\ganttbar{Actividad 1}{1}{1} \\
\ganttlinkedbar{Actividad 3}{1}{1}\\
\ganttlinkedbar{Actividad 4}{1}{1}
\ganttnewline[thick, blue]
\end{ganttchart}