甘特图包进度条

甘特图包进度条

我想知道是否可以通过部分填充完成百分比来提供每个任务栏的进度。

下面的图片阐明了我心中的想法。非常感谢大家的帮助。

问候。

\documentclass[border=12pt]{standalone}
\usepackage{gantt}
\usepackage{xpatch}
\xpatchcmd{\gantt}{-0.5}{-1.5}{}{}

\newcommand{\defcolor}{blue}

\begin{document}

    \begin{gantt}[drawledgerline=true]{18}{24}
        % vertical, horizontal 'boxes'
    \begin{ganttitle}  % First title: Year 
        \numtitle{2019}{1}{2019}{24}  
        % start, label, width 
    \end{ganttitle}

    \begin{ganttitle} % Second title: Months
        \titleelement{Feb}{4}
        \titleelement{Mar}{4}
        \titleelement{Apr}{4}
        \titleelement{May}{4}
        \titleelement{Jun}{4}
        \titleelement{Jul}{4}
    \end{ganttitle}

    \begin{ganttitle} % Third title: Weeks
        \numtitle{6}{1}{29}{1}
        % start, skip, end, width       
    \end{ganttitle}

    %---------------------------------------
     \ganttmilestone{Task A}{0} % Milestone: Label, position
    %---------------------------------------


    %--------------------------------------- 
    %   Task B
    %---------------------------------------
    \ganttgroup{Task B}{0}{6} % start, width 
    %
    \ganttbar[color=\defcolor]{Task B}{0}{1}
    \ganttbarcon[color=\defcolor]{Task B}{1}{1}
    \ganttbarcon[color=\defcolor]{Task B}{1}{4}
    \ganttbarcon[color=\defcolor]{Task B}{3}{3}
    %
    \ganttmilestonecon{Task B}{6}
    %---------------------------------------


    %--------------------------------------- 
    %   Task C
    %---------------------------------------
    \ganttgroup{Task C}{6}{15} % start, width 
    %
    \ganttbar[color=\defcolor]{Task C}{6}{2}
    \ganttbarcon[color=\defcolor]{Task C}{8}{8}
    \ganttbarcon[color=\defcolor]{Task C}{15}{3}
    \ganttbarcon[color=\defcolor]{Task C}{16}{4}
    %
    \ganttmilestonecon{Task C}{20}
    %
    \ganttbarcon[color=\defcolor]{Task C}{20}{1}
    %
    \ganttmilestonecon{Task C}{21}
    %---------------------------------------
    \end{gantt}

\end{document}

在此处输入图片描述

相关内容