Closed melwazir closed 3 years ago
Hi! Love the website and thanks for the amazing charts. I just used the stacked grouped circular barplot (https://www.r-graph-gallery.com/299-circular-stacked-barplot.html), and needed to order the bars like you did in the regular one (https://www.r-graph-gallery.com/297-circular-barplot-with-groups.html), so after some tinkering I got it to work by replacing this line: data <- data %>% arrange(group, individual)
data <- data %>% arrange(group, individual)
with this line:
data <-data %>% group_by(group, individual) %>% mutate(sumValue=sum(value, na.rm = T)) %>% arrange(group, sumValue, individual) %>% ungroup()
Just thought I'd share back if you'd like to add it as an optional feature.
Thanks again for your work!
This repo is about the D3 graph gallery! :) but thanks
Hi! Love the website and thanks for the amazing charts. I just used the stacked grouped circular barplot (https://www.r-graph-gallery.com/299-circular-stacked-barplot.html), and needed to order the bars like you did in the regular one (https://www.r-graph-gallery.com/297-circular-barplot-with-groups.html), so after some tinkering I got it to work by replacing this line:
data <- data %>% arrange(group, individual)
with this line:
data <-data %>% group_by(group, individual) %>% mutate(sumValue=sum(value, na.rm = T)) %>% arrange(group, sumValue, individual) %>% ungroup()
Just thought I'd share back if you'd like to add it as an optional feature.
Thanks again for your work!