rstudio / ggvis

Interactive grammar of graphics for R
Other
713 stars 171 forks source link

Should be easier to show data in tooltip #227

Open wch opened 10 years ago

wch commented 10 years ago

It should be easier to a tooltip with columns that aren't used in the plot.

For example, it shouldn't take much work to display columns other than wt and mpg here:

all_values <- function(x) {
  if(is.null(x)) return(NULL)
  paste0(names(x), ": ", format(x), collapse = "<br />")
}

base <- mtcars %>% ggvis(x = ~wt, y = ~mpg) %>%
  layer_points()
dholstius commented 10 years ago

+1. Very useful in manually identifing outliers by something non-aesthetic (e.g. census tract by FIPS ID).