library(rCharts) p2 <- nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'scatterChart') p2$xAxis(axisLabel = 'Weight') p2$chart(size = '#! function(d){return d.gear} !#') p2$chart(color = c('red', 'green', 'blue')) p2