Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on lazyeval #2319

Closed
wants to merge 5 commits into from
Closed

Drop dependency on lazyeval #2319

wants to merge 5 commits into from

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented Nov 23, 2023

A fix was inspired by the fix here https://github.com/tidyverse/ggplot2/pull/2797/files.

I fixed small docs issues + updated the link to the repo.

Edit: seealso https://github.com/rstudio/ggvis/pull/488/files

@olivroy
Copy link
Contributor Author

olivroy commented Nov 23, 2023

Can't replicate most test failures locally.

This fails in CI (both locally and on GHA), but when I try running it manually, it works fine.

test_that("doesn't break old behavior", {
  # from https://community.plot.ly/t/manual-color-bug/10479
  density1 <- density(diamonds[diamonds$cut %in% "Fair", ]$carat)
  density2 <- density(diamonds[diamonds$cut %in% "Ideal",]$carat)
  
  l <- plot_ly(x = ~density1$x, y = ~density1$y, type = 'scatter', mode = 'lines', name = 'Fair cut', fill = 'tozeroy',
          fillcolor = 'rgba(168, 216, 234, 0.5)',
          line = list(width = 0.5)) %>%
    add_trace(x = ~density2$x, y = ~density2$y, name = 'Ideal cut', fill = 'tozeroy',
              fillcolor = 'rgba(255, 212, 96, 0.5)') %>%
    plotly_build()
  
  
  expect_equal(l$x$data[[1]]$name, "Fair cut")
  expect_equal(l$x$data[[2]]$name, "Ideal cut")
})

@olivroy olivroy closed this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant