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

Multiple charts barcharts work!!!!!!!

YEAHY FINALLY
parent 8916e138
...@@ -305,31 +305,34 @@ server <- function(input, output, session) { ...@@ -305,31 +305,34 @@ 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))
) )
local({
output[[plotname]] <- renderPlot({
print("hello itse mi")
print(yplotname)
data<- structure(list(V1=as.numeric(coconut.df[[input[[xplotname]]]]),
V2=as.numeric(coconut.df[[input[[yplotname]]]])),
.Names=c("V1","V2"), row.names=c(NA,10L), class = "data.frame")
#print("data")
#print(data)
#Neues Plot
barplot(data$V2,data$V1,
ylab= yplotname,
xlab=xplotname)
})
}) #Local end
}) })
#BARCHART view #BARCHART view
local({
output[[plotname]] <- renderPlot({
print("hello itse mi")
print(input$xplotname)
data<- structure(list(V1=as.numeric(coconut.df[[input$xplotname]]),
V2=as.numeric(coconut.df[[input$yplotname]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
#Neues Plot
barplot(data$V1,data$V2,
ylab= input$yplotname,
xlab=input$xplotname)
})
})
## ALTES PLOT ## ALTES PLOT
#a=1 #a=1
...@@ -413,6 +416,7 @@ server <- function(input, output, session) { ...@@ -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) { ...@@ -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()
}) })
......
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