First column of the df tibble must be a datetime or date variable.
The rest of columns must be numeric of the same units. This functions makes
use of dygraphs package to generate an HTML dygraphs plot.
plot_ts(
df,
title = NULL,
xlab = NULL,
ylab = NULL,
legend_show = "auto",
legend_width = 250,
group = NULL,
width = NULL,
height = NULL,
...
)dygraph
data.frame or tibble, first column of name datetime being of class datetime and rest of columns being numeric
character, title of the plot (accepts HTML code)
character, X axis label (accepts HTML code)
character, Y axis label (accepts HTML code)
character, when to display the legend. Specify "always" to always show the legend. Specify "onmouseover" to only display it when a user mouses over the chart. Specify "follow" to have the legend show as overlay to the chart which follows the mouse. The default behavior is "auto", which results in "always" when more than one series is plotted and "onmouseover" when only a single series is plotted.
integer, width (in pixels) of the div which shows the legend.
character, dygraphs group to associate this plot with. The x-axis zoom level of dygraphs plots within a group is automatically synchronized.
Width in pixels (optional, defaults to automatic sizing)
Height in pixels (optional, defaults to automatic sizing)
extra arguments to pass to dygraphs::dyOptions function.
plot_ts(dtf, ylab = "kW", legend_show = "onmouseover")
Run the code above in your browser using DataLab