Skip to content

Commit 6dae230

Browse files
Closes #1872. Implemented to_basic for geom_function
1 parent c35a44e commit 6dae230

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

R/layers2traces.R

+6
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ to_basic <- function(data, prestats_data, layout, params, p, ...) {
170170
UseMethod("to_basic")
171171
}
172172

173+
#' @export
174+
to_basic.GeomFunction <- function (data, prestats_data, layout, params, p, ...) {
175+
data$y <- params$fun(data$x)
176+
prefix_class(data, "GeomPath")
177+
}
178+
173179
#' @export
174180
to_basic.GeomCol <- function(data, prestats_data, layout, params, p, ...) {
175181
prefix_class(data, "GeomBar")

0 commit comments

Comments
 (0)