You can use the east
anchor (ans possibly an xshift
) for the milestone
style:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
vgrid,
hgrid,
milestone/.append style={anchor=east,xshift=-1pt},
]{1}{12}
\gantttitle{Title}{12} \\
\ganttbar{Task 1}{1}{4} \\
\ganttmilestone{M 1}{12} \\
\end{ganttchart}
\end{document}
The method is not really much different from the question you refer to actually, i.e. add e.g. pattern=north east lines
to the foobar
style. The only problem is that the filling covers over the pattern, but if you set fill opacity=0.5
the pattern becomes visible through the fill.
\documentclass[a2paper, 10pt, parskip=full, listof=toc, bibliography=numbered, draft=false]{scrartcl}
\usepackage{pgfgantt}
\usetikzlibrary{shapes,arrows,patterns}
\begin{document}
\definecolor{foobarblue}{RGB}{0,153,255}
\definecolor{foobaryellow}{RGB}{234,187,0}
\newganttchartelement{foobar}{
foobar/.style={
shape=rounded rectangle,
inner sep=0pt,
draw=foobarblue!50!black,
very thick,
top color=white,
bottom color=foobarblue,
fill opacity=0.5,
pattern=north west lines
},
foobar incomplete/.style={
/pgfgantt/foobar,
draw=foobaryellow,
bottom color=foobaryellow,
pattern=north east lines
},
foobar label font=\slshape,
foobar left shift=-.1,
foobar right shift=.1
}
\begin{ganttchart}[
vgrid,
progress=today,
progress label text=\relax,
today=6
]{1}{12}
\gantttitlecalendar{day} \\[grid]
\ganttfoobar{Foobar 1}{1}{2} \\
\ganttfoobar{Foobar 2}{3}{7} \\
\ganttlinkedfoobar{Foobar 3}{9}{12}
\end{ganttchart}
\end{document}
Best Answer
If I understand your question correctly, then you can use
xscale
to adjust the aspect ratio. For example: