我創建了一個甘特圖,我想添加一些空間(如紅色箭頭處的空間),以便邊界之外沒有圖表箭頭?
到底有沒有辦法做到這一點?
謝謝
\begin{ganttchart}[
vgrid
]{1}{16}
\gantttitle{Weeks}{16} \\
\gantttitlecalendar{day} \\[grid]
\ganttgroup{Phase 1}{1}{5} \\
\ganttbar{System Analysis}{1}{3} \\
\ganttlinkedbar{System Design}{4}{5} \ganttnewline
\ganttmilestone{System Architecture}{5} \ganttnewline
\ganttgroup{Phase 3}{6}{13} \\
\ganttlinkedbar{System Implementation}{6}{8} \ganttnewline
\ganttlinkedbar{Benchmarks Implementation}{9}{12} \ganttnewline
\ganttmilestone{System and Benchmarks code}{12} \ganttnewline
\ganttgroup{Phase 4}{13}{13} \\
\ganttlinkedbar{System Evaluation}{13}{13} \ganttnewline
\ganttmilestone{Evaluation Results}{13} \ganttnewline
\ganttgroup{Phase 4}{14}{16} \\
\ganttbar{Documentation}{14}{16}\ganttnewline
\ganttmilestone{Milestone}{16}
\ganttlink{elem1}{elem2}
\ganttlink{elem2}{elem3}
\ganttlink{elem3}{elem4}
\ganttlink{elem4}{elem5}
\ganttlink{elem5}{elem6}
\ganttlink{elem6}{elem7}
\ganttlink{elem7}{elem8}
\ganttlink{elem8}{elem9}
\ganttlink{elem9}{elem10}
\ganttlink{elem10}{elem11}
\ganttlink{elem11}{elem12}
\ganttlink{elem12}{elem13}
\end{ganttchart}
答案1
使圖表從 變為{0}
並{17}
相應地調整標題和日曆標題。為此,\calendartitle
您需要使用帶有星號的版本,它允許您指定範圍並添加偏移選項。
\documentclass{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
vgrid
]{0}{17}
\gantttitle{Weeks}{18} \\
\gantttitlecalendar*[title left shift=1,title right shift=1]{1}{16}{day}
\\[grid]
\ganttgroup{Phase 1}{1}{5} \\
\ganttbar{System Analysis}{1}{3} \\
\ganttlinkedbar{System Design}{4}{5} \ganttnewline
\ganttmilestone{System Architecture}{5} \ganttnewline
\ganttgroup{Phase 3}{6}{13} \\
\ganttlinkedbar{System Implementation}{6}{8} \ganttnewline
\ganttlinkedbar{Benchmarks Implementation}{9}{12} \ganttnewline
\ganttmilestone{System and Benchmarks code}{12} \ganttnewline
\ganttgroup{Phase 4}{13}{13} \\
\ganttlinkedbar{System Evaluation}{13}{13} \ganttnewline
\ganttmilestone{Evaluation Results}{13} \ganttnewline
\ganttgroup{Phase 4}{14}{16} \\
\ganttbar{Documentation}{14}{16}\ganttnewline
\ganttmilestone{Milestone}{16}
\ganttlink{elem1}{elem2}
\ganttlink{elem2}{elem3}
\ganttlink{elem3}{elem4}
\ganttlink{elem4}{elem5}
\ganttlink{elem5}{elem6}
\ganttlink{elem6}{elem7}
\ganttlink{elem7}{elem8}
\ganttlink{elem8}{elem9}
\ganttlink{elem9}{elem10}
\ganttlink{elem10}{elem11}
\ganttlink{elem11}{elem12}
\ganttlink{elem12}{elem13}
\end{ganttchart}
\end{document}