I am using networkD3 and shiny to visualize some data. I have a diagonalNetwork created by networkD3. However, I want the tree to be displayed vertically. networkD3 doesn't seem to have an option to rotate diagonal networks.
Can I rotate a tabPanel in shiny?
I have added the code below. If possible I would like to be able to rotate the diagram specified by diagonalNetwork(). If not, can I rotate the whole tabPanel?
I notice that networkD3's forceNetwork has an onclick option, is it possible to respond to node clicks in the same way with a diagonalNetwork?
#### Load necessary packages and data ####
library(shiny)
library(networkD3)
data(MisLinks)
data(MisNodes)
hc <- hclust(dist(USArrests), "ave")
URL <- paste0(
  "https://cdn.rawgit.com/christophergandrud/networkD3/",
  "master/JSONdata//flare.json")
## Convert to list format
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
#### Server ####
server <- function(input, output) {
  output$simple <- renderDiagonalNetwork({
    diagonalNetwork(List = Flare, fontSize = 10, opacity = 0.9)
  })  
  
  output$force <- renderForceNetwork({
    forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source",
                 Target = "target", Value = "value", NodeID = "name",
                 Group = "group", opacity = input$opacity)
    
    
  })
  
  ## 
  #dendroNetwork(hc, height = 600)
 # 
#  dendroNetwork(hc, height = 500, width = 800, fontSize = 10,
#                linkColour = "#ccc", nodeColour = "#fff", nodeStroke = "steelblue",
#                textColour = "#111", textOpacity = 0.9, textRotate = NULL,
#                opacity = 0.9, margins = NULL, linkType = c("elbow", "diagonal"),
#                treeOrientation = c("horizontal", "vertical"), zoom = FALSE)
  
  
}
#### UI ####
ui <- shinyUI(fluidPage(
  titlePanel("Shiny networkD3 "),
  sidebarLayout(
    sidebarPanel(
      sliderInput("opacity", "Opacity (not for Sankey)", 0.6, min = 0.1,
                    max = 1, step = .1)
    ),
    mainPanel(
      tabsetPanel(
        tabPanel("Simple Network", diagonalNetworkOutput("simple")),
        tabPanel("Force Network", forceNetworkOutput("force"))
      )
    )
  )
))
#### Run ####
shinyApp(ui = ui, server = server) 
     
     
    