1. require(rCharts)
  2. n1 <- nPlot(mpg ~ wt, data = mtcars, type = 'scatterChart', group = 'gear')
  3. n1$chart(tooltipContent= "#! function(key, x, y, e){
  4. return '<b>Disp:</b> ' + e.point.disp + '<br/>' +
  5. '<b>Cyl: </b>' + e.point.cyl
  6. } !#")
  7. n1