diff --git a/DESCRIPTION b/DESCRIPTION index f7d6c995c7..927a0895a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plotly Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library -Version: 2.4.0 +Version: 2.4.1 Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"), email = "cpsievert1@gmail.com"), person("Chris", "Parmer", role = c("aut", "cph"), diff --git a/NEWS b/NEWS index d49d877438..e4f561ce81 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +2.4.1 -- 2 Feb 2015 + +Attach base_url in as.widget() so it works in multiple contexts + 2.4.0 -- 1 Feb 2015 * Pass plot configuration using ... to avoid conflicts in defaults/documentation diff --git a/R/plotly.R b/R/plotly.R index abaa70cc74..ad108cf17d 100644 --- a/R/plotly.R +++ b/R/plotly.R @@ -97,8 +97,7 @@ plot_ly <- function(data = data.frame(), ..., type = "scatter", layout = NULL, url = NULL, width = width, - height = height, - base_url = get_domain() + height = height ) if (evaluate) p <- plotly_build(p) diff --git a/R/print.R b/R/print.R index ff4c507d63..5de936aefe 100644 --- a/R/print.R +++ b/R/print.R @@ -38,6 +38,7 @@ as.widget <- function(x, ...) { list(b = 40, l = 60, t = 25, r = 10), p$layout$margin %||% list() ) + p$base_url <- get_domain() # customize the JSON serializer (for htmlwidgets) attr(p, 'TOJSON_FUNC') <- to_JSON htmlwidgets::createWidget(