How to render trelliscope in Shiny ?

It seems that trelliscope is not able to use within shiny even though renderTrelliscope function is included. Could any of you help me to confirm this ?

Although these link seems to help:

An issue but couldnt help me

library(shiny)
install.packages("gapminder")
library(gapminder)
devtools::install_github("hafen/trelliscopejs")
library(trelliscopejs)
ui <- fluidPage(
  
  # App title ----
  titlePanel("Hello trelliscope in Shiny!"),
  
  # Sidebar layout with input and output definitions ----
  fluidPage(

    # Main panel for displaying outputs ----
    mainPanel(
      
      # Output: Histogram ----
      trelliscopeOutput("plot", width = "100%", height = "400px")
      
    )
  )
)


server <- function(input, output) {
  
  output$plot <- renderTrelliscope(
    qplot(year, lifeExp, data = gapminder) +
      xlim(1948, 2011) + ylim(10, 95) + theme_bw() +
      facet_trelliscope(~ country + continent,
                        nrow = 2, ncol = 7, width = 300, as_plotly = TRUE)
  
    )
  }

shinyApp(ui, server)

How can we render facet_trelliscope within shiny ?

1 Like

Dear Community,

I can confirm AbhishekHP's experience: I am unable to render Trelliscope within Shiny. This occurs both using my own data, but also working with Abhishek's reproducible example.

Any help would be most appreciated! Trelliscopejs is a fantastic package but it would be most helpful if anyone can confirm whether they've successfully rendered objects in Shiny.
Thanks

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.