-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
38 lines (30 loc) · 1.32 KB
/
server.R
File metadata and controls
38 lines (30 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This is the server logic for a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shinydashboard)
shinyServer(function(input, output, session) {
#===================================#
observe({
# Atualizando valores de exibicao (keySelect)
keys = c("YHOO","AAPL","MSFT","GOOG","BIDU","FB","IBM","TWTR","HPQ")
updateSelectizeInput(session, "keySelect", choices = keys, selected = keys[1], server = T)
})
#===================================#
#===================================#
observe({
# Atualizando valores de exibicao (timeSelect)
tempo = c("Todos", "5 minutos", "30 minutos", "1 Hora")
updateSelectInput(session, "timeSelect", choices = tempo)
})
#===================================#
#===================================#
observeEvent(input$dataPrevision,{
# Atualizando valores de exibicao (dataPrevision)
estado = ifelse(input$dataPrevision, "Habilitado", "Desabilitado")
lab = sprintf("Previsao de dados (%s).", estado)
updateCheckboxInput(session, "dataPrevision", label = lab)
})
#===================================#
})