Pretty straightforward:
This does not work
iris %>%
ggvis(x= ~Sepal.Length, y = ~Sepal.Width, fill=~Sepal.Length) %>%
layer_bars()
This it does
iris %>%
ggvis(x= ~Sepal.Length, y = ~Sepal.Width, fill=~Sepal.Length) %>%
layer_points()
Why?
I actually managed to use the fill aesthetic with another dataset that I am not sharing, but that's just to point out that the fill should definitely work in my replicable example, right?
From ?layer_bars
If grouping var is continuous, you need to manually specify grouping
iris %>%
group_by(Sepal.Length) %>%
ggvis(x= ~Sepal.Length, y = ~Sepal.Width, fill = ~Sepal.Length) %>%
layer_bars()
Which gives: