ganttChart: Gantt Chart

View source: R/ganttChart.R

ganttChartR Documentation

Gantt Chart

Description

A flexible Gantt Chart.

Usage

ganttChart(
  df,
  task_order = TRUE,
  mstone_add = task_order,
  mstone_spacing = 1,
  mstone_lwd = 2,
  axes = TRUE,
  mstone_font = 2,
  lighten_done = 0
)

Arguments

df

a data.frame (see details).

task_order

a logical. Should the tasks be ordered? See below for more details.

mstone_add

Should milestones be added?

mstone_spacing

spacing between milestones (expressed as figure unit).

mstone_lwd

lines width for the milestone.

axes

a logical. Should the axes be added?

mstone_font

font of milestone (ignore of axes is FALSE).

lighten_done

percentage use to lighten done task (see lighten()). Default set to 0, so the completed task of a given milestone have the same color as the pending ones.

Details

Argument df should be a data frame with the following columns (in any order):

  • milestone: milestones names,

  • due: due date (will be converted into a date with as.Date()),

  • start: start date (will be converted into a date with as.Date()),

  • task: tasks names. It might as well include any of the following optional columns:

  • done: vector of logicals indicating whether the task if completed

  • col: to custom the color of the tasks.

Author(s)

David Beauchesne, Kevin Cazelles

References

https://insileco.github.io/2017/09/20/gantt-charts-in-r/

Examples

ff <- ganttChart(dfGantt,
  mstone_lwd = 3, mstone_spacing = 0.6,
  lighten_done = 80
)


inSileco/graphicsutils documentation built on Sept. 12, 2022, 11:13 p.m.