Is There An Dygraph Has Loaded Event?
I want to show checkboxes for every column in my dygraph. But I can't figure out when to get the names of my columns from dygraph using g.getLabels(). It works when I call it manu
Solution 1:
This is what the .ready()
method is designed to do:
g = newDygraph(div, "/path/to/data.csv");
g.ready(function() {
var labels = g.labels();
...
});
The function you pass to ready()
will be called after the chart has been drawn for the first time.
If you pass CSV data or an array to the Dygraphs constructor, it will be called synchronously. If you pass a URL, it will be called asynchronously.
Post a Comment for "Is There An Dygraph Has Loaded Event?"