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.
Usage
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 class '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 class '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 class '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 class '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()
)Arguments
- log
log: Object of classlogor derivatives (grouped_log,eventlog,activitylog, etc.).- x
character(default"absolute"): Value to plot on x-axis:"absolute"time or"relative"time.- sort
character(default"auto"): Ordering of the cases on y-axis:"auto"(default, see Details),"start","end", or"duration".- color
character(defaultNULL): Attribute to use for coloring the activity instances (dots). This attribute should be present inlog. Default (NULL) is the activity identifier (activity_id()). UseNAfor no colors.- units
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".- line_width
numeric(default2): The width of lines.- plotly
logical(defaultFALSE): Return aplotlyobject, instead of aggplot2.- scale_color
ggplot2scale function (defaultscale_color_discrete_bupaR): Set color scale. Defaults toscale_color_discrete_bupaR. Replaced withscale_color_discretewhen more than 26 activities are present.- eventlog
Details
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".
Methods (by class)
lined_chart(eventlog): Create lined chart for aneventlog.lined_chart(activitylog): Create lined chart for anactivitylog.lined_chart(grouped_eventlog): Create lined chart for agrouped_eventlog.lined_chart(grouped_activitylog): Create lined chart for agrouped_activitylog.
Examples
library(processmapR)
library(eventdataR)
patients %>%
lined_chart(x = "absolute", color = "employee")
