time_dygraph: Function for plotting interactive time-series plots in a...

View source: R/time_dygraph.R

time_dygraphR Documentation

Function for plotting interactive time-series plots in a similar way to timePlot.

Description

Function for plotting interactive time-series plots in a similar way to timePlot.

Usage

time_dygraph(
  df,
  variable = "value",
  colour = "dodgerblue",
  range = TRUE,
  step = FALSE,
  points = FALSE,
  fill = FALSE,
  color = colour,
  ylab = NA,
  legend_width = 400,
  tz = NA,
  window = NULL,
  group = NULL,
  y_reference = NA,
  main = NULL,
  highlight = FALSE
)

Arguments

df

Data frame with a variable/column named "date".

variable

Variable in df to plot. Default is "value". variable can be a vector but faceting is not yet supported.

colour, color

Colour of plotted geometry. Default is "dodgerblue".

range

Should a range selector be plotted? Default is TRUE.

step

Should the plot take a stepped look? Default is FALSE.

points

Should the plot include points where observations are recorded? Default is FALSE.

fill

Should the plot fill between the x-axis and the geometry? Default is FALSE.

ylab

String for y-axis label.

legend_width

Width of legend in pixels. Default is 400.

tz

Timezone to display plot with. If not used, tz will use the time-zone of the df's "date" variable.

window

An optional range window. Uses a date vector with a length of two.

group

An optional grouping string for when multiple plots are to be connected when rendered in an HTML document.

y_reference

Location of a y-axis reference line.

main

The plot's title.

highlight

On mouse-over, should the time series be highlighted?

Value

Invisible, an interactive dygraph.

Author(s)

Stuart K. Grange

See Also

timePlot, dygraph, plot_time_series


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.