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

Issue when using chorddiag with collapsibleTree #25

Open
rpouillot opened this issue Sep 12, 2018 · 0 comments
Open

Issue when using chorddiag with collapsibleTree #25

rpouillot opened this issue Sep 12, 2018 · 0 comments

Comments

@rpouillot
Copy link

Hi,

Thank you for your package. I have an issue, though, while using the chorddiag and the collapsibleTree packages in the same shiny app.
Here is a minimal example. The chord Diagram will not draw, except if I comment out the line collapsibleTreeOutput("tree"). Note that the two graphs use D3.js

Could you have a look?
Thank you.
R.

library(shiny)
library(chorddiag)
library(collapsibleTree)


# Server logic
ui <-   fluidPage(
  h5("The graph should be here"),
  chorddiagOutput("chordDiagram"),
  h5("The graph should be here"),
# The chord diagram is drawn only if I comment out the following line
  collapsibleTreeOutput("tree"),
  hr()
  
)

server <- function(input, output) {
  output$chordDiagram <- renderChorddiag({  

    m <- matrix(c(11975,  5871, 8916, 2868,
                  1951, 10048, 2060, 6171,
                  8010, 16145, 8090, 8045,
                  1013,   990,  940, 6907),
                byrow = TRUE,
                nrow = 4, ncol = 4)
    groupnames <- c("black", "blonde", "brown", "red")
    row.names(m) <- groupnames
    colnames(m) <- groupnames
    chorddiag(m)
    
  })
  
  output$tree <- renderCollapsibleTree(
    collapsibleTree(warpbreaks, c("wool", "tension"))
  )
  
}


shinyApp(ui, server)

Note: I use
‘collapsibleTree’ version 0.1.7
‘shiny’ version 1.1.0
‘chorddiag’ version 0.1.2
R version 3.5.0

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

1 participant