demo/apps/zoom/server.r

library(ggvis)

shinyServer(function(input, output, session) {
  reactive({
    mtcars %>% ggvis(~disp, ~mpg) %>%
      layer_points() %>%
      scale_numeric("x", domain = input$x_domain, nice = FALSE, clamp = TRUE) %>%
      scale_numeric("y", domain = input$y_domain, nice = FALSE, clamp = TRUE)
  }) %>%
  bind_shiny("zoom")
})

Try the ggvis package in your browser

Any scripts or data that you put into this service are public.

ggvis documentation built on May 29, 2024, 1:12 a.m.