Difference between revisions of "Gantt"

From ConTeXt wiki
Jump to navigationJump to search
(redirecting to "Gantt charts")
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
< [[Modules]] | [[Graphics]] | [[Gantt charts]] | [[MetaPost]] >
+
#REDIRECT [[Gantt charts]]
 
 
This is a module for drawing Gantt diagrams via [[MetaPost]].
 
 
 
It is the recommended way of creating Gantt charts within ConTeXt.
 
 
 
[http://tlcontrib.metatex.org/cgi-bin/package.cgi/action=view/id=310 Gantt] is included as a (third party) [http://tlcontrib.metatex.org module] for ConTeXt.
 
 
 
== Examples ==
 
 
 
=== Minimal example ===
 
<texcode>
 
\usemodule[t-gantt]
 
\setuppagenumbering[location=]
 
 
 
\starttext
 
  \startgantt{7}{12}
 
    \startganttitle
 
      \numtitle{1}{1}{12}{1}
 
    \stopganttitle
 
    \ganttbar{a task}{0}{2}
 
    \ganttbarcon{a consecutive task}{2}{4}
 
    \ganttbarcon{another consecutive task}{8}{2}
 
    \ganttbar{another task}{2}{2}
 
    \ganttbar{another task}{4}{2}
 
    \ganttbar{another task}{4}{2}
 
    \ganttcon{4}{4}{4}{6}
 
  \stopgantt
 
\stoptext
 
</texcode>
 
 
 
[[Image:Gantt_example1.png|653px]]
 
 
 
 
 
=== Similar example using names of calendar months ===
 
<texcode>
 
\usemodule[t-gantt]
 
\setuppagenumbering[location=]
 
 
 
\starttext
 
  \startgantt{3}{12}
 
    \startganttitle
 
      \titleelement{Jan}{1}
 
      \titleelement{Feb}{1}
 
      \titleelement{Mar}{1}
 
      \titleelement{Apr}{1}
 
      \titleelement{May}{1}
 
      \titleelement{Jun}{1}
 
      \titleelement{Jul}{1}
 
      \titleelement{Aug}{1}
 
      \titleelement{Sep}{1}
 
      \titleelement{Oct}{1}
 
      \titleelement{Nov}{1}
 
      \titleelement{Dec}{1}
 
    \stopganttitle
 
    \ganttbar{Task 1}{0}{2}
 
    \ganttbarcon{a consecutive task}{2}{4}
 
  \stopgantt
 
\stoptext
 
</texcode>
 
 
 
[[Image:Gantt_example2.png|607px]]
 
 
 
 
 
=== Multiple titles with different length ===
 
<texcode>
 
\usemodule[t-gantt]
 
\setuppagenumbering[location=]
 
 
 
\starttext
 
  \startgantt{4}{12}
 
    \startganttitle
 
      \numtitle{2010}{1}{2012}{4}
 
    \stopganttitle
 
    \startganttitle
 
      \numtitle{1}{1}{4}{1}
 
      \numtitle{1}{1}{4}{1}
 
      \numtitle{1}{1}{4}{1}
 
    \stopganttitle
 
    \ganttbar{Task 1}{0}{2}
 
    \ganttbarcon{a consecutive task}{2}{4}
 
  \stopgantt
 
\stoptext
 
</texcode>
 
 
 
[[Image:Gantt_example3.png|607px]]
 
 
 
 
 
=== More complex example (using groups and optional arguments) ===
 
<texcode>
 
\usemodule[t-gantt]
 
\setuppapersize[landscape][landscape]
 
\setuplayout[scale=0.8]
 
\setuppagenumbering[location=]
 
 
 
\starttext
 
  \startgantt[xunitlength=0.5cm,fontsize=\tfx,titlefontsize=\tfx,drawledgerline=true]{10}{48}
 
    \startganttitle
 
      \titleelement{2009}{7}
 
      \numtitle{2010}{1}{2012}{12}
 
      \titleelement{2013}{5}
 
    \stopganttitle
 
    \startganttitle
 
      \numtitle{6}{1}{12}{1}
 
      \numtitle{1}{1}{12}{1}
 
      \numtitle{1}{1}{12}{1}
 
      \numtitle{1}{1}{12}{1}
 
      \numtitle{1}{1}{5}{1}
 
    \stopganttitle
 
    \ganttbar{task 1}{2}{17}
 
    \ganttgroup{a group of tasks}{6}{18}
 
    \ganttbar{task 2}{5}{10}
 
    \ganttbar[color=blue]{task 3}{15}{3} 
 
    \ganttbar{task 4}{20}{3} 
 
    \ganttcon{15}{4}{20}{6}
 
    \ganttbar{task 5}{15}{5}
 
    \ganttbarcon[color=red]{task 6}{20}{5}
 
    \ganttbarcon{task 7}{30}{5}
 
  \stopgantt
 
\stoptext
 
</texcode>
 
 
 
[[Image:Gantt_example4.png|838px]]
 
 
 
== See also ==
 
 
 
* [[Gantt-tikz]]
 
 
 
 
 
''The package maintainer is [http://wiki.contextgarden.net/User:M%C3%A6stro Adam Reviczky] and it is released as Public Domain.''
 
 
 
[[Category:Modules]]
 
[[Category:Graphics]]
 
[[Category:Metapost]]
 

Latest revision as of 17:31, 11 September 2011

Redirect to: