addEventLines | R Documentation |
add lines to dygrap plot representing begin and end of events
addEventLines( dygraph, events, labels = seq_len(nrow(events)), color = "red", labelLoc = "top", color.begin = color, color.end = color, labelLoc.begin = labelLoc, labelLoc.end = labelLoc, signalWidth = kwb.event::hsSigWidth(events) )
dygraph |
dygraph object as returned by dygraph |
events |
data frame with columns tBeg (begin time) and tEnd (end time) of events to be drawn |
labels |
labels given to the events (default: |
color |
color (default: "red") |
labelLoc |
"top" or "bottom" (default: "top") |
color.begin |
default: same as argument "color" |
color.end |
default: same as argument "color" |
labelLoc.begin |
default: same as argument "labelLoc" |
labelLoc.end |
default: same as argument "labelLoc" |
signalWidth |
signal width in seconds = length of time interval that one timestamp in the original data represents, e.g. 300 for 5-minutes-data. |
modified dygraph object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.