2

I would like to keep all the labels of my gantt chart on the outside of the chart, but would like to add an extra note (the date) to a milestone which should be placed in the chart next to the milestone. As seen in the picture I have attached, I would like the extra note to be placed where I have drawn the blue line.

Thanks in Advance enter image description here

1
  • 2
    Welcome to TeX.SE. You've gotten an answer, but for future questions, consider giving us a minimal working example that you used to create this figure. That gives us something to start from.
    – Teepeemm
    Commented Mar 30, 2021 at 13:21

1 Answer 1

3

There is the inline keyword provided as an optional argument to \ganttmilestone which does exactly what you need. Here is a short standalone example that demonstrates how to modify the label position + rendering style. See pgfgantt.pdf (p.26) for all the details and more examples.

pgfgantt example chart with two milestones with inline labels in the same row

\documentclass{ar}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
    vgrid={*{2}{gray!10}, {gray!50}},
    time slot format=isodate,
    time slot unit=month,
    milestone inline label node/.append style={left=2ex,fill=white,fill opacity=.75,text opacity=1},
    flip/.style={milestone inline label node/.append style={right=2ex}},
    milestone/.append style={draw=none,fill=blue},
    milestone label font=\normalfont,
    ]{2020-01-01}{2021-12-31}

  \gantttitlecalendar{year} \\
  \ganttmilestone[inline,flip]{label on the right}{2020-05-15}
  \ganttmilestone[inline]{label on the left}{2021-10-31}
\end{ganttchart}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .