I want to create a scatter plot of the movies
dataset where when the user scrolls over a point, it will display the title of the movie. Using the answer from rCharts rNVD3 tooltip customisation, I wrote the following:
movies <- data(movies)
p1 <- nPlot(length ~ votes,
group = 'mpaa',
data = movies,
type = 'scatterChart',
#the following line seems to have NO EFFECT:
tooltip = "#!function(item){ return item.title + ' ' + '('+item.year+')'}!#")
#item is not a valid input to the tooltipContent function
p1$chart(tooltipContent = "#! function(key, x, y){
return key + ' '+item.year
} !#")
p1$print("chart3")
p1
As noted in the in-line comments above, neither of these attempts to customize the tooltip is working for me.