Commit 87b68a73 authored by Stephanie Wegscheidl's avatar Stephanie Wegscheidl

Map, timeline --> No data selecting

Scatterplot, Linechart, Barchart work with selecting data.

Next Steps: Boxplot
parent b98c9128
......@@ -34,7 +34,6 @@ server <- function(input, output, session) {
json_data_coco <- fromJSON(paste(inFile$datapath, sep = ""), flatten = TRUE)
coconut.df <<- json_data_coco[["data"]]
lastCoConUT <<- inFile$name
#print("coconut:")
......@@ -94,6 +93,7 @@ server <- function(input, output, session) {
else{touch<<-coconut.df$interaction.touch}
# setting the table style
datatable(
cbind(coconut.df),
......@@ -268,13 +268,12 @@ server <- function(input, output, session) {
status= "warning",
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("hist", height = 250))
plotOutput("bar", height = 250))
})
#BAR VIEW
output$hist <- renderPlot({
output$bar <- renderPlot({
print("BAR wird aufgerufen.")
print(coconut.df)
data<- structure(list(V1=as.numeric(coconut.df[[input$bar_y]]),
V2=as.numeric(coconut.df[[input$bar_x]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
......@@ -336,6 +335,11 @@ server <- function(input, output, session) {
})
output$texttimeline <- renderText({
"Check Timeline for getting a Timeline about CoCoQuest Tasks and Questions."
})
#linechart
output$line_box <- renderUI({
......@@ -350,6 +354,13 @@ server <- function(input, output, session) {
#TODO: linechart View
output$line <- renderPlot({
print("LINE wird aufgerufen")
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")
plot(data$V1,data$V2, type="l", ylab=input$line_y, xlab=input$line_x)
})
......@@ -365,12 +376,12 @@ server <- function(input, output, session) {
#TODO: Scatterplot View
output$scat <- renderPlot({
data<- structure(list(V1=as.numeric(coconut.df[[input$scat_y]]),
V2=as.numeric(coconut.df[[input$scat_x]])),
data<- structure(list(V1=as.numeric(coconut.df[[input$scat_x]]),
V2=as.numeric(coconut.df[[input$scat_y]])),
.Names=c("V1","V2"), row.names=c(NA,6L), class = "data.frame")
print("SCAT wird aufgerufen")
plot(data, x= data$V2, y= data$V1, type="p")
plot(data$V1, data$V2, type="p", labx=input$scat_x, laby=input$scat_y )
})
# Boxplot
......
......@@ -84,7 +84,8 @@ ui <- dashboardPage(
#TIMELINE
tabPanel("Timeline",
checkboxInput("check_time", "Timeline", FALSE),
selectInput("time_data", "data", choices=colnames(coconut.df))
textOutput("texttimeline")
#selectInput("time_data", "data", choices=colnames(coconut.df))
#uiOutput("input_time_x"),
#uiOutput("input_time_y")
),
......
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