rdygraphs

dygraphs doesn't show the line for more than 10,000 datapoints


I am trying to plot a graph using dygraph function for a dataset with more than 100,000 datapoints. As soon as I try it the graph appears empty. I tried to shorten the dataset and it turns out that dygraph shows graph for dataset up to 10,000 entries only. Here is a sample with 9,999 datapoints

dygraph(ts(1:9999))

up to 9999 datapoints

as soon as I change to 10,000 it doesn't show anything

dygraph(ts(1:10000))

10000 datapoints


Solution

  • After some research I came to conclusion that this is a bug. Nevertheless I found a solution to this. If you convert your data to time series using timeSeries function, it starts working.

    For example:

    y = timeSeries(1:1000000, 1:1000000)
    dygraph(y)