Skip to content
Snippets Groups Projects
Commit 8da11e51 authored by Berinda van Dijk's avatar Berinda van Dijk
Browse files

Small improvements, bugfixes and changes

parent e5a1f2e7
Branches
No related tags found
1 merge request!10Added some tables. Removed some barplots. Splitted the column 'City' in two...
......@@ -39,7 +39,7 @@ doId <- function(input) {
bron=bron[order(bron$stroke, bron$distance),]
bron$AfstandSlag<-factor(bron$AfstandSlag, ordered=TRUE, levels=unique(bron$AfstandSlag))
#Wat als iets niet in kleurenset_afstanden valt?
kleurenset_afstanden=c('25'='red', '50'='orange', '100'='yellow', '200'='green', '400'='blue', '800'='purple', '500'='black')
kleurenset_afstanden=c('25'='red', '50'='orange', '100'='yellow', '200'='green', '400'='blue', '800'='purple', '1500'='deeppink1','500'='black')
kleurenset_strokes=c('Backstroke'='red', "Breaststroke"='orange', "Butterfly"="purple", "Freestyle"="green", "Medley"="blue")
bron=separate(bron, col = heatType, into = c("hoofdafstand", "heatType"), sep = ", ", fill='left')
......@@ -85,7 +85,7 @@ doId <- function(input) {
guides(color='none')+ scale_x_date()+scale_y_discrete(limits=rev)
tijdlijn_alles<-ggplotly(tijdlijn_alles, tooltip=c('x', 'shape'), dynamicTicks=TRUE)%>%
layout(title = list(text = paste0('Datum van alle gezwommen slagen per afstand',
'<br>', '<sup>', 'Green: last entrys','</sup>')))
'<br>', '<sup>', 'Green: pbs (Dutch: prs)','</sup>')))
appendPlotly(tijdlijn_alles)
kleurentabel_prs <- ggplot(tabel_Prs, aes(distance, stroke)) +
......@@ -117,7 +117,7 @@ doId <- function(input) {
barplot_rotatedlabels<-ggplot(tabel_Prs, aes(fill=distance, y=points, x=AfstandSlag, label=poolType, text=date))+
geom_col(position=position_dodge2(preserve='single'))+
scale_fill_manual(values=kleurenset_afstanden, limits=force)+
scale_fill_manual(values=kleurenset_afstanden, limits=force)+
theme(axis.text.x = element_text(angle = 45, hjust=1))+
labs(title = "Barplot_rotatedlabels- prs")
barplot_rotatedlabels<-ggplotly(barplot_rotatedlabels, tooltip=c('label', 'text', 'y'))%>%
......@@ -161,7 +161,7 @@ doId <- function(input) {
linetype=poolType, shape=poolType)) +
labs(title = "Points, grouped by pooltype", color='Distance & stroke') +guides(shape='none', linetype='none')+
geom_line()+geom_point()
lijnenplot_ineen=ggplotly(lijnenplot_ineen, tooltip=c('date', 'points', 'text', 'shape'))
lijnenplot_ineen=ggplotly(lijnenplot_ineen, tooltip=c('date', 'points', 'text', 'shape'), dynamicTicks=TRUE)
naam_laatstgezien=''
for (i in 1:length(lijnenplot_ineen$x$data)){
goede_naam=substring(unlist(strsplit(lijnenplot_ineen$x$data[[i]]$name, ','))[1], 2)
......@@ -194,9 +194,9 @@ doId <- function(input) {
scale_colour_manual(values=kleurenset_strokes)+
facet_wrap(vars(distance), scales = 'free_y')
lijnenplot_gesplitst=ggplotly(lijnenplot_gesplitst, tooltip=c('x', 'y')) %>%
layout(dragmode=FALSE, legend=list(orientation='h'))
layout(dragmode=FALSE, legend=list(orientation='h'), yaxis = list(hoverformat = '%M:%S'))
appendPlotly(lijnenplot_gesplitst)
}
}
return(response)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment