Produces plot with one vertical bar from the specified start variable's value to the end variable's value. Common uses would be to visualize time-to-completion for issues gotten by (get_issues and parse_issues) or milestones. Bars are colored by duration with longer bars as a darker shade of blue, and start/completion is denoted by points at the ends of the bars.

viz_gantt(data, start = "created_at", end = "closed_at", str_wrap_width = 30)

Arguments

data

Dataset, such as those representing issues or milestones (i.e. parse_issues() or parse_milestones()). Must have unique title variable and variables to specify for start and end

start

Unquoted variable name denoting issue start date

end

Unquoted variable name denoting issue end date

str_wrap_width

Number of characters before text of issue title begins to wrap

Value

ggplot object

Details

By default, the start date is the issue's created_at date, and the end date is the issue's closed_at date. However, either of these can be altered via the start and end parameters since these dates might not be reflective of the true timeframe (e.g. if issues are posted well in advance of work beginning.)

Unfinished tasks (where the value of the end variable is NA) are colored grey and do not have dots on their bars. Unstarted tasks are dropped because user intent is ambiguous in that case.

See also

viz_linked

Examples

if (FALSE) { issues <- get_issues(myrepo, state = "closed") issues_df <- parse_issues(issues) viz_gantt(issues_df) }