0

I am using rCharts and shiny in order to plot a variety of datasets. These datasets are dynamic and may in some cases be very big (10 000+ points in some cases). In these cases displaying the plot takes a lot of time (40s+).

Is there a way to generate an rCharts plot without the animations. This should significantly reduce the creating and rendering time of the plot.

I have looked trough the documentation (ltle that there is), but haven't found a way to do it.

The only thing that i have found is https://gist.github.com/timelyportfolio/10184829

I am using Polycharts, NVD3 and HighCharts.

EDIT: For highCharts i can do p$tooltip(enabled = F) and p$chart(animation = F). But any additional help would be appreciated, especially for Polycharts and NVD3

FableBlaze
  • 1,785
  • 3
  • 16
  • 21
  • 1
    the main advantage of these chart libraries over other chart libraries is that they are interactive. If you take away the interactivity then there is not really a need for these libraries at all, since you can rebuild all of them using base plot functions or ggplot2, which would speed up your visualisations. – maRtin May 09 '15 at 23:07
  • @maRtin Interactiviti and animations are different things. For example there is a way to disable animations in Highcharts, without losing interactivity: http://api.highcharts.com/highcharts#chart.animation However i am unable to modify this property trough rShiny... – FableBlaze May 10 '15 at 00:57

1 Answers1

1

I am not a heavy user of Polycharts and Highcharts, so if you could add an example it would be helpful. For NVD3 the variable is called transitionDuration. An example of a chart without animations would be as follows:

library(rCharts)
hair_eye = as.data.frame(HairEyeColor)
p2 <- nPlot(Freq ~ Hair, group = 'Eye',
            data = subset(hair_eye, Sex == "Female"),
            type = 'multiBarChart')

p2$chart(transitionDuration=0)
p2
Jon Nagra
  • 1,538
  • 1
  • 16
  • 36
  • Basic examples can be seen at http://ramnathv.github.io/rCharts/. I am not doing anything out of the ordinary besides that. Current calls are `p <- rPlot(x ~ y, data = dataSet$data, color = "group", type = "point")` and `hPlot(x ~ y, data = dataSet$data, group = "group", type = "scatter")`. I will try the `transitionDuration` parameter later. – FableBlaze May 11 '15 at 19:53
  • I haven't been able to find/construct an example with animations with polycharts. For Highcharts you can set animation and shadow to FALSE as they do here: goo.gl/WCHDJl . If you have a clear example showing an animation for polycharts I believe you should post it, as I have not found such in the ordinary examples. – Jon Nagra May 11 '15 at 23:42
  • Yes, you seem to be correct about Polycharts. It seems that animations for Polycharts need to be custom made. Only default iteractivity seems to be the tooltips. It is interesting to note that Polycharts performs really well with larger datasets and therefore disabling the tooltips does not seem needed. – FableBlaze May 12 '15 at 11:03
  • I do not have the time to work on it in the foreseeable future. Marking this as the correct answer. – FableBlaze May 23 '15 at 13:21