Closed ignacio82 closed 9 years ago
it turns out the TauCharts API does have support for this. Gimme just a little bit and I shld have it in dev
if you devtools::install_github("hrbrmstr/taucharts@dev")
you should be able to do:
tauchart(effectiveness) %>%
tau_stacked_bar(x = "data", y = "Probability", color = "Ranking") %>%
tau_guide_y(tick_format = "%") %>%
tau_guide_gridlines(FALSE, FALSE) %>%
tau_tooltip() %>%
tau_legend()
I'd probably add auto_scale = FALSE
to tau_guide_y
so the max value is 100%, too.
@hrbrmstr looks great. Is it possible to invert the order of the ranking? That is, bottom should be on the bottom and top on the top
This works
effectiveness %>% arrange(data, Ranking) %>%tauchart() %>%
tau_stacked_bar(x = "data", y = "Probability", color = "Ranking") %>%
tau_guide_y(tick_format = "%", auto_scale = FALSE) %>%
tau_guide_gridlines(FALSE, FALSE) %>%
tau_tooltip() %>%
tau_legend()
Thanks!
Is is possible to have stacked bars? For example:
I would like to have 4 bars, each one adds to 100%
Thanks!