A lined chart is a graph in which each activity instance is displayed with a line. The x-axis refers to the time aspect, while the y-axis refers to cases.
lined_chart(
log,
x = c("absolute", "relative"),
sort = c("auto", "start", "end", "duration"),
color = NULL,
units = c("auto", "secs", "mins", "hours", "days", "weeks"),
line_width = 2,
plotly = FALSE,
scale_color = bupaR::scale_color_discrete_bupaR,
eventlog = deprecated()
)# S3 method for eventlog
lined_chart(
log,
x = c("absolute", "relative"),
sort = c("auto", "start", "end", "duration"),
color = NULL,
units = c("auto", "secs", "mins", "hours", "days", "weeks"),
line_width = 2,
plotly = FALSE,
scale_color = bupaR::scale_color_discrete_bupaR,
eventlog = deprecated()
)
# S3 method for activitylog
lined_chart(
log,
x = c("absolute", "relative"),
sort = c("auto", "start", "end", "duration"),
color = NULL,
units = c("auto", "secs", "mins", "hours", "days", "weeks"),
line_width = 2,
plotly = FALSE,
scale_color = bupaR::scale_color_discrete_bupaR,
eventlog = deprecated()
)
# S3 method for grouped_eventlog
lined_chart(
log,
x = c("absolute", "relative"),
sort = c("auto", "start", "end", "duration"),
color = NULL,
units = c("auto", "secs", "mins", "hours", "days", "weeks"),
line_width = 2,
plotly = FALSE,
scale_color = bupaR::scale_color_discrete_bupaR,
eventlog = deprecated()
)
# S3 method for grouped_activitylog
lined_chart(
log,
x = c("absolute", "relative"),
sort = c("auto", "start", "end", "duration"),
color = NULL,
units = c("auto", "secs", "mins", "hours", "days", "weeks"),
line_width = 2,
plotly = FALSE,
scale_color = bupaR::scale_color_discrete_bupaR,
eventlog = deprecated()
)
log
: Object of class log
or derivatives (grouped_log
,
eventlog
, activitylog
, etc.).
character
(default "absolute"
): Value to plot on x-axis: "absolute"
time or "relative"
time.
character
(default "auto"
): Ordering of the cases on y-axis: "auto"
(default, see Details),
"start"
, "end"
, or "duration"
.
character
(default NULL
): Attribute to use for coloring the activity instances (dots).
This attribute should be present in log
. Default (NULL
) is the activity identifier (activity_id()
).
Use NA
for no colors.
character
(default "auto"
): Time units to use on the x-axis in case of relative time: "auto"
(default, see Details), "secs"
, "mins"
, "hours"
, "days"
, or "weeks"
.
numeric
(default 2
): The width of lines.
logical
(default FALSE
): Return a plotly
object, instead of a ggplot2
.
ggplot2
scale function (default scale_color_discrete_bupaR
):
Set color scale. Defaults to scale_color_discrete_bupaR
. Replaced with scale_color_discrete
when more than 26 activities are present.
lined_chart(eventlog)
: Create lined chart for an eventlog
.
lined_chart(activitylog)
: Create lined chart for an activitylog
.
lined_chart(grouped_eventlog)
: Create lined chart for a grouped_eventlog
.
lined_chart(grouped_activitylog)
: Create lined chart for a grouped_activitylog
.
When setting sort
to "auto"
, the ordering of cases is done automatically, based on the specified value of x
:
x = "absolute"
: sort = "start"
,
x = "relative"
: sort = "duration"
.
When setting units
to "auto"
, the time units on the x-axis is done automatically, based on the specified value of x
:
x = "absolute"
: units = "weeks"
,
x = "relative"
: units = "weeks"
.
dotted_chart()
library(processmapR)
library(eventdataR)
patients %>%
lined_chart(x = "absolute", color = "employee")
Run the code above in your browser using DataLab