# pgfgantt: How to adjust \gantttitle width same as chart width?

Consider the following Minimum Working Example (MWE):

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfgantt}

\begin{document}
\begin{ganttchart}[time slot format=isodate]{2019-01-01}{2019-02-15}
\gantttitle{TITLE}{30} \\
\gantttitlecalendar{year, month=name}\\
\end{ganttchart}
\end{document}


Screenshot of the result:

The question:

How can I automatically adjust the width of the \gantttitle to the same width as the chart itself? Messing around with absolute (incremental) values like 30 does not seem to make a big sense - I guess there is some better solution available?

You can define a command that returns the range, and use it.

\documentclass{standalone}
\usepackage{pgfgantt}
\makeatletter
\def\ganttrange{\the\numexpr1+\the\gtt@endjulian-\the\gtt@startjulian\relax}
\makeatother
\begin{document}
\begin{ganttchart}[time slot format=isodate]{2019-01-01}{2019-02-15}
\gantttitle{TITLE}{\ganttrange} \\
\gantttitlecalendar{year, month=name}\\
\end{ganttchart}
\end{document}