i have a problem with my shiny app which won't update barchart when using multiple selection. It generates only chart on specified data at the beginning. Adding update button doesn't work
ui <- fluidPage(
sidebarLayout(
checkboxGroupInput(inputId = "sele", label = "Wyznania (do wykresu slupkowego):", choiceValues = dane_3, choiceNames = nazwy_3,
selected = dane_3),
actionButton("update", "Update View")
),
mainPanel(
tabsetPanel(type = "tabs",
[..]
tabPanel("Wykres slupkowy", plotOutput("barPlot"))
)
)
server <- function(input, output) {
sele2 <- reactive({
return(as.vector(as.numeric(input$sele)))
})
output$barPlot <- renderPlot({
dane_new = as.matrix(as.numeric(dane_3[as.numeric(sele2())]))
nazwy_new = nazwy_3[as.numeric(sele2())]
rownames(dane_new) = nazwy_new
barchart(dane_new,xlab="Sredni wynik egzaminu SAT")
})
[..]
}
shinyApp(ui=ui,server = server)