From b651e7127626c3c7516f06a7dc8ca71f072a207a Mon Sep 17 00:00:00 2001 From: Millicool Date: Wed, 21 Jan 2026 19:06:33 +0100 Subject: [PATCH] Sort top 3 x axis by value instead of name --- server.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.R b/server.R index 036bbeb..1dd6c48 100644 --- a/server.R +++ b/server.R @@ -223,7 +223,7 @@ server <- function(input, output, session) { year = "2024" ) req(nrow(data_tibble) > 0) - ggplot(data_tibble, aes(x = Name, y = Erfasst, fill = Name)) + + ggplot(data_tibble, aes(x = reorder(Name, -Erfasst), y = Erfasst, fill = Name)) + geom_col(width = 0.7) + scale_x_discrete( labels = function(x) str_wrap(x, width = 15)) +