0๐
โ
Ok for reasons unknown to me, i was using the wrong plot commands for output and render. The correct solution is:
testplot <- function(){
chartjs(mtcars, mpg, qsec, labels = row.names(mtcars)) %>%
cjsBar
}
ui <- fluidPage(
tags$body(
chartjsOutput("plot"))
)
server <- function(input, output) {
output$plot <-renderChartjs({
testplot()
})
}
shinyApp(ui = ui, server = server)
Source:stackexchange.com