pgfgantt:使用今天的偏移量=.5时,进度是错误的,

pgfgantt:使用今天的偏移量=.5时,进度是错误的,

当我不使用时今日偏移=.5,我得到了这个:

在此处输入图片描述

因此灰色的进展是正确的。现在如果我添加今日偏移=.5,我得到了这个:

在此处输入图片描述

灰度级数不再是 50%。我该如何消除级数上的偏移?

提前致谢。

示例代码 (今日偏移=.5是选项中的第 8 条规则):

\documentclass[tikz,border=5mm]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage{pgfgantt}
\begin{document}

\definecolor{barblue}{RGB}{153,204,254}
\definecolor{groupblue}{RGB}{51,102,254}
\definecolor{linkred}{RGB}{165,0,33}
\renewcommand\sfdefault{phv}
\renewcommand\mddefault{mc}
\renewcommand\bfdefault{bc}
\sffamily
\begin{ganttchart}[
    x unit=0.4cm, 
    y unit title=1.2cm, 
    y unit chart=.6cm, 
    canvas/.append style={fill=none, draw=black!30, line width=.75pt},
    hgrid style/.style={draw=black!30, line width=.75pt},
    vgrid={*1{draw=black!30, line width=.75pt}},
    % Tell at which week we are right now & style of today line
    today=3,
    today offset=.5,
    today rule/.style={
      draw=black!64,
      dash pattern=on 3.5pt off 4.5pt,
      line width=1.5pt
    },
    today label font=\small\bfseries,
    today label=Current Week,
    % Title options
    title/.style={draw=none, fill=none},
    title label font=\bfseries\footnotesize,
    title label node/.append style={below=7pt},
    include title in canvas=false,
    % Style of ganttgroup's title
    bar label font=\mdseries\small\color{black!70},
    bar label node/.append style={left=0.40cm},
    % Style of bars
    bar/.append style={draw=none, fill=black!63},
    bar incomplete/.append style={fill=barblue},
    bar progress label font=\mdseries\footnotesize\color{black!70},
    % Syle of groups
    group incomplete/.append style={fill=groupblue},
    group left shift=0,
    group right shift=0,
    group height=.2,
    group peaks tip position=0,
    group label node/.append style={left=0.25cm},
    group progress label font=\bfseries\small,
    % Syle of milestones
    milestone progress label text=,
    milestone label font=\mdseries\small\color{red!60},
    milestone label node/.append style={left=0.40cm},
    milestone/.append style={anchor=east,xshift=-1pt},
    redMile/.style={milestone/.append style={fill=red}},    % Option red milestone
  ]{1}{18}
  % Gantt's title = Weeks
  \gantttitle[
    title label node/.append style={below left=7pt and -3pt}
  ]{WEEKS:\quad1}{1}
  \gantttitlelist{2,...,18}{1} \\   % Indication of week's number
  % === Organisation du projet
  \ganttgroup[]{Organisation du projet}{2}{18} \\
    \ganttbar[progress=50]{Ecrire le cahier des charges}{2}{3} \\
    \ganttmilestone[redMile]{Rendu du cahier des charges}{4} \\
    \ganttbar[progress=0]{Préparer la défense intermédiaire}{4}{4} \\
    \ganttmilestone[redMile]{Défense intermédiaire}{5} \\
    \ganttbar[progress=0]{Ecrire le rapport}{3}{17} \\
    \ganttmilestone[redMile]{Rendu du projet}{17} \\
    \ganttbar[progress=0]{Préparer la défense finale}{18}{18} \\
    \ganttmilestone[redMile]{Défense finale}{18} \\
\end{ganttchart}
\end{document}

相关内容