Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth transition when subsetting? #15

Open
ignacio82 opened this issue Aug 4, 2015 · 4 comments
Open

Smooth transition when subsetting? #15

ignacio82 opened this issue Aug 4, 2015 · 4 comments

Comments

@ignacio82
Copy link

The following shiny app allows me to subset the data and then redraws a bar graph. Is it possible to have an animation where the bars change size instead of the discrete jumps that I have now?

#Fake data
effectiveness <-
  structure(
    list(
      Ranking = structure(
        c(
          5L, 4L, 3L, 2L, 1L, 5L,
          4L, 3L, 2L, 1L, 5L, 4L, 3L, 2L, 1L, 1L, 2L, 3L, 4L, 5L
        ), .Label = c("Bottom",
                      "Bellow Average", "Average", "Above Average", "Top"), class = c("ordered",
                                                                                      "factor")
      ), Probability = c(
        0.4, 0.4, 0.1, 0.08, 0.02, 0.1, 0.2,
        0.5, 0.1, 0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.01, 0.04, 0.15, 0.7,
        0.1
      ), data = c(
        "lots", "lots", "lots", "lots", "lots", "little",
        "little", "little", "little", "little", "none", "none", "none",
        "none", "none", "some", "some", "some", "some", "some"
      )
    ), row.names = c(NA,-20L), .Names = c("Ranking", "Probability", "data"), class = "data.frame"
  )
# Shiny app
server <- function(input, output) {
  output$plot <- renderTaucharts({
    effectiveness %>% filter(data == input$data) %>%
      tauchart(.) %>%
      tau_bar(x = "Ranking", y = "Probability") %>%
      tau_guide_y(tick_format = "%") %>%
      tau_tooltip()
  })

}

ui <- fluidPage(sidebarLayout(
  sidebarPanel(width = 3,
               selectInput(
                 "data", label = h4("Data available:"),
                 choices = c("none", "little", "some", "lots"),
                 selected = 1
               )),
  mainPanel(width = 9, tauchartsOutput("plot"))
))

shinyApp(ui = ui, server = server)

Thanks!

@timelyportfolio
Copy link
Collaborator

This is definitely not documented, so I looked in the code and don't see anything there to support transitions. Feel free to post an issue without the R stuff over at tauCharts.

@ignacio82
Copy link
Author

No clue how to generate a little example without R :(

@vladminsky
Copy link

Transitions and animation are going to be later. Not now.. sorry

@ignacio82
Copy link
Author

@vladminsky happy to read that they are in the road-map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants