Commit 1dc3f219 authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

Button instead of checkbox.

Selectinputs again in viewpanel not in chartboxes.

Plots more width.
Timeline height reduced.

multiple barcharts not working
parent f500043c
...@@ -272,7 +272,8 @@ server <- function(input, output, session) { ...@@ -272,7 +272,8 @@ server <- function(input, output, session) {
insertUI( insertUI(
selector= "#viewpanel", #wo will ichs hinhaben selector= "#viewpanel", #wo will ichs hinhaben
ui= box( title="Barchart", ui= box( width = 12,
title="Barchart",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
...@@ -289,20 +290,23 @@ server <- function(input, output, session) { ...@@ -289,20 +290,23 @@ server <- function(input, output, session) {
#DASHBOARD #DASHBOARD
#BAR VIEW #BAR VIEW
local({ # #local({
output[[plotname]] <- renderPlot({ #
print(plotname) #
# #
data<- structure(list(V1=as.numeric(coconut.df[[input$xplotname]]), # # output[[plotname]] <- renderPlot({
V2=as.numeric(coconut.df[[input$yplotname]])), # # print(plotname)
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame") # #
#Neues Plot # # data<- structure(list(V1=as.numeric(coconut.df[[input$xplotname]]),
barplot(data$V1,data$V2, # # V2=as.numeric(coconut.df[[input$yplotname]])),
ylab= input$yplotname, # # .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
xlab=input$xplotname) # # #Neues Plot
# # barplot(data$V1,data$V2,
}) # # ylab= input$yplotname,
}) # # xlab=input$xplotname)
# #
# # })
# #})
## ALTES PLOT ## ALTES PLOT
#a=1 #a=1
...@@ -326,11 +330,12 @@ server <- function(input, output, session) { ...@@ -326,11 +330,12 @@ server <- function(input, output, session) {
#TIMELINE #TIMELINE
output$time_box <- renderUI({ output$time_box <- renderUI({
if(input$check_time) if(input$check_time)
box( title="Timeline", box( width = 12,
title="Timeline",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
timevisOutput("time", height = 250) timevisOutput("time", height = 150)
) )
}) })
...@@ -365,12 +370,12 @@ server <- function(input, output, session) { ...@@ -365,12 +370,12 @@ server <- function(input, output, session) {
#linechart #linechart
output$line_box <- renderUI({ output$line_box <- renderUI({
if(input$check_line) if(input$check_line)
box( title="Linechart", box( width = 12,
title="Linechart",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
selectInput("line_x", "x-axis", choices=colnames(coconut.df)),
selectInput("line_y", "y-axis", choices=colnames(coconut.df)),
#add_tooltip(data_tooltip, "hover"), #add_tooltip(data_tooltip, "hover"),
plotOutput("line", height = 250)) plotOutput("line", height = 250))
}) })
...@@ -388,12 +393,12 @@ server <- function(input, output, session) { ...@@ -388,12 +393,12 @@ server <- function(input, output, session) {
# Scatterplot # Scatterplot
output$scat_box <- renderUI({ output$scat_box <- renderUI({
if(input$check_scat) if(input$check_scat)
box( title="Scatterplot", box( width = 12,
title="Scatterplot",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
selectInput("scat_x", "x-axis", choices=colnames(coconut.df)),
selectInput("scat_y", "y-axis", choices=colnames(coconut.df)),
plotOutput("scat", height = 250)) plotOutput("scat", height = 250))
}) })
...@@ -410,11 +415,12 @@ server <- function(input, output, session) { ...@@ -410,11 +415,12 @@ server <- function(input, output, session) {
# Boxplot # Boxplot
output$box_box <- renderUI({ output$box_box <- renderUI({
if(input$check_box) if(input$check_box)
box( title="Boxplot", box( width = 12,
title="Boxplot",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
selectInput("box_x", "x-axis", choices=colnames(coconut.df)),
plotOutput("box", height = 250)) plotOutput("box", height = 250))
}) })
...@@ -430,11 +436,12 @@ server <- function(input, output, session) { ...@@ -430,11 +436,12 @@ server <- function(input, output, session) {
#MAP #MAP
output$map_box <- renderUI({ output$map_box <- renderUI({
if(input$check_map) if(input$check_map)
box( title="Map", box( width = 12,
title="Map",
status= "warning", status= "warning",
solidHeader = TRUE, solidHeader = TRUE,
collapsible = TRUE, collapsible = TRUE,
selectInput("map_data", "data", choices=colnames(coconut.df)),
leafletOutput("map", height = 250)) leafletOutput("map", height = 250))
}) })
......
...@@ -82,33 +82,40 @@ ui <- dashboardPage( ...@@ -82,33 +82,40 @@ ui <- dashboardPage(
), ),
#TIMELINE #TIMELINE
tabPanel("Timeline", tabPanel("Timeline",
actionButton("check_time", "add Timeline"),
textOutput("texttimeline") textOutput("texttimeline"),
actionButton("check_time", "add Timeline")
#selectInput("time_data", "data", choices=colnames(coconut.df)) #selectInput("time_data", "data", choices=colnames(coconut.df))
#uiOutput("input_time_x"), #uiOutput("input_time_x"),
#uiOutput("input_time_y") #uiOutput("input_time_y")
), ),
#Linechart #Linechart
tabPanel("Linechart", tabPanel("Linechart",
actionButton("check_line", "add Linechart") selectInput("line_x", "x-axis", choices=colnames(coconut.df)),
selectInput("line_y", "y-axis", choices=colnames(coconut.df)),
actionButton("check_line", "add Linechart")
#uiOutput("input_line_x"), #uiOutput("input_line_x"),
#uiOutput("input_line_y") #uiOutput("input_line_y")
), ),
#Scatterplot #Scatterplot
tabPanel("Scatterplot", tabPanel("Scatterplot",
selectInput("scat_x", "x-axis", choices=colnames(coconut.df)),
selectInput("scat_y", "y-axis", choices=colnames(coconut.df)),
actionButton("check_scat", " add Scatterplot") actionButton("check_scat", " add Scatterplot")
), ),
#Boxplot #Boxplot
tabPanel("Boxplot", tabPanel("Boxplot",
selectInput("box_x", "x-axis", choices=colnames(coconut.df)),
actionButton("check_box", "add Boxplot") actionButton("check_box", "add Boxplot")
#selectInput("box_y", "y-axis", choices=colnames(coconut.df)) #selectInput("box_y", "y-axis", choices=colnames(coconut.df))
), ),
#MAP #MAP
tabPanel("Map", tabPanel("Map",
actionButton("check_map", "add Map") selectInput("map_data", "data", choices=colnames(coconut.df)),
actionButton("check_map", "add Map")
) )
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment