Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Imports:
dplyr,
vctrs,
tibble,
lazyeval (>= 0.2.0),
rlang (>= 1.0.0),
crosstalk,
purrr,
Expand Down
5 changes: 0 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,6 @@ importFrom(httr,write_disk)
importFrom(jsonlite,parse_json)
importFrom(jsonlite,read_json)
importFrom(jsonlite,toJSON)
importFrom(lazyeval,all_dots)
importFrom(lazyeval,f_eval)
importFrom(lazyeval,f_new)
importFrom(lazyeval,is_formula)
importFrom(lazyeval,is_lang)
importFrom(magrittr,"%>%")
importFrom(purrr,transpose)
importFrom(rlang,"!!!")
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# plotly (development version)


* Removed the dependency on the `{lazyeval}` package.


# plotly 4.12.0
Expand Down
6 changes: 3 additions & 3 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -1161,13 +1161,13 @@ gg2list <- function(p, width = NULL, height = NULL,
mappingFormulas <- lapply(layers, function(x) {
mappings <- getAesMap(plot, x)
if (originalData) {
lapply(mappings, lazyeval::f_new)
lapply(mappings, function(x) rlang::new_formula(lhs = NULL, rhs = x))
} else {
nms <- names(mappings)
setNames(lapply(nms, function(x) lazyeval::f_new(as.name(x))), nms)
setNames(lapply(nms, function(x) rlang::new_formula(lhs = NULL, rhs = as.name(x))), nms)
}
})

return_dat <- if (originalData) layer_data else data

# translate group aesthetics to data attributes
Expand Down
1 change: 0 additions & 1 deletion R/imports.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#' @importFrom jsonlite toJSON parse_json read_json
#' @importFrom httr RETRY content config add_headers authenticate stop_for_status warn_for_status write_disk
#' @importFrom htmlwidgets createWidget sizingPolicy saveWidget onRender prependContent
#' @importFrom lazyeval f_eval is_formula all_dots is_lang f_new
#' @importFrom tibble as_tibble
#' @importFrom htmltools browsable tagList tags div
#' @importFrom purrr transpose
Expand Down
3 changes: 2 additions & 1 deletion R/plotly_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,8 @@ traceify <- function(dat, x = NULL) {


eval_attr <- function(x, data = NULL) {
if (lazyeval::is_formula(x)) lazyeval::f_eval(x, data) else x
if (rlang::is_formula(x)) rlang::eval_tidy(rlang::f_rhs(x), data = data,
env = rlang::f_env(x)) else x
}

# overwrite defaults with the user defined palette
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ verify_key_type <- function(p) {
p$x$data[[i]]$`_isSimpleKey` <- TRUE
p$x$data[[i]]$`_isNestedKey` <- FALSE
}
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !lazyeval::is_atomic(k)
p$x$data[[i]]$`_isNestedKey` <- p$x$data[[i]]$`_isNestedKey` %||% !rlang::is_atomic(k)
# key values should always be strings
if (p$x$data[[i]]$`_isNestedKey`) {
p$x$data[[i]]$key <- lapply(p$x$data[[i]]$key, function(x) I(as.character(x)))
Expand Down