mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-17 08:40:56 +00:00
* Pass ... from dyplot.prophet to dygraph to be able to set additional parameters * Add documentation for ... in dyplot.prophet Co-authored-by: Ben Letham <bletham@gmail.com>
This commit is contained in:
parent
9320ed1fb5
commit
187bf06bf7
1 changed files with 18 additions and 18 deletions
|
|
@ -405,7 +405,7 @@ add_changepoints_to_plot <- function(m, threshold = 0.01, cp_color = "red",
|
||||||
#' @param uncertainty Optional boolean indicating if the uncertainty interval for yhat
|
#' @param uncertainty Optional boolean indicating if the uncertainty interval for yhat
|
||||||
#' should be plotted, which will only be done if x$uncertainty.samples > 0. Must be
|
#' should be plotted, which will only be done if x$uncertainty.samples > 0. Must be
|
||||||
#' present in fcst as yhat_lower and yhat_upper.
|
#' present in fcst as yhat_lower and yhat_upper.
|
||||||
#' @param ... additional arguments
|
#' @param ... additional arguments passed to dygraph::dygraph
|
||||||
#' @importFrom dplyr "%>%"
|
#' @importFrom dplyr "%>%"
|
||||||
#' @return A dygraph plot.
|
#' @return A dygraph plot.
|
||||||
#'
|
#'
|
||||||
|
|
@ -443,7 +443,7 @@ dyplot.prophet <- function(x, fcst, uncertainty=TRUE,
|
||||||
dfTS <- xts::xts(df %>% dplyr::select_(.dots=colsToKeep), order.by = df$ds)
|
dfTS <- xts::xts(df %>% dplyr::select_(.dots=colsToKeep), order.by = df$ds)
|
||||||
|
|
||||||
# base plot
|
# base plot
|
||||||
dyBase <- dygraphs::dygraph(dfTS)
|
dyBase <- dygraphs::dygraph(dfTS, ...)
|
||||||
|
|
||||||
presAnnotation <- function(dygraph, x, text) {
|
presAnnotation <- function(dygraph, x, text) {
|
||||||
dygraph %>%
|
dygraph %>%
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue