I am wondering if somebody has been able to get a dynamic ggvis plot to work with a knitr document. I am getting the following warning when I produce my plot and the interactive tool tip does not work after using knitr
.
Warning: Can't output dynamic/interactive ggvis plots in a knitr document. Generating a static (non-dynamic, non-interactive) version of the plot.
df %>%
ungroup() %>%
ggvis(~Week,~Rank, stroke = ~Team) %>%
layer_points(size := 40, size.hover := 200, fill = ~Team, key:=~id) %>%
layer_lines(stroke.hover = ~Team, strokeWidth.hover := 8, strokeWidth := 1) %>%
add_axis("x", title="Week", subdivide = 0, values = seq(1, 17, by = 1), format="####") %>%
add_axis("y", title="Rank", subdivide = 0, values = seq(1, 10, by = 1), format='####') %>%
scale_numeric("y", reverse=TRUE) %>%
add_tooltip(all_values, "hover")
Everything works after I knit the .Rmd
file except for add_tooltip()