在甘特图和当前“周期”上显示非标准周

在甘特图和当前“周期”上显示非标准周

我的工作周从周六到周五晚上,我们根据周期 + 周数安排一切。每个周期正好有 4 周(去年我们有一个闰周来修复滑动...)。第 2 个周期的第 4 周结束于 2016 年 2 月 26 日。

我正在尝试创建一个甘特图来显示项目的这些细节,通常发生在一整个星期内(从周六到周五,但有 30% 跨越数周,并在一周的中间结束/开始。鉴于它们比较不规律的性质,这些对于我的计划来说尤其重要。

我还想让周六和周日显示为绿色,周五显示为红色。样式还不错,但没有什么对齐,而且每个月重新对齐会很麻烦,我需要为即将到来的月份更新它。我还将这个工作示例保存到: https://www.overleaf.com/read/cfcjfvcxxcqn

\documentclass[12pt,letterpaper]{article}
\usepackage[a4paper,landscape,margin=3cm]{geometry}
\usepackage{pgfkeys,pgfcalendar}
\usepackage{pgfgantt}
\usepackage{advdate}
\usepackage{scrdate}
\usepackage{datenumber}

\begin{document}

\begin{ganttchart}[
    time slot format=isodate,
    hgrid=true,
    vgrid={ {*{3}{blue, dashed}},  *2{red}, *1{green}, *{5}{blue, dashed}},
    today={\the\year-\the\month-\the\day}
    ]{2016-01-26}{2016-02-26}
 \gantttitlecalendar{month=name} \\

\gantttitle{C.3}{3}
\gantttitle{C.4}{26}\\
%
\gantttitle{W 1}{6} 
\gantttitle{W 2}{7} 
\gantttitle{W 3}{7} 
\gantttitle{W 4}{7} \\
%

\ganttbar{Item 1}{2016-01-30}{2016-02-05} \\
\ganttbar{Item 2}{2016-01-30}{2016-02-05} 
\ganttnewline[thick, blue]
\ganttbar{Item 3}{2016-02-06}{2016-02-12} \\
\ganttbar{Item 4}{2016-02-06}{2016-02-12} 
\ganttnewline[thick, blue]
\ganttbar{Item 5}{2016-02-13}{2016-02-19} \\
\ganttbar{Item 6}{2016-02-13}{2016-02-19}
\ganttnewline[thick, blue]
\ganttbar{Item 7}{2016-02-20}{2016-02-26}\\
\ganttbar{Item 8}{2016-02-20}{2016-02-26}

\end{ganttchart}
\end{document}

相关内容