diff --git a/server.R b/server.R index a6a3bff..efbb063 100644 --- a/server.R +++ b/server.R @@ -39,6 +39,10 @@ server <- function(input, output, session) { currently_selected_maptype(input$rd_maptype) }) + observeEvent(input$vergleichs_jahr, { + currently_compared_year(input$vergleichs_jahr) + }) + observe({ maptype <- currently_selected_maptype() heatmap <- currently_selected_heatmap_crime() @@ -257,7 +261,7 @@ server <- function(input, output, session) { data_tibble <- map_data_to_plot( locations = currently_compared_location(), crimes = currently_compared_crimes(), - year = "2024" + year = currently_compared_year() ) ggplot(data_tibble, aes(x = Location, y = Erfasst, group = Name, fill = Name)) +