You must specify shape in the layer_points() call:
mtcars %>% transform(cyl = factor(cyl)) %>% ggvis(~wt, ~mpg) %>% layer_points(shape = ~cyl, fill = ~cyl) %>% group_by(cyl) %>% layer_model_predictions(model = "lm", formula=mpg~wt)
(Note that I use transform() to convert cyl to a coefficient. This means that you do not need to convert cyl to a coefficient in the call to ggvis() , and the plot key is a little neater.)

source share