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

conflict of networkD3 and d3treeR on shiny #261

Closed
dingying85 opened this issue Jul 13, 2019 · 1 comment
Closed

conflict of networkD3 and d3treeR on shiny #261

dingying85 opened this issue Jul 13, 2019 · 1 comment

Comments

@dingying85
Copy link

Dear developer,

I found when a conflict between the networkD3 and d3treeR, below is a reproducible example:
library(shiny)
library(plotly)
library(networkD3)
library(treemap)
library(d3treeR)
ui <- fluidPage(
plotlyOutput("p"),
forceNetworkOutput("o"),
d3treeOutput("a")
)

server <- function(input, output, session) {

output$p <- renderPlotly({
ds <- data.frame(labels = c("A", "B", "C"), values = c(10, 40, 60))
plot_ly(ds, labels = ~labels, values = ~values) %>%
add_pie() %>%
layout(title = "Basic Pie Chart using Plotly")
})

output$o <- renderForceNetwork({
forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source",
Target = "target", Value = "value", NodeID = "name",
Group = "group", opacity = 0.4, zoom = TRUE)

})

output$a <- renderD3tree({
data(GNI2014)

tm <- treemap(
GNI2014,
index=c("continent", "iso3"),
vSize="population",
vColor="GNI",
type="value"
)

d3tree( tm,rootname = "World" )
})

}

shinyApp(ui, server)

@cjyetman
Copy link
Collaborator

see #162

in short d3treeR uses v3 of D3 while networkD3 uses v4 and they are not compatible in many ways

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

No branches or pull requests

2 participants