This function plots an interactive time series using dygraph
package.
1 2 3 4 |
df |
A dataframe containing variables to plot in a wide format. |
x |
Name of the variable to plot as x axis. Default is "date". Note that
the this does not have to be a |
vars |
The name of variables to plot. If not supplied, all the numeric variables will be plotted. |
normalise |
Should the data be normalised. This is suitable for plotting
variables of different scales. Default is |
dy.label |
This specify the column containing additional info to add the
dygraph. Default is |
tz |
Time zone of the time series data. |
draw.points |
Draw points in the series? The default is |
point.size |
Default value is 2, which is generally appropriate. A value of 0.5 is very subtle. |
line.width |
Default value is 0.5. |
connect.points |
Force the line to be drawn between points with gap.
Default is |
dy.group |
This specifies the group of the dygraphs. If multiple dygraphs are plotted and you want zooming in one of the graphs to be synced with other graphs, then set all the dygraphs to the same group. |
ylab |
Name of y axis. |
ylim |
Set the vertical range of the graph to c(low, high). See |
... |
other arguements passed to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.