Skip to content

Commit ce9b7cb

Browse files
committed
break_positions() no longer contains post-transformed values
tidyverse/ggplot2#5029
1 parent 61d68d5 commit ce9b7cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/ggplotly.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,8 @@ gg2list <- function(p, width = NULL, height = NULL,
732732
isDiscrete <- identical(sc$scale_name, "position_d")
733733
isDiscreteType <- isDynamic && isDiscrete
734734

735-
ticktext <- rng[[xy]]$get_labels %()% rng[[paste0(xy, ".labels")]]
736-
tickvals <- rng[[xy]]$break_positions %()% rng[[paste0(xy, ".major")]]
735+
ticktext <- rng[[paste0(xy, ".labels")]] %||% rng[[xy]]$get_labels()
736+
tickvals <- rng[[paste0(xy, ".major")]] %||% rng[[xy]]$break_positions()
737737

738738
# https://github.com/tidyverse/ggplot2/pull/3566#issuecomment-565085809
739739
hasTickText <- !(is.na(ticktext) | is.na(tickvals))

0 commit comments

Comments
 (0)