dyplot: Plot a timeseries data.frame in a Dygraphs HTML plot

View source: R/plotting.R

dyplotR Documentation

Plot a timeseries data.frame in a Dygraphs HTML plot

Description

First column of the data.frame must be a datetime or date column. The rest of columns must be numeric of the same units.

Usage

dyplot(
  df,
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  group = NULL,
  legend_width = 250,
  format = TRUE,
  css_file = NULL,
  width = NULL,
  height = NULL,
  ...
)

Arguments

df

data.frame or tibble, first column of name datetime being of class datetime and rest of columns being numeric

title

character, title of the plot (accepts HTML code)

xlab

character, X axis label (accepts HTML code)

ylab

character, Y axis label (accepts HTML code)

group

character, dygraphs group to associate this plot with. The x-axis zoom level of dygraphs plots within a group is automatically synchronized.

legend_width

integer, width (in pixels) of the div which shows the legend.

format

logical, whether to format dygraph with custom CSS file

css_file

character path to a CSS file to format dygraph plot. If NULL, custom CSS is applied to dygraph. Only used when format is TRUE.

width

Width in pixels (optional, defaults to automatic sizing)

height

Height in pixels (optional, defaults to automatic sizing)

...

extra arguments to pass to dygraphs::dyOptions function. Only used when format is TRUE

Value

dygraph


mcanigueral/dutils documentation built on Jan. 25, 2024, 3:34 p.m.