# How to build this Gantt Chart

i want to build an easy Gantt Chart but the tikz document is way to hard for me. Can someone help me with that Ganttchart i have in my picture?

\documentclass[a4paper, 12pt,fleqn]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[fleqn]{amsmath}
\usepackage{mathptmx}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}

\end{ganttchart}
\end{document}


I have no clue to start. Can someone please help me a bit? I am a total newbie on latex....

• @cfr thanks for editing! oh man im suche a newbie... – Milo Li Dec 13 '16 at 0:27
• I suggest starting by looking at the package's documentation. That is the way to become less of a newbie. Simply copy-pasting code from others will not help you get to grips with things. Getting help when you get stuck, on the other hand, would be really helpful. – cfr Dec 13 '16 at 0:27
• @Milo Li The figure does not looks to me as a gantt chart. Instead, it looks as a time schedule for machines or processes. I vaguely remember as a graph of operations research. – djnavas Dec 13 '16 at 7:43
• @MiloLi, adding to cfr's comment: if the TikZ documentation is to extensive for you, perhaps look at the pgfgantt's documentation. To draw the Gantt Chart it's not required to know TikZ... ;) – Guilherme Zanotelli Dec 13 '16 at 7:47

If you use pgfgantt what you have to read is pgfgantt documentation which is not so intimidating like TiKZ's one. Although it's convenient to have some TiKZ notions which can be obtained taking a look at first tutorials in TiKZ documentation.

All packages documentation is on your system and, probably, you can open it with command texdoc name-of-package.

Following examples in pgfgantt documentation it's easy to obtain

which is not exactly what you want, but similar. I'm sure that after some look at pgfgantt documentation you will easily understand the code

\documentclass[a4paper, 12pt,fleqn]{article}
\usepackage{pgfgantt}

\begin{document}
\begin{figure}
\centering
\begin{ganttchart}[%
inline,
bar inline label anchor=west,
bar inline label node/.append style={anchor=west, text=white},
bar/.append style={fill=cyan!90!black,},
bar height=.8,]{0}{18}
\gantttitlelist{0,...,18}{1}\\
\ganttbar[inline=false]{M1}{0}{3}
\ganttbar{J1}{0}{3}
\ganttbar{J2}{3}{4}
\ganttbar{}{5}{18}\\
\ganttbar[inline=false]{M2}{0}{5}
\ganttbar{J2}{5}{8}
\ganttbar{J1}{8}{12}
\ganttbar{}{12}{18}
\end{ganttchart}
\caption{To demonstrate Flow shop Scheduling}
\end{figure}
\end{document}