在甘特圖和目前「週期」上顯示非標準週

在甘特圖和目前「週期」上顯示非標準週

我的工作週從週六到週五晚上,我們根據週期+週數安排一切。每個週期剛好有 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}

相關內容