pgfgantt 图中额外的列

pgfgantt 图中额外的列

我已经使用 pdfgantt 创建了一个基本的甘特图(几乎复制了其中一个示例)但想对其进行一些(额外)修改。

我确实需要能够对我的组和条进行编号,并且希望在标签左侧有一个带有此编号的额外列(即在下面的例子中,第 1 部分的编号为 1,第 1 部分的任务 1 的编号为 1.1 等等)。

下面我有一个例子,我想添加这个功能。

在此先感谢您的帮助!!

\begin{figure}[h]
 \begin{center}
 \begin{ganttchart}[
  x unit=2.0cm, y unit title=0.4cm, y unit chart=0.6cm, vgrid,
  title/.append style={draw=none, fill=RoyalBlue!50!black}, title left shift=0.01, title right shift=-0.01,
  title label font=\sffamily\bfseries\color{white},
  title label node/.append style={below=-1.6ex},title height=1,
  bar/.append style={draw=none, fill=OliveGreen!75},
  bar height=.3, bar label font=\normalsize\color{black!90}, bar label text={#1\hspace*{0.1cm}},
  group right shift=0.05, group top shift=.6, group height=.1, group peaks height=.2, group peaks width=0.1, group left shift=-0.05,
  group label node/.append style={align=right}, group label text={#1\hspace{0.2cm}},
  milestone left shift=0.94, milestone right shift=0.06, milestone height=0.4, milestone label text={#1\hspace*{0.1cm}},
  bar incomplete/.append style={fill=Maroon}]{1}{8}
  % Titles
  \gantttitle{2013}{3}\gantttitle{2014}{5} \\
  \gantttitle{Q4}{3}\gantttitle{Q1}{3}\gantttitle{Q2}{2}\\
  \gantttitle{10}{1}\gantttitle{11}{1}\gantttitle{12}{1}\gantttitle{1}{1}\gantttitle{2}{1}\gantttitle{3}{1}\gantttitle{4}{1}\gantttitle{5}{1} \\
  \ganttset{progress label text={}, link/.style={black, -to}}
  % Part 1
  \ganttgroup{Part 1}{1}{4} \\
  \ganttbar[progress=25, name=T1A]{Task 1}{1}{3} \\
  \ganttbar[progress=25, name=T2A]{Task 2}{2}{2} \\
  \ganttbar[progress=25, name=T3A]{Task 3}{3}{3} \\
  \ganttbar[progress=25, name=T4A]{Task 4}{3}{3} \\
  \ganttbar[progress=25, name=T5A]{Task 5}{3}{3} \\
  \ganttbar[progress=25, name=T6A]{Task 6}{3}{4} \\
  % Part 2
  \ganttgroup{Part 2}{4}{8} \\
  \ganttbar[progress=25, name=T1B]{Task 1}{4}{6} \\
  \ganttbar[progress=25, name=T2B]{Task 2}{4}{8} \\
  \ganttbar[progress=25, name=T3B]{Task 3}{6}{8} \\
  % Overviews
  \ganttgroup{Overview}{1}{8} \\
  \ganttmilestone{Milestone 0}{0} \\
  \ganttmilestone{Milestone 1}{2} \\
  \ganttmilestone{Milestone 2}{3} \\
  \ganttmilestone{Milestone 3}{8} \\
  \ganttset{link/.style={OliveGreen}}
 \end{ganttchart}
 \end{center}
\end{figure}

相关内容