Skip to content

Gantt

gantt() over named columns of a dataframe_mojo DataFrame (#743). Each argument names a column instead of holding the values.

Gantt

Usage

from dataviz import gantt
from dataviz import save
from dataviz import Theme

def main() raises:
    # Illustrative six-week release plan with deliberately overlapping
    # product, engineering, documentation, and rollout workstreams.
    var tasks: List[String] = [
        "Discovery", "UX design", "API implementation", "UI build",
        "Integration testing", "Documentation", "Pilot rollout",
        "General availability",
    ]
    var start: List[Int] = [0, 3, 8, 10, 22, 17, 30, 39]
    var end: List[Int] = [6, 12, 25, 27, 34, 32, 38, 42]

    var c = gantt(
        tasks,
        start,
        end,
        title="Illustrative Product Release Schedule",
        x_title="Day since project start",
        y_title="Workstream",
    )
    save(c, "docs/src/examples/out_gantt.svg")

See Data shapes for shared input conventions.

Args:

  • df: The frame to read.
  • categories: The string column for this channel.
  • start: A numeric or date/datetime start column.
  • end: A numeric or date/datetime end column.
  • theme: See the list overload.
  • width: See the list overload.
  • height: See the list overload.
  • title: See the list overload.
  • subtitle: See the list overload.
  • x_title: See the list overload.
  • y_title: See the list overload.

Related

Related charts: Population Pyramid · Span Chart

Relevant API: gantt