plotly / plotly.R

An interactive graphing library for R
https://plotly-r.com
Other
2.57k stars 628 forks source link

geom_GeomCircle() with plotly #1522

Closed bookerbn closed 5 years ago

bookerbn commented 5 years ago

Hi,

I am trying to convert a ggraph object to plotly object to incoorporate it into a shiny web application but I get a warning message:

"In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) : geom_GeomCircle() has yet to be implemented in plotly. If you'd like to see this geom implemented, Please open an issue with your example code at https://github.com/ropensci/plotly/issues."

Is there any way around this?

Attached is the code

circle <- read.csv("circlePacking.csv")
edges <- data.frame(circle$from, circle$to, circle$OI.Primary, circle$OI.Secondary)
mygraph <- graph_from_data_frame(edges)

a <- ggraph(mygraph, layout = 'circlepack') + 
  geom_node_circle(aes(fill=depth))+ 
  theme_void()

a
library(plotly)
b <- ggplotly(a)
b
cpsievert commented 5 years ago

Duplicate of #566