In Plotly.js you can retrieve the data from the element after plotting.
Is there a way to do the same thing with a Dygraphs plot?
Plotly.newPlot('id_of_the_div', data, layout);
...
var dataRetrievedLater = 'id_of_the_div'.data;
If you create the graph with
var g = new Dygraph(....)
The data is available through
g.rawData_