It would be really nice to have in the document a real-world example of say a project that takes up a year or is multi-year so that various settings could be understood better.
The questions below are all issues I've struggled with when using this package:
How do I space things properly when such a large time is present?
How do I get \ganttmilestones to show up as the diamonds they are supposed to be?
How do I get the \ganttgroups to have the triangular ticks appropriately?
How does using expand chart=0.9\textwidth affect things like the group height or the width of things?How does one format the background color for the various labels?
Why can I not set the time slot to something like month but still be able to use the dates for groups/bars/milestones and have them display properly? (most of the examples use the integer notation, not dates)
For instance, it would be helpful to have an example similar to this below:
%------------------------------------------------------------
% settings
%------------------------------------------------------------
\ganttset{
y unit chart=0.60cm,
expand chart=0.9\textwidth,
% grids
hgrid,
vgrid={
% ...reorder for the start month
*{30}{draw=none},*{1}{dotted}, % january
*{27}{draw=none},*{1}{dotted}, % february
*{30}{draw=none},*{1}{dotted}, % march
*{29}{draw=none},*{1}{dotted}, % april
*{30}{draw=none},*{1}{dotted}, % may
*{29}{draw=none},*{1}{dotted}, % june
*{30}{draw=none},*{1}{dotted}, % july
*{30}{draw=none},*{1}{dotted}, % august
*{29}{draw=none},*{1}{dotted}, % september
*{30}{draw=none},*{1}{dotted}, % october
*{29}{draw=none},*{1}{dotted}, % november
*{30}{draw=none},*{1}{dotted} % december
},
% time settings
time slot format=big-endian,
% title settings
title height=0.90,
% group settings
group left shift=-0.1,
group right shift=0.1,
group top shift=0.2,
group height=0.6,
group peaks width=4.0,
group label font={\bfseries\scriptsize},
% bar settings
bar label font={\itshape\tiny},
% milestone settings
milestone label font={\bfseries\scriptsize},
milestone height=0.6,
% today settings
today=2021.04.27,
today label={today},
today label font={\itshape\scriptsize},
today rule/.style={dashed, line width=0.75pt}
}
%------------------------------------------------------------
% chart
%------------------------------------------------------------
\begin{ganttchart}
{2021.01.01} % start date
{2022.12.31} % end date
%--------------------------------------------------
% year title bar
\gantttitlecalendar[
title label font={\bfseries}
]
{2021.01.01} % start date
{2022.12.31} % end date
{year}
\
%--------------------------------------------------
% month title bar
\gantttitlecalendar[
title label font={\itshape\scriptsize}
]
{2021.01.01} % start date
{2022.12.31} % end date
{month=shortname}
\
%--------------------------------------------------
% group
\ganttgroup[
group/.append style={draw=black, fill=blue!50}
]
{Group 1}
{2021.01.01} % start date
{2021.03.01} % end date
\
%--------------------------------------------------
% bar
\ganttbar[
bar/.append style={draw=black, fill=blue!25}
]
{Task 1}
{2021.01.15}
{2021.02.15}
\
%--------------------------------------------------
% milestone
\ganttmilestone[
milestone/.append style={draw=black, fill=blue!25}
]
{Milestone 1}
{2021.04.15}
\
%--------------------------------------------------
% group w/ continuation
\ganttgroup[
group/.append style={draw=black, fill=green!50}
]
{Group 2}
{2021.01.01} % start date
{2021.03.01} % end date
\ganttgroup[
group/.append style={draw=black, fill=green!50}
]
{}
{2021.05.01} % start date
{2022.06.01} % end date
\
%--------------------------------------------------
% bar w/ continuation
\ganttbar[
bar/.append style={draw=black, fill=green!25}
]
{Task 2}
{2021.06.15}
{2022.02.15}
\ganttbar[
bar/.append style={draw=black, fill=green!25}
]
{}
{2022.04.15}
{2022.05.15}
\
%--------------------------------------------------
% milestone w/ continuation
\ganttmilestone[
milestone/.append style={draw=black, fill=green!25}
]
{Milestone 2}
{2022.04.15}
\ganttmilestone[
milestone/.append style={draw=black, fill=green!25}
]
{}
{2022.05.15}
\
%--------------------------------------------------
\end{ganttchart}
I am not bad at programming but the LaTeX coding of packages is still something I struggle with.
It would be really nice to have in the document a real-world example of say a project that takes up a year or is multi-year so that various settings could be understood better.
The questions below are all issues I've struggled with when using this package:
\ganttmilestone
s to show up as the diamonds they are supposed to be?\ganttgroup
s to have the triangular ticks appropriately?expand chart=0.9\textwidth
affect things like thegroup height
or the width of things? How does one format the background color for the various labels?Why can I not set the time slot to something like
month
but still be able to use the dates for groups/bars/milestones and have them display properly? (most of the examples use the integer notation, not dates)For instance, it would be helpful to have an example similar to this below:
%------------------------------------------------------------ % chart %------------------------------------------------------------ \begin{ganttchart} {2021.01.01} % start date {2022.12.31} % end date %-------------------------------------------------- % year title bar \gantttitlecalendar[ title label font={\bfseries} ] {2021.01.01} % start date {2022.12.31} % end date
{year} \ %-------------------------------------------------- % month title bar \gantttitlecalendar[ title label font={\itshape\scriptsize} ] {2021.01.01} % start date {2022.12.31} % end date
{month=shortname} \ %-------------------------------------------------- % group \ganttgroup[ group/.append style={draw=black, fill=blue!50} ] {Group 1} {2021.01.01} % start date {2021.03.01} % end date \ %-------------------------------------------------- % bar \ganttbar[ bar/.append style={draw=black, fill=blue!25} ] {Task 1} {2021.01.15} {2021.02.15} \
%-------------------------------------------------- % milestone \ganttmilestone[ milestone/.append style={draw=black, fill=blue!25} ] {Milestone 1} {2021.04.15} \ %-------------------------------------------------- % group w/ continuation \ganttgroup[ group/.append style={draw=black, fill=green!50} ] {Group 2} {2021.01.01} % start date {2021.03.01} % end date \ganttgroup[ group/.append style={draw=black, fill=green!50} ] {} {2021.05.01} % start date {2022.06.01} % end date \ %-------------------------------------------------- % bar w/ continuation \ganttbar[ bar/.append style={draw=black, fill=green!25} ] {Task 2} {2021.06.15} {2022.02.15} \ganttbar[ bar/.append style={draw=black, fill=green!25} ] {} {2022.04.15} {2022.05.15} \ %-------------------------------------------------- % milestone w/ continuation \ganttmilestone[ milestone/.append style={draw=black, fill=green!25} ] {Milestone 2} {2022.04.15} \ganttmilestone[ milestone/.append style={draw=black, fill=green!25} ] {} {2022.05.15} \ %-------------------------------------------------- \end{ganttchart}