I have an IOT application in which data is streaming onto a file, which I check for any modification using
reactiveFileReader function of shiny R. Once new data arrives in the file I pull it out, process it and append (using
rbind()) to my master dataframe that remains in memory. There is no problem upto this point.
Since the data is a time series data I use the excellent dygraph for R package to plot various charts using the standard
renderDygraph in shiny. So far so good.
Now the problem starts when the data refreshes and the
renderDygraph refreshes the entire rendering of the graph resulting in a temporary freezing of the screen. The freezing of the screen is not only annoying but is not an elegant solution to a time series appending of data at the end of the time scale. We need not redraw the entire chart with tens of thousands of data points when only one or two points are added to the right side.
By the way, dygraphs supports a dynamic update to a time series where just the point is updated in the existing chart.
Here is a demo for it.
How can we implement this version of dygraph in R? Is it possible to use some custom JS plugin in dygraph that does this? This will be an important feature in case not yet in pipeline of dygraph / shiny R.
Will appreciate if developers of dygraph and shiny take note.
Many thanks in advance.