Skip to contents

A serializable description of a Gantt chart. Build one with setup_GanttConfig() rather than calling this constructor directly.

Usage

GanttConfig(
  dat_path = NULL,
  title = NULL,
  origin = NULL,
  writer = NULL,
  legend_position = "top",
  legend_placement = "outside",
  label = "label",
  start = "start",
  end = "end",
  group = NULL,
  tooltip = NULL,
  border = NULL,
  axis_type = "value",
  zoom = TRUE,
  guides = TRUE,
  bar_height = 0.6,
  bar_radius = 0,
  border_color = "#E53935",
  border_width = 1.5,
  palette = NULL,
  xlab = NULL
)

Arguments

dat_path

Optional Character: Path to the data, read at draw time. The serializable alternative to passing data to draw().

title

Optional Character: Chart title. Declared here because it is the one property every chart type has; palette is not (four take a colormap instead), and axis labels and margins are cartesian-only.

origin

Optional Named character {"user", "default", "derived"}: Where each value came from, one entry per settable property. Absent on an authored config; written by the interface that resolved it.

writer

Optional Named character: Which interface wrote the config, as name and version. Absent on an authored config.

legend_position

Character {"top", "bottom", "left", "right", "top-left", "top-right", "bottom-left", "bottom-right"}: Legend anchor. Top/bottom anchors use horizontal rows; left/right anchors use a vertical column. Corner anchors align within the top or bottom row.

legend_placement

Character {"outside", "inside"}: Relation to the plotting area. Outside placement reserves space for the complete legend; inside placement overlays the data. Neither setting adds a missing legend.

label

Character: Column naming each task.

start

Character: Column holding each task's start.

end

Character: Column holding each task's end.

group

Optional Character: Column to color bars by.

tooltip

Optional Character: Column holding per-bar tooltip text.

border

Optional Character: Logical column; TRUE outlines the bar.

axis_type

Character {"value", "time"}: How the time axis is scaled.

zoom

Logical: Enable the zoom control.

guides

Logical: Show guide lines.

bar_height

Numeric [0, 1]: Bar height as a fraction of the row.

bar_radius

Numeric [0, Inf): Bar corner radius in pixels.

border_color

Character: Outline color for bordered bars.

border_width

Numeric [0, Inf): Outline width in pixels.

palette

Optional Character: Bar colors, overriding the theme palette for this chart. NULL uses the theme's.

xlab

Optional Character: Time axis label.

Value

GanttConfig object.

Details

The bound data is a table of tasks, one row per bar. label, start and end name its required columns; group, tooltip and border name optional ones.

Author

EDG

Examples

#> [1] "gantt"