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) {
collapsible = TRUE,
selectInput(xplotname, "x-axis", choices=colnames(coconut.df)),
selectInput(yplotname, "y-axis", choices=colnames(coconut.df)),
print(plotname),
#print(xplotname),
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
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
#a=1
......@@ -413,6 +416,7 @@ server <- function(input, output, session) {
data<- structure(list(V1=as.numeric(coconut.df[[input$line_x]]),
V2=as.numeric(coconut.df[[input$line_y]])),
.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)
})
......@@ -553,7 +557,7 @@ server <- function(input, output, session) {
#boxplot(data$V1, type="box", xlab=input$box_x)
#m
#leafletOutput("map", height = 250)
plot()
plot(data$V1,data$V2, type="p", xlab=input$scat_x, ylab=input$scat_y )
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