my original code
SubCategory=chr; Sales=dbl
ggplot(superstore) +
geom_col(mapping = aes(x = SubCategory, y = Sales, fill = SubCategory)) +
theme(axis.text.x = element_text(angle = 90))
orders the columns alphabetically graph 1
my attempt to fix it
ggplot(superstore) +
geom_col(mapping = aes(x = fct_reorder(SubCategory, -Sales),
y = Sales, fill = SubCategory)) +
theme(axis.text.x = element_text(angle = 90))
Created some new strange order that is neither value nor alphabetical.
Am I using the wrong Geom?