Commit 1ecfa95e authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl
Browse files

Multiple charts barcharts work!!!!!!!

YEAHY FINALLY
parent 8916e138
Loading
Loading
Loading
Loading
+23 −19
Original line number Original line Diff line number Diff line
@@ -305,32 +305,35 @@ server <- function(input, output, session) {
                collapsible = TRUE,
                collapsible = TRUE,
                 selectInput(xplotname, "x-axis", choices=colnames(coconut.df)),
                 selectInput(xplotname, "x-axis", choices=colnames(coconut.df)),
                 selectInput(yplotname, "y-axis", choices=colnames(coconut.df)),
                 selectInput(yplotname, "y-axis", choices=colnames(coconut.df)),
                print(plotname),
                #print(xplotname),
                plotOutput(plotname, height = 250))
                plotOutput(plotname, height = 250))
    )
  })
  
   
  #BARCHART view
      
      
    )
    local({ 
    local({ 
      
      
      output[[plotname]] <- renderPlot({
      output[[plotname]] <- renderPlot({
        print("hello itse mi")
        print("hello itse mi")
    print(input$xplotname)
        print(yplotname)
    
        
        
    data<- structure(list(V1=as.numeric(coconut.df[[input$xplotname]]),
        data<- structure(list(V1=as.numeric(coconut.df[[input[[xplotname]]]]),
                          V2=as.numeric(coconut.df[[input$yplotname]])),
                              V2=as.numeric(coconut.df[[input[[yplotname]]]])),
                     .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
                         .Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame")
        #print("data")
        #print(data)
        #Neues Plot
        #Neues Plot
    barplot(data$V1,data$V2,
        barplot(data$V2,data$V1,
            ylab= input$yplotname,
                ylab= yplotname,
            xlab=input$xplotname)
                xlab=xplotname)
        
        
      })
      })
    }) #Local end
  })
  })
  
  
   
  #BARCHART view
  
  
  
  ## ALTES PLOT
  ## ALTES PLOT
  #a=1
  #a=1
  
  
@@ -413,6 +416,7 @@ server <- function(input, output, session) {
    data<- structure(list(V1=as.numeric(coconut.df[[input$line_x]]), 
    data<- structure(list(V1=as.numeric(coconut.df[[input$line_x]]), 
                          V2=as.numeric(coconut.df[[input$line_y]])),
                          V2=as.numeric(coconut.df[[input$line_y]])),
                     .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
                     .Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
    print(data)
    plot(data$V1,data$V2, type="l", ylab=input$line_y, xlab=input$line_x)
    plot(data$V1,data$V2, type="l", ylab=input$line_y, xlab=input$line_x)
    
    
  })
  })
@@ -553,7 +557,7 @@ server <- function(input, output, session) {
      #boxplot(data$V1, type="box", xlab=input$box_x)
      #boxplot(data$V1, type="box", xlab=input$box_x)
      #m
      #m
      #leafletOutput("map", height = 250)
      #leafletOutput("map", height = 250)
      plot()     
      plot(data$V1,data$V2, type="p", xlab=input$scat_x, ylab=input$scat_y )     
      dev.off()
      dev.off()
    })
    })