Change tooltips using GoogleVis

Below is the code I want to get. Except that I want to add l values ​​to the tooltip. I currently have no idea how to do this.

require(googleVis) df <- data.frame(x = c(1:5), y = c(10, 20 , 30, 40, 50), l = c("A", "B", "C", "D", "E")) plot(gvisLineChart(df, xvar = "x", yvar = "y")) 
+4
source share
2 answers

I was also looking for a way to control tooltips in gvis charts. So after googling, I came across this site GoogleVis Vignette: using roles via googleVis . Therefore, this problem seems to be fixed.

It just took a while to get this working for different types of charts. Also, when compiling your data, make sure that it has columns alternating between, say, data and tooltips, data and tooltips ... so you can configure tooltips for multiple columns (this doesn't work if you just add - la cbind - a set of hint columns for your data frame).

+6
source

I could not find a way (yet) to do this in googleVis. rCharts is another package that interacts with javascript tools for interactive visualization, and there seems to be some flexibility with tips: for example, http://rcharts.io/viewer/?6644957#.Uk0xQIZDvb8

I really wanted to use this, but then I could not figure out how to get the log scale, so instead I switched with the SVGAnnotation package to provide svg.

0
source

All Articles