Open brooklynbagel opened 7 years ago
I thank the creator of this useful package for the time he put into it.
I also can confirm that I am unable to render Trelliscope in Shiny using the renderTrelliscope/outputTrelliscope binding functions as Brooklynbagel asked.
Any help or update would be most appreciated!
I recently updated the package to work more nicely with Shiny. These changes are located in the dev branch, which you can install with
remotes::install_github("hafen/trelliscopejs@dev")
Please give it a try and let me know if you have any issues.
Hi. It has been wonderful to work with Trelliscope within RStudio. Wondering if recent updates cover some of the trellis applications with Shiny? I tried the following, but could not get it to work in Shiny. But a more basic ggplot2 version rendered properly.
library(shiny)
library(trelliscopejs)
library(ggplot2)
library(gapminder)
ui <- fluidPage(
titlePanel("Facet with TrelliscopeJS"),
mainPanel(
trelliscopeOutput(outputId="trellis_facet", width = "100%", height = "400px")
)
)
server <- function(input, output) {
output$trellis_facet <- renderTrelliscope({
qplot(year, lifeExp, data = gapminder) +
theme_bw() +
facet_trelliscope(~continent)
})
}
shinyApp(ui = ui, server = server)
Basic ggplot2 version works:
library(shiny)
library(trelliscopejs)
library(ggplot2)
library(gapminder)
ui <- fluidPage(
titlePanel("Facet with Basic ggplot"),
mainPanel(
plotOutput("ggplot")
)
)
server <- function(input, output) {
output$ggplot <- renderPlot({
qplot(year, lifeExp, data = gapminder) +
theme_bw() +
facet_wrap(~continent)
})
}
shinyApp(ui = ui, server = server)
Rendering a trelliscopejs plot through Shiny does not appear to work.Running the app on both Chrome and Firefox and inspecting the webpage reveal the following errors:
and
An example shiny app is below and attached is the code.
My session info:
The code and error logs from Chrome and Firefox trelliscope-shiny.zip in this example are attached in the zip file.