Closed jrowen closed 9 years ago
This should fix #18. I included a new test, and the shiny example below works as expected.
shiny
library(shiny) library(metricsgraphics) ui = shinyUI( fluidPage( sidebarPanel( selectInput("x", "X", colnames(mtcars), "wt"), selectInput("y", "Y", colnames(mtcars), "mpg") ), mainPanel( metricsgraphicsOutput('mjs1') ) ) ) server = function(input, output) { output$mjs1 <- renderMetricsgraphics({ mtcars %>% mjs_plot(x=input$x, y=input$y, width=400, height=300) %>% mjs_point(color_accessor=carb, size_accessor=carb) %>% mjs_labs(x="Weight of Car", y="Miles per Gallon") }) } shinyApp(ui = ui, server = server)
This should fix #18. I included a new test, and the
shiny
example below works as expected.