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 manually after I know the graph has loaded. But how can I automate this? I couldn't find an event like "Dygraph.loaded" or a property like "Dygraph.hasLoaded". Is there some way to easily do this?