我正在寻找可以ganttbar
为每个 WP 制作双倍的东西,这样我就可以把预计时间和每个任务实际花费的时间都放进去。
您可能理解,蓝色表示预计时间,橙色表示实际花费时间,所以我会显示任何类型的延迟。
我已经尝试制作第二个条形图,但是它将其画得有点太低了,正如您所看到的,我尝试使用它将top bar shit
其放得有点高,但我无法真正管理标签的移动。
我知道应该有类似的东西yshift=<factor>
但我无法让它工作。
抱歉,大家,我完全忘记分享我的代码了……
``
\documentclass[a4paper,14pt,twoside, openany]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[a4paper, total={17cm, 25cm}]{geometry}
\usepackage[document]{ragged2e} %
\usepackage{hyperref}
\usepackage{pgf}
\usepackage{pgfgantt} %per il gannt
\usepackage{tikz}
\usepackage{graphicx}
\graphicspath{{./images/}}
%%%%%%
%% Some more packages
%%%%%%
% Gantt, per avere solo il numero delle settimane
\newcounter{myWeekNum}
\stepcounter{myWeekNum}
%
\newcommand{\myWeek}{\themyWeekNum
\stepcounter{myWeekNum}
\ifnum\themyWeekNum=53
\setcounter{myWeekNum}{1}
\else\fi
}
\begin{document}
\begin{figure}[h!]
\centering
\begin{tikzpicture}
%% impostazioni
\setcounter{myWeekNum}{39}
\ganttset{%
calendar week text={\myWeek{}}%
}
\begin{ganttchart}[
y unit chart=7mm,
x unit = 1.1mm,
% hgrid,
vgrid={*{6}{draw=none}, dotted}, % barre ogni 6 giorni
expand chart=\textwidth,
time slot format=isodate,
time slot unit=month,
link mid=.45,
link bulge=2.3,
link tolerance=2,
]{2019-09-16}{2020-01-14}
% \gantttitle{Progetto Corso}{18} \\
\gantttitlecalendar{year, month=shortname, week=39} \\
\ganttnewline [thick, black]
%%Pianificazione
\ganttgroup{Pianificazione}{2019-09-16}{2019-09-19} \\
\ganttbar[name= Pian, bar height=.4,bar label node/.append yshift=-0.2,]{Pianificazione}{2019-09-16}{2019-09-19} \\
\ganttbar[name= Pian2, bar height=.4, bar top shift = -.3, bar/.append style={fill=red!50}, ]{}{2019-09-16}{2019-09-19} \\
%% Sviluppo
\ganttgroup{Sviluppo}{2019-09-20}{2019-11-3} \\
\ganttbar[name= svC]{Case}{2019-09-20}{2019-09-29} \\
\ganttlinkedbar{Motore}{2019-09-30}{2019-10-20} \\
% \ganttnewline
% \ganttmilestone{Milestone}{7}
% \ganttnewline
\ganttbar{Riduttore}{2019-10-7}{2019-11-3}\\
\ganttbar{Ricezione comando}{2019-10-14}{2019-11-3}
\ganttnewline [thick, black]
\end{ganttchart}
\end{tikzpicture}
\caption{Gannt progetto corso}
\label{fig:Gannt_1}
\end{figure}
\end{document}
``
如果这也适用于ganttgroup
,那真的太棒了。
非常感谢。