[pstricks] pst-gantt hack to turn it into a "timeline"?

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Oct 28 14:16:48 CET 2013


Am 28.10.2013 06:05, schrieb Hubert Lam:

> A quick question: has anyone been able to place different \PstGanttTask sequentially after one another, i.e. not on the next line? (see attached PDF)
>
> I realise doing this would not make it a Gantt Chart at all but rather a stacked horizontal column chart. However, the fact that pst-gantt properly calculates distances for dates etc is so handy for it to be turned into a time line.

\documentclass{report}
\usepackage{pst-gantt}
\makeatletter
\def\Reset{%
   \advance\pst at GanttTaskCnt by \@ne}
\makeatother
\begin{document}

  \begin{PstGanttChart}[yunit=1.5,
  ChartUnitIntervalName=KW,ChartUnitBasicIntervalName=KW,
  ChartModulo,ChartModuloValue=52,
  TaskUnitIntervalValue=14,TaskUnitType=KW,ChartStartInterval=49,
  ChartShowIntervals]{3}{8}
  \PstGanttTask[TaskInsideLabel={Task 1}]{0}{1}\Reset
  \PstGanttTask[TaskInsideLabel={Task 2}]{3}{4}
  \PstGanttTask[TaskInsideLabel={Task 3}]{2}{2}
  \PstGanttTask[TaskInsideLabel={Task 4}]{3}{5}
  \end{PstGanttChart}

\end{document}


Herbert



More information about the PSTricks mailing list