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

ggiraph 0.8.2 not working with ggplot2 3.4.0 #239

Closed
neuwirthe opened this issue Nov 6, 2022 · 8 comments
Closed

ggiraph 0.8.2 not working with ggplot2 3.4.0 #239

neuwirthe opened this issue Nov 6, 2022 · 8 comments

Comments

@neuwirthe
Copy link

I installed the latest versions

suppressPackageStartupMessages({
  library(tidyverse)
  library(ggiraph)
})
packageVersion("ggplot2")
packageVersion("ggiraph")

with results

[1] ‘3.4.0’
[1] ‘0.8.2’

Then I tried a simple chart

demo_df <-
  tibble(x=rep(seq(0,1,by=0.1),2),
         p=rep(c(1,2),each=11),
         y=x^p)

demo_df |>
  ggplot(aes(x=x,y=y,color=factor(p))) +
  geom_line()

which works, but trying geom_line_interactive breaks

demo_df |>
  ggplot(aes(x=x,y=y,color=factor(p))) +
  geom_line_interactive()

breaks with

Error:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `[.data.frame`:
! undefined columns selected
Backtrace:
  1. base (local) `<fn>`(x)
  2. ggplot2:::print.ggplot(x)
  4. ggplot2:::ggplot_gtable.ggplot_built(data)
  5. ggplot2:::by_layer(...)
 12. ggplot2 (local) f(l = layers[[i]], d = data[[i]])
     ...
 26. ggplot2 (local) FUN(X[[i]], ...)
 27. ggplot2 (local) apply_fun(cur_data)
 28. ggiraph (local) fun(x, ...)
 33. base::`[.data.frame`(df, , c("alpha", "colour", "size", "linetype"))
 34. base::stop("undefined columns selected")
 Error in (function (mapping = NULL, data = NULL, stat = "identity", position = "identity", : 

I tried reverting to ggplot2 3.3.6, but the code still breaks.
Do I need to revert some other packages?

How can I make things work again?

@neuwirthe
Copy link
Author

Temporarily solved.
ggplot2 3.3.6 and ggiraph 0.8.3 work together.

@davidgohel
Copy link
Owner

Thank you

We need to do a migration. We are working on it here: https://github.com/davidgohel/ggiraph/tree/ggplot

@mbedward
Copy link

mbedward commented Nov 9, 2022

I've just been advised by CRAN that my package packcircles is now failing a check when building a vignette that uses ggiraph, and I guess it's this same issue. Is it possible to say whether it will be resolved in the next couple of weeks? That's the deadline I've been given by CRAN and I'd prefer not to remove the nice example that uses ggiraph.

@davidgohel
Copy link
Owner

we are working on it :) We certainly don't want the package to be archived.

duplicate of #235

@mbedward
Copy link

mbedward commented Nov 9, 2022

Many thanks!

@davidgohel
Copy link
Owner

@mbedward ggiraph 0.8.4 is now on CRAN, your package should be safe now :)

@mbedward
Copy link

Excellent! Thanks so much for that.

@raymondnicholas4

This comment was marked as duplicate.

Repository owner locked as resolved and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants