ggvis - add tooltip with count to layer_bars -


suppose have following graph

library(ggvis) mtcars%>% ggvis(~factor(cyl)) %>% layer_bars() 

how can add tooltip count variable?

thanks

this trick:

library(ggvis) mtcars  %>% ggvis(~factor(cyl)) %>% layer_bars() %>%   add_tooltip(function(df) (df$stack_upr_ - df$stack_lwr_)) 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -