Вопрос

Whenever I plot >1000 entries using rCharts and open the output in browser, only part of the datapoints are plotted. Each time I refresh the page, random datapoints (from those included in the data frame) are being shown. Is there any way to include all the entries? I am totally new to R and scripts, but guess it's a javascript issue?

data = data.frame(sample(1:10,size = 10000, replace = TRUE), rnorm(10000))
colnames(data)=c("x","y")
p1 <- rPlot("x", "y", data = data, type = 'point')
p1$save("p1.html")

rChart output uses the polychart2.standalone.js script.

Thanks for help!

Это было полезно?

Решение

My recommendation to the OP (from my comment) was to use NVD3. The code for tooltipContent is from the OP.

p1 <- nPlot("x", "y", data = data, type = 'scatterChart')
p1$chart(tooltipContent = "#! function(key, x, y, e){ 
  return 'tip: ' + e.point.interakcja 
} !#")
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top