Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当悬停在使用 ggvis 创建的折线图上时,我只看到显示的 data.frame 的第一个值,无论我将鼠标移动到哪里。
例子:
library(ggvis) mtcars %>% ggvis(~wt, ~mpg) %>% layer_lines() %>% add_tooltip(function(df) df$wt)
我现在得到 1.513 的值,不管我悬停在哪里。使用时不会出现此问题layer_points。
layer_points