我的问题就像label above points with rChart
*但我的标签包含中文代码,我的代码是这样的:
library(rCharts)
age <- c(1:20)
tall <- seq(0.5, 1.90, length = 20)
name <- rep(c("运营成本由一降为2","游戏进行推广","开始安全运行","无事件","this is"),4)
Encoding(name)<-'UTF-8'
df <- data.frame(age = age, tall = tall,name=name)
n1 <- nPlot(age ~ tall ,data = df, type = "scatterChart")
n1$xAxis(axisLabel = "the age")
n1$yAxis(axisLabel = "the tall", width = 50)
n1$chart(tooltipContent = "#! function(key, x, y, e ){
var d = e.series.values[e.pointIndex];
return 'x: ' + x + ' y: ' + y + ' name: ' + d.name
} !#")
n1