# pgfgantt: Start/End between time slots

To be clear what I want to achieve I provide an easy example which points out what is not working yet.

This code:

\begin{ganttchart}[hgrid,vgrid]{1}{7}
\gantttitlelist{1,...,7}{1} \\
\ganttbar{}{1}{3.5} \\
\ganttbar{}{4.2}{5} \\
\ganttmilestone{}{6.2}
\end{ganttchart}


As you can see, each element (bar, milestone) has been aligned to a time slot. But I want these elements to start/end at exactly that place which I defined, so e.g. the first bar should end in the middle between two slots, the milestone should be at 6.2 (and not 6.0) and so on.

How can I achieve this?

The arguments must be integers, fractions are truncated.

A simple way would be to multiply everything by 10 and scale down the gantt chart accordingly.

\documentclass{article}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
hgrid,
x unit=0.05cm,
vgrid={*9{draw=none}, dotted},
milestone left shift = -3.3,
milestone right shift = 3.3
]{1}{70}
\gantttitlelist{1,...,7}{10} \\
\ganttbar{}{1}{35} \\
\ganttbar{}{42}{50} \\
\ganttmilestone{}{62}
\end{ganttchart}
\end{document}}


Result:

• That's a shame that it doesn't support fractions. Jul 29, 2021 at 20:45