score:2

Accepted answer

i think i've already found the solution by using highcharts() and hc_add_series, this does allow for arranging:

pokemon <- pokemon %>% 
  group_by(type_1, type_2) %>% 
  summarise(n = n())%>%
  arrange(type_2)

# create chart
highchart() %>% 
  hc_add_series(pokemon, type = "bar", hcaes(x = type_2, group = type_1, y = n)) %>% 
  hc_xaxis(categories = pokemon$type_2)

Related Query

More Query from same tag