Search code examples
javascriptplotdygraphsplotly.js

Is there a way to get the data from Dygraphs like plot.data in Plotly.js?


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;

Solution

  • If you create the graph with

    var g = new Dygraph(....)

    The data is available through

    g.rawData_